• Hello could somebody help me to anderstand why the oncomplete is not working in this code


    <plugin name="soundinterface" url="soundinterface.swf" onloaded="action(sound_on1)" loop="false" keep="false" volume="1" oncomplete="loadpano(biodiversite020105.xml,NULL,NULL,BLEND(1))"/>

    <action name="sound_on1">
    playsound(viel3,biodiversite02010data/graphics/sound/viel3b.mp3);"
    </action>


    Thank you


    do somebody know a best way to begin to play some sound than with onloaded because it seems not easely to work two times, even if loop="false"

    Thank you

  • Hi JPC,

    Quote

    Hello could somebody help me to anderstand why the oncomplete is not working in this code

    The oncomplete has to be set inside the playsound action not inside the plugin itself...

    • playsound(id, mp3file, loops*, oncomplete*);
      • plays a sound file
      • id = id/name of the sound (use "auto" for a automatic new id for every play)
      • mp3file = the filename/path of a sound file
      • loops = number of loops, 0=endless, default=1 (*optional)
      • oncomplete = action/event that will called on complete (*optional)

    So your code could be:

    Code
    <plugin name="soundinterface" url="soundinterface.swf" onloaded="action(sound_on1)" loop="false" keep="false" volume="1"/>
    
    
    <action name="sound_on1">
    playsound(viel3,biodiversite02010data/graphics/sound/viel3b.mp3,1,loadpano(biodiversite020105.xml,NULL,NULL,BLEND(1)));"
    </action>

    SAlut.

Participate now!

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