Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > TextField > multiline (TextField.multiline property) | |||
public multiline : Boolean
Indicates whether the text field is a multiline text field. If the value is true, the text field is multiline; if the value is false, the text field is a single-line text field.
Availability: ActionScript 1.0; Flash Player 6
The following example creates a two text fields. The first has the multiline property set to true, and the second has it set to false. When you run the file, notice the difference between pressing the ENTER key in the first text field and doing so in the second text field:
this.createTextField("input1", this.getNextHighestDepth(), 10, 10, 240, 320);
input1.border = true;
input1.type = "input";
input1.multiline = true;
input1.text = "Type some text and press the ENTER key: ";
this.createTextField("input2", this.getNextHighestDepth(), 10, 10, 240, 320);
input2.border = true;
input2._x = 275;
input2.type = "input";
input2.multiline = false;
input2.text = "Type some text and press the ENTER key: ";
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.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00002219.html