# For loop question

**URL:** <https://forum.kirupa.com/t/for-loop-question/267858>\
**Category:** Uncategorized\
**Created:** [August 6, 2008, 2:40pm UTC](https://forum.kirupa.com/t/for-loop-question/267858 "2008-08-06T14:40:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thursday0384](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@thursday0384](https://forum.kirupa.com/u/thursday0384)\
**Post date:** [August 6, 2008, 2:40pm UTC](https://forum.kirupa.com/t/for-loop-question/267858/1 "2008-08-06T14:40:16Z")

</div>

so i’m working on a tutorial using a for loop, and i’m still trying to get the hang of for loops. here’s the code:

```auto

var imagesNumber:Number = 9;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
}

```

so the last line that says

```auto
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i); 

```

is the part i’m having trouble with. i would just like to know how i would “translate” that in my head.

ex: we’re attaching a movie to the container variable. in it is a “thumb” … and it increments and so on and so on.

could someone sort of help me figure out exactly how to read that last line.

i just want to know for myself, because i don’t like accepting free tutorial code without analyzing it and making sure i know it for myself. otherwise, i would feel like i wasn’t really having to learn anything.

thanks
