Hi guys,

I'm pretty new to AS 3. I've been tasked with converting an online calculator from AS2 to AS3 and am having trouble figuring out how to get one of the functions to work.

There are several input fields, restricted to numbers, which are ordered by tabIndex. When you enter a value and hit the 'Enter' key, it deletes the numbers the user just typed and focuses in on the now blank text field.

What I need it to do is focus on the text field, and instead of deleting the text, select it.

Any help would be greatly appreciated.

I've included part of my code so far, if it helps.

txt1.tabIndex = 1;
txt2.tabIndex = 2;
txt3.tabIndex = 3;
txt4.tabIndex = 4;
txt5.tabIndex = 5;
txt6.tabIndex = 6;

txt1.restrict = "0123456789";
txt2.restrict = "0123456789.";
txt3.restrict = "0123456789.";
txt4.restrict = "0123456789.";
txt5.restrict = "0123456789";
txt6.restrict = "0123456789";