TextField.html Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextField.html Property Flash 5

Boolean; enables or disables HTML displayFlash 6; accessible via authoring tool only in 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, TextField.htmlText, TextField.text, the TextFormat class; Appendix E



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net