About Flash Builder projects

Flash Builder uses a traditional approach to software development: grouping the resources (folders and files) that constitute an application into a container called a project. A project contains a set of properties that control how the application is built, where the built application resides, how debugging is handled, and the relationships to other projects in the workspace.

To manage projects, you use the Package Explorer view, which lets you add, edit, and delete resources. You can also close projects within a workspace, import resources, and link to external resources.

In addition to Flex projects, Flash Builder provides a basic project type called an ActionScript project. Using an ActionScript project, you can code and debug ActionScript applications that directly access the Adobe Flash Player APIs and are compiled into SWF files. ActionScript projects do not use the Flex framework or MXML language.

Applications deployed to Flash Player

Use the New Flex Project wizard to create applications that can be deployed to the Flash Player. When creating the project, specify the application type as Web (runs in Adobe Flash Player). These applications are compiled into stand-alone SWF files. For more information, see Working with projects and ActionScript projects.

Applications deployed to Adobe AIR

Use the New Flex Project wizard to create applications that can be deployed to Adobe® AIR®. Specify the application type as Desktop (runs in Adobe AIR). Use the Export Release Build feature to generate a release-quality, installable AIR package. For more information, see Developing AIR applications with Flash Builder.

With Flash Builder you can debug, package, and manage AIR projects. Flash Builder enables you to run applications in AIR.

The Adobe AIR Marketplace is a place where AIR developers can publish AIR applications for users to download. To find the Marketplace, go to www.adobe.com/go/marketplace. If you have questions on the Adobe AIR Marketplace, go to www.adobe.com/go/marketplace_faq.

Flex Library Projects

You also use Flash Builder to build custom code libraries that you share between your applications or distribute to other developers. A library project generates a SWC file, which is an archive file for Flex components and other resources. For more information, see Library projects.

Applications contained in projects

To begin building an application in Flash Builder, you must first create a project. Specify whether the application is a Web application (runs in Flash Player) or Desktop application (runs in AIR). When you create a Flex project, a main application file is created for you. Then you add other resources such as MXML application files, custom MXML component files, ActionScript files, and other assets that make up your application. When you create an ActionScript project, a main ActionScript file is created; then you can build an application by using ActionScript and the Flash Player API. For more information, see Creating Flex projects and Managing projects.

Projects managed in workspaces

Projects are managed from within a workspace, which is a defined area of the file system that contains the resources (files and folders) that make up your applications. By default, your projects reside within the workspace. You can, however, create projects that are located outside the workspace; Flash Builder automatically links them to the workspace. When you switch workspaces, Flash Builder restarts.

More than one project in each workspace

You can add as many projects to a workspace as needed. All of your projects are displayed in the Package Explorer, and you can manage them as needed. You can add resources, organize your projects into folders, and build projects in the workspace. For more information, see Managing projects and Creating folders and files in a project.

External linked resources

In addition to the resources in your projects, you can link to resources outside a project and workspace. Linked external resources appear as part of the project but reside outside the project’s location. For more information, see Linking to resources outside the project workspace.

More than one application in a project

Flash Builder lets you define more than one file in your project as an application. When you create a project, Flash Builder generates a main application file that serves as the entry point into your application, and the compiler uses this file to generate the application SWF file. However, if your project is complex, you can create additional application files. All application files must reside in the src folder under the root folder of your project. For more information, see Managing project application files.

Support for Multiple Flex SDKs

You could have projects that are in progress or an older project code base that must be maintained. With Flash Builder, you can work with different versions of the Flex SDK. To specify the installed SDKs, you configure the Flash Builder workspace, which provides a default SDK for any project. After you set up a project, you can add, remove, or edit SDK configurations in the Preferences dialog by selecting Flex > Installed SDKs. You can also modify the SDK configurations by selecting Project > Properties > Flex Compiler. For more information, see Using multiple SDKs in Flash Builder.

Automatic project builds

By default, your project is automatically built any time you save changes to a file. You have complete control over how and how often your applications are built. If you have no special requirements for customizing the build, it works transparently and automatically generates the application SWF files. For more information, see Building projects.

Export Release Build

When your application is ready to deploy, you use the Export Release Build wizard to create a release-quality non-debug version of your application. The wizard copies required assets to a bin-release folder separate from the debug version. You can specify whether or not to include the application’s source code. The exported application is an optimized production build that can be viewed by end users. For Adobe AIR projects, AIR applications are exported to an AIR file. You use Export Release Build to create a digitally signed AIR file, which users install before running an application.

Custom Ant scripts

Apache Ant is a Java-based build tool that you use to create custom scripts for building applications in Flash Builder. You use Ant to modify and extend the standard build process. For more information, see Customizing builds with Apache Ant.

Command line build

With Flash Builder Premium, you can implement command line builds. Use command line builds to synchronize a developer’s individual build settings with a nightly build. For more information, see Flash Builder command line build.

Project types

You use Flash Builder to create project types in the following configurations:

Flex projects

Project configuration options are based on how your application accesses data and if you have Adobe® LiveCycle® Data Services ES or Adobe BlazeDS installed. You can create projects for web (runs in Flash Player) or desktop (runs in Adobe AIR) applications. Here are the options:

None
If you do not have an application server, this basic configuration lets you specify the output folder for your compiled Flex application. You also set the build paths for your new project.

ASP.NET
With Microsoft Windows and Microsoft Visual Web Developer installed, you can create projects that use ASP.NET Development Server for deployment. Also, if you have access to Internet Information Service (IIS), you can create projects with a Flex output folder under IIS.

ColdFusion
This project configuration lets you create projects that use ColdFusion with LiveCycle Data Services, BlazeDS, or ColdFusion Flash Remoting. If none of these options is selected, a ColdFusion project is created with an output folder under web root (or virtual folder). Flash Builder provides tools for accessing remote data from ColdFusion data sources. For more informations, see Building data-centric applications with Flash Builder.

J2EE
This project configuration lets you create projects that use J2EE for deployment. You specify whether to use the remote object access service and either LiveCycle Data Services or BlazeDS. If you do not select a remote object access service, an output folder is created under the Java application server root. If you select the Use Remote Object Access Service option, you can use Flex with LiveCycle Data Services or BlazeDS. Your project is deployed to a LiveCycle Data Services or BlazeDS server. With the Eclipse Web Tools Project (WTP) plug-in installed, you select the Create Combined Java/Flex Project Using WTP option to create combined Java/Flex projects with or without remote object access service. For locally compiled projects with WTP, projects are deployed on your J2EE server.

You can use LiveCycle Data Services with or without WTP. If you use it with WTP, the project will not be deployed on the local LiveCycle Data Services server, but it will be deployed using WTP features.

PHP
This project configuration lets you create Flex projects that have a Flex output folder under the Apache/IIS web root (or virtual folder). Flash Builder provides tools for accessing remote data from PHP servers. For more informations, see Building data-centric applications with Flash Builder.

Other
If you have an application server other than those previously listed, this option lets you specify the output folder for your compiled application. You can also set the build paths for your new project.

Web services and HTTP services
For each application type, you can create applications that can access web services and HTTP services. Flash Builder provides tools for accessing web services and HTTP services. For more informations, see Building data-centric applications with Flash Builder.

ActionScript projects

Based on the Flash API, not the Flex framework, ActionScript projects let ActionScript developers use Flash Builder to code, build, and debug ActionScript-only applications. Because these projects do not use MXML to define a user interface, you cannot view the application layout and design in Design mode. You work exclusively in the source editor, the debugging tools as necessary, and then build the project into SWF application files to preview and test your application in a web browser or stand-alone Flash Player. For more information about ActionScript projects, see ActionScript projects.

Library projects

Library projects are used to package and distribute components and other resources. They generate SWC files that you add to other projects or distribute to other developers. For more information, see Library projects.

Flash Professional projects

Use Flash Professional projects to edit, build, or debug FLA or XFL files created in Adobe Flash Professional CS5. Flash Professional projects are only available if you have Flash Professional CS5 installed. For more information, see Creating Flash Professional projects.

Projects in the Package Explorer

All projects in a workspace are displayed in the Package Explorer, as the following example shows. The Package Explorer provides a tree view of projects from both a physical view and logical (flat) view. Using this view, you manage your projects by adding and deleting resources (folders and files), importing and linking to external resources, and moving resources to other projects in the workspace.

Flex Navigator view

Highlights of the Package Explorer include:

  • Displaying ActionScript packages in either a hierarchical or flat presentation.

    Use the Package Explorer’s menu to specify the package presentation.

  • Project libraries are represented in two top-level nodes, one node for the Flex SDK and the other for referenced libraries.

    You can expand a library’s contents and open editors to view attachments.

  • Error and warning badges on Package Explorer nodes notify you of problems within a package.

  • You can limit which projects and resources are visible.

    You can create a working set (a collection of resources), create display filters, and sort resources by name and type. These options are available from the Package Explorer menus. For more information about modifying views, see Navigating and customizing the Flash Builder workbench.

  • You can expand ActionScript, MXML, and CSS files and see a tree view of their contents.

From the Package Explorer, you can open the project resources for editing. For example, you can edit MXML and ActionScript in <fx:Script> blocks and CSS in <fx:Style> blocks, or you can switch to Design mode and visually manipulate components and controls to create the application’s layout and behavior. For more information about working with the Flash Builder editors, see About code editing in Flash Builder and Building a user interface with Flash Builder.

Then you add projects, files, and folders, and organize and manage them as needed (see Creating folders and files in a project).

Most menu commands that you use in the Package Explorer view are also available from the view’s context menu.

For more information about working with projects in the Package Explorer, see Managing projects and Creating folders and files in a project.

Creating projects and opening resources

Flash Builder provides the wizards to help you create Flex projects, ActionScript projects, and Flex Library projects. The following table describes the projects. To create a project, select File > New.

Project type

Description

ActionScript Project

An ActionScript project based on the Flash API, not the Flex framework. ActionScript projects let ActionScript developers use Flash Builder to code, build, and debug ActionScript-only applications. For more information, see Creating ActionScript projects

Flex Project

A Flex project contains a set of properties that control how the application is built, where the built application resides, how debugging is handled, and the relationships to other projects in the workspace. In a Flex project you can create applications that run in Flash Player (web applications) or Adobe AIR (desktop applications). For more information, see Setting Flex project properties.

Flex Library Project

Flex Library Projects are used to package and distribute components and other resources. They generate SWC files that you add to other projects or distribute to other developers. For more information, see Library projects.

Flash Professional Project

Use Flash Professional projects to access Flash FLA or XFL files created with Flash Professional CS5. This feature allows Flash Professional developers to take advantage of the editing and debugging environment available with Flash Builder. The features of Flash Professional projects are only available in Flash Builder if you have installed Flash Professional CS5.

Project resources

Flex and ActionScript applications support several standard resource types (MXML, ActionScript, and CSS). The following table lists the resource types that you can add to your projects. To add these resources, select File > New

Resource type

Description

ActionScript Class

An ActionScript class file. When you add this type of resource, the New ActionScript Class wizard prompts you for class definition elements, such as the superclass, interfaces, and so on. For more information about working with ActionScript in Flash Builder, see Creating an ActionScript class.

ActionScript File

A text file template for creating ActionScript functions.

ActionScript Interface

An ActionScript interface file. When you add this type of resource, the New ActionScript Interface wizard prompts you for interface definition elements such as extended interfaces and the package in which they reside. For more information about working with ActionScript in Flash Builder, see Creating an ActionScript interface.

CSS File

A text file template for creating a Cascading Style Sheets file.

File

An unformatted text file. For more information, see Creating folders and files in a project.

Folder

A standard file system folder for organizing the contents of your projects. For more information, see Creating folders and files in a project.

MXML Application

A standard application file with the <s:Application> tag as the root MXML element (for Flex 4 projects). You can specify which layout to use for the application. A Flex project can have more than one application file. For more information, see Managing project application files.

MXML Component

A standard component file with the <s:Group> tag as the root MXML element. The wizard allows you to specify an alternate root MXML element. For more information, see Creating MXML components using Flash Builder.

MXML Item Renderer

Item renderers control the appearance of a data item in a DataGroup, SkinnableDataContainer, or in a subclass of those containers. The appearance can include the font, background color, border, and any other visual aspects of the data item. For more information, see Generating custom item renderers.

MXML Skin

Skin classes modify the appearance of controls in a user interface. The way you create, edit, and import skins differs for Spark components and MX components. For more information, see Modifying user interfaces using skins.

MXML Module

A resource that can be added to an existing application project or created separately, but always associated with one application. For more information, see Creating modules in Flash Builder.

Test Case Class

Test Suite Class

FlexUnit test cases and test suites. You can generate and edit repeatable tests that can be run from scripts or directly within Flash Builder. For more information, see FlexUnit test environment.

Package

Create a new package for project source files. The default location is under the src directory in your project folder.

Other

Other file types that are registered in Flash Builder. Select File > New > Other to add any other file types. For example, if you have a Java plug-in installed in Flash Builder, you can add new Java classes, interfaces, and packages.

When a file type is registered in Flash Builder, a corresponding editor is also available in the workbench. For more information, see Associating editors with file types.

You can always add unregistered file types to your projects by importing them. For more information see Importing projects

For more information about adding resources to your projects, see Creating folders and files in a project.