EasyManua.ls Logo

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

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...
About working with custom classes in an application 243
For example, you might create a directory such as the following for your custom classes:
Windows: Hard Disk\Documents and Settings\user\custom classes.
Macintosh: Hard Disk/Users/user/custom classes.
Then, you would add this path to the list of global classpaths (see “Using a global classpath
on page 241).
When Flash attempts to resolve class references in a FLA script, it first searches the document-
level classpath specified for that FLA file. If Flash doesnt find the class in that classpath, or if
that classpath is empty, it searches the global classpath. If Flash doesnt find the class in the
global classpath, a compiler error occurs.
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. You can either manually type a file path or you can click the Browse to Path button to
browse to the directory you want to add to the classpath.
For more information on packages, see About packages” on page 228.
How the compiler resolves class references
When Flash attempts to resolve class references in a FLA script, it first searches the document-
level classpath specified for that FLA file. If the class is not found in that classpath, or if that
classpath is empty, Flash searches the global classpath. If the class is not found in the global
classpath, a compiler error occurs.
In Flash Professional, when you click the Check Syntax button while editing an ActionScript
file, the compiler looks only in the global classpath; ActionScript files arent associated with
FLA files in Edit mode and dont have their own classpath.
NOTE
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.
NOTE
To delete a directory from the classpath, select the path in the Classpath list, and
click the Remove Selected Path (-) button.

Table of Contents

Related product manuals