Developing Flash Lite 2.x and 3.0 Applications

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 users to provide a numeric value, such as their age, and that the input text field has the variable name ageVar. To ensure that the user enters only numeric values in the text input dialog box, you could add the following code to your application:

fscommand2("SetInputTextType", "ageVar", "Numeric");

When users open the input text dialog box, they can enter only numeric values in the text fields.

For more information, see SetInputTextType in the fscommand2 function entry in the Flash Lite 2.x and 3.0 ActionScript Language Reference.