开发者

how to mute a movieclip?

I load a movieclip in another project开发者_JAVA技巧. this loop.swf has music in it.

loopingLoader = new Loader;
loopingLoader.load(new URLRequest("img/loop.swf"));
addChild(loopingLoader);

After some seconds, I want to unload or easier "mute" this clip.

When I unload it, even when I load a new clip in it, the music continues to play.

How can I mute this clip?

Thanks for your help.

N


you can control global sounds or stop all sounds in flash player via the SoundMixer class by setting the soundTransform property or calling the stopAll() function respectively:

flash.media.SoundMixer


Are you removing and disposing you clip correctly?

This helps if you just wants to mute all sounds:

SoundMixer.soundTransform.volume = 0


Try this:

loopingLoader.unloadAndStop();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜