Preparing for ActionScript or Flex Application Development
In this section:
- Preliminary steps
- Registering a Flex or AIR SDK in IntelliJ IDEA
- Configuring general Flex compiler settings
- Creating a Flash module
- Configuring module contents
To prepare for ActionScript or Flex application development:
- Make sure that the Flash/Flex Support plugin is enabled. The plugin is bundled with IntelliJ IDEA and activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.
- Download and install a Flex or AIR SDK on your computer. IntelliJ IDEA provides integration with Apache Flex, Adobe Flex, Adobe AIR and Adobe Gaming SDKs.
- Register the Flex or AIR SDK in IntelliJ IDEA. (You can postpone this step until a later time. You will be able to specify the SDK when creating a Flash module.)
- Check general Flex compiler settings and, if necessary, adjust them to your needs.
- Create a new project with a Flash module, or add a Flash module to an existing project.
See Creating a Flash module.
Note that you can create a project or a module by importing Adobe Flash Builder projects.
- Check the initial module configuration and make the necessary adjustments.
These may include configuring the module contents,
modifying the existing build configuration and creating additional ones, etc.
All these tasks, however, may be performed at a later time, when needed, in parallel with developing your source code.
Registering a Flex or AIR SDK in IntelliJ IDEA
To register a Flex or AIR SDK in IntelliJ IDEA
- Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
- Under Platform Settings, click SDKs.
- Click Add New SDK on the toolbar, and then click Flex/AIR SDK in the Add New SDK list.
In the dialog that opens,
select the directory in which the Flex or AIR SDK is installed and click OK.
As a result, the SDK configuration is shown on the SDK page in the right-hand part of the Project Structure dialog.
- Generally, you don't need to make any changes on the Classpath and Sourcepath tabs because all the necessary libraries and sources are already there. However, you may want to add external online documentation to be able to access additional reference information when writing your code. To do that:
- Click OK in the Project Structure dialog.
Configuring general Flex compiler settings
To configure general Flex compiler settings
- Open the Settings/Preferences dialog (for example, Ctrl+Alt+S, or on the toolbar).
- In the left-hand part of the dialog, under Build, Execution, Deployment node, open the Compiler node and click ActionScript and Flex Compiler.
- On the Compiler > ActionScript and Flex Compiler page, configure the settings as required.
Creating a Flash module
To create a Flash module
Do one of the following:
If you are going to create a new project:
click Create New Project on the Welcome screen or
select File | New | Project.
As a result, the New Project wizard opens.
If you are going to add a module to an existing project:
open the project you want to add a module to, and
select File | New | Module.
As a result, the New Module wizard opens.
- If you are going to create a new project: click Create New Project on the Welcome screen or select File | New | Project.
- On the first page of the wizard, in the left-hand pane, select Flash.
- In the right-hand part of the page, select the necessary options. For more information, see Flash.
- Specify the name and location settings. For more information, see Project Name and Location or Module Name and Location.
As a result, the module structure looking similar to this is generated (the contents may be different depending on the module options that you have selected):
In this structure:
html-templateis a folder with files that constitute an HTML wrapper template.
srcis a folder for your application source files (
In addition to the module itself, IntelliJ IDEA creates the following:
Configuring module contents
To configure module contents
The module contents are configured by adding and removing the module content roots as well as by assigning individual folders (within the content roots) to source folders, test source folders and also by excluding the folders.
For a Flash module, generally, these task are performed on the Module page of the Project Structure dialog.
To access this page: