I want to detect and then duplicate the functions that the flash IDE uses to wrap timeline actionscript. The “frame1”, “frame2”, “frameX”, etc. functions that are the result of the MovieClip.addFrameScript the IDE uses.
I provided a sample file that has a timeline object and an object created by some frame actionscript.
I add an EXIT_FRAME listener to those objects and try to detect those functions.
I can validate the objects are of the type “boxAnima”…as I expect.
They should have this public function…
public function frame10 () : *;
I know the functions must be present since they effect the animation (boxes don’t move right, only scale up&down)
I can null out those functions by calling addFrameScript(x, null); and my timeline animation is effected(they move right after they scale)
comment next line in fla to recreate nulling
//box.addFrameScript(loop-1, null);
But, I cant sense the functions existence by evaluating (functionName in boxAnima) nor (boxAnima[functionName])… even if I eval at the same time I can effectively null
whats odd, is if I decompile(using FlashDevelop to view classes in swf) the swfs I can see the class definition that shows my boxAnima extends MovieClip and has…
public function frame10 () : *;
So why can’t I see these functions in my actionscript?
I attached my sample, all code in on timeline