This is because the Flash Player instance itself (Object/Embed tag) does not have the focus in the Browser. There is a bit of javascript code that will set the focus, but last I heard it only works in IE. I can find that script if it would be useful.
Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Byrne Sent: Friday, December 05, 2008 1:25 PM To: [email protected] Subject: [flexcoders] txtbx focus at login This is a bit odd. When I first open the application, the focus IS set on the login txtbx but when I start typing nothing happens. If I tab to the password txtbx I can type. If I tab back to the login, I can type. If I click anywhere on the flex app, not just in the login txtbx, I can type. I know the focus is on the login txtbx because there is an orange box around it. When tabbing to the password, the orange box moves to the password. I tried setting focus to the flash object in the html wrapper within a window.onload event using both focus() and click(). Nothing. Any ideas? Thanks - Robert. Here's some code: MXML: <mx:Label text="@Resource(key='loginId', bundle='Labels')" fontWeight="bold" width="60" /> <mx:TextInput id="usernameInput" width="140" /> AS: override protected function init():void{ super.init(); this.logger.debug("init"); this.loginForm.defaultButton = this.loginButton; this.usernameInput.setFocus(); }

