Hello reader
I am trying to achieve a pinch zoom effect on an image dynamically added to the stage via actionscript.
the images natural size is 2048x and onload is scaled to 1024x
when the pinch zoom is performed it calls the function below.
the problem i am trying to solve (and have tried numerous things) is to ONLY have the image scale between the two sizes as mentioned above.
scale between 1024x and 2048x and not go larger or smaller than.
private function zoomHandler(event:TransformGestureEvent):void
{
var clip:MovieClip = event.target as MovieClip;
clip.scaleX *= event.scaleX;
clip.scaleY *= event.scaleY;
}
i am sure this is pretty simple but it is frustrating me.
any help would be much appreciated
warm regards