Pinch Zoom...and Pan Image working together in harmony?

In my perfect world, I want to be able to pinch zoom, and at any time, pan the image around.

I have a single image loaded, and individual listeners to accomplish both of the needed functions, when applied one at a time, works perfectly.

I am looking for input from the community on how to get both to live together and work together.

Both listeners are listening for the "touch" event, so I am thinking I need to either figure out an event to listen to that isn't "touch", or... that is where I lose my train of thought. I just can't seem to wrap my head around how to accomplish it.

I will take any and all ideas at this point.

In my imperfect world, I go about doing things that may not be entirely efficient, but since you say you will take any and all ideas...

Since you have both functions working, what if you place two display object, one loads the image and the other a transparent rectangle the same size as the loaded image, and attach one "touch" event to the image and another to the transparent rectangle -- and have these two objects always placed on exactly the same x,y coordinate?

Now that is an interesting idea, if I have the pinch zoom above the pan, I can allow single touches (panning) to fall through the pinch zoom.........

Off to test.

Let us know how it goes. Good luck!

EDIT: One more thought... you might be able to group the two objects into displayGroup...

Still testing, so far no joy....

views:1365 update:2011/10/17 8:58:49
corona forums © 2003-2011