MACROMEDIA FLEX - DEVELOPING COMPONENTS AND THEMES Manual page 11

Developing flex components and themes in flash authoring
Table of Contents

Advertisement

To change the global classpath:
Select Edit > Preferences.
1.
The Preferences dialog box appears.
Select the ActionScript tab.
2.
Click the ActionScript 2.0 Settings button.
3.
The Classpath dialog box appears.
Add, remove, or edit entries in the Classpath dialog box.
4.
Click OK to save your changes.
5.
About importing classes
Flash imports all files referenced in ActionScript classes with
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
components to the Flash IDE" on page
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.
import
8. The dot (.) indicates the current working directory in
Working in the Flash environment
statements.
"Adding Flex classes and
11

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX - DEVELOPING COMPONENTS AND THEMES and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flex

Table of Contents