Hi,
here is an example for this: (for the 1.0.8 beta 8)
add/load the soundinterface in the "first" xml:
|
Quellcode
|
1
|
<plugin name="soundinterface" url="soundinterface.swf" preload="true" keep="true" />
|
and a button to play/stop the sound:
|
Quellcode
|
1
|
<plugin name="soundbutton" ... onclick="action(playorstopsound);" />
|
and then add this in every pano xml, it will start or stop the sound (a custom variable "isplaying" is used to save the state if the sound is playing or not):
<action name="playorstopsound">
if(isplaying == true, stopsound(sound1);set(isplaying,false); , playsound(sound1, sound1.mp3);set(isplaying,true); );
</action>
and also add an event that stops the sound from the previous pano:
|
Quellcode
|
1
|
<events onxmlcomplete="if(isplaying == true, stopsound(sound1);set(isplaying,false); );" />
|
best regards,
Klaus