Label class
Inheritance
MovieClip >
ActionScript Class Name
The properties of the Label class allow you at runtime to specify text for the label, indicate
whether the text can be formatted with HTML, and indicate whether the label auto-sizes to
fit the text.
Setting a property of the Label class with ActionScript overrides the parameter of the same
name set in the Property inspector or Component inspector.
When you access the values of label properties, make sure the component has finished loading
before you try to access the desired property. Consider the following example:
var listenerObject:Object = new Object();
listenerObject.load = function(){
trace(label.width);
};
label.addEventListener("load", listenerObject);
Each component class has a
available only on the class itself. The
version of the component. To access this property, use the following code:
trace(mx.controls.Label.version);
The code
trace(myLabelInstance.version);
Method summary for the Label class
There are no methods exclusive to the Label class.
Methods inherited from the UIObject class
The following table lists the methods the Label class inherits from the UIObject class. When
calling these methods from the Label object, use the form
Method
UIObject.createClassObject()
UIObject.createObject()
UIObject.destroyObject()
UIObject class
> Label
mx.controls.Label
property, which is a class property. Class properties are
version
property returns a string that indicates the
version
Description
Creates an object on the specified class.
Creates a subobject on an object.
Destroys a component instance.
returns
.
undefined
labelInstance.methodName
.
Label class
755
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers