I have this code. The clip moves in a slow spiral trajectory until it stops. When I increase the number of clips (var totalClips) the behaviour changes. The movement is faster and they make more “laps” until they stop.
Any hint?
Thanks.
MovieClip.prototype.move = function(x, y, radio) {
this.radio = radio;
this.onEnterFrame = function() {
if (this.radio>=0) {
this.radio -= 2;
this._x = x+this.radio*Math.cos(t*Math.PI/180);
this._y = y+this.radio*Math.sin(t*Math.PI/180);
t += 10;
}
};
delete this.onEnterFrame();
};
totalClips = 1;
for (i=1; i<totalClips+1; i++) {
attachMovie("circle", "circle"+i, i);
}
for (a=1; a<totalClips+1; a++) {
eval("circle"+a).move(150, a*50, 150);
}