« ActionScript 3.0 Presentation and Examples | Main | Clarifying the Term "Flex" »

January 17, 2006

A Ruby Script for Compiling Flex Applications

There have been a lot of posts recently about how to compile Flex applications and ActionScript projects from the command line (on Windows, Mac, and Linux).  Mike Chambers has a nice summary which points to all the information you need to get going, and has a bash script which wraps the mxmlc compiler to make compilation easier.

I have some specific compilation needs, however, so I decided to write a Ruby script to wrap the mxml compiler (I'm not a huge fan of bash once my scripts reach a certain level of complexity). Once you have the Flex environment set up, just download the script, make sure it's in your path, configure it, and you can compile like this:

% mxmlc.rb MyApplication.mxml

The script has the following flags:

Before running the script, you have to configure it by defining the following variables at the top:

Let me know if you have any problems getting it to run. It was written and tested under Ruby version 1.8.2 which should already be installed on your Mac. To get the alpha version of the Flex Framework and the compiler, check out Flex Builder 2 on Adobe Labs.

Posted by cantrell at January 17, 2006 8:59 AM

Comments

Hi Christian,

Cool stuff. i'm actually building a RoR app where i mix Ajax / Html with Flex components and ExternalInterface. This is turning into such a productivity platform, its amazing.

With this good stuff, i can optimize my workflow further.

ps. did you ever take a look at the bobby van der Sluis UFO approach? there is a ruby on rails helper app around that is not very good, imho. What do you think?

Posted by: ilya Devèrs at January 17, 2006 1:43 PM

love the way my name always turns up on the weblogs.macromedia site :)

Posted by: ilya Devers at January 17, 2006 1:44 PM

It's great to see a Ruby programmer in Macromedia err ... Adobe midst. Gives me a little hope that Flash might allow ruby as a scripting option instead of Action Script.

Posted by: Michael Christenson II at January 31, 2006 5:46 PM




Remember Me?

(you may use HTML tags for style)

Copyright © 2009 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).