从一个对象火灾事件,以通知帧结束 [英] Fire event from one object to notify end of frame
问题描述
我是比较新的AS,想知道我可以通知对象我进口已经达到了它的最后一帧。基本上,我想可能创建一个类文件的.fla并导入瑞士法郎如在其他FLA一个影片剪辑,也许有进口影片剪辑的多个实例。现在,我想知道我怎么能得到通知的进口影片剪辑的一个实例已达到最后一帧。
I am relatively new to AS and want to know how I can notify that an object I imported has reached it's final frame. Basically I want to create a .fla with a class file maybe and import the .swf as a movieclip in an other fla and maybe have multiple instances of that imported movieclip. Now I would like to know how I can get notified that one instance of the imported movieclip has reached the final frame.
感谢您
推荐答案
您可以触发事件,则dispatchEvent(新的事件(eventName的))
。
写则dispatchEvent
在帧结束。
You can fire event with dispatchEvent(new Event("eventname"))
.
Write dispatchEvent
on end of frame.
dispatchEvent(new Event(Event.COMPLETE));
和,监听事件:
mc.addEventListener(Event.COMPLETE, endOfFrameHandler);
function endOfFrameHandler(e:Event):void
{
...
}
这篇关于从一个对象火灾事件,以通知帧结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!