actionscript-2flashswf-compilermtasc

Flash AS2 Command Line compiler capablities


Although the MTASC command-line compiler can compile ActionScript class files into an SWF, I need specific insights into its capabilities, via the command-line switches.

-version n : specify SWF version : 6 to generate Player 6r89 compatible SWF or 8 to access Flash8 features.

-frame f : will export AS2 classes into target frame of swf.



Solution

  • As far as I'm aware you can't specify what classes go into what frames. You can however designate a frame where all class code will be exported. Since the SWF format is a steaming format (it's downloaded frame by frame) you could e.g. export all your classes in frame 2. If you would then place code in frame 1 that basically starts with a stop(); and you then would then go into a loop the measure how much of the SWF is loaded, you can create a SWF preloader on frame one.

    You also might what to have a look at swfmill that lets you layout the frames of your SWF and import assets. You can use MTASC to inject code into a swfmill generated SWF.