Motion-Twin ActionScript 2 Compiler
The general usage of mtasc tool is : mtasc (your .as class files) -swf (you project swf). Please note that if you have two classes Point and Line with Line.as using Point for its code, you don't need to ask MTASC to compile Point.as when compiling Line.as since it will do it automatically for you.
Then if you want to include the minimal set of classes needed by your program to run, you can simply compile using mtasc Main.as where Main.as is your "main" class, the entry point of your program (if you have any).
Now that you know how to call MTASC, let's have a look at how it works : MTASC takes the SWF file specified with the -swf flag, compile all .as specified files, and update the SWF file by replacing all classes that are present inside it by the newly compiled classes.
To use MTASC instead of Macromedia Flash Compiler, it's simple. Open your project and publish it normally (for example project.swf). Now run MTASC using the published SWF as input : mtasc (your as files) -swf project.swf. This will compile your classes and update the SWF that you can use for your website. Please note that MTASC add the compiled classes to the SWF in replacement of ALL classes compiled by Flash.
If you have an error such as class not found, file not found, or class name mistake, you should use the -cp flag in order to add a ClassPath to MTASC (that means a directory where it will look for .as files). For example if your classes are in the /code directory, do not call mtasc code/Hello.as because it will look for the class code.Hello (with package code), but call instead mtasc -cp code Hello.as.
In a hurry? Add it to your Download Basket!
What's New in This Release:
- updated Video and NetStream headers.
- fixed small bug if environment variable in new E()
- fixed multivars declarations
- fixed bug with filters inside buttons