How to make a row of 5 objects to be in the center of the stage
Im trying to add 5 objects to the stage and the entire Row of the 5 objects to be centered on the stage. The objects will be with same Y position and a gap of 10px in between them.
the object have a center,center Registration poin
so far i have this, but it makes the 1st element go in the center and the rest follow him
for(var k:uint=0;k<5;k++){
var gap = 10
var box:Box= new Box()
addChild(box);
box.x=stage.stageWidth/2 + ( k*(gap+box.width));
}