Compatibility: Flash Lite: 1.1, 2.x, 3.x
Contents |
Using inline text-field user can edit the textfield directly in the FlashLite application rather than in seperate model input box. In case of inline text input Flash Lite player does not process the user input directly but devices native input method editor is used. When the inline text field is active, Flash Lite player can not execute any instruction as Flash Lite player runs in restricted mode. Only after the text field is deactivated, Flash Lite player runs in norml mode.
When the user is entering text in the input field, Flash Lite player uses Input Mode Indicator to indicate if it is alpha input(Indicated by letter 'A') or numeric input(Indicated by sign '#').
After user sets focus to input text-field, it is not necessary for user to press the devices Select key in case the application contains following text field activation code.
var objFocusListener:Object = new Object ();
objFocusListener.onSetFocus = function (oldFocus, newFocus) {
fscommand ("activateTextField", "");
};
TextFieldInstanceName.addListener (objFocusListener);
You can make an input text field allowing numbers only by executing this code:
fscommand2("SetInputTextType", "myText", "Numeric");
Select you text field, then fill the Maximum characters in the Properties tab.
You can change the color of the focus rectangle (yellow by default) by using the following statement:
fscommand2("SetFocusRectColor", 255, 153, 0); //Orange
To reset the color of the focus rectangle:
fscommand2("SetFocusRectColor", <red>, <green>, <blue>);
You can download an example with source code here:
Input Text 240*320 (swf + fla)
No related wiki articles found