tags:

views:

178

answers:

1

On my application I have a login form. On application start, I want the focus/selected one is set on the user id textinput.

I tried normal setFocus method and didnt worked.

How can i make it work?

+1  A: 

This works for me with Flex 3 and AIR 1.5:

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

  <mx:applicationComplete>
    ti.setFocus();
  </mx:applicationComplete>

  <mx:TextInput id="ti"/>

</mx:WindowedApplication>
James Ward
Am using AIR. Not a flex swf which runs in browser.
Umesh
Whoops. Missed that part.
James Ward
I've updated my answer to pertain to AIR instead of in the browser.
James Ward