Strange text box and for loop problem

i’m trying to write some actionscript that takes data from a series of consecutively numbered textboxes (texb1, textb2, etc in this example) and writes them to a string array, using a for loop.

I have two pieces of code that work, but putting them together does not so any help would be greatly appreciated!

These two work:

1

[COLOR=SeaGreen] [/COLOR][COLOR=SeaGreen]var Val = new Array();
Val[0] = textb0.text;
Val[1] = textb1.text;
Val[2] = textb2.text;
Val[3] = textb3.text;
Val[4] = textb4.text;
Val[5] = textb5.text;
[/COLOR]

2
[COLOR=SeaGreen]
for (var i=0; i<5; i++)
{
this[“text”+i].text = Val*;
}

[COLOR=Blue]with predefined text in the Val array

[COLOR=Black]but when I try to combine the two, like this, nothing gets entered into the array:
[/COLOR][/COLOR][/COLOR][COLOR=SeaGreen]
for (var i=0; i<5; i++)
{
Val* = this[“text”+i].text;
}[/COLOR]
[COLOR=SeaGreen][COLOR=Blue][COLOR=Black]
Any help would be greatly appreciated, I can’t understand it!

Thanks
[/COLOR][/COLOR][/COLOR]