# Forloop in onEnterFrame

**URL:** <https://forum.kirupa.com/t/forloop-in-onenterframe/244255>\
**Category:** Uncategorized\
**Created:** [November 15, 2007, 4:55pm UTC](https://forum.kirupa.com/t/forloop-in-onenterframe/244255 "2007-11-15T16:55:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bardic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bardic/32/3708_2.png) [@bardic](https://forum.kirupa.com/u/bardic)\
**Post date:** [November 15, 2007, 4:55pm UTC](https://forum.kirupa.com/t/forloop-in-onenterframe/244255/1 "2007-11-15T16:55:20Z")

</div>

So, a forloop doesn’t work in an onEnterFrame. What can one do to imitate the process or make it work?

Ex: I have a onEnterFrame and within it I was to loop through an array. Normally I would use a forloop but because my index in the forloop is being reset everytime the onEnterFrame runs, I can’t properly loop through the array.
