Modify the classpath – Adobe Flash Professional CS3 User Manual

Page 421

Advertising
background image

FLASH CS3

User Guide

415

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 ".").

See also

“Set the classpath for ActionScript 2.0” on page 422

“Set the classpath for ActionScript 3.0” on page 423

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.

Advertising