Adobe Flex is an API that works in tandem with Flash 9 player, is available as an SDK. There is a free version of the SDK that allows you to develop Flex applications. You can get the SDK from the download section and install it in your development directory. The SDK contain two sets of development tools that target two platforms: Linux and Windows. You can code and test in Windows or choose a flavor of Linux, remember to simply run the appropriate compiler to get the output file generated.
If you’re interested to know more about setting-up a Flex development environment in Linux, please read-on as I’ll document the steps needed to get you up-and-running.
From here on, you’ll be seeing concrete examples that might confuse you if you’re not familiar with what I’m describing. For example, Ubuntu will be used as a reference OS and that might confuse non-Ubuntu developers. If that’s the case, you can still follow-through and try to relate them to your familiar environment.
Let’s start with what tools are needed to setup the environment.
- Ubuntu 7
- Adobe Flex SDK (free version)
- Java JRE
We’re now ready to assemble the parts. Here we go.
I chose Ubuntu as a reference for this article. The reason behind for choosing Ubuntu is a subjective one and I’m not going to go there explaining why. This is one of the benefits of having to participate in Freedom Culture.
I’ve set up the latest version known as Feisty Fawn and you can get a free copy from www.Ubuntu.com , download a copy and install, you should be OK to follow the next step.
The free version of Flex SDKis available from Adobe Flex Download. Download the package and install it in your development directory.
- Click download to start download.
- Save package in ~/Packages.
- Expand downloaded package in ~/Packages/flex
- For every build.sh file add the following text shown in the code box.
- That’s it.
Setting the path to Java JRE instead of the default Java that came with Ubuntu.
#code box export JAVA_HOME=~/Packages/jre export PATH=$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
If this approach doesn’t appeal to you, there is another method you can do and that is simply add the setting to ~/.bashrc instead.
Java developers may find this one optional as they already have Java JRE installed. In my case, I don’t code Java so I had to download the JRE from http://www.Sun.com, that’s definitely an extra step. One thing I found out when I was testing the sample files, the Java that came installed in Ubuntu didn’t work, that’s why you need to get a working version for Flex SDK.
At this point, you can now compile the sample files located in ~/Packages/flex/samples/ directory. Simply navigate to the directory and run the shell script build.sh and you’ll see the output files with the extension .swf, you can drop the swf file onto a browser and it will render once it gets loaded.
This is the last step to get you going. Flex is browser dependent and mostly all testing will be done using a browser. In Ubuntu’s case, the Firefox browser is already installed and accessible from the desktop toolbar.
At this point, your Flex development environment is already set up. And if you count how much they cost to get these tools installed you will be surprised they are free as in beer.
Thanks for reading if you’ve reach this far.
Addendum: by the way, check out the Flex SDK website for more information on developing applications using the Flex SDK