|
-
Stop just one sound
I have a button with this AS2 on it (below). It attaches a sound and plays it onRollOver and stops it onRollOut,onPress & onDragOut. It also opens a new MC with a sound playing on it (onPress). My problem is that when I roll off myBtn1 it runs the "mySound1.stop" & it stops the new sound that was opened in the MP3playerMC (even though the name of the sound attached to it is different).
Why would it do this? Is there another way of stopping "mySound1" while allowing the other one to play unaffected? Again I point out, these two sounds have two different names, yet if either has a ".stop" function ran on it, it stops all sounds.
The code attached to myBtn1:
mySound1 = new Sound();
mySound1.attachSound("sound1");
myBtn1.onRollOver = function() {
mySound1.start();
};
myBtn1.onRollOut = function() {
mySound1.stop();
};
myBtn1.onPress = function() {
mySound1.stop();
holderMC.attachMovie("MP3Player","MP3Player2",1);
};
myBtn1.onDragOut = function() {
mySound1.stop();
};
Thank you in advance for any help : )
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|