ActionScript 2.0 Components Language Reference |
|
|
|
| Label component > Label.html | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
labelInstance.html
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.
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.
|
|
|
|