flash actionscript:
I'm using the next script to play sounds: mySound = new Sound(); mySound.attachSound('MySound'); mySound.setVolume(30); mySound.start( 0 , 500 ); But when I use this script again all my sounds modify their volume or even when I use the mySound.stop() all my sounds stop!!!! I want to use a sound as a backround and play or stop other sounds at any time. Is there anything that I'm doing wrong!!! All my sounds are modified when I modify my volume, or stop when I use the mySound.stop() all sounds stop! Can anyone help me? Brnda S.
if you setVolume then all sounds on that timeline will be given that volume. What you need to do is put each sound in its own movieClip or effectively its own timeline - and this should enable you to setVolume for each sound - i think :)
I already tried to put my sound in a movieclip and the behavior is the same. When I stop one of my sounds, all of them stop!!!! does any one know a solution for this, I.m desperate! THanks brenda s.
For every sound you have, you need another sound object. So if you had two sounds you would need: mySound = new Sound(); mySound.attachSound('MySound'); and mySound2 = new Sound(); mySound2.attachSound('MyOtherSound'); If you do not make a new sound object, then all the sounds will respond to any command that affects the sound object, like stop and setVolume.
Don't see what you're looking for? Try a search.
|