This may be a different technique, but it has worked for me…
I prefer to put the sound file in an empty .swf (just sound) - this allows me to preload it.
When I want to “mute”, I just unload the sound.swf
If you just set sound.volume to 0, this means the sound will continue to play, it just happens that you can´t hear it (thus consuming system resources).
So does anyone know how to create a UNMUTE button?
Basically, the is my scenerio…
When the user loads the page, the music already starts to play. As soon as they press the MUTE button, there will be no sound. BUT when the user presses the REPLAY button, i want the music to start up again.
How would i go about coding the REPLAY button to play the music??
Ok im having multiple heartattacks. I cant get it to work. I tried switching my mute button to be similar to the one u suggested but it doesnt work. Here ill paste the code im using. and the comments is the code that does work.
BG = the name of my background music.