Setting nextX according to count

Hi guys.
Cant quite get this to work.


nextY = 0;
nextX = 6;
counter = 1;
while (counter < imgCount) {
 holder.attachMovie ("modThumb", "modThum" + counter, counter); 
 holder["modThum" + counter].count = counter;
 holder["modThum" + counter].modID = modID;
 holder["modThum" + counter]._x = nextX;
 holder["modThum" + counter]._y = nextY;
             nextX = (counter % 2) ? 6 : 75;
 nextY += Math.ceil (holder["modThum" + counter]._height) + 5;
 counter++;
}

When images are loaded instead of;
[] []
[] []
[] []
I am getting
[]
. []
[]
. []
Anyone?
thanks