
TextField._name Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
851
// Create the nameInput_txt field
this.createTextField("nameInput_txt", 1, 0, 0, 200, 20);
nameInput_txt.type = "input";
nameInput_txt.border = true;
nameInput_txt.multiline = false;
// Create the addressInput_txt field
this.createTextField("addressInput_txt", 2, 0, 40, 200, 60);
addressInput_txt.type = "input";
addressInput_txt.border = true;
addressInput_txt.multiline = true;
See Also
TextField.maxChars, TextField.restrict, TextField.type, TextField.wordWrap
TextField._name Property
the instance name of the TextField object
Flash 6
read/write
theField._name
Description
The string _name property specifies a field’s instance name, which is specified initially via
the Property inspector at authoring time or via the MovieClip.createTextField() method at
runtime. Though rarely (if ever) necessary, setting
_name reassigns the instance name for
theField; thereafter, references to the old instance name yield undefined:
// Create a text field with an instance name of address_txt
this.createTextField("address_txt", 1, 0, 0, 200, 60);
// Reassign the instance name
address_txt._name = "location_txt";
// Now access the field through the new instance name
location_txt.text = "Toronto, Canada";
More commonly, the _name property is used to identify a