Following should solve the cursor not showing and focus issue:
public class txt extends Sprite
public function txt()
var txt:TextField = new TextField();
txt.type = TextFieldType.INPUT;
txt.text = "Hello World!";
txt.embedFonts = false;
addChild( txt );
txt.selectable = true;
txt.stage.focus = txt;
Please note, run the newly created swf from the standalone player to see it in action. If you open the swf from browser then it might not work because flash itself will not have the focus.
The problem is if the Flash window itself doesn't have focus then it can't give focus to the TextField because your OS itself has focus on something else.
Thank you for your reply, However, the browser has the focus (I can edit the text), but the caret is not showing.
Farthermore , I can't really tell the users to run the standalone player when they log on to sites
Please note that this issue only applies to chrome 6 running on Mac.
I'm having the exact same issue. Have you been able to find a solution at all? Any help would be greatly appreciated!
Using TLFTextField (you can find it in the flash ide subfolders somewhere, the SWC is called tlfruntime.swc, the behavior is very simular to the classic TextField)
will solve the issue.
Unfotunately that isn't a valid solution for me, as it adds 160Kb to the project (there are many other issues with it, but you can patch them as you go along ~ annoying but not a biggy)
Thanks for the quick response man.
I'm in the same boat - adding 160K isn't viable. Thanks for the heads-up though.
I hope Adobe/Google fixes the problem in future releases.
After a day of unsuccessfully trying to fix this in Flex, I found a fix on the JS side. Running this code after each SWF that is loaded fixes it for me:
Also I created a bug here:
Thanks for figuring this out man, good work!
I'll implement the HTML hack next time I have the caret issue...