How to set focus and insert caret in an empty text field in AS3
stage.focus = te开发者_运维知识库xtField;
textField.setSelection(0,0);
is not working for me.
If the caret is not showing in your text field after using stage.focus = textField;
Simply try publishing your movie instead of testing it with the CTRL+Enter command.
It didn't work for me until I published it.
-Cheers
Is "textField" the child of a library movieclip? If so, you have to access it through the parent.
stage.focus = someMovieStageName.textField
精彩评论