Posts in Category "Flash Builder"

How to Use AIR 2.6 with Flash Builder 4

Flash Builder 4 and AIR 2.6 are technically not a supported configuration, and the version of Flash Builder Burrito that is on Labs is not 2.6 compatible yet, either. Fortunately, with a very simple work-around, it is possible to combine AIR 2.6 and Flash Builder 4.

The first thing you need to do is overlay the SDK (combine the AIR SDK with the Flex SDK). These instructions haven’t been updated in some time, but they’re still accurate.

Once you’ve added the new SDK in Flash Builder, you will find that you have access to new AIR 2.6 APIs (overview here), however if you try to run your application, you will get a runtime VerifyError. To work around this issue, follow these simple steps:

  1. Right-click on your project and choose "Properties".
  2. Select the "Flex Compiler" section.
  3. In the "Additional compiler arguments" field, add -target-player=11.
  4. Click "OK".

Debug your application again, and everything should work fine.

How to Create an ActionScript AIR Project in Flash Builder

In Flash Builder 4, I used to follow these steps to create an ActionScript AIR project:

  1. Go to File > New > Flex Project.
  2. Create a project as usual, making sure “Desktop” is chosen as the Application Type.
  3. Rename the default application MXML file to something temporary.
  4. Create a new ActionScript file with the name of the application (and make sure it extends Sprite).
  5. Right click on the new ActionScript file, and choose “Set as Default Application.” This renames the application descriptor file accordingly.
  6. Delete the old temporary MXML file.

Not very smooth. Fortunately, in Flash Builder “Burrito” (still a preview release), there’s an ActionScript Desktop (AIR) project. To create an ActionScript AIR project in “Burrito,” all you have to do is:

  1. Select File > New > ActionScript Project.
  2. Set up your project as usual and make sure the “Application Type” is set to “Desktop.”

This is obviously a much better work-flow, and a big improvement. There’s even mobile application types for both Flex and ActionScript. If you haven’t tried “Burrito” yet, give it a try.