Name (Textfield._Name Property); Onchanged (Textfield.onchanged Handler) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example creates a multiline text field called
this.createTextField("myText", this.getNextHighestDepth(), 10, 30, 110,
100);
myText.text = "Flash is an authoring tool that designers and developers use
to create presentations,
applications, and other content that enables user interaction.";
myText.border = true;
myText.wordWrap = true;
myText.multiline = true;

_name (TextField._name property)

public _name :
String
The instance name of the text field.
Availability: ActionScript 1.0; Flash Lite 2.0
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 ActionScript 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());
}
}
When you test the document, the instance name and depth is displayed in the Output
panel.When you test the document, the instance name and depth writes to the log file.

onChanged (TextField.onChanged handler)

onChanged = function(changedField:TextField) {}
Event handler/listener; invoked when the content of a text field changes. By default, it is
undefined; you can define it in a script.
666
ActionScript classes
.
myText

Advertisement

Table of Contents
loading

Table of Contents