|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
<plugin name="soundinterface" url="soundinterface.swf" alturl="soundinterface.js" keep="true" volume=".1" onloaded="playsound(1,'%SWFPATH%/audio/music.mp3',0);" /> <!-- PERSONAL TOUCH: Sound mute/resume button --> <plugin name="bg-play" url="soundoff.png" onloaded="set(alpha,0); tween(alpha,.8);" zorder="2" origin="topleft" edge="topleft" y="25" x="25" visible="false" keep="true" onhover="showtext(Resume Music);" onclick="action(playsound)" /> <plugin name="bg-mute" url="sound.png" onloaded="set(alpha,0); tween(alpha,.8);" zorder="2" origin="topleft" edge="topleft" y="25" x="25" visible="true" keep="true" onhover="showtext(Pause Music);" onclick="action(mutesound)" /> <action name="playsound"> resumesound(1); set(plugin[bg-mute].visible,true); set(plugin[bg-play].visible,false); </action> <action name="mutesound"> pausesound(1); set(plugin[bg-mute].visible,false); set(plugin[bg-play].visible,true); </action> |
This post has been edited 1 times, last edit by "Tebasaki" (Feb 13th 2012, 1:09am)
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
<plugin name="soundinterface" url="soundinterface.swf" alturl="soundinterface.js" keep="true" volume=".1" onloaded="playsound(1,'%SWFPATH%/audio/music.mp3',0);" /> <!-- NICKS PERSONAL TOUCH: Sound mute/resume button --> <plugin name="bg-play" url="soundoff.png" onloaded="set(alpha,0.8);" zorder="2" origin="topleft" edge="topleft" y="25" x="25" visible="false" keep="true" onhover="showtext(Resume Music);" onclick="action(playsound)" /> <plugin name="bg-mute" url="sound.png" onloaded="set(alpha,0.8);" zorder="2" origin="topleft" edge="topleft" y="25" x="25" visible="true" keep="true" onhover="showtext(Pause Music);" onclick="action(mutesound)" /> <action name="playsound"> <!-- playsound(1,'%SWFPATH%/audio/music.mp3',0); --> resumesound(1); set(plugin[bg-mute].visible,true); set(plugin[bg-play].visible,false); </action> <action name="mutesound"> pausesound(1); set(plugin[bg-mute].visible,false); set(plugin[bg-play].visible,true); </action> |
Nupsi, could you share a snippet of your code for me to test with?
|
|
Source code |
1 2 3 |
<action name="mute" > if(sound == 1, pausesound(music);set(sound,0),resumesound(music);set(sound,1)); </action> |
Oh...and make sure you´re using the latest krpano-version including the latest version of soundinterface!This post has been edited 2 times, last edit by "Tebasaki" (Feb 19th 2012, 5:52am)
What is sound == 1?
if the sound is 1, then pause the music, set the sound to 0
else resume the music and set sound to 1?