Running your applications

Your applications are run (and debugged) based on a launch configuration. When you create new Flex and ActionScript 3.0 applications, a launch configuration specifies the location of the built applications files, the main application file, and so on. You can modify the launch configuration or create custom launch configurations. For more information, see Managing launch configurations.

Running your projects opens the main application SWF file in your default web browser or directly in the Flash desktop player. For information about changing the default web browser or running and debugging with the Flash desktop player, see Changing the default web browser and Running the application SWF file in the stand-alone Flash Player.

You can run your projects in a number of ways in Flex Builder. For example, you can use the Run command from the workbench main menu and toolbar, and from the Navigator view and code editor pop-up menus.

To run the currently selected project with the default Flex application launch configuration:

  1. In the Navigator view, select the project to run.
  2. On the main workbench toolbar, click the Run button ( ). Or, in the code editor, right-click (Control-click on Macintosh) to display the pop-up menu and select Run As > Flex Application.


    Run As popup menu

    If your project is not built yet, Flex Builder builds and then runs it.

  3. Your application appears in your default web browser or the stand-alone Flash Player.

You can run and debug any project files that have been set as application files. (See Managing project application files.)

To create a custom launch configuration:

  1. In the Navigator view, select the project you want to run and open the main application file in the editor.
  2. On the main workbench toolbar, click the Run drop-down list and select Run.


    Run drop-down list

    The Create, Manage, and Run Configurations dialog box appears.

  3. In the list of launch configurations, select Flex Application.
  4. Click New.
  5. Enter the launch configuration name.
  6. Optional. Modify the configuration properties as needed.
  7. Optional. To run the application immediately, click Run.

To run other application files in your project:

  1. In the Navigator view, select the project to run.
  2. On the main workbench toolbar, click the Run drop-down list.


    Run drop-down list

    NOTE

     

    The Run button has two elements: the main action button, and the drop-down list that shows all of the application files in the project that can be run or debugged. When you click the main action button, the project's default application file is run. You can alternatively click the drop-down list and select any of the application files in the project. You can also access the launch configuration dialog box and create or edit a launch configuration by selecting the Run command.

  3. Select the application you want to run.

To run a custom launch configuration:

If you're using the plug-in configuration of Flex Builder, the run command works a bit differently. Instead of running the currently selected project, it runs the most recently launched configuration. You can also select from a list of recently launched configurations.

To run the last launched configuration:

Related topics


Flex 2.01

Take a survey