Selecting text and focusing on a textbox

Posted by Malfist on Stack Overflow See other posts from Stack Overflow or by Malfist
Published on 2010-03-24T18:08:16Z Indexed on 2010/03/24 22:13 UTC
Read the original article Hit count: 203

Filed under:
|
|

I'm trying to programmatically select the text in a textbox, and focus on it too, so that when the form is launch the user only has to start typing and it will replace what is already there.

I've been using the code:

stage.focus = _finalScoreTF;
_finalScoreTF.setSelection(0, _finalScoreTF.text.length - 1);

but it doesn't work...any ideas?

© Stack Overflow or respective owner

Related posts about flash

Related posts about flash-cs3