Dragging multiple objects

Hello,

wondering, if somebody could help me out with a small sample code...
i create three separate objects and leave one empty space "_", so on screen it would look something like this:

X Y Z _

now, trying to figure out, how to make the following functionality:
if i drag Z to the empty space.. then it drags and drops there alone.

if i drag Y right, it puts Z in an empty space and moves Y right as well.. in other words - it drags both objects at same time

if i drag X right, it drags X and Y and Z accordingly.

i would think that ON TOUCH you should create a group (depending on where the touch was made x,y or z). Then automatically somehow initiate drag event (from touch event?).. and let it fall in place.

Sample code would be appreciated much.

Thanks

anyone?

You'd want to check when an object got locked to _ whether or not there was already an object there, (likely using a simple flag,) if there was, move that object to Z. So on and so forth back to X.

views:1336 update:2011/10/11 8:57:46
corona forums © 2003-2011