PDA

View Full Version : Stopping sound


Cr4zyJ
05-08-2006, 05:05 PM
Hello, I am having trouble with my website. My website is completely flash and I have a sound button which when pressed i have sound start to play and sound waves which appear to come out of my sound button (a speaker). But the problem arises when i want to make the sound stop. I coded the button with:

on (release) {
gotoAndStop("Start");
}

"Start" is my first frame, which has a stop(); action and has:

on (release) {
gotoAndPlay(2);

}


Therefore what should happen is when the clip is loaded, nothing happens until the user presses the sound button. Then the sound should start, but then when the user presses it again, the sound should stop and it should go back to frame one.

What is happening is that the animation stops and goes back to frame 1, but the sound keeps on playing and does not stop when the button is pressed.
Please help me, I thought i did everything right, but obviously i've missed out on something.

jcalabro
05-10-2006, 08:32 PM
stopAllSounds();