EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 242

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.
NOTE
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.

Table of Contents

Related product manuals