#X3D V3.0 utf8 PROFILE Interactive # [meta] reference: http://www.hypermultimedia.com/x3d/URLTests/USEInlineURLField.x3dv # example is expected to replace the texture when the loaded scene is clicked NavigationInfo { headlight FALSE type [ "EXAMINE" "FLY" "ANY" ] } Background { skyColor [ 0 0 0 ] } DEF FRONT Viewpoint { description "FRONT" orientation 0 1 0 0 position 0 0 10 } DEF MainSceneNode Transform { scale 3 3 3 children [ DEF NextSensor TouchSensor { } Shape { geometry Box { size 1 1 1 } appearance Appearance { material Material { diffuseColor 0 0 0 emissiveColor .5 .5 .5 } texture DEF BoxImageTexture ImageTexture { url [ "256x256gray.jpg" "http://www.hypermultimedia.com/x3d/URLTests/256x256gray.jpg" ] } } } ] } DEF LoadNewTextureURL Script { directOutput TRUE inputOnly SFBool znext initializeOnly SFNode TargetNode USE BoxImageTexture initializeOnly MFString nexturl [ "256x256.jpg" "http://www.hypermultimedia.com/x3d/URLTests/256x256.jpg" ] url [ "USEURLFieldChange.js" "http://www.hypermultimedia.com/x3d/URLTests/USEURLFieldChange.js" ] } ROUTE NextSensor.isActive TO LoadNewTextureURL.znext