User Guide

TextField.text 755
TextField._target
Availability
Flash Player 6.
Usage
my_txt._target:String
Description
Read-only property; the target path of the text field instance specified by my_txt. The _self
target specifies the current frame in the current window, _blank specifies a new window, _parent
specifies the parent of the current frame, and
_top specifies the top-level frame in the current
window.
Example
The following ActionScript creates a text field called my_txt and outputs the target path of the
new field, in both slash and dot notation.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
trace(my_txt._target); // output: /my_txt
trace(eval(my_txt._target)); // output: _level0.my_txt
TextField.text
Availability
Flash Player 6.
Usage
my_txt.text:String
Description
Property; indicates the current text in the text field. Lines are separated by the carriage return
character ('\r', ASCII 13). This property contains the normal, unformatted text in the text field,
without HTML tags, even if the text field is HTML.
Example
The following example creates an HTML text field called my_txt, and assigns an HTML-
formatted string of text to the field. When you trace the
htmlText property, the HTML-
formatted string writes to the log file. When you trace the value of the
text property, the
unformatted string with HTML tags writes to the log file.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 400, 22);
my_txt.html = true;
my_txt.htmlText = "<b>Remember to always update the help panel.</b>";
trace("htmlText: "+my_txt.htmlText);
trace("text: "+my_txt.text);
/* output: