The classpath

This section describes the Flash classpath.

Understanding the classpath

The classpath is an ordered list of directories in which Flash searches for class files during component export or SWF file generation. The order of the classpath entries is important because Flash uses the classes on a first-come, first-served basis. At export time, classes found on the classpath that match linkage identifiers in the FLA file are imported into the FLA file and registered with their symbols.

A global classpath refers to all FLA files generated with Flash. A local classpath applies only to the current FLA file.

The default local classpath is empty. The default global classpath consists of the following two paths:

The dot (.) indicates the current working directory. Flash searches the FLA file's current directory for ActionScript classes.

The $(UserConfig)/Classes path indicates the per-user configuration directory. This directory points to the following locations:

The UserConfig directories mirror the directories located in Flash_root/en/Configuration. However, the classpath does not directly include those directories, and it is relative to the UserConfig directory.

Changing the classpath

You can change the classpath for an individual FLA file (local classpath) or for all FLA files you work with in Flash (global classpath).

To change the global classpath:

  1. Select Edit > Preferences.

    The Preferences dialog box appears.

  2. Select the ActionScript tab.
  3. Click the ActionScript 2.0 Settings button.

    The ActionScript Settings dialog box appears.

  4. Add, remove, or edit entries in the Classpath box.
  5. Save your changes.

To change the local classpath:

  1. Select File > Publish Settings.

    The Publish Settings dialog box appears.

  2. Select the Flash tab.
  3. Click the Settings button.

    The ActionScript Settings dialog box appears.

  4. Add, remove, or edit entries in the Classpath box.
  5. Save your changes.