开发者

how to mute a movieclip?

开发者 https://www.devze.com 2023-01-26 17:58 出处:网络
I load a movieclip in another project开发者_JAVA技巧. this loop.swf has music in it. loopingLoader = new Loader;

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

精彩评论

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

关注公众号