开发者

osx compiling AS3 project from the command line

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?


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


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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜