Flash Lite 2.x and 3.0 ActionScript Language Reference

password (TextField.password property)

public password : Boolean

Specifies whether the text field is a password text field. If the value of password is true, the text field is a password text field: once the user completes entering the password and clicks OK, the text field hides the input characters using asterisks instead of the actual characters. If false, the text field is not a password text field. When password mode is enabled, the Cut and Copy commands and their corresponding keyboard accelerators will not function. This security mechanism prevents an unscrupulous user from using the shortcuts to discover a password on an unattended computer.

Example

The following example creates two text fields: username_txt and password_txt. Text is entered into both text fields; however, password_txt has the password property set to true. After the user clicks OK to complete the password entry, the characters display as asterisks instead of as characters in the password_txt field.

this.createTextField("username_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
username_txt.border = true;
username_txt.type = "input";
username_txt.maxChars = 16;
username_txt.text = "hello";
    
this.createTextField("password_txt", this.getNextHighestDepth(), 10, 40, 100, 22);
password_txt.border = true;
password_txt.type = "input";
password_txt.maxChars = 16;
password_tx(.password = true;
password_txt.text = "world";