Position mc on embedded mc

Hey I have seen many threads on moving mc with easing to center coordinates but does anyone know how to position an mc on the center coordinates of another mc embedded inside. inside of my main mc I have an image and mcs above. I want to make a button that says something like:

on release center main mc on coordinates of mc inside of main mc.

So far I have some code for an on event function:

main_image_mc.onEnterFrame = function() {
main_image_mc._x;
main_image_mc._y;
speed1 = 8;
function moveIt([COLOR=“Red”]endX, endY[/COLOR]) {
main_image_mc.onEnterFrame = function() {
this._x += (endX-this._x)/speed1;
this._y += (endY-this._y)/speed1;
if (Math.abs(this._x-endX) == 1 && Math.abs(this._y-endY) == 1) {
this._x = endX;
this._y = endY;
}
};
}
moveIt([COLOR=“Red”]-300, -1100[/COLOR]);
};

any help much appreciated.

-M