Multiline (Textfield.multiline Property); Name (Textfield._Name Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

multiline (TextField.multiline property)

public multiline : Boolean
Indicates whether the text field is a multiline text field. If the value is
multiline; if the value is
Availability: ActionScript 1.0; Flash Player 6
Example
The following example creates a multiline text field called
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()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the

_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());
}
}
1192
ActionScript classes
, the text field is a single-line text field.
false
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
, the text field is
true
that displays a long,
fontList_txt
method.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF