# Help converthing this while loop to onEnterFrame

**URL:** <https://forum.kirupa.com/t/help-converthing-this-while-loop-to-onenterframe/76576>\
**Category:** Uncategorized\
**Created:** [January 19, 2005, 5:25pm UTC](https://forum.kirupa.com/t/help-converthing-this-while-loop-to-onenterframe/76576 "2005-01-19T17:25:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonzales](https://avatars.discourse-cdn.com/v4/letter/g/ac91a4/32.png) [@gonzales](https://forum.kirupa.com/u/gonzales)\
**Post date:** [January 19, 2005, 5:25pm UTC](https://forum.kirupa.com/t/help-converthing-this-while-loop-to-onenterframe/76576/1 "2005-01-19T17:25:11Z")

</div>

can anyone help me convert this loop to onEnterFrame? i used pom’s tutorial on making grids but i want flash to create it frame by frame…

help a brotha out?

[AS]  
function makeThumbs() {  
thumb.\_visible = 0;  
clearInterval(delay);  
var i = 0;  
var k = 0;  
while (i\<image.length) {  
k++;  
for (var j = 1; j\<7 && i\<image.length; i++, j++) {  
thumb.duplicateMovieClip(“th”+num, num);  
thmb.id = this.\_name.substring(2);  
thmb = \_root[“th”+num];  
thmb.\_x = thmb.\_x+gridx_j;  
thmb.\_y = thmb.\_y+gridy_(k);  
num++;  
thmb.info.text = this.\_name.substring(2);  
thmb.thumbs\_mc.loadMovie(thumbnails\*);  
thmb.onRelease = function() {  
showImage(this.\_name.substring(2));

```
		};
	}
}

```

}  
[/AS]
