Developing Flash Lite 1.x Applications |
|
|
|
| Working with Text and Fonts > Using input text fields > Restricting character input | |||
You can use the SetInputTextType command to restrict the characters that the user can enter in the text input dialog box. For example, suppose an application contains an input text field for the user to provide a numeric value, such as their age. And furthermore suppose that the input text field has the variable name of ageVar.
To ensure that the user only enters numeric values into the text input dialog, you could add the following code to your application:
fscommand2("SetInputTextType", "ageVar", "Numeric");
When the user opens the input text dialog box, they will only be able to enter numeric values in the text fields.
For more information, see SetInputTextType in Flash Lite 1.x ActionScript Language Reference.
|
|
|
|