here is a fla that i kept from a long time back...shows ya how to do exactly that...pick it apart and see if you can get it...if not come back in and someone will help ya get it going...you could even just manipulate the button and change the music to make it suit your needs..then just drag it into your movie's timeline..
once again this is not my personal fla...just one of the many i have downloaded and used to learn from..
You can use the Sound() object. To make the button set the volume to zero and then set it back to its original value when pressed again set this up at the start of your movie...
mySound=new Sound();
...and attach this to your button...
on (release) {
myVolume = mySound.getVolume();
if (myVolume == 100) {
myVolume = 0;
} else if (myVolume == 0) {
myVolume = 100;
}
}
yeh your right it would make the movie clip that it would be in start and stop..but it would not make the main timeline start and stop because you would have it in a movie clip on the main timeline..
have your button on the main time line callling the mc..
_root.yourmc.gotoAndPlay(1); or something like that..
The solution from wangbar works but I'm not sure whether it will work across different scenes.
I'll get back on that.
thanks virt and wang
(and um I do smoke...)X-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.