views:

65

answers:

2

When working on small projects or some test classes , I would prefer to quickly compile my code from the command line as opposed to creating a full Actionscript project in Flash Builder for instance.

In a previous similar question , an answer was given referring to this article: http://www.senocular.com/flash/tutorials/as3withmxmlc/

but this is for Windows user...

I had a look at ProjectSprouts, which seems excellent but too heavy for the sort of task I'm looking for.

Would you know of any alternative approach that could be used to quickly compile a swf from the Terminal on Mac OSX?

+1  A: 

I'm not sure how complex your project is, but something fairly similar to the method the article you linked to uses is probably an easy way to go. Assuming you've got the mxmlc program from the Flash SDK somewhere, you could just set up a Makefile like so:

MXMLC = ~/Library/flex_sdk_4.1/bin/mxmlc
SRC = src/foo.as src/bar.as
MAIN = src/Main.as
SWF = output.swf

$(SWF) : $(SRC)
    $(MXMLC) -o $(SWF) -- $(MAIN)
DarthShrine
A: 

Ok, found the answer with the following tutorial http://disruption.ca/archives/actionscript-and-mxmlc/

Effectively , it's as simple as doing this

mxmlc Main.as
PatrickS