gpt4 book ai didi

Flash AS3 - 等待 MovieClip 完成

转载 作者:行者123 更新时间:2023-12-02 06:43:41 27 4
gpt4 key购买 nike

我正在编写一些代码(我认为)需要顺序播放 MovieClip 对象。我希望能够将其保留在单个框架中并仅使用外部源文件。

我希望使用它的方式是在程序的各个部分之间切换。

删除当前的 child
构建影片剪辑
添加新 child
等待新 child 完成并转到下一步

这可行吗?

编辑:ENTER_FRAME 方法除外。当剪辑到达其最后一帧时肯定可以发送信号时,每一帧都运行一个处理程序似乎很浪费。

最佳答案

您可以使用 addFrameScript 方法。

http://www.kirupa.com/forum/showpost.php?p=2098268&postcount=318

MovieClip.addFrameScript(frame:int, method:Function, [frame:int, method:Function...]):void;

像这样:

// This will be called on the last frame.
function myfunc():void{
// Do stuff
}
// ** The frame number is zero-based.
myclip.addFrameScript(myclip.totalFrames-1, myfunc);

关于Flash AS3 - 等待 MovieClip 完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4014472/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com