# Help me with this for loop

**URL:** <https://forum.kirupa.com/t/help-me-with-this-for-loop/138678>\
**Category:** Uncategorized\
**Created:** [February 24, 2005, 12:51pm UTC](https://forum.kirupa.com/t/help-me-with-this-for-loop/138678 "2005-02-24T12:51:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alapimba](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@alapimba](https://forum.kirupa.com/u/alapimba)\
**Post date:** [February 24, 2005, 12:51pm UTC](https://forum.kirupa.com/t/help-me-with-this-for-loop/138678/1 "2005-02-24T12:51:25Z")

</div>

Hello, i have this code:

```auto
var numrotos=7;
for (n=0;n<numrotos;n++) {
 newroto="roto"+String(n);
 this.attachMovie("roto",newroto,n+1);
 this[newroto].theta=n*360/numrotos;
 this[newroto].panel=50+random(10);
 this[newroto].radius=200;//+random(240);
 this[newroto].rotographic.gotoAndStop(random(this[newroto].rotographic._totalframes)+1);
 //this[newroto].rotographic._y=random(150)-75;
}

```

this[newroto].rotographic.gotoAndStop(random(this[newroto].rotographic.\_totalframes)+1); \<-- this line gets the images randomly… and i wanted it to show all images… like the image on frame 1 the image on frame 2 on frame 3… this 7 (the var set on the beguining…)  
can you help me?

Thanks
