
TextField.password Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
858
|
ActionScript Language Reference
TextField.password Property
obscure characters displayed in the field
Flash 6; accessible only via authoring tool in Flash 5
read/write
theField.password
Description
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.
Fields for which password is true are not secure despite being masked
on screen. Their content is still visible if, say, it is transmitted to a
server-side script. For information on securing a Flash application, see
http://www.macromedia.com/desdev/security and http://www.
macromedia.com/desdev/mx/flash/extreme/extreme003.html.
Example
The following code creates typical username ...