Greetings.
I have a project that requires the ability to zoom in and out on a movieclip. The image starts at 100% and I want to limit the zoom out functionality to go no further than that. I thought I had figured it out, but there seems to be something wrong with my argument. Any help would be appreciated.
function Zoom(e:MouseEvent):void{
if ((mc.scaleX >> 1)||((mc.scaleX == 1)&&(e.delta >> 0))){
var mod:uint = 75;
var coord:Point = mc.globalToLocal(new Point(stage.stageWidth/2, stage.stageHeight/2));
mc.scaleX += e.delta / mod;
mc.scaleY += e.delta / mod;
mc.x = ((2 * stage.stageWidth/2) - (2 * (coord.x * mc.scaleX))) / 2;
mc.y = ((2 * stage.stageHeight/2) - (2 * (coord.y * mc.scaleY))) / 2;
}
}