User Guide

Label.text 759
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 removes 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.
my_label.html = true;
my_label.text = "The <b>Royal</b> Nonesuch";
my_label.autoSize = "right";
The word “Royal” is displayed in bold.
Label.text
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
labelInstance.text
Description
Property; the text of a label. The default value is "Label".
Example
The following code sets the text property of the Label instance my_label and sends the value
to the Output panel:
my_label.text = "The Royal Nonesuch";
trace(my_label.text);