Hey all…I have made a sound toggle button using a variation of this code. When I used that code as specified it worked, but my MC/button wouldn’t play when given the instance myMuteButton. So I put the following code as part of the MC/button:
on (release){
gotoAndPlay(2)
}
on(release) {
if(muted == false){
myBackgroundSound.setVolume(0);
muted = true;
}else{
myBackgroundSound.setVolume(100);
muted = false;
}
}
and vice versa for frame two.
Everything works great now except my toggle goes back to mute when the animations loops. Is there a way around this? I’m a noob at AS so please bear with me.
.fla is too big to attach. Click here to download it.
Thanks in advance