When watching a video from gotoAndLearn( ) i saw that when you decompile a .swf file you will get to the code of it. The weird thing is that when looking at the code Flash adds lines with ‘addFrameScript’ in it. This is a undocumented function in the flash framework. Well ofc i wanted to know what it does.
AddFrameScript( framenumber, functionToExecute );
This function lets you execute a function on the frame you want to execute it. Ofcourse your flash movie must excist of more than one frame, otherwise it can’t recall on which frame it is. Also you functions should be defined on the first frame of the file.
You can also trigger more functions in one call. That is done like so:
AddFrameScript( framenumber, functionToExecute, framenumber, functionToExecute, framenumber, functionToExecute );
Well, it’s always fun to discover undocumented things
Have fun with it!
The [AS3.0] addFrameScript by Script.it, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Netherlands License.