1

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 Answers 6

2

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)

1
1

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.

1

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.

1

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

maybe you can also have a look at the undocumented function

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.