tab to next component textfield

COwebmaster used Ask the Experts™
I have 4 component textboxes and when the user enters in 4 characters in each textfield, I want to tab to the next textfield.  How would you do that?   Also, how can I convert what the user is typing into all caps (numbers would also be included)?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009
Hi, a nice tidy way to do it would be in an array, for this example i'm using a button to call the function, i'm assuming you're not want to be lstening the whole time for textfield changes.

var textboxesArray:Array = new Array("textbox1", "textbox2", "textbox3", "textbox4"); //parse the instance names of your textboxes.
function doIt() {
      for (var i = 0; i<textboxesArray.length; i++) {
            eval(textboxesArray[i]).tabEnabled = true;
            eval(textboxesArray[i]).tabIndex = i+1;
            var textBoxValue:String = eval(textboxesArray[i]).text;
            trace(textBoxValue.toUpperCase()); //this is the upper case bit.
test_btn.onRelease = function() {

i have tested teh code and it works.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial