SetInputTextType
Specifies the mode in which the input text field should be opened.
Flash Lite supports input text functionality by asking the host application to start the generic device-specific text input interface, often referred to as the front-end processor (FEP). When the SetInputTextType command is not used, the FEP is opened in default mode.
|
Command |
Parameters |
Value Returned |
|---|---|---|
|
SetInputTextType |
variableName Name of the input text field. It can be either the name of a variable or a string value that contains the name of a variable. Note: A text field's variable name is not the same as its instance name. You can specify a text field's variable name in the Var text box in the property inspector or by using ActionScript. For example, the following code restricts input to numeric characters for the text field instance (numTxt) whose associated variable name is "numTxt_var". var numTxt:TextField;numTxt.variable = "numTxt_var";fscommand2("SetInputTextType", "numTxt_var", "Numeric"); type One of the values Numeric, Alpha, Alphanumeric, Latin, NonLatin, or NoRestriction. |
0: Failure. |
The following table shows what effect each mode has, and what modes are substituted:
|
InputTextType Mode |
Sets the FEP to one of these mutually exclusive modes |
If not supported on current device, opens the FEP in this mode |
|---|---|---|
|
Numeric |
Numbers only (0 to 9) |
Alphanumeric |
|
Alpha |
Alphabetic characters only (A to Z, a to z) |
Alphanumeric |
|
Alphanumeric |
Alphanumeric characters only (0 to 9, A to Z, a to z) |
Latin |
|
Latin |
Latin characters only (alphanumeric and punctuation) |
NoRestriction |
|
NonLatin |
Non-Latin characters only (for example, Kanji and Kana) |
NoRestriction |
|
NoRestriction |
Default mode (sets no restriction on the FEP) |
N/A |
|
NOTE: Not all mobile phones support these input text field types. For this reason, you must validate the input text data. |
||
The following line of code sets the input text type of the field associated with the input1 variable to receive numeric data:
status = fscommand2("SetInputTextType", "input1", "Numeric");