242
Classes
The relative path portion of the global classpath is denoted by a single dot (
.
) and 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.
You can use the following steps to add a global classpath or edit an existing classpath.
To modify the global classpath:
1.
Select Edit > Preferences (Windows) or Flash > Preferences (Macintosh) to open the
Preferences dialog box.
2.
Click the ActionScript in the left column, and then click the ActionScript 2.0
Settings button.
3.
Click the Browse to Path button to browse to the directory you want to add.
4.
Browse to the path that you want to add and click OK.
To delete a directory from the classpath:
1.
Select the path in the Classpath list.
2.
Click the Remove from Path button.
For information on importing packages, see
“Working with packages” on page 230
.
Using a document-level classpath
The document-level classpath applies only to FLA files. You set the document-level classpath
in the Publish Settings dialog box for a particular FLA file (File > Publish Settings, then click
the Flash tab, and then click ActionScript 2.0 Settings). The document-level classpath is
empty by default. When you create and save a FLA file in a directory, that directory becomes
a designated classpath directory.
When you create classes, in some cases you might want to store them in a directory that you
then add to the list of global classpath directories in the following situations:
■
If you have a set of utility classes that all your projects use
■
If you want to check the syntax of your code (click the Check Syntax button) that’s within
the external ActionScript file
Creating a directory prevents the loss of custom classes if you ever uninstall and reinstall Flash,
especially if the default global classpath directory is deleted and overwritten, because you
would lose any classes that you stored in that directory.
NO
TE
Do not delete the absolute global classpath. Flash uses this classpath to access
built-in classes. If you accidentally delete this classpath, you can reinstate it by
adding $(LocalData)/Classes as a new classpath.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...