开发者

Stop all sounds but one

I posted a question earlier about stopping all sounds in a swf. Now, to do that I'm using the following code.

var transform1:SoundTransform=new SoundTransform();
transform1.volume=0;
flash.media.SoundMixer.soundTransform=transform1;

Which solves the problem (mutes all sounds) but now there is an issue, I want to stop all sounds but one开发者_如何学C. Any Ideas?


You have to keep track of all SoundChannels that are currently playing back. you should create a sound manager instead of calling Sound::play directly, and do all the tracking within the manager. then you'll just a a method to do what you need to.


You have to individually stop each SoundChannel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜