I'm trying to get my application to launch a popup as soon as it starts up and the popup should put the focus its text box. The problem is, that while I can see the blue border around the text box, the cursor is not active in the text box, meaning the user has to click on the popup in order to type anything in.
How do I make it so the user can type in straight away? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="doInit()"> <mx:Script> <![CDATA[ import Login.Login; import mx.managers.PopUpManager; private function doInit():void { PopUpManager.createPopUp(this, TestPopUp, true); } ]]> </mx:Script> </mx:Application> <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" creationComplete="doInit()"> <mx:Script> <![CDATA[ import mx.controls.Alert; private function doInit():void { txt.setFocus(); } ]]> </mx:Script> <mx:TextInput id="txt"/> </mx:TitleWindow>