# Rotation /w multiple objects

**URL:** <https://forum.kirupa.com/t/rotation-w-multiple-objects/10127>\
**Category:** Uncategorized\
**Created:** [December 24, 2002, 10:16pm UTC](https://forum.kirupa.com/t/rotation-w-multiple-objects/10127 "2002-12-24T22:16:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![notpro](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@notpro](https://forum.kirupa.com/u/notpro)\
**Post date:** [December 24, 2002, 10:16pm UTC](https://forum.kirupa.com/t/rotation-w-multiple-objects/10127/1 "2002-12-24T22:16:44Z")

</div>

Hi,

it sounds like someone is in trouble…he he … OK here we go…there is an example of what i’m trying to do [http://actionscript-toolbox.com/sample3drotator.php](http://actionscript-toolbox.com/sample3drotator.php)

the only difference is that i’d like to use several different objects in my file…and not only one (ie. ball or whatever) - but different objects with different shapes, colors…circulating on the same “path”

any hint or tutorial,… would be of great help

tnx a lot

notpro

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 25, 2002, 3:43pm UTC](https://forum.kirupa.com/t/rotation-w-multiple-objects/10127/2 "2002-12-25T15:43:55Z")

</div>

You need to change the for loop in the load handler:

```auto

  for (i=1;i<=nBalls*3;i++) {
    this.attachMovie("expBall","mcBall"+i, i);
    this["mcBall"+i].angle = i * Math.PI*2/nBalls;
  }

```

Here, Helen Triolo (absolute respect to her :beam: ) always ataches the same clip, _expBall_. All you have to do is make a list of the clips you want to attach (their linkage names), in an array because it’s very practical to use in loops, and you’re off:

```auto

  myClips=["doggy","mommy","PamXXX"];
  for (i=1;i<=nBalls*3;i++) {
    this.attachMovie(myClips[i-1],"mcBall"+i, i);
    this["mcBall"+i].angle = i * Math.PI*2/nBalls;
  }

```

pom \<:}
