Zoom out until the original size of the document
Hi! I've got a problem with this code, because i need to zoom out for the original size. Please HELP ME in it! thanks
import flash.events.MouseEvent;
stage.addEventListener(MouseEvent.MOUSE_WHEEL, Zoom);
function Zoom(e:MouseEvent):void
{
var mod:Number = 20;
kep2.scaleX += e.delta / mod;
kep2.scaleY += e.delta / mod;
kep2.x = ((2 * mouseX) - (2 * (e.localX * kep2.scaleX))) / 2;
kep2.y = ((2 * mouseY) - (2 * (e.localY * kep2.scaleY))) / 2;
}
import flash.events.MouseEvent;
this.addEventListener(MouseEvent.MOUSE_DOWN, startDragging, true);
this.addEventListener(MouseEvent.MOUSE_UP, stopDragging, true);
function startDragging(e:MouseEvent) {
kep2.startDrag();
}
function stopDragging(e:MouseEvent) {
kep2.stopDrag();
}
