视频导入上的 FLV 提示点
我在处理一个简单的 AS3 (CS5.5) 项目时遇到问题 我已导入通过 Adobe 媒体编码器编码的视频作为 FLV 文件,并在视频末尾添加了一个导航提示点,因为我希望视频能够简单地显示视频结束时转到帧号,这样视频就不会停止在该视频上。
我使用了在 AS2 中多次使用过的代码,我在视频运行的顶部放置了一个关键帧,并为视频指定了实例名称 vid:
stop();
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here<br>
trace("Cue point name: " + eventObject.info.name);
trace("Cue point type: " + eventObject.info.type);
if(eventObject.info.name=="movieend")
{
gotoAndPlay(135);
}
}
vid.addEventListener("cuePoint", listenerObject);
由于某种原因,这在 AS3 中出现了错误。
理想情况下,我只希望代码在视频结束时转到帧号,而不是停留在视频上。
I'm having trouble with a simple AS3 (CS5.5) project I have imported a video encoded through Adobe media encoder as a FLV file and have added a Navigation Cue Point at the end of the video as I would like the video to simply go to a frame number when the video has ended so it doesn't stop on that video.
I have used a code I have used on many occasions in AS2 which I put on a keyframe at the top where the video runs under and give the video an instance name of vid:
stop();
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here<br>
trace("Cue point name: " + eventObject.info.name);
trace("Cue point type: " + eventObject.info.type);
if(eventObject.info.name=="movieend")
{
gotoAndPlay(135);
}
}
vid.addEventListener("cuePoint", listenerObject);
For some reason this is coming up with an error in AS3.
Ideally I just want the code go to a frame number when the video finishes instead of staying on the video.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的代码似乎有点不正常。试试这个。
Your code seems to be a little out of whack. Try this.