How to set focus with blinking cursor on a textinput control in Adobe Air?
A:
Use the FocusManager class and the setFocus() method. An example is here.
whybird
2010-02-08 00:45:05
Thanks whybird for your answer but this is not working for me.My question was not clear.I have a login form in adobe air with 2 controls (user name and password) and I want to set the focus with blinking cursor to the username control after the form is totally loaded and without click any buttom
Naive programmer
2010-02-08 03:34:05
You mean an HTML form inside the air app? Then instead of usernameButton.addEventListener(MouseEvent.CLICK, usernameButton_click);make it html.addEventListener(Event.COMPLETE, usernameButton_click); (only for future readability, don't name the function _click, because it has nothing to do with clicking any more). As seen on http://livedocs.adobe.com/flex/3/html/help.html?content=HandlingHTMLEvents_1.html
whybird
2010-02-08 05:05:30