Hi i am new in AS3.
I want to make a scope wich can zoom in on button click and go back to previous stage (zoom out) also by clicking a button.

Now i made it work for zooming in (when i click my button it zooms) but
when i want to zoom out everything i tried didn't work so please help.

Here is the code:

//button for zoom in
zoom.addEventListener(MouseEvent.CLICK,glassMove);
function glassMove(event:MouseEvent):void{

addEventListener(Event.ENTER_FRAME,glassMove);
var moveX,moveY;

function glassMove(e:Event) {

scope.x=m_mc.x=mouseX;
scope.y=m_mc.y=mouseY;

moveX = ( ((mag_mc.width-ori_mc.width)/2) * (scope.x-ori_mc.x) )/(ori_mc.width/2);
moveY = ( ((mag_mc.height-ori_mc.height)/2) * (scope.y-ori_mc.x) )/(ori_mc.height/2);

mag_mc.x=270-moveX;
mag_mc.y=135-moveY;

if(mag_mc.x<216)
mag_mc.x=216;
if(mag_mc.x>321)
mag_mc.x=321;
if(mag_mc.y<125)
mag_mc.y=125;
if(mag_mc.y>195)
mag_mc.y=195;}
}

//button for zoom out
zoomout.addEventListener(MouseEvent.CLICK,glassMov e2);
function glassMove2(event:MouseEvent):void{

//code for disabling function glassMove

}