User Guide
Creating the ActionScript class file 147
Identifying the class, symbol, and owner names
To help Flash find the proper ActionScript classes and packages and to preserve the
component’s naming, you must set the
symbolName, symbolOwner, and className variables
in your component’s ActionScript class file.
The
symbolOwner variable is an Object reference that refers to a symbol. If the component is
its own
symbolOwner or is the symbolOwner has been imported, it does not have to be fully
qualified.
The following table describes these variables:
The following example adds the
symbolName, symbolOwner, and className variables to the
MyButton class:
class MyButton extends mx.controls.Button {
static var symbolName:String = "MyButton";
static var symbolOwner = myPackage.MyButton;
var className:String = "MyButton";
}
Variable Type Description
symbolName
String The name of the ActionScript class (for example, ComboBox).
This name must match the symbol’s linkage identifier.
This variable must be static.
symbolOwner
Object The fully qualified class name (for example,
mypackage.MyComponent).
Do not use quotation marks around the
symbolOwner value, because
it is an Object data type.
This name must match the AS 2.0 class in the Linkage Properties
dialog box.
This variable is used in the internal call to the
createClassObject()
method.
This variable must be static.
className
String The name of the component class. This does not include the
package name and has no corresponding setting in the Flash
development environment.
You can use the value of this variable when setting style properties.