Can any Flash compiler put scripts on multiple frames?

867 views Asked by At

Can any Flash compiler put specific scripts on specific frames of the Flash movie SWF?

Like you can do from within the Flash IDE, just place a script on the required frame using the Timeline panel, and the script gets compiled to that frame of the Flash movie SWF.

Eg. script on frame 1 :

trace("Reached frame 1");

Eg. script on frame 2 :

trace("Reached frame 2");

SWF Compilers: (Hopefuls)

6

There are 6 answers

1
tylermac On BEST ANSWER

It's possible with the MXMLC, though it not very well documented.

A Google Search for Flex Frame Metadata will show you the code. A little trial and error and you should be able to get something working. (This is how the flex preloader works)

0
Luke On

Both MTASC and Haxe let you 'inject' code into a specific frame of an existing swf. The usual process is to create a library swf using SWFMill that contains all your assets. After that you inject your code with either one of the compilers into that swf resulting in a new swf.

After injecting code into frame 1, try also injecting code into frame 2 as a next step. In theory this should work. I haven't tried this myself so you might want to experiment with this.

0
TheHippo On

There is a small haxe written neko tool that allows you build multiple frame swfs: http://gamehaxe.com/2009/02/04/haxe-preloader-for-flash-written-in-haxe/

0
OXMO456 On

maybe you can also have a look at the undocumented function

addFrameScript(frameNumber,function,frameNumber,function...)

0
artificialidiot On

As far as I know, none of the compilers you mentioned manages a timeline based execution. But swfmill may help here. I advise you to compile your own binaries because the precompiled binaries are pretty outdated and lacks important fixes.

0
oldUser On

what about using ASC opensourced in FLEX sdk, you could use it for compilation and then envelope the resulting abc into DoAbc tag and put into desired frame with any library that handles swf file format.