|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How do I stop a sound from playing?
Here is what I currently have scripted on a button.
on (press) { arnold.stop(); } on (release) { arnold.gotoAndPlay(2); } Arnold is the name of an instance of a movie that plays Arnold Schwartzenegger saying "No problemo" I'm making a do it yourself arnold rap movie. What I want to happen is when you press the button rapidly, it would say.... "no no no no no no problemo." The problem is that the movie keeps playing and all I ever get is no problemo. I cant get it to stop halfway through his phrase when I reclick the button. Any ideas? Thanks! |
|
#2
|
|||
|
|||
|
you would put it so that on click, stop all sounds, before the go to, then it stops the last sound playing, then plays the new one.
|
|
#3
|
|||
|
|||
|
but even when I insert the arnold.stop() in the same loop as teh release it doesnt work.
whats teh code for stop all sounds? |
|
#4
|
||||
|
||||
|
Code:
stopAllSounds(); |
|
#5
|
|||
|
|||
|
Another way to do this is to make the sound file its own swf file (movie) then in your main movie just load and unload your “sound” movie for example into and out of a movie clip. This has the added advantage of keeping your main movie smaller and allowing it to load faster.
|
|
#6
|
|||
|
|||
|
I still cant get it to work.... can someone write the loop to show me what Im doin wrong?
|
|
#7
|
|||
|
|||
|
Quote:
The problem with this is, when I stop all sounds, it kills the beats in the background as well.... otherwise it works perfectly. How do I just stop one sound? |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > How do I stop a sound from playing? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|