scale image up at the touch coordinate as its center

How can I scale an image up at the coordinates the screen is touched?

I've tried without success to modify the reference point using event x,y,then scaling.

You need a reference to the object in order to scale it. You can get the reference by creating a table "touch" listener for each object and use event.target along with the object:scale() API.

You can also create a table of all the objects created and determine which object was touched in a global Runtime "touch" event listener.

You can only scale the entire image/object and not a portion of the object.

@Tom
Thanks for your response.
It is the entire image I want to scale, just at the point it's touched.

I've tried without success to change the image origin to the touch coordinates, then scale up.

I haven't put the image into a table, so I'll try that next per your suggestion.

Meanwhile, Carlos is looking for some code he believes will demonstrate how it's done.

@Tom
I noticed given the same code, if I scale around a display object without inserting it into a group it doesn't scale around the touch. If I put the object in a group it does.

Why?

views:1521 update:2011/10/8 8:54:25
corona forums © 2003-2011