MTASC is a free and open source ActionScript 2 compiler developed by Nicolas Cannasse at Motion-Twin. It was widely used by many Flash professionals around the world.
MTASC does not require the Flash IDE: it will compile .as files into a .swf containing the flash bytecode. If you want to add additionnal resources, you can build an input SWF with open source tools such as SWFMill or FlashDevelop.
You can read more about MTASC on mtasc.org.
- OCaml 3
Tip
Use opam to switch between OCaml versions with ease.
Clone this repository and run:
ocaml install.ml
Note
Precompiled binaries can be found here.
mtasc -swf <output.swf> -main -header <width:height:fps:bgcolor> <Input.as>
For advanced usage, see here.
// HelloWorld.as
class HelloWorld {
static var app:HelloWorld;
function HelloWorld() {
_root.createTextField("tf", 0, 0, 0, 640, 480);
_root.tf.text = "Hello, World!";
}
static function main(mc) {
app = new HelloWorld();
}
}
mtasc -swf helloworld.swf -main -header 800:600:20 HelloWorld.as