Populating text fields w/ for(){}

Hey guys I’m trying to populate a set of dynamic text fields with text using a for() loop and cant seem to get it to work.

I have 9 seperate dynamic text boxes each labled picNum0 - picNum8. I want to read a number of pictures from an external file then have those numbers populate 1 through 9 into the text fields.

I get the variables loaded in with the correct values but the text fields wont populate.

here is what I have so far:

pics = 4;

for(i=0; i<pics; i++){
curPic = (“picNum”+i);
curPic.text = i;
};

Pretty simple, but I can’t get it working.

When I trace(curPic) inside the for(){} it outputs: picNum0 - picNum8, so I know that the variables are allocating ok, but dynamic text fields arent populating with the correct numbers.

Any ideas?
Thanks.