Label class

Inheritance UIObject > Label

ActionScript Class Namespace mx.controls.Label

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 panel.

Each component class has a version property which is a class property. Class properties are only available on the class itself. The version property returns a string that indicates the version of the component. To access the version property, use the following code:

trace(mx.controls.Label.version);

Note: The following code returns undefined: trace(myLabelInstance.version);.

Method summary for the Label class

Inherits all methods from UIObject class.

Property summary for the Label class

Property

Description

Label.autoSize

A string that indicates how a label sizes and aligns to fit the value of its text property. There are four possible values: "none", "left", "center", and "right". The default value is "none".

Label.html

A Boolean value that indicates whether a label can be formatted with HTML (true) or not (false).

Label.text

The text on the label.

Inherits all properties from UIObject class.

Event summary for the Label class

Inherits all events from UIObject class.