Flash Lite 2.x and 3.0 ActionScript Language Reference

htmlText (TextField.htmlText property)

public htmlText : String

If the text field is an HTML text field, this property contains the HTML representation of the text field's contents. If the text field is not an HTML text field, it behaves identically to the text property. You can indicate that a text field is an HTML text field in the Property inspector, or by setting the text field's html property to true.

Example

The following example creates a text field that sets the html property to true. HTML-formatted text appears in the text field.

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
my_txt.html = true;
my_txt.htmlText = "< this is bold text >";

See also

html (TextField.html property)