I have 6 objects that have to move randomly and continuously. Is it efficient to enterframe each object seperately or 1 enterframe with loop addressing all objects.
var myObjArray:Array = new Array(); // Contains 6 movieclip objects
for(var i=1; i<=6; i++)
{
var Square:MoveObject = new MoveObject();
Square.addEventListener(Event.ENTER_FRAME, Square.go);
myObjArray[i] = Square;
}
public Class MoveObject extends Movieclip{
public function go(e:Event):void
{
this.x++;
}
}
OR we loop through objects in one EnterFrame function ?