hi all, I've a music in background (loaded and played at start) + a video (paused at start) :
when I click on the video, it plays and mute the music (and switch the on/off state of the sound button). All is right but when it mute the sound (manually click on the sound button and the mute the music) before clicking the video to play it, the video plays well but the music is then played again! It a nightmare... (my plugins are updated to the actual version)
In facts, it seems that my onclick conditional function switch well OFF but not ON in the video hotspot : see this line code
onclick="if(plugin[sound_on].visible==true, action(sound_off), action(sound_on)); togglepause();"
---
here is my code :
<events onxmlcomplete="action(setuppano); action(sound_play); " />
...
<!-- -------------------- Sound -------------------- -->
<plugin name="soundinterface" url="../pano.plugins/soundinterface.swf" keep="true" preload="true" onloaded="" />
<plugin name="sound_on" align="bottom" x="+103" y="10" style="button" crop="960|0|40|40" onovercrop="960|40|40|40" ondowncrop="960|80|40|40" onhover="showtext(, buttonstyle);" onclick="action(sound_off);" visible="false" keep="true" />
<plugin name="sound_off" align="bottom" x="+103" y="10" style="button" crop="1000|0|40|40" onovercrop="1000|40|40|40" ondowncrop="1000|80|40|40" onhover="showtext(, buttonstyle);" onclick="action(sound_on);" visible="false" keep="true" />
<action name="sound_play">
preloadsound(pano.music/07-FashionSoundz-FS2010-Be_Special-light.mp3);
playsound2D(sound1,pano.music/07-FashionSoundz-FS2010-Be_Special-light.mp3,1.0,0.0,0);
pausesound(sound1);
action(sound_on);
</action>
<!-- playsound3D(sound1,pano.music/07-FashionSoundz-FS2010-Be_Special-light.mp3,0,0,180,1.0,0);
-->
<action name="sound_on">
set(plugin[sound_on].visible,true); set(plugin[sound_off].visible,false);
set(plugin[sound_on].enable,true); set(plugin[sound_off].enable,false);
resumesound(sound1);
<!--pausesoundtoggle(sound1);-->
</action>
<action name="sound_off">
set(plugin[sound_off].visible,true); set(plugin[sound_on].visible,false);
set(plugin[sound_off].enable,true); set(plugin[sound_on].enable,false);
pausesound(sound1);
<!--pausesoundtoggle(sound1);-->
</action>
....
<!-- Video hotspot -->
<hotspot name="videospot"
url="512x288.jpg"
videourl="../../pano.videos/333i_1.flv"
preload="true"
keep="true"
ath="177.613" atv="-1.95961"
zoom="false" distorted="true"
width="598" height="256"
scale="1" scale9grid="true" scalechildren="false" rotate="0"
rx="-1.03604" ry="2.93211" rz="-0.460742"
edge="center" ox="" oy=""
crop="" ondowncrop="" onovercrop=""
visible="true" enabled="true" handcursor="true" capture="false" children="true"
zorder="1"
alpha="1.00" blendmode="normal" smoothing="true"
refreshrate="auto"
onloaded=""
onover=""
onhover="if(ismovie!= true, set(url,pano.plugins/videoplayer.swf)); if(ispaused, showtext(click to play, videohoverstyle), showtext(click to pause, videohoverstyle));"
onout=""
ondown=""
onup=""
onclick="if(plugin[sound_on].visible==true, action(sound_off), action(sound_on)); togglepause();"
buffertime="1"
directionalsound="true"
isvideoready="true"
ismovie="true"
ispaused="false"
loop="true"
onvideocomplete="set(url,pano.videos/512x288.jpg);"
pausedonstart="true"
range="300"
updateeveryframe="true"
volume="1"
/>
Thanks a lot, have a nice day
Alain