soundinterface onover

  • Hi,
    why is this not working:
    <plugin name="button" url="test.png" devices="desktop" align="bottom" x="-160" y="10" onover="playsound(auto,%SWFPATH%/skin/beep21.mp3,1,null);" />


    onhover,ondown, onclick works ok, but onover doesn´t :( Can somebody help? *unsure* <br>Thank U!

    Best regards,
    Igor Socha

    3 Mal editiert, zuletzt von igor.socha (13. März 2012 um 17:01)

  • onover is something that happens over and over based on the frame rate.
    playing your sound like that would start it like 30 times a second or whatever it is.
    If you put it in an action and set a variable that indicated it was started already and not to run it simultaneously it would probably work.

    <action="playmysound">
    ifnot(soundrunning == true,
    set(soundrunning, true);
    playsound(auto,%SWFPATH%/skin/beep21.mp3,1,set(soundrunning, false););
    );
    </action>

    onover="playmysound"

    you can make it pretty with arguments etc...

  • Sacha, thanx, but does not work :(

    I´ve changed the code to be 100% ok:
    <action name="playmysound">
    ifnot(soundrunning == true,
    set(soundrunning, true);
    playsound(auto,%SWFPATH%/skin/beep21.mp3,1,set(soundrunning, false););
    );
    </action>
    but still does not work *unsure* I can see in Safari Activity, that soundinterface.swf and beep21.mp3 are loaded.

    thanx

    Best regards,
    Igor Socha

  • Aaach, I have found the problem - I have style="button" there also, by removing this it is working!

    So I have tried to put my former code to <style name="button" keep="true" zorder="1" scale="0.9" onover="tween(scale,1.1,0.25);playsound(auto,%SWFPATH%/skin/beep21.mp3,1,null);" onout="tween(scale,0.9,0.25)"/>
    and it is working (without the need of action). *smile*

    Thanx for your help!
    Igor

    Best regards,
    Igor Socha

Jetzt mitmachen!

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