my site’s audio can be turned on and off using one button.
when music is playing, the button should be “audio off”.
when clicked, the audio is off and the button switch to another button “audio on”, if clicked again, the music is back on, and the button is back to “audio off”, and so on …
i already have this universal button and have it working great.
i just want to do the switching. anyone can help ??
theres no unload movie in that fla, what Kel - 420 has done, is create two frame labels, on and off, which are indicated on the first layer. then on first button there is code to load a external swf which would turn off the music.
on (release) {
loadMovieNum("nosound.swf", 10);
gotoAndPlay("off");
}
so this button would load a swf called nosound in level 10 of flash, and then go to the frame label called off where there is a graphic to represent that the sound is off
edit:: you could also use
on (release) {
unloadMovieNum(10);
gotoAndPlay("off");
}
this is if you want to unload the swf in level 10 , which would be like turning off the sound in this situation.
then on the second frame
there is the code to turn off all sounds
stop();
stopAllSounds();
and on the button
on (release) {
loadMovieNum("music01.swf", 10);
gotoAndPlay("on");
}
so when this button is pressed it will load a external swf called music01.swf in level 10 which will replace the other sound that was already in level 10 and then go to the frame label on which had the graphic to represent the sound is on.
it cant seem to work, and i dont know why.
i am trying to do the same as the attachment on a MC. my webpage is all done with Flash.
i will try to make it simpler: i have a 800x600 document that has buttons and mousetrail and stuff like that … thats where i am trying to add this audio button.
i dont have my site published yet, and the SWF file is big to attach. i will try to explain.
my document is 800x600, on this i have a background image.
on this image i have added buttons, like: home, portfolio, pictures, contact.
these buttons have mouseovers effects.
in a corner i added a button that switch audio on and off, but it doesnt change, it remains the same.
and thats the button that i want to switch upon clicking.
Hey Kel-420, ur last file worked great, it is better than the first.
thanks mate …
and i think it is better to use a blank movie instead of the unload, i dunno, i found it better…