TextField.condenseWhite Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextField.condenseWhite Property Flash 6 (undocumented)

specifies whether HTML whitespace should be condensed read/write
theField.condenseWhite

Description

When set to true, the Boolean condenseWhite property causes a field's HTML text to be condensed, removing all excess whitespace characters (tab, line break, space, etc.). Hence, the field's HTML rendering mirrors a typical web browser multiple spaces behave as a single space between words and the newline character "\n" no longer serves as a line break; the <P> and <BR> tags must be used instead. In this mode, HTML text parsing behaves like Flash's XML parser when the XML.ignoreWhite property is set to true.

The condenseWhite property allows you to use existing HTML text in Flash without removing excess whitespace manually. The default value of condenseWhite is false. Even when set to true, it has no effect unless the field's html property is also true.

The condenseWhite property is an undocumented feature of the TextField object, but you can rely on it being supported in future versions as well. The overly cautious developer can manually remove whitespace from the HTML text to make it appear the same in Flash as it does in a web browser.

See Also

TextField.html, TextField.htmlText, XML.ignoreWhite



    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