TextField.password Property | Flash 5 |
obscure characters displayed in the fieldFlash 6; accessible only via authoring tool in | read/write |
The Boolean password property specifies whether a field's characters should be displayed normally (false) or obscured on screen for privacy (true). When true, all characters, including spaces, are displayed as asterisks (*). For example, the words "hi there" are displayed as "********". This allows users to enter text without casual onlookers seeing it.
Any text entered while password is true is not altered and can be retrieved as usual through the text property. The password property does not affect other line display properties such as multiline and wordWrap; text in a password-enabled field can both wrap and span multiple lines. The Cut and Copy commands do not function in a password text field.
|
The following code creates typical username and password text input fields:
this.createTextField("nameInput_txt", 1, 0, 0, 200, 20); nameInput_txt.type = "input"; nameInput_txt.border = true; this.createTextField("passInput_txt", 2, 0, 30, 200, 20); passInput_txt.type = "input"; passInput_txt.border = true; passInput_txt.password = true;
TextField.multiline, TextField.text, TextField.type, TextField.wordWrap