Zoom with mask

Hello there. I have to do I zoom In/Out function with a mask. Scenario: I have a big image and I have to do zoom on it only once and the problem is that my zoomed image must be in a panel(invisible, like a mask), so when I zoom the image the width and height of the image do not affect my stage, like google maps. And I have to be able to pan the image when I zoom in. I do not know how to set that mask so my image do my get off the stage. If you know what I mean. This is my code for the moment.
main._x = (Stage.width - main._width)/2;
main._y = (Stage.height - main._height)/2;

zoomIn_btn.onRelease = function()
{
zoomIn_btn.enabled = false;
zoomOut_btn.enabled = true;
main._height = main._height1.5;
main._width = main._width
1.5;
main._x = (Stage.width - main._width)/2;
main._y = (Stage.height - main._height)/2;
}

zoomOut_btn.onRelease = function()
{
zoomIn_btn.enabled = true;
zoomOut_btn.enabled = false;

main._height = main._height/1.5;
main._width = main._width/1.5;
main._x = (Stage.width - main._width)/2;
main._y = (Stage.height - main._height)/2;

}

Thank you.