Modifying the classpath

You can modify the global classpath using the Preferences dialog box. To modify the document-level classpath setting, you use the Publish Settings dialog box for the FLA file. You can add absolute directory paths (for example, C:/my_classes) and relative directory paths (for example, ../my_classes or ".").

By default, the global classpath contains one absolute path (the Classes directory in the user configuration directory) and a relative classpath, denoted by a single dot (.), which points to the current document directory. Be aware that relative classpaths can point to different directories, depending on the location of the document being compiled or published. For more information, see Global and document-level classpaths.

To modify the global classpath:

  1. Select Edit > Preferences to open the Preferences dialog box.
  2. Click the ActionScript tab, then click the ActionScript 2.0 Settings button.
  3. Do any of the following:
    • To add a directory to the classpath, click the Browse to Path button, browse to the directory you want to add, and click OK.

      Alternatively, click the Add New Path (+) button to add a new line to the Classpath list. Double-click the new line, type a relative or absolute path, and click OK.

    • To edit an existing classpath directory, select the path in the Classpath list, click the Browse to Path button, browse to the directory you want to add, and click OK.

      Alternatively, double-click the path in the Classpath list, type the desired path, and click OK.

    • To delete a directory from the classpath, select the path in the Classpath list and click the Remove from Path button.

To modify the document-level classpath:

  1. Select File > Publish Settings to open the Publish Settings dialog box.
  2. Click the Flash tab.
  3. Click the Settings button next to the ActionScript Version pop-up menu.
  4. Do any of the following:
    • To add a directory to the classpath, click the Browse to Path button, browse to the directory you want to add, and click OK.

      Alternatively, click the Add New Path (+) button to add a new line to the Classpath list. Double-click the new line, type a relative or absolute path, and click OK.

    • To edit an existing classpath directory, select the path in the Classpath list, click the Browse to Path button, browse to the directory you want to add, and click OK.

      Alternatively, double-click the path in the Classpath list, type the desired path, and click OK.

    • To delete a directory from the classpath, select the path in the Classpath list and click the Remove from Path button.