IntelliJ IDEA 12.1 has complete support for the Adobe Gaming SDK, i.e. Adobe AIR SDK bundled together with Away3D, Starling and Feathers frameworks. In this tutorial you'll get step-by-step instructions on how to set up, build and run sample applications included in the SDK.

We assume you have Adobe Gaming SDK installed on your computer and IntelliJ IDEA 12.1 (or later) is running. Samples included in the SDK are shipped with Flash Builder project files (.project, .actionScriptProperties, etc.), and this makes setting up an IntelliJ IDEA project quick and easy, because IntelliJ IDEA is able to import a Flash Builder project in just a few clicks.

If you are new to IntelliJ IDEA but have experience with Flash Builder or other Eclipse-based products, there are some differences in terminology that you should keep in mind:

  • Flash Builder workspace is the equivalent of IntelliJ IDEA project.
  • Flash Builder project is the equivalent of IntelliJ IDEA Flash module.

IntelliJ IDEA Flash module contains one or more Flash build configurations. A build configuration is a set of parameters that define how to produce SWF or SWC, HTML wrapper or AIR descriptor, Desktop, Android or iOS package from the module source.

1. Import Flash Builder project(s)

1a. Import a single Flash Builder project

To import a single Flash Builder project, select File | Open... or click Open Project on the IntelliJ IDEA welcome screen. Then in the file chooser select a .project file, e.g. [SDK]/Samples/Away3D/Invawayders/.project. If you decide to import a single project, you will skip step 2.

1b. Import multiple Flash Builder projects

To import multiple projects, select File | Import Project... or click Import Project on the IntelliJ IDEA welcome screen. Then in the file chooser select the base folder to search for projects in: [SDK]/Samples

2. Pass 'Import Project' wizard

At the next step select Import project from external model and Flash Builder.

Leave the defaults at the next step.

Now you can choose which projects to import. Let's keep them all.

3. Configure SDK

If you have Flash Builder installed on your computer, IntelliJ IDEA will automatically select Flex or AIR SDK from the Flash Builder installation. Otherwise you'll be asked to select SDK manually.

Click [...], at the next dialog click [+], select Flex/AIR SDK on the popup, and then select the path to AIR SDK bundled with Adobe Gaming SDK: [SDK]/AIR SDK/air3.5_p5_sdk_asc2_win_011013.

4. Explore Project Structure

Now all samples are imported and ready to be started. But first let's explore the structure of the IntelliJ IDEA project we just created (the Project Structure button on the main toolbar).

5. Look through the Run Configurations

Look through the Run configurations created by IntelliJ IDEA (Run | Edit Configurations...). Flash run configurations have different options depending on the target platform of the build configuration on which run configuration is based: Web, Desktop or Mobile. You don't have anything to fix here; the purpose of this step is just to understand that you can configure the following:

6. Explore the source code

Coding assistance is the strongest feature of IntelliJ IDEA. It includes code highlighting, completion, analysis (including UML), refactorings, intentions, inspections, code generation, navigation and much more. We won't focus on these features in this tutorial (a whole book could be written on the topic), but at the first glance you'll notice a lot of warnings about unused imports, unused classes/fields/methods/parameters, methods that could be static, fields that could be converted to local vars, and so on.

7. Start the app.

Just select any run configuration in the corresponding tool bar combo box and click Run or Debug.

8. Develop with pleasure!