Translate 'while' loop to 'for' loop


i’m create a grid-like structure and am trying to translate my old loop:

while (dayCount <= lastDay) // creates 30 text fields

to a ‘for’ loop where I can increment the position of each duplicated text field by i * a specified width.

the thing is that i can’t figure out how to do that with my while loop. but i can do it with a ‘for’ loop. that’s why i’m trying to change it.

earlier in my code i use this ‘for’ loop to lay out the row above where i want to start…

for(var i:Number = 0; i < numCols; i++){
     _root.createTextField("dayHeadings" + i, i, indColWidth*i, startSecRowYPos, indColWidth, colHeight);
     _root["dayHeadings"+i].border = true;
     _root["dayHeadings"+i].text = dayHeadings*;

anyone have any ideas?

thanks to anyone for helping out. fumeng.