TextInput.text

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

textInputInstance.text

Description

Property; the text contents of a TextInput component. The default value is "" (an empty string).

Example

The following code places a string in the TextInput instance called my_ti, and then traces that string to the Output panel.

You must first drag a TextInput component to the Stage and give it an instance name of my_ti; then add the following code to Frame 1.

/**
 Requires:
  - TextInput instance on Stage (instance name: my_ti)
*/

var my_ti:mx.controls.TextInput;

my_ti.text = "The Royal Nonesuch";
trace(my_ti.text); // "The Royal Nonesuch"