Control duplicates with prototype

Here something i’m applying what i used the prototype to. Just some random flash just to keep on learning new things.

excuse the [color] stuff, idk where that came from but thats not in my actionscript…


[color=#000000]for (x; x<5; x++) { 
_root.dot.duplicateMovieClip("ring"+x, x+1); 
} 
MovieClip.prototype.ball = function(speed, rotation, alpha, sized) { 
this._x += (_root._xmouse-this._x)/speed; 
this._y += (_root._ymouse-this._y)/speed; 
this._xscale = math.cos(i++/rotation)*sized; 
this._yscale = math.sin(i++/rotation)*sized; 
this._alpha = (math.cos(i++/alpha)*50)+75; 
this._rotation++; 
}; 
dot.onEnterFrame = function() { 
this.ball(5, 175, 75, 200); 
}; 
_root["ring"+1].onEnterFrame = function() { 
this.ball(5, 165, 50, 100); 
}; 
_root["ring"+2].onEnterFrame = function() { 
this.ball(5, 155, 25, 50); 
}; 
_root["ring"+3].onEnterFrame = function() { 
this.ball(5, 145, 12.5, 25); 
};[/color] 

It functions good, the way i want/like it to, although it seems theres got to be a better way. I’m not sure if its an array, or another for loop but i’d like to condense _root[“ring”+1], _root[“ring”+2]… etc etc, into one onEnterFrame statement. By doing this i get the feeling it will be hard to set a pattern say, i’d like each duplicated movie clip to be offset from the other, 10 units on the x and y axis. Now that i got the prototype working it saves mucho time defining individual properties, but just looking to make it even more efficient. Thanks in advance.