Learning Flex: Building Flex Applications the OpenSource Way

Im brand new to Flex and after my little fiasco last week, I decided to step back and start from the beginning and walk myself through this whole process again and look at it from a different angle. Post mortem’s are a really good at helping you see where things went wrong in a project and what you learned.

I was thinking that there maybe some other folks who have been holding out on learning Flex like myself for one reason or another. Whether it be the Flash aspect or learning a new development tool, or just the cost. So as Im learning this Im going to be posting about my experience and try to help some of you out who may be like me, a little leary about jumping into the unknown.So without further ado, I wanted to post about what I did to get myself a 100% free development setup for writing my Flex apps. Thats right, you dont have to have Flex Builder to develop Flex applications. Nope. Adobe made the wonderful decision to opensource Flex and give you the tools you need to compile them.

So lets focus this post on getting that dev environment setup. First of all, let me say that Im working on a Mac and this is how I setup my environment. I know there are other tools and ways that you can build Flex apps. Im just trying to give insight on what worked for me. This should work for Windows and even Linux users since all of the tools that I used are cross platform.

Flex 2 SDK

First off, you are going to need to install the Adobe Flex 2 SDK. Its free and you can download it from Adobe’s website here.

Once you download the SDK unzip it and copy the files to a permanent location on your hard drive. I used the following so it would make it easy to get to. On windows this obviously would be different.


So my full path to the compiler looks like this:


Next, you are going to want to install the debugger version of the Flash player. Look in the flex_sdk_root/player directory for the install files.

With the compiler installed you can test its functionality by compiling the sample applications that are shipped with the SDK. This is optional but I would recommend it so you know for sure that the compiler is functioning on your system. You can compile the samples by executing the following in a terminal window:


… again, this would be different for windows users. There is a .bat file in the same location for the windows users.

Now we have a functioning Flex compiler! That was easy. Lets move on.


Being a ColdFusion developer I already had CFEclipse installed. If you dont, you should. Now, if you are not a CFEclipse user, you are kind of on your own from here. But I would recommend at least downloading Eclipse for developing your Flex apps because we will be using the built-in Ant support to compile our apps right from the IDE.

If you have Eclipse or CFEclipse installed, good, your ready for the next step, if not and you wanna follow along, great, go get it here. Its ok, we’ll wait….

Now with the SDK installed and CFEclipse installed we can move on to the next step.


Flex2Ant is a solution that allows you to add the Flex 2 SDK command-line compiler into your Eclipse or CFEclipse installation. Flex2Ant adds a specific Ant task for compiling the MXML files that you will create in your Flex applications. Now, the Flex2Ant folks have already written a wonderful easy to follow set of instructions for installing Flex2Ant complete with screenshots so Im not going to go into the install procedure here. Just head over to the Flex2Ant site and download the latest version and follow the install instructions.

Once you complete the Flex2Ant install, thats it. You have everything you need to start developing Flex applications for free. Yeah, well thats great you say, is there more? Absolutely! In my next post I will cover a free MXML designer and actually walk you through developing a simple Flex application and compiling from right within CFEclipse.

10 thoughts on “Learning Flex: Building Flex Applications the OpenSource Way”

  1. One idea might be using the 30-day trial version of FlexBuilder to learn/evaluate Flex in a nice integrated environment before moving towards the difficulty of rolling your own set-up using the SDK. (This will also give a way to evaluate what Flex Builder offers on top of basic Eclipse, and whether that is worth the money to you).

    There are also hints elsewhere for using the Flex compiler with XCode, or TextMate, as your editor/IDE of choice, should you already be more familiar with these than Eclipse.

  2. Using the 30 day trial to evaluate Flex Builder isnt a bad idea. I did it myself. But, there are people who are just not going to pay $500 for a dev tool. Whether they dont have the budget for it in their company or cant afford it on their own.

    Flex is not Flex Builder. Thats what I want people to understand. Since Adobe was gracious enough to opensource Flex, everyone can get involved. Flex is more about ActionScript and MXML than it is a particular build tool.

  3. Please, do post the steps to get the development setup in Windows Enviroment, I did followed your installation process which is similar, but I ended up with an Error,
    since I don’t have admin rights to install, so I was unable to install Flash Player 9 Activex, but Flash Player 9 is already installed in the system, now help me on,
    how to get fixed my Flex_SDK_3 development.

    These are the things, I have done. Path is set for jdk1.5.0_05 and Flex_sdkin, I am able to complie my Java program from any directory. But, why I am receiving "Error:
    could not find a JVM", when I try to run the sample application.

Leave a Reply

Your email address will not be published. Required fields are marked *