jash
jash

Reputation: 86

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

stage.focus = textField;

textField.setSelection(0,0);

is not working for me.

Upvotes: 2

Views: 3882

Answers (2)

mghWeb
mghWeb

Reputation: 11

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

Upvotes: 1

curro
curro

Reputation: 167

Is "textField" the child of a library movieclip? If so, you have to access it through the parent.

stage.focus = someMovieStageName.textField

Upvotes: 0

Related Questions