tags:

views:

165

answers:

1

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
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
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