[UPDATED Jan 3, 2006: Added “flCompile and httpTest”, updated workflows to make it easier to customize command line parameters like swf dimension and background color]
There are a lot of things I want to play with in AS 3 and Flex 2, but there’s one problem: I’m using Mac OS X, and FlexBuilder 2 is only available for Windows right now. Fortunately, I stumbled upon this page via this blog entry by Robin Hilliard, which explains how to compile ActionScript 3 and Flex 2 on the Macintosh using the command line.
I’m a Mac user though! Commandlines are for lesser OSes! Refusing to stoop to typing arcane commands into the Terminal, I instead spent my evening learning to use Automator and the rather eccentric AppleScript language to build a solution. The result is a contextual menu plugin that will compile AS3 and Flex 2 MXML files, then open them in Safari for testing. It’s still a little rough around the edges, and it’s nowhere near as nice as working in FlexBuilder2, but it works! I also fleshed out the instructions for getting command line compiling working on the Mac.
You can download it by clicking here (10kb). It requires Mac OS X 10.4. Please read the ReadMe file – the contents of which follows:
Disclaimer
I take absolutely no responsibility for any problems you experience or damages (direct or indirect, including but not limited to loss of data) caused by using these workflows. I have tried my best to make sure they are totally safe, but I am not an AppleScript expert or a command line guru. Use at your own risk.