![MACROMEDIA FLEX - DEVELOPING COMPONENTS AND THEMES Manual Download Page 11](http://html1.mh-extra.com/html/macromedia/flex-developing-components-and-themes/flex-developing-components-and-themes_manual_3388115011.webp)
Working in the Flash environment
11
To change the global classpath:
1.
Select Edit > Preferences.
The Preferences dialog box appears.
2.
Select the ActionScript tab.
3.
Click the ActionScript 2.0 Settings button.
The Classpath dialog box appears.
4.
Add, remove, or edit entries in the Classpath dialog box.
5.
Click OK to save your changes.
About importing classes
Flash imports all files referenced in ActionScript classes with
import
statements.
For example, if your component extends the UIObject class and makes use of assets found in the
SimpleButton and TextInput controls, you import the following classes in your class file:
import mx.core.UIObject;
import mx.controls.SimpleButton;
import mx.controls.TextInput;
When importing classes, you can use a wildcard to import all classes in a particular package; for
example:
import mx.controls.*;
Flash only imports the necessary classes when compiling the component.
Flash finds classes that you import by searching the directories in the classpath. For most
situations, your local Flash classpath must consist of at least the following entries:
•
$(LocalData)/Flex Classes
•
. (the dot)
The $(LocalData)/Flex Classes points to the classes that you extracted in
“Adding Flex classes and
components to the Flash IDE” on page 8
. The dot (.) indicates the current working directory in
Flash. This is the directory in which you store your FLA file.
To import a custom class or package of classes, you can store the file or the directory structure in
the same directory as the FLA file so that Flash will find them with these classpath settings.