button that opens the audio file, works well sometimes and not others

  • I have a picture with three hotspot opening audio files.
    By clicking, the audio file is opened and the button changes to one that closes the audio, if someone wants to mute the audio before finishing. When the audio ends must be changed back to the initial button.
    It does well at times, but others, does not make the final change.
    Something wrong must have the code.
    The code is
    <plugin name="soundinterface" devices="all" volume="0.5" url="plugins/soundinterface.swf" alturl="plugins/soundinterface.js" rootpath="%CURRENTXML%" loop="1" preload="true" keep="true" />

    <hotspot name="sonidoon" devices="all" url="on1.png" style="tooltip" ath="49.000" atv="9.000" scale.normal="0.6" scale.mobile="0.4" onover.desktop="tween(scale,1,0.5);" onout.desktop="tween(scale,0.6,0.5);"
    onclick="set(hotspot[sonidooff].visible,true);set(hotspot[sonidoon].visible,false);playsound(music,'audio/audio 1.mp3',1,oncomplete=stopsound(audio/audio 1.mp3);set(hotspot[sonidooff].visible,false);set(hotspot[sonidoon].visible,true));" visible="true" keep="false" onhover="showtext(Audio - Click para activar);" />

    <hotspot name="sonidooff" devices="all" url="off1.png" style="tooltip" ath="49.000" atv="9.000" scale.normal="0.6" scale.mobile="0.4"
    onclick="stopallsounds();set(hotspot[sonidooff].visible,false);set(hotspot[sonidoon].visible, true);" visible="false" keep="false" onhover="showtext(Audio - Click para desactivar );" />

    http://www.ciudadcubica.com/n2/


    Any clue to solve this error is welcome
    Ramiro

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!