开发者

How to set focus and insert caret in an empty text field in AS3

开发者 https://www.devze.com 2022-12-23 22:22 出处:网络
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;

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号