View comments | RSS feed

Flash CS3  |  Go to CS4 Help

Modify the classpath

The classpath tells the ActionScript compiler where to look for external ActionScript files your FLA file references.

When you use ActionScript 2.0, you can set a document-level classpath. This is useful when you create your own classes and you want to override the global ActionScript classpath that is set in the ActionScript preferences.

When you modify a classpath, you can add absolute directory paths (for example, C:/my_classes) and relative directory paths (for example, ../my_classes or ".").

Modify the global classpath

  1. Select Edit > Preferences (Windows) or Flash > Preferences (Macintosh) to open the Preferences dialog box.
  2. Click ActionScript in the Category list, and then click ActionScript 2.0 Settings.
  3. Do one of the following:
    • To add a directory to the classpath, click Browse To Path, browse to the directory you want to add, and click OK.

      Alternatively, click Add New Path (+) 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 Browse to Path, 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 Remove From Path.

      Note: Do not delete the absolute global classpath. The software uses this classpath to access built‑in classes. If you accidentally delete this classpath, reinstate it by adding $(LocalData)/Classes as a new classpath for ActionScript 2.0 or $(AppConfig)/ActionScript 3.0/Classes for ActionScript 3.0.

Modify the document-level classpath

Changing the classpath in the publish settings applies only to the current FLA file.

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

      Alternatively, click Add New Path (+) 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 Browse To Path, 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 Remove From Path.



Comments

Comments are no longer accepted for Flash CS3. Flash CS4 is the current version. To discuss Flash CS3, please use the Adobe forum.

Comments


deriel said on Apr 18, 2008 at 3:14 PM :
Missing Information?


Where is there a list of class path variables that are supported by Flash? Aside from LocalData and AppConfig.

Eric deRiel
AidanFraser said on Sep 16, 2008 at 4:29 PM :
I second Eric's request: it would be great to have a list of available variables. Also, can you set custom ones?

Also, are they sourced from the environment? So, on windows, could I use $(ProgramFiles)/SomeFramework/src ??

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/UsingFlash/WS3e7c64e37a1d85e1e229110db38dec34-7fa2.html