Recipe 13.2. Adding a Password Form ControlProblemYou want to add a form control that allows the user to input a password value (or something like a credit card number) that cannot be read by others who can see the computer screen. SolutionUse a TextInput component with the password parameter set to TRue, or use an input text field with the line type set to password. DiscussionTypically, you want to design a form so that potentially sensitive information cannot be easily read by others in the same room as the user. Password and credit card numbers are two of the most common examples of this type of information. The conventional solution is to use what is known as a password form control. The password form control allows the user to input their information, but rather than displaying the information in plain text, it is represented by asterisks. This device lets the user to know that the computer is responding to their input, but it does not permit passersby to read the information. Even though the information does not display in clear text on the screen, it is stored within Flash in the correct format so that it can be utilized by the program. You can create a password form control in two ways. These two ways are really just slight variations on the standard, single-line text form control discussed in Recipe 13.1. Both the input text field and the TextInput component allow you to change a single parameter to convert them into a password form control. With a TextInput component, all you need to do is select the component on the stage and change the password parameter to TRue. For an input text field, select the instance on the stage and change the line type to password. See AlsoRecipe 13.1 |
Tripod >> 3pod Tips & Learning and manuals for educations