Flash 视频播放完毕后,如何运行一行动作脚本?

发布于 2024-07-17 13:38:33 字数 247 浏览 3 评论 0原文

我在 Flash 横幅中添加了一个视频。 当横幅加载时,在视频播放的空间中,我准备了“单击播放”图形,并使用一个调用 nextFrame 的按钮 - 将主 Flash 影片的播放头带到实际视频所在的帧。

然后视频可以正常播放,但结束时会出现空白、黑屏。

我想要的是,当视频播放完毕后,主 Flash 影片的时间线将返回到带有“单击播放”图形的帧,而不是空白。 谁能告诉我我需要使用什么动作脚本(as2)以及将其放在哪里? 谢谢。

I am including a video within a flash banner. When the banner loads, in the space where the video will play I have prepared 'click to play' graphics, with a button which invokes nextFrame – taking the main flash movie's play head to the frame where the actual video is.

The video then plays fine, but finishes on a blank, black screen.

What I would like is that when the video has finished playing, the main flash movie's timeline will return to the frame with the 'click to play' graphics on it, rather than blank. Can anybody tell me what actionscript (as2) I need to use and where to put it please? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流云如水 2024-07-24 13:38:33

你用什么来显示FLV? FLVPlayback 组件、媒体显示组件还是只是 Video、NetSteam 和 NetConnection 类?

例如,对于 FLVPlayback 组件,您有 FLVPlayback.complete 事件,但让我们知道您使用什么,其余的应该很容易。

假设 FLVPlayback 组件的实例名称为 my_FLVPlybk,这应该对您有帮助:

import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
    trace("Elapsed play time at completion is: " + my_FLVPlybk.playheadTime);
};
my_FLVPlybk.addEventListener("complete", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";

代码片段来自 Flash 8 FLVPlayback.complete 事件文档。

What are you using to display the FLV ? The FLVPlayback Component, the Media Display Component or just the Video, NetSteam and NetConnection classes ?

For the FLVPlayback component for example, you have the FLVPlayback.complete event, but let us know what you use and the rest should be easy.

Assuming FLVPlayback component has an instance name of my_FLVPlybk, this should help you:

import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
    trace("Elapsed play time at completion is: " + my_FLVPlybk.playheadTime);
};
my_FLVPlybk.addEventListener("complete", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";

Code snippet is from Flash 8 FLVPlayback.complete event documentation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文