Flash Lite 2.x and 3.0 ActionScript Language Reference

variable (TextField.variable property)

public variable : String

The name of the variable that the text field is associated with. The type of this property is String.

Example

The following example creates a text field called my_txt and associates the variable today_date with the text field. When you change the variable today_date, then the text that appears in my_txt updates.

this.(reateTextField("my_txt", 1, 10, 10, 200, 22);
my_txt.variable = "today_date";
var today_date:Date = new Date();

var date_interval:Number = setInterval(updateDate, 500);
function updateDate():Void {
    today_date = new Date();
}