Java ActionScript Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
samples merged with latest trunk and binding changes Dec 6, 2009


Relevant Sites:

Adobes ‘Set up your Development Environment’
All Ant Binary Downloads
Ant 1.7.1
Macports Guide
Flex SDK Forum

Install Git, and SVN

If you don’t have MacPorts, install that. It makes it so you don’t have to install everything from source. Then install git, svn, ant, and flex. The Flex Team uses Ant 1.7.0, so make sure you get that one:

  1. Mac Leopard MacPorts DMG
  2. Ant 1.7.0
  3. TextMate
  4. Install the TextMate bundles so it’s easier to code:
    • mkdir ~/Library/Application\ Support/TextMate/Bundles
    • cd ~/Library/Application\ Support/TextMate/Bundles
    • git clone git://
    • git clone git://
    • git clone git://
  5. sudo port install git-core +svn
  6. git clone git://
  7. cd flex
  8. source # setup flex sdk

Build and Test

Now that you have the basic Development Environment setup, you will need to compile the Flex SDK, run their test suite to make sure it passes, and then load it into Flex Builder.

  1. ant -q main # ant task to compile all of flex
  2. ant -q checkintests # ant task to run flex test suite, run this when you make changes to make sure everything still works

Other helpful tasks:

  1. ant -q framework-compile # compiles just the “mx” framework
  2. ant -q spark-compile # compiles just spark framework
  3. cd frameworks/projects/textLayout && ant -q compile # compiles the textLayout framework

If ant -q checkintests doesn’t work, you will have to recompile the flex sdk.

Setting up Flex Builder

Once you have downloaded and installed everything above, you’re ready to use the sdk in Flex:

  1. Go to Preferences → General → Linked Resources
  2. Add FLEX_SDK, and the path to the downloaded sdk, and save
  3. Go to Preferences → Flex → Installed Flex SDKs, and add the path to the downloaded sdk, and name it “Flex 4”.

Create your project! It’s up!

To stay up-to-date with the latest changes, whenever you get a chance, either by checking github, or just by habit, run:

  1. git pull origin master
  2. ant -q main
  3. ant -q checkintests # only if you want

That’ll update your flex source, recompile it, and run the tests. If you have Flex Builder 3 open when you do this, you will need to refresh your project (but “refresh” doesn’t always work). What I do is make a change to the Flex Project files that you’re working on, and “build”. And make sure you empty the browser cache because it stores the old Flex SDK sometimes.

Here is a helpful command-line alias to get you to that sdk directory:
alias flexsdk="cd ~/Documents/Development/git/flex" # or wherever it is


Using Git to Modify the Flex SDK

The best way to learn Git is to watch this Peepcode screencast, and to get the Git book:

Peepcode Git Screencast

Here is a nice overview of the commands:

Git Basic Tricks

If you add something to the git cache, and you haven’t committed, and you want to remove everything to start over, do this:

git rm -r —cached . # remove added files

= This is the Unofficial Github port of Adobe Flex

== Notes

Adobe builds Flex with Cygwin on Windows XP Pro SP2.

It requires the following software that is not under source control:

J2SDK 1.5.0_13 (see Ant 1.7.0 (see

The following environment variables must be set:


The PATH must include

bin directory of Flex SDK bin directory of Ant bin directory of Java

For testing, the Flash Player’s mm.cfg file must have the following entries

ErrorReportingEnable=1 TraceOutputFileEnable=1

and a FlashPlayerTrust file must allow local SWFs to access local files.

To build and test the SDK, execute

ant main checkintests


  1. Make changes ONLY to the frameworks/projects directory (where the ActionScript source code is). If you want to make changes to the modules directory for the compiler, good luck remembering what you’ve done!
  2. Merge with the trunk at least once a week:
    1. svn merge
      • This command merges your remote repository with the trunk
    2. svn merge -r currentRevision:HEAD .
      • This merges the trunk with your local repository
  3. You will likely have a lot of merge conflicts, so find them with this command:
    grep -r “<<<<<<<[^<]” ./frameworks/projects
  4. Delete the left and right conflict files, and fix anything. If you know you didn’t touch that file, just go to the adobe site and grab the source for that file and copy/paste it.
  5. svn update
    • This updates you with YOUR REMOTE REPOSITORY, so make sure you have merged your remote repository with the trunk
  6. If you keep getting errors, and they’re not in the frameworks/projects directory, just delete the whole directory from the root (say the “modules” directory), and do “svn checkout ….” from the trunk.
  7. svn commit