User Guide

448 Chapter 6: Components Dictionary
center The bottom side of the label resizes to fit the text. The horizontal center of the label
stays anchored at its original horizontal center position.
right The left and bottom sides of the label resize to fit the text. The top and right sides
dont resize.
Note: The Label component’s autoSize property is different from the built-in ActionScript TextField
object’s
autoSize property.
Label.html
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
labelInstance.html
Description
Property; a Boolean value that indicates whether the label can be formatted with HTML (true)
or not (
false). The default value is false. Label components with the html property set to true
cannot be formatted with styles.
To retrieve plain text from HTML-formatted text, set the
HTML property to false and then access
the
text property. This will remove the HTML formatting, so you may want to copy the label
text to an offscreen Label or TextArea component before you retrieve the plain text.
Example
The following example sets the html property to true so the label can be formatted with HTML.
The
text property is then set to a string that includes HTML formatting.
lbl.html = true;
lbl.text = "The <b>Royal</b> Nonesuch";
The word “Royal” displays in bold.
Label.text
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
labelInstance.text