Hi,
I have many, many textboxes and each of them will hold only one letter. When user presses a key, the key is written into one textbox and when he presses again, the key is written into another textbox.
What the next textbox will be, depends on some situations. Basically, user is filling in words. I have those “words” in arrays. (That is, textboxes in arrays and I then go though this array and put letter in appropriate textbox)
The problem is that how do I access these arrays.
Here is my code:
_root.onKeyDown = KeyDownHandler;
function KeyDownHandler()
{
_root.vars[_root.activeBoxIndex].text = GetChar(Key.getCode());
_root.activeBoxIndex++;
}
(_root.vars is an array that contains textboxes)
This works when I only have one array. But when I have many arrays, I somehow should acces them. That means, _root.vars should be “variable variable”.
In traditional programming languages I would use a pointer or reference but AFAIK there is no such feature in ActionScript.