EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Condensewhite (Textfield.condensewhite Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1176 ActionScript classes
condenseWhite (TextField.condenseWhite property)
public condenseWhite : Boolean
A Boolean value that specifies whether extra white space (spaces, line breaks, and so on) in an
HTML text field should be removed when the field is rendered in a browser. The default
value is
false.
If you set this value to
true, you must use standard HTML commands such as <BR> and <P>
to place line breaks in the text field.
If the text field's
.html is false, this property is ignored.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example creates two text fields, called
first_txt and second_txt. The white
space is removed from the second text field. Add the following ActionScript to your FLA or
AS file:
var my_str:String = "Hello\tWorld\nHow are you?\t\t\tEnd";
this.createTextField("first_txt", this.getNextHighestDepth(), 10, 10, 160,
120);
first_txt.html = true;
first_txt.multiline = true;
first_txt.wordWrap = true;
first_txt.condenseWhite = false;
first_txt.border = true;
first_txt.htmlText = my_str;
this.createTextField("second_txt", this.getNextHighestDepth(), 180, 10,
160, 120);
second_txt.html = true;
second_txt.multiline = true;
second_txt.wordWrap = true;
second_txt.condenseWhite = true;
second_txt.border = true;
second_txt.htmlText = my_str;
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
See also
html (TextField.html property)

Table of Contents

Related product manuals