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.
Thank you
You can use MovieClip' undocumented
addFrameScript()
method , like:With
addFrameScript
you don't need to put any code in.fla
' frames/timeline!You can fire event with
dispatchEvent(new Event("eventname"))
. WritedispatchEvent
on end of frame.and, listen for the event: