Textbox problem

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.

I partly solved this making an array of word arrays. And then I only need to play with indexes.

glad you solved it. If you didnt, please add your fla. Much easier that way.

:slight_smile:

Yep. What I’m doing is a crossword puzzle. Do you have any ideas how to achive it?
I have just started working with Flash, and really just can’t think the “Flash way” (I’m coming from C++ / Java world…)

Here is a sample how it should look like : http://ristikko.iltasanomat.fi/start.asp?time=first
I know it’s done using JAVA but is it possible to do with FLASH?