#X3D V3.0 utf8 PROFILE Immersive # [meta] reference: USESoundURLField.x3dv # example is expected to replace the sound when the loaded scene is clicked NavigationInfo { headlight FALSE type [ "EXAMINE" "FLY" "ANY" ] } Background { skyColor [ 0 0 0 ] } DEF FRONT Viewpoint { description "FRONT" jump TRUE 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 } } } ]} DEF MainSoundNode Sound { intensity 1 spatialize TRUE direction 0 0 1 location 1 0 0 priority 1 minBack 40 minFront 40 maxBack 260 maxFront 260 source DEF MainSoundClip AudioClip { url [ "astation1a.wav" "http://www.hypermultimedia.com/x3d/URLTests/astation1a.wav" "astation1a.mp3" "http://www.hypermultimedia.com/x3d/URLTests/astation1a.mp3" ] pitch 1 loop TRUE startTime 0 stopTime 0 } } DEF LoadNewSound Script { directOutput TRUE inputOnly SFBool znext initializeOnly SFNode TargetNode USE MainSoundClip initializeOnly MFString nexturl [ "astation1b.wav" "http://www.hypermultimedia.com/x3d/URLTests/astation1b.wav" "astation1b.mp3" "http://www.hypermultimedia.com/x3d/URLTests/astation1b.mp3" ] url [ "USEURLFieldChange.js" "http://www.hypermultimedia.com/x3d/URLTests/USEURLFieldChange.js" ] } ROUTE NextSensor.isActive TO LoadNewSound.znext