Have you tried to set selection on atextfield after a validation procedure? Have you noticed that it doesn’t work quite right? Here’s the quick solution for that:
Normally you would use the yourTextField.setSelection(startIndex, endIndex); method, but like I said before that doesn’t really work very well.
You just need to set the focus to the textfield and then set the selection:
Example: (assuming you have a textfield called “tf”)
.... tf.stage.focus = tf; tf.setSelection(0, tf.length); ...
And that’s how you solve the textfield.setSelection() problem

The AS3 – textfield setSelection() by Tiago's Weblog, unless otherwise expressly stated, is licensed under a Creative Commons Attribution 2.5 Switzerland License.



Thanks, helped me a lot!
Thank you! I’ve searched high and low for this solution. Glad I found you.
Kool , you are the one of the best i come across
This is a great way to simulate an anchor tag but do you know if there is a way to deselect the text after the text field autoscrolls using the setSelection() function.
Ok just figure out once I have the index pos I can just use that as the start and end point in the setSelection() and no actual text is selected while the textfield still autoscrolls to the correct position.