# For (i=0;i=done;i++) {messed up}

**URL:** <https://forum.kirupa.com/t/for-i-0-i-done-i-messed-up/123184>\
**Category:** Uncategorized\
**Created:** [September 21, 2004, 10:18am UTC](https://forum.kirupa.com/t/for-i-0-i-done-i-messed-up/123184 "2004-09-21T10:18:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phat7](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Phat7](https://forum.kirupa.com/u/Phat7)\
**Post date:** [September 21, 2004, 10:18am UTC](https://forum.kirupa.com/t/for-i-0-i-done-i-messed-up/123184/1 "2004-09-21T10:18:15Z")

</div>

I have two “for” statements in a row in one frame, which duplicate two different movies. First one creates 7 copies of one movie and the second one creates 30 copies of another movie. When I write the first one only it duplicates 7 movies, works fine. When i write the second one it works properly but the first one stops working. The question is:

Why:q:

Here’s the code if needed:

```auto
weekdays = new Array ("Su","Mo","Tu","We","Th","Fr","Sa")
now = new Date();
weekd._x = -25;
ox = weekd._x * -1;
days._x = -25;

for (i = 0;i<weekdays.length;i++) {
	_root.weekd.duplicateMovieClip("weekd"+i,i);
	_root["weekd"+i]._x = ox * i + 30;
}
for (j = 1;j<31;j++) {
	_root.days.duplicateMovieClip("days"+j,j);
	_root["days"+j]._x = ox2 * j + 30;
}

```
