有没有办法来监听完成了影片剪辑播放? [英] Is there a way to listen for the completion of a MovieClip playing?

查看:197
本文介绍了有没有办法来监听完成了影片剪辑播放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个影片剪辑的动画完成时执行的函数。也就是说,我会命令它播放()或的gotoAndPlay()。我不知道,我可以附加到MovieClip用的addEventListener()命令的任何监听器。有什么想法,我能怎么办?

I want to execute a function upon completion of a MovieClip's animation. That is, I would command it to play() or gotoAndPlay(). I don't know of any listener that I can attach to the MovieClip with the "addEventListener()" command. Have any idea I can do?

推荐答案

您可以使用addFrameScript方法,如本<一个href="http://stackoverflow.com/questions/2099049/stopping-on-the-last-frame-flash/2106190#2106190">post调度自定义事件时,到达最后一帧。

You can use the addFrameScript method, as shown in this post to dispatch a custom event when the last frame is reached.

这篇关于有没有办法来监听完成了影片剪辑播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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