Using MTASC with the OSX Terminal Part 1

I’m attempting to clarify and document all the methods I intend to use to Compile and Publish to swf files.
The bare bones method would be to use the OSX Terminal.
The following is an abridged OSX specific version of the text in


1. Download MTASC see:

2. Place in applications folder.

3. Open the Terminal Application.

4. Add the path to the MTASC Application in the Terminal:

$ export PATH=$PATH:/Applications/mtasc-1.13-osx/

5. Test by tying MTASc in the Terminal:

$ mtasc

If the the app has been correctly downloaded and the path correctly set the output will be something like:

	 Usage : mtasc.exe [options] 
 Options :
  -pack  : compile all files in target package
  -cp  : add classpath
  -v : turn on verbose mode
  -strict : turn on strict mode
  -infer : turn on local variables inference
  -wimp : turn on warnings for unused imports
  -msvc : use MSVC style errors
  -mx : use precompiled mx package
  -swf  : swf file to update
  -out  : swf output file
  -keep : does not remove AS2 classes from input SWF
  -frame  : export into target frame (must exist in the swf)
  -main : enable main entry point
  -header  : specify header format 'width:height:fps'
  -group : group classes into a single clip
  -exclude  : exclude classes listed in file
  -version : change SWF version (6,7,8,...)
  -trace  : specify a TRACE function
  -help  Display this list of options
  --help  Display this list of options

Which lists all the MTASC Commands.

6. Create a folder to create project in.

$ mkdir tuto

7. Duplicate the Class from the page and save in folder:

class Tuto {

	static var app : Tuto;

	function Tuto() {
		// creates a 'tf' TextField size 800x600 at pos 0,0
		// write some text into it = "Hello world !";

	// entry point
	static function main(mc) {
		app = new Tuto();

8. make MTASC publish swf enter in the Terminal:

$ mtasc -swf tuto.swf -main -header 800:600:20

This should create a tuto.swf file in the tuto folder.


9. The flags seen in the help output above can be added to the call launch MTASC for instance:

mtasc -v -swf tuto.swf -main -header 800:600:20

Will produce a verbose output link which includes:

Classpath : /Applications/mtasc-1.13-osx/std/;/Applications/mtasc-1.13-osx/;;/
Parsed /Applications/mtasc-1.13-osx/std/
Typing Tuto.Tuto
Time spent : 0.004443

I’ll attempt to test further MTASC Commands in further posts, I’ve just found a MTASC forum.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s