Drag Me sample code

Is there a way to send back the image to its original position when event.phase =="ended" is called.Basically I want my image to go back to its original position from where i started the phase =="began" for draging.
Please help me out doing this as I am unable to figure it out.

Not sure if I'm thinking about the same code as you, but the drag me example I remember was storing the original coordinates of the object at the phase == "began" stage as p.x0 and p.y0. So if you wanted the object to snap back to its original location, you would use:

1
2
3
if phase == "ended" then
p.x = p.x0
p.y = p.y0
views:1809 update:2011/12/1 20:56:45
corona forums © 2003-2011