Category Archives: Flex 3 SDK

Viewing a Flex application’s generated source code

The following example shows how you can view a Flex application’s generated source code by adding the -keep compiler argument in Flex Builder.

To add a compiler argument in Flex Builder, launch the Project Properties dialog box by selecting Project > Properties from the main menu, select the Flex Compiler option from the left menu, and type “-keep” at the end of the Additional compiler arguments text input field (see Figure 1).

Flex Builder Project Properties dialog box
Figure 1. Flex Builder Project Properties dialog box.

Full code after the jump.

Continue reading Viewing a Flex application’s generated source code

Downloading and installing Flex SDK builds from

The Flex SDK is constantly changing and improving. Every day bugs are getting fixed, features are being added or improved. If you want to use the latest code, you’ll need to know where to download the Flex SDK from and how to add the new SDK to Flex Builder.

New builds of the Flex SDK can be downloaded from the Flex SDK Downloads page on the site. Currently, this page gives you links to download the latest Gumbo nightly build, the latest Flex 3 nightly build, or the various Flex 3 Compiler Modules. There are three main SDK build types:

  • Latest Milestone Release Builds — Releases are builds that have been declared major releases by the development team – Releases are the right builds for people who want to be on a stable, tested release, and don’t need the latest greatest features and improvements. There are generally a few milestone releases on a given branch and will be signified by incrementing the first minor number (e.g., 3.1).

    The Flex team creates signed versions of the major RSLs for every milestone release.

  • Stable Builds — Stable builds have been found to be stable enough for most people to use. They are promoted from nightly build by the architecture team after they have been used for a few days and deemed reasonable. The latest stable build is the right build for people who want to stay up to date with what is going on in the latest development stream, and don’t mind putting up with a few problems in order to get the latest and greatest features and bug fixes. The latest stable build is the one the development team likes people to be using because of the valuable and timely feedback; however it should be understood that the only fully supported versions are milestones (e.g., Adobe technical support supports milestones, though may point to fixes in stable builds) . The development team attempts to put out a stable build on active branches within 60 days of each other. Stable builds are signified by incrementing the second minor number (e.g., 3.0.1).

    The Flex team dos not currently create signed versions of the major RSLs for stable builds as it would begin negating the value of the framework cache (that said, we’ll be keeping an eye on things and re-evaluating as necessary).

  • Nightly Builds — Nightly builds are produced every night from whatever has been released into the HEAD of the SVN repository. They are untested and may have problems. Some possibly will not work at all. These drops are normally only useful to developers actually working on the Flex Project, but may be used to monitor how a given feature is progressing. Nightly builds follow the numbering of the last stable build, with only the third minor number incrementing (and matching the last revision number from Subversion).

[source SDK Build Types]

The next important thing to understand is the different types of Flex SDKs available:

  • Free Adobe Flex SDK — An official Adobe product, with released versions found at The Adobe Flex SDK contains everything you will need to build and deploy Flex RIAs. It is licensed under the Adobe Flex SDK license because it contains a mixture of open and closed source components (see license info above). The Flex framework source code included in this package is called out explicitly as licensed under the MPL. However, if you want just the open source stuff, you should look at the Open Source Flex SDK.
  • Open Source Flex SDK — For users who want a package that contains only open source code, we offer the Open Source Flex SDK, which is available from this site. This package is entirely under the MPL, including its binaries. It contains the majority of the Flex SDK (compilers, framework, debugger) but does not include anything that is not open source like the Adobe Flash Player, Adobe AIR, or the advanced font encoding libraries. This SDK is capable of creating Flex applications and can be used in whatever fashion the MPL allows. If you have questions regarding the use of code licensed under the MPL, you should consult with an attorney.
  • Adobe Add-ons for Open Source Flex SDK — This package contains all of the items that are in the Adobe Flex SDK and not in the Open Source Flex SDK. Downloading this file will allow you to bring the Open Source Flex SDK to parity with the Adobe Flex SDK. This package includes the Adobe Flash Player, Adobe AIR, the advanced font encoding libraries, and the code that allows licensing of things like the Data Visualization components. All of these elements are licensed under the Adobe Flex SDK license.

[source Flex SDK Downloads]

Downloading and installing Flex SDK builds into Flex Builder 3

  1. To download the Flex 3 SDK, navigate to the following URL:
  2. Download the latest nightly build. You can download either of the available SDK types (Adobe Flex SDK, Open Source Flex SDK, or Adobe Add-ons — see the previous list for explanations between the differnt types). For this example I am downloading the latest nightly build of the Adobe Flex SDK.
  3. Save the nightly build to your hard drive and extract the files from the .ZIP file
  4. In Flex Builder 3, select Window > Preferences from the main menu to open the Flex Builder Preferences dialog box. To add, edit, or remove a Flex SDK, select Flex > Installed Flex SDKs.
  5. Click the Add button to launch the Add Flex SDK dialog box and click the Browse button to navigate to the directory where you extracted the nightly SDK build in a previous step.
  6. Click OK to apply your changes and add the new Flex SDK. If you want to set the newly downloaded SDK as your default SDK, click the check box to the left of the SDK name. Click OK to dismiss this dialog.

That’s it! You’ve successfully downloaded and installed the latest and greatest version of the Flex SDK into Flex Builder.

If you want to compile your code against this new SDK you can select Project > Properties from the main menu, select Flex Compiler from the menu on the left, and select your new SDK from the dropdown menu in the Flex SDK version section.

Also worth mentioning is that you can manage your installed SDKs via the Project Properties dialog menu by clicking the Configure Flex SDKs link, which takes you to the Installed Flex SDKs preferences.

Happy Flexing!

Migrating from Flex Builder 3 Beta 1 to Flex Builder 3 Beta 2

The following entry walks you through uninstalling the standalone version of Flex Builder 3 Beta 1 and installing the new standalone version of Flex Builder 3 Beta 2 from the Adobe Labs site.

Before you get started…

  • If you want to back up your existing Flex Builder 3 SDKs, go to the following directory:
    “C:\Program Files\Adobe\Flex Builder 3\sdks\” and copy them somewhere like “C:\dev\Flex\sdks\”.
  • Close any applications that may be using the Adobe Flash Player (including things like web browsers, Yahoo! Instant Messenger, etc.)
  • Download the Adobe Flex Builder 3 Beta 2 (M3) from Adobe Labs, if you haven’t already. You can find it at Save it to your desktop or somewhere easy to find. For the sake of this article I’ll be installing “Download for Windows (EXE, 311 MB)”. Due to the size of the installer, you may want to start the download while performing the other steps.
  • Read the “Flex 3 Beta 2 Release notes”.
  • If you’re the paranoid type, feel free to back up your existing project files at: “C:\Documents and Settings\username\My Documents\Flex Builder Moxie\”.

Once you’ve followed the pre-install steps above (or not), proceed onto the following:

  1. Start > Control Panel > Add or Remove Programs.
  2. Uninstall “Adobe Flex Builder 3”. If you have Adobe Flex Builder 2 installed, you can leave it. I haven’t run into any issues with having the standalone versions of Flex Builder 2 and Flex Builder 3 running side by side.
  3. Uninstall “Adobe Flash Player ActiveX” and “Adobe Flash Player Plugin” to remove the Flash Player plugin from Internet Explorer and Firefox/Mozilla based browsers. To confirm the Flash Player uninstall was successful, you can open Windows Explorer to the “C:\WINDOWS\system32\Macromed\Flash\” directory (I’m using Windows XP) and make sure that there are no rogue OCX files or anything. Usually I’ll manually delete any strange lookig files at this point, and only leave files such as FlashAuthor.cfg or the FlashPlayerTrust folder, if they exist.
  4. You can close the Add or Remove Programs dialog box now.
  5. With the installer downloaded, double click the EXE file (flexbuilder3_b2_win_sa_101107.exe) to begin the install process. The install process is pretty straight forward. Read and accept the license agreement, select a location to install, select whether you want to install the Flash Player plugins for Internet Explorer and/or Netscape or Firefox, and select if you want to install ColdFusion extensions for Flex Builder or JSEclipse (a JavaScript plugin for Eclipse). Next, review the installation details and click the “Install” button when you’re ready. Once started, it takes a few minutes for Flex Builder to install and set itself up. Now is a good time to walk to the kitchen for a tall glass of juice and a cookie. When the installer is finished, click the Done button to close the installer.
  6. You’re pretty much there. Launch Flex Builder and make sure everything is happy. If for any reason you need to install or reinstall Flash Player, you can find the installers at: “C:\Program Files\Adobe\Flex Builder 3\Player\win\”. Again, the ActiveX control is for Internet Explorer, and the Plugin version is for Netscape or Firefox. FlashPlayer.exe is the standalone version of Flash Player.
  7. One of the first things you may notice is that your “Flex Navigator” tab is not showing any of your old projects. To reimport the projects into the existing workspace, select File > Import > Other from the main menu and expand the “General” folder in the Import dialog box. Select the “Select root directory” radio button and click the Browse buton and select your “C:\Documents and Settings\username\My Documents\Flex Builder Moxie\” directory. If you want to select all files, click the “Select All” button, or if you want to only import a handful of projects into the current workspace.
  8. Click the Finish button when you’re done in order to import the specified projects and close the import projects wizard. At this point you should see all your old projects within the Flex Navigator tab.
  9. Flex Builder 3 beta 2 comes with the Flex 2.0.1 Hotfix 3 and Flex 3 M3 (Beta 2) SDKs installed, but if you want to install other Flex SDKs (such as Flex 2.0.1 Hotfix 2, Flex 3 M3 (Beta 1), or the nightly Flex 2.0.1 or Flex 3 SDK builds), select Window > Preferences from the main menu and click the Add button. In the “Add Flex SDK” dialog box, click the Browse button to locate an existing Flex SDK build. For example, if you saved your old Flex Builder 3 Beta 1 SDKs into the “C:\dev\Flex\sdks\” directory, you should be able to browse to “C:\dev\FlexSDKs\2.0.1\” directory to add the Flex 2.0.1 Hotfix 2 SDK. For more information on installing multiple SDKs into Flex Builder 3, see “Installing the latest nightly Flex 3 SDK build into Flex Builder 3”.

Congratulations, that should be it!

Happy Flexing.

Debugging Flex applications with mm.cfg and flashlog.txt

When working with Flex applications, it may useful to see the output from the trace() function. Well, the good news is that if you have the debug version of the Flash Player installed, it is really easy to redirect the trace() output to an external file which can you browse using any text editor.

There are lots of excellent online resources for this already, but here is a brief run-down…

Continue reading Debugging Flex applications with mm.cfg and flashlog.txt

Installing the latest nightly Flex 3 SDK build into Flex Builder 3

Continuing my post from the the other day, if you’re trying out Flex 3 SDK and Flex Builder 3 (codename: Moxie), you may want to consider downloading and installing a newer nightly build of the SDK so you can take advantage of all the bug fixes that happen on a daily basis. The first step is to grab the latest version of the SDK, which can be found over on the Adobe Labs site at¬†All you need to do is read the terms of use and check the check box to enable the downloads. That’s it, no logging in, or registering, just one click and go!

Continue reading Installing the latest nightly Flex 3 SDK build into Flex Builder 3

Downloading the latest Adobe Labs version of Flex 3 SDK/Flex Builder 3 (codename: Moxie)

Whether you’re new to the Wonderful World of Flex, or if you’ve used Flex 1.0, 1.5 or 2 in the past, head on over to the Adobe Labs site and check out the Flex 3 SDK, or if you fancy more of an IDE, grab Flex Builder 3 (which uses Eclipse).

Adobe Flex Builder 3 Public Beta
Adobe Flex 3 SDK Public Beta

If you choose to go the SDK route (it includes a nice command-line compiler, mxmlc) you have the option of grabbing either the Flex 3 SDK Beta 1 release, or you can grab one of the many recent Nightly Builds of the Flex 3 SDK (click the check box to enable the downloads and populate the list of nightly builds). A word of warning about the nightly builds though:

The nightly builds of the Flex 3 SDK do not include support for Adobe AIR. If you require Adobe AIR support you should use the beta 1 version of the Flex 3 SDK.

In an upcoming post, I’ll walk you through installing the standalone version of Flex Builder 3 (Beta 1) and how you can install a nightly build so you can take advantage of the latest code fixes and improvements.

Good luck, and happy Flexing!


For more information on installing the nightly builds into Flex Builder 3, see “Installing the latest nightly Flex 3 SDK build into Flex Builder 3”