Assign stage.focus to text field
I want to have it so that when text is entered into an input text field, the cursor advances automatically to the next text field. The text fields are nameed box1, box2 and so on, and are custom classes called Box. So far I have:
var nextBoxNum:int = boxNum + 1; // identifies the next text field
var nextBoxName:String = "box" + String(nextBoxNum); // identifies the name of the next text field
??
stage.focus = //the next box // assigns the focus to the next text field
How do I get from a string variable to the stage.focus?