This content has been marked as final. Show 3 replies
The selection which you want is to be made after the text field has received the focus.
But, the onSetFocus function works only at the time of the text field receives the focus. (Make sense?)
Use the code below:
Thanks for the response.
The onEnterFrame() is the solution but it has the problem that when you enter a character into the field, it is immediately selected and the next character you type deletes it. Below is what I have now. This works but it seems pretty clunky. Is there a simpler way??
Generally, the new text will replace the selected text.
If you don't want that to happen, try this code. (But, it doesn't remove the selection. If you find how to remove the selection, just post it. I've tried Selection.removeSelection() [this is not available], Selection.setSelection(0,0). It didn't work.)