TextInput.password

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

textInputInstance.password

Description

Property; a Boolean value indicating whether the text field is a password field (true) or not (false). If this property is true, the text field is a password text field and hides the input characters. If this property is false, the text field is not a password text field. The default value is false.

Example

The following example sets the password property to display an asterisk in place of the character that the user enters in the TextInput instance called my_ti. It also sets maxChars to limit the maximum number of characters the user can enter to eight.

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.maxChars = 8;
my_ti.password = true;