User Guide

1192 ActionScript classes
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
Example
The following example creates a multiline text field called
fontList_txt that displays a long,
multiline list of fonts.
var font_array:Array = TextField.getFontList().sort();
this.createTextField("fontList_txt", this.getNextHighestDepth(), 10, 10,
240, 320);
fontList_txt.border = true;
fontList_txt.wordWrap = true;
fontList_txt.multiline = true;
fontList_txt.text = font_array.join("\n");
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.
_name (TextField._name property)
public _name : String
The instance name of the text field.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example demonstrates text fields residing at different depths. Create a dynamic
text field on the Stage. Add the following ActionScript to your FLA or AS file, which
dynamically creates two text fields at runtime and displays their depths in the Output panel.
this.createTextField("first_mc", this.getNextHighestDepth(), 10, 10, 100,
22);
this.createTextField("second_mc", this.getNextHighestDepth(), 10, 10, 100,
22);
for (var prop in this) {
if (this[prop] instanceof TextField) {
var this_txt:TextField = this[prop];
trace(this_txt._name+" is a TextField at depth: "+this_txt.getDepth());
}
}