声音继续播放后,外部SWF被卸载 [英] Sound keeps playing after external swf was unloaded

查看:159
本文介绍了声音继续播放后,外部SWF被卸载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Flash应用程序,某种播放列表的加载外部SWF视频播放器(我没有到外部文件code访问),因此用户可以观看视频,或跳到另一个。当用户切换到另一个视频新的SWF文件被加载。

I have a flash application, some kind of a play-list that loads external SWF video player (I don't have code access to that external file), so users can watch the video or skip to another one. When user switches to another video new SWF file is being loaded.

问题:如果用户没有看完视频,并跳到下一个,然后我卸载previous SWF文件( unloadAndStop())并装载一个新的。而由于previous SWF玩它实际上并没有卸载,它仍然发挥的背景(我听到两音轨:当前和previous)。

The problem: If user didn't finish watching the video and skips to the next then I unload previous SWF file (unloadAndStop()) and load a new one. And because the previous SWF was playing it is not actually unloaded, it is still playing on the background (I hear two audio tracks: current and previous).

我试过 SoundMixer.stopAll()通话,但它实际上并没有帮助,因为在背景和加载,和声音在当前的视频在启动时播放。

I tried SoundMixer.stopAll() call, but it doesn't actually help, because of the loading on the background and and sound over the current video when it starts playing.

有没有办法从主装载机应用程序解决此问题?

Is there a way to solve this from the main 'loader' application?

推荐答案

试试停止播放新的声音之前,所有的声音。看看<一href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundMixer.html#stopAll%28%29"相对=nofollow> STOPALL()调用。

Try stopping all sounds before playing a new sound. Check out stopAll() call.

这篇关于声音继续播放后,外部SWF被卸载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆