The sound I wanted to stop or play are separates into background music and button sound effect. I know you could use SoundMixer.stopAll() to stop all sound, and some how exclude the bg music, IF everything is written in the same class. But what if the sounds are called from others dynamic classes? How could I target them and exclude the bg Music?
+1
A:
if i were you i would set up something like a singleton or static class for music/sound and register all sounds with that, therefore you can run it all in the single class.
shortstick
2010-04-14 12:06:08
thanx! will look into it!
Hwang
2010-04-15 02:51:59
A:
Definitely look into creating a sound manager class that keeps all the sounds together, like shortstick suggested.
And, to stop a sound you would keep an instance of its SoundChannel, like
var mySound:SoundChannel = (new mySoundClass).play();
when you need to stop that sound:
mySound.stop()
jonathanasdf
2010-04-14 16:10:30