Follow Closest With Multiple Movieclips

Hello, I’m trying to make it so that there are a bunch of instances (let’s say 20) that move around about the stage. There are also 5 other instances (let’s call them followers) that move and rotate towards the nearest of the 20 moving instances. I achieved this with this code in an ENTER_FRAME event:


for (var i:int=0; i<_root.eArray[0].length; i++) {
	var obj=_root.eArray[0]*;
	var distX:Number=this.x-obj.x;
	var distY:Number=this.y-obj.y;
	var dist:Number=(distX*distX+distY*distY);
	if (dist<max) {
		max=dist;
		c=_root.eArray[0]*;
	}
}
max=Number.MAX_VALUE;
angle=Math.atan2(c.y-this.y,c.x-this.x);
speedX=Math.cos(angle)*2;
speedY=Math.sin(angle)*2;
rotation=angle/(Math.PI/180);
this.x+=speedX;
this.y+=speedY;

This code is placed in the class file for the follower objects. The problem is that I don’t want more than one follower following the same movieclip. I was thinking that after the for loop I would remove c (the closest movieclip and the one it is following) from _root.eArray[0] and put it in _root.eArray[1] so that the other followers would not count it when searching for the closest. But I couldn’t figure out the best way to go about doing it. I’d really appreciate any help