how to stop the sound linked to a hotspot when going to a new pano'

  • I have set a sound to play from a hotspot (as below). it doesn't stop when the next pano scene is called though. What do i need to do please anyone ?
    Thanks in advance.
    <hotspot name="spot1" style="skin_hotspotstyle" ath="43.041" atv="29.810" onclick="playsound(info1, sound/info1.mp3);" onremovepano="stopsound(info1);" />

  • i'm a complete novice at this .. as are many i think ..
    are you able to give me an idea of the code that i could use here to stop the sound file when i move to a different pano' ?

    i've been reading through the document carefully but its busting my head i'm afraid .. i dont know where to start really without looking at a working example of code that does the same as i need.

    *confused*

  • I''ll give you an example:

    1. Events is a handy way to do something. You can have many 'events' in one tour, just add keep="true" and give them different names (according to you needs).
    2. Try this code

    Code
    <events name="stop_sound" keep="true" onremovepano="stopsound(info1);" />	<events name="stop_sound2" keep="true" onnewpano="showlog();trace('NEW PANO WAS LOADED!');" />




    One event will stop your sound when the pano was removed, the second one will open the log and trace some text.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!