Hey Peeps :D,
How are you all going?? I’m having a bit of trouble with muting some sound and unmuting it with the same button.
Here is my AS Code:
[AS]
on(release){
var mySnd = new Sound(_root);
mySnd.setVolume(0);
function Volume(){
if(mySnd.volume == 0){
mySnd.setVolume(100);
}
}
Volume();
}
[/AS]
What i’m trying to do is mute the sound when the button is clicked…and then when it’s clicked unmute the sound…
I was thinking about using an if statement to check if the volume was set to 0 and if so change it to 100 and visa versa. Any ideas why my code isn’t working??
NB i’m muting the sounds on the root level of my swf…
Cheers in advance
George