In the example below, the sound is triggered when you drive up and click on the sphere.
#VRML V2.0 utf8
DEF MyForm Transform {
children [
DEF Mouse TouchSensor {},
DEF Timer TimeSensor {
cycleInterval 3
},
Shape {
geometry Sphere {}
}
Sound { source DEF MySound AudioClip {
url "../wav/twang.wav"}
}
]
}
ROUTE Mouse.touchTime TO Timer.set_startTime
ROUTE Timer.cycleTime TO MySound.set_startTime
< < < < < _ > > >