Example
The following code imports the assets of the Button component and then makes a subobject of
the Button component.
import mx.controls.Button;
createClassObject(Button,"button2",5,{label:"Test Button"});
The following example creates a CheckBox object:
import mx.controls.CheckBox;
form.createClassObject(CheckBox, "cb", 0, {label:"Check this"});
You can also specify the class package name using the following syntax:
createClassObject(mx.controls.Button,"button2",5,{label:"Test Button"});
UIObject.createObject()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
componentInstance.createObject(linkageName, instanceName, depth, initObject)
Parameters
linkageName
instanceName
A number indicating the depth of the new instance.
depth
An object containing initialization properties for the new instance.
initObject
Returns
A UIObject object that is an instance of the symbol.
Description
Method; creates a subobject on an object. This method is generally used only by component
developers or advanced developers.
Example
The following example creates a CheckBox instance on the
form.createObject("CheckBox", "sym1", 0);
A string indicating the linkage identifier of a symbol in the library.
A string indicating the instance name of the new instance.
object:
form
UIObject class
811
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?