# Any tips for FOR loops?

**URL:** <https://forum.kirupa.com/t/any-tips-for-for-loops/91958>\
**Category:** Uncategorized\
**Created:** [October 10, 2003, 11:20pm UTC](https://forum.kirupa.com/t/any-tips-for-for-loops/91958 "2003-10-10T23:20:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdzines](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kdzines](https://forum.kirupa.com/u/kdzines)\
**Post date:** [October 10, 2003, 11:20pm UTC](https://forum.kirupa.com/t/any-tips-for-for-loops/91958/1 "2003-10-10T23:20:05Z")

</div>

hey,

in my quest to make my code more manageable, i am trying to figure out how to take the following code and put it in a FOR loop

```auto

_root.createEmptyMovieClip("holder", 10);
holder._x = 50;
holder._y = 50;

_root.createEmptyMovieClip("holder2", 11);
holder2._x = 50;
holder2._y = 50;

_root.createEmptyMovieClip("holder3", 12);
holder3._x = 50;
holder3._y = 50;

_root.createEmptyMovieClip("holder4", 13);
holder4._x = 50;
holder4._y = 50;

```

so i get how to do it, but i got problems with the syntax. I made this

```auto

this.onEnterFrame = function(){
for (i, i<4,i++){
_root.createEmptyMovieClip("holder"+i, i);
holder*._x = 50;
holder*._y = 50;
}
}

```

if someone could take a few mins and write it for me, i would forever understand how to do it.

cheers,

kd
