You cannot put cursor in textInput manually, it can be fall under some constraint of browser.
Thanks for the reply!
Can u tell me what is the best way to do it
Thanks in advance
Are you talking about initial focus of the Flex app on the web page?
Or is it about setting focus somewhere during the flex app run?
If first option, then it works only in IE and does not work in Mozilla. Known old bug, as FLash plugin simply does not receive a focus from a browser.
If second, well, there are some cases when focus can't se set directly in popup windows, it should be done on some event or via callLater() method.
Yes I am talking about the first problem!
How to get the initial focus of the Flex app on the web page!
I am using IE7 but still I am not able to get it!
Tell me which version of IE7 need to be used?
Thanks in advance
It should be OK in any version of IE6 or 7
What you have to do - add creationComplete() handler to your component
and in it say text_put_control.setFocus();
If it does not help - publish your code here.
Thnaks for the reply
Please find the following code!
<?xml version="1.0" encoding="utf-8"?>
public function init():void
<mx:Form width="292" borderStyle="solid" height="98" x="301.5" y="185"
Login ID" borderColor="#ffffff"
10" fontStyle="normal" fontWeight="bold" >
<mx:TextInput id="username" focusEnabled="true" />
Password" borderColor="#ffffff" fontSize="10" fontStyle="normal" fontWeight="bold" >
<mx:TextInput id="password" displayAsPassword="true"/>
I just found how to solve this problem!
One who are struggling with same problem can follow the link below!
It will be useful!
Hi Aruna, can u mark it as answered?
Actually you can try 2 ways,
By dispatching Mouse click event manually & 2nd one is
txtInput.selectionBeginIndex = 0;
in the html wrapper page
(where application is the id of your embedded flex appliction)
this approach works perfectly
Hi thanks for the reply
Yes even I implemented this, its working perfectly!