MTASC 1.11 reviewDownload
MTASC is the first ActionScript 2 Open Source free compiler. MTASC project can compile large number of .as class files in a very s
MTASC is the first ActionScript 2 Open Source free compiler.
MTASC project can compile large number of .as class files in a very short time and generate directly the corresponding SWF bytecode without relying on Macromedia Flash or other tools.
You can download it now and please read the comparison between MTASC and Macromedia compiler that is sold with Flash. If it's your first time using MTASC, please read how to install and use MTASC.
Theses install notes are for windows user unfamiliar with commandline tools usage.
First download the MTASC package corresponding to your system and install/unzip somewhere on your computer. Then add the path of the installed executable to your PATH environment variable (see http://www.chem.gla.ac.uk/~louis/software/faq/q1.html if you don't kwnow how to do).
For example if you've installed into c:program filesmtasc you might add c:progra~1mtasc to your PATH. Now the executable is accessible everywhere. You can then write a compile.bat file containing the following text :
mtasc.exe YourFiles.as... -swf YourProject.swf
Put the compile.bat file with your source files and run it when you want to compile.
MTASC is a commandline compiler, it can then be better integrated into [Your favorite editor] by configuring it to compile .as files with MTASC. 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.
Additional arguments are the following :
-swf file : specify input SWF which contains assets.
-cp path : add a directory path to the ClassPath : this is the list of directories that MTASC will use to look for .as files. You can use several times -cp to add several directories.
-main : will automaticaly call static function main once all classes are registered.
-header width:height:fps:bgcolor : does not load a SWF, instead create a new one containing only compiled code and using provided header informations. bgcolor is optional and should be 6 digits hexadecimal value.
-mx : use precompiled MX classes (see section on V2 components below).
Some other arguments, for advanced users :
-version n : specify SWF version : 6 to generate Player 6r89 compatible SWF or 8 to access Flash8 features.
-v : activate verbose mode, printing some additional informations about compiling process.
-out file : change output swf file.
-msvc : use Microsoft Visual Studio errors style formating install of Java style (for file names and lines number).
-strict : will use strict compilation mode which require that all variables are explicitely typed.
-exclude file : exclude code generation of classes listed in specified file (format is one full class path per line).
-trace function : specify a custom trace function. (see Trace Facilities), or no disable all the traces.
-keep : keep AS2 classes compiled by MCC into the SWF (this could cause some classes to be present two times if also compiled with MTASC).
-frame f : will export AS2 classes into target frame of swf.
-pack path : compile all the files contained in specified package - not recursively (eg to compile files in c:flashcodemyapp do mtasc -cp c:flashcode -pack my/app).
-group : will merge classes into one single clip (this will reduce SWF size but might cause some problems if you're using -keep or -mx).
What's New in This Release:
Several small fixes.
Strongly typed arrays have been added.
MTASC 1.11 search tags