![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.0.79.
Flash MX 2004.
componentInstance
.createClassObject(className
,instanceName
,depth
,initObject
)
className
An object indicating the class of the new instance.
instanceName
A string indicating the instance name of the new instance.
depth
A number indicating the depth of the new instance.
initObject
An object containing initialization properties for the new instance.
A UIObject that is an instance of the specified class.
Method; creates a subobject of an object. Generally only used by component or advanced developers. This method allows you to create components at runtime.
You need to specify the class package name. Do one of the following:
import mx.controls.Button; createClassObject(Button,"button2",5,{label:"Test Button"});
or
createClassObject(mx.controls.Button,"button2",5,{label:"Test Button"});
The following example creates a CheckBox object:
form.createClassObject(CheckBox, "cb", 0, {label:"Check this"});
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |