有没有办法来监听完成了影片剪辑播放?没有办法、影片剪辑、完成了

2023-09-08 15:30:42 作者:抵达你身边

我想要一个影片剪辑的动画完成时执行的函数。也就是说,我会命令它播放()或的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方法,如本post调度自定义事件时,到达最后一帧。

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