
TextField.html Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
844
|
ActionScript Language Reference
See Also
setInterval(), TextField.getNewTextFormat(), TextField.maxhscroll, TextField.scroll,
TextField.width, TextField.wordWrap, TextField._yscale, TextFormat.getTextExtent(); the
FScrollBar component in Appendix G
TextField.html Property
Boolean; enables or disables HTML display
Flash 6; accessible via authoring tool only in Flash 5
read/write
theField.html
Description
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.
Example
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>
See Also
TextField.condenseWhite