Flash Lite 2.x and 3.0 ActionScript Language Reference

wordWrap (TextField.wordWrap property)

public wordWrap : Boolean

A Boolean value that indicates if the text field has word wrap. If the value of wordWrap is true, the text field has word wrap; if the value is false, the text field does not have word wrap.

Example

The following example demonstrates how wordWrap affects long text in a text field that is created at runtime.

this.createTextField("my_txt", 99, 10, 10, 100, 200);
my_txt.text = "This is very long text that will certainly extend beyond the width of this text field";
my_txt.border = true;

Test the SWF file in Flash Player by selecting Control > Test Movie. Then return to your ActionScript and add the following line to the code and test the SWF file again:

my_txt.wordWrap = true;