TextField.html Property | Flash 5 |
Boolean; enables or disables HTML displayFlash 6; accessible via authoring tool only in | read/write |
The Boolean html property indicates whether a field should render the contents of its htmlText property as formatted HTML (true) or as plain text (false). It defaults to false. To have an effect, html must be true before htmlText is assigned. In Flash 5, HTML provided the only means of achieving complex text formatting in a text field; as of Flash 6, the TextFormat class offers object-oriented formatting control.
For more information, see TextField.htmlText.
The following code creates a text field that displays italicized text:
this.createTextField("theField_txt", 1, 0, 0, 200, 20); theField_txt.html = true; theField_txt.htmlText = '<I>This will display italicized text.</I>';
The text field displays:
This will display italicized text.
If line 2 were omitted, the text field would display:
<I>This will display italicized text.</I>
TextField.condenseWhite, TextField.htmlText, TextField.text, the TextFormat class; Appendix E