Fine Tuning MC position using stage object

I’m using the stage object to align multiple MC’s. My question is how do I affect a MC’s position if I want to have it be centered on both axis but 100px away from the bottom margin instead of the top relative to the size of the window?

here’s my positioning code:

[AS]
navBar._y = Stage.height;
navBar._x = Stage.width/2;
tpShadow._x = Stage.width/2;
tpShadow._y = 6;
idol2._y = Stage.height/2;
idol2._x = Stage.width/2;

[/AS]

Also if i’m using an empty MC to load external swf’s, do the external swf’s have to have AS for positioning as well or do I position the empty MC in the base movie?

Thanks,

Nico

Not sure what you are asking, but assuming your registration point is in the center and you want the clip centered horizontally and centered vertically but with a 100 pixel margin at the bottom.


theMC._x = Stage.width/2;
theMC._y = Stage.height/2 - 100;

To make things easier for you though, why don’t you make an object to hold the center stage coordinates? That way, when you make a change to where the “center” is, you just have to change it in one spot.


var stageCenter:Object = {x:Stage.width/2, y:Stage.height-100};

theMC._x = stageCenter.x;
theMC._y = stageCenter.y;