#VRML V2.0 utf8


Group {
children [
	DEF TOUCH TouchSensor {
	},
        DEF  TOGGLE Script {
         eventIn SFTime toggle
         eventOut SFInt32 which 
         field SFInt32 thisVal 0                                
            behavior "
               function toggle() {    
                  if (thisVal >= 7 ) 
                      thisVal = 0;                                   
                  else 
                      thisVal = thisVal+1;
               which = thisVal; 
           }"
        },
         DEF SWITCH Switch {
            whichChild 0
              choices [
                 Inline { url "object01.wrl" },
                 Inline { url "object02.wrl" },
                 Inline { url "object03.wrl" },
                 Inline { url "object04.wrl" },
                 Inline { url "object05.wrl" },
                 Inline { url "object06.wrl" },
                 Inline { url "object07.wrl" },
                 Inline { url "object08.wrl" }
                                         ]
          }
]
	ROUTE TOUCH.touchTime TO TOGGLE.toggle
	ROUTE TOGGLE.which TO SWITCH.which
}