停止 FLVPlaypack 组件
您好,
当我从一个帧导航到另一个帧时,我在停止 FLVPlaypack 组件时遇到问题,其中实例名称 (vi) 的播放仍在后台运行。 当闪存加载时,我使用 vi.stop() 来停止播放,我还向每个函数添加了相同的行,当单击按钮时将调用该行,但当我单击任何按钮时,声音仍在后台播放,当我单击按钮(b1)导航到有播放器的第 1 帧,播放器将停止,但声音仍在播放。
请帮我解决这个问题。 我想要的只是当我导航到另一个帧时停止播放器。
这是我的代码:
stop();
vi.stop();
b1.addEventListener(MouseEvent.CLICK, bt1);
b2.addEventListener(MouseEvent.CLICK, bt2);
b3.addEventListener(MouseEvent.CLICK, bt3);
function bt1(evt:MouseEvent) {
gotoAndStop(1);
vi.stop();
}
function bt2(evt:MouseEvent) {
gotoAndStop(2);
vi.stop();
}
function bt3(evt:MouseEvent) {
gotoAndStop(3);
vi.stop();
}
Greeting,
I have problem stopping FLVPlaypack component when I navigate from one frame to another frame that the play which has instance name (vi) still working in back ground.
when the flash loaded I used vi.stop() to stop the play also I added same line to each function that would be called when a button clicked but when I click any button the sound still playing in the background and when I click on the button(b1) which navigate to frame 1 which has the player, the player would be stopped but the sound is still playing.
Please help me to solve this problem.
all what I want is to stop the player when I navigate to another frame.
here is my code:
stop();
vi.stop();
b1.addEventListener(MouseEvent.CLICK, bt1);
b2.addEventListener(MouseEvent.CLICK, bt2);
b3.addEventListener(MouseEvent.CLICK, bt3);
function bt1(evt:MouseEvent) {
gotoAndStop(1);
vi.stop();
}
function bt2(evt:MouseEvent) {
gotoAndStop(2);
vi.stop();
}
function bt3(evt:MouseEvent) {
gotoAndStop(3);
vi.stop();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
调用“vi.stop();”导航到新帧之前
代码应如下所示:
导航到新帧后,您将丢失对 vi FLVPlayback 对象的引用。
call "vi.stop();" before navigating to a new frame
Here's what the code should look like:
Once you navigate to a new frame you are losing the reference to the vi FLVPlayback object.
对于用户导航到的每个帧,只需添加
SoundMixer.stopAll();
For each frame that the user navigates to just add
SoundMixer.stopAll();