Need help making a for loop to onEnterFrame

hi all,

i posted this question last week and didnt get much of a response. im making an image gallery and have a for loop that plots the thumbnail grid. i need help converting it to onEnterFrame so that the thumbnails are created one by one… heres my as:

[AS]
gridx = 21;
//x spacing
gridy = 21;
// yspacing
num = 0;
numOfImages = image.length;
//////////////////
function makeThumbs() {
_root.navContainer.thumb._visible = 0;
clearInterval(delay);
var i = 0;
var k = -1;
while (i<image.length) {
k++;
for (var j = 0; j<10 && i<image.length; i++, j++) {
_root.navContainer.thumb.duplicateMovieClip(“th”+num, num);
thmb.id = this._name.substring(2);
thmb = _root.navContainer[“th”+num];
thmb._x = thmb._x+gridxj;
thmb._y = thmb._y+gridy
(k);
num++;
thmb.info.text = Number(thmb._name.substring(2))+1;
thmb.thumbs_mc.loadMovie(thumbnails*);
thmb.onRelease = function() {
this.onEnterFrame = function() {
picture.prevFrame();
//trace(“i am thmb’s onEnterFrame”);
if (picture._currentframe == 1) {
showImage(this._name.substring(2));
picture._alpha = 0;
delete this.onEnterFrame;
}
};
//trace(this._name.substring(2));
};
}
}
}
[/AS]