Jump to content
Search Community

Throwprops + blitMask + pinch zoom gesture

Seb-AS test
Moderator Tag

Recommended Posts



I´m trying to make a simple pinch zoom image scroll app in Adobe Air Mobile for Android and ios.


I always having the same issue when I try to pinch the image zoom in and I activate the blitmask. I don´t have problems making this part. But when I pinch to zoom out, the image moves to different x and y coordinates, and sometimes the image disappears. IThe image upon zoom out moves off-center and doesn´t return to position zero. I know there is something in the blitmask that changes these values, but I´m not sure what exactly is going wrong.


I always use blitmask.update() and enable or disable bitmapMode. Does anyone have an example for Flash with pinch zoom gestures with ThrowProps + blitMask?



Link to comment
Share on other sites

Sorry isn't the blitmask is a matrix problem, when i use the matrix for zoom in works ok but when I do zoom out it change the MovieClip positions x and y.

I can use TransformMatrixPlugin for do this?

here is the code I´m using but I think I need special transform funcion when is pinch zoom out



var matrix:Matrix = mc.transform.matrix;

var transformPoint:Point = matrix.transformPoint(new Point(event.localX, event.localY));

matrix.translate(-transformPoint.x, -transformPoint.y);

matrix.scale(event.scaleX, event.scaleY);

matrix.translate(transformPoint.x, transformPoint.y);

mc.transform.matrix = matrix;



Link to comment
Share on other sites

I'm not sure what event.localX and event.localY is exactly, but maybe that's where the problem is. I don't see an obvious mistake in your code, but it's tough to troubleshoot without having a file that we can publish and interact with. If you want to tween the transformations around a particular point (like a custom registration point), you should check out the TransformAroundPointPlugin. There's an interactive example in the Plugin Explorer. It's a membership benefit of Club GreenSock.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...