User Guide
TextField.length 893
TextField.length
Availability
Flash Player 6.
Usage
my_txt.length:Number
Returns
A number.
Description
Read-only property; indicates the number of characters in a text field. This property returns the
same value as
text.length, but is faster. A character such as tab (\t) counts as one character.
Example
The following example outputs the number of characters in the date_txt text field, which
displays the current date.
var today:Date = new Date();
this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
date_txt.autoSize = true;
date_txt.text = today.toString();
trace(date_txt.length);