views:

487

answers:

2

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.

  • Configure which Flash Player version you're targeting, 6 / 7 / 8

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

  • Configure which single frame of the movie, contains all the code.

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


  • But how do I configure what frames of the movie, contain what ActionScript code??
  • In other words, put class A into frame 1, class B into frame 2, class C into frame 3 of the flash movie.
+1  A: 

With AS2 all your code is going to be imported into the same frame, you can choose which frame that will be.

With AS3 however, the code imported on the root goes into frame 1 and code imported with shapes goes into the shape's frame.

DavGarcia
+2  A: 

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.

Luke

related questions