Loops and Arrays

Hi,

I have 3 balls and i want them to turn around a center point.

The physics is right but I’m finding confusing how to apply the equation to any object of my array.

Here it goes the code:

var movies = ["ball_mc", "ball2_mc", "ball3_mc"];
var angle:Number = 0;
var centerX:Number = center_mc._x;
var centerY:Number = center_mc._y;
var radius:Number = 100;
var speed:Number = .1;
for (var i = 0; i<movies.length; i++) {
    onEnterFrame = function () {
        movies[0]._x = centerX+Math.cos(angle)*radius;
        movies[0]._y = centerY+Math.sin(angle)*radius;
        angle += speed;
    };
}

Anyone?