MovieClip problem

Please, somebody explain the difference between:

while(i<Stage.width){
while(j<Stage.height){
mcTemp=mcmask.attachMovie(“mask_ani”,“m” + mcmask.getNextHighestDepth(),mcmask.getNextHighest Depth());
mcTemp._x = i;
mcTemp._y = j;
arr.push(mcTemp);
j+=15;
}
i+=15;
j=0;
}

which works just fine (creates a clip, attaches another clip from the library to it and then stores a reference into an array)

and

for(count=1;count<=nPics;count++){
pcm=imagcont.createEmptyMovieClip(“pic”+count,imag count.getNextHighestDepth());
pcm.loadMovie(“image”+count+".jpg");
p.push(pcm);
}

which is supposed to create an empty clip, load an image in it, and store it into an array, but it doesn’t work.
In the end, in the p array I just get the first 4 records empty, and only the last (nPics is 5 in my example) is what it is supposed to be.

Thanks a lot,

Chris