drag/drop target

Hi all,

I have a question… in the game I am building there are three targets at the bottom of the screen, and the user must drag/drop an image onto a specific target, then drag the next image its own specific order etc.

Example:

image1 ----> box3(only)
image2 ----> box1(only)

Thanks in advance and I appreciate any advice you can provide! [import]uid: 32253 topic_id: 7119 reply_id: 307119[/import]

What’s the question? [import]uid: 10903 topic_id: 7119 reply_id: 25052[/import]

Hi crssmn,

Sorry I should have been more specific. Basically, I am wondering how to implement the following: I have three images and each has its own target. The user must drag each image to its target to place the images in a specific order. So, if the image is placed on top of the wrong target, the image then moves away, but if all the images are in the correct order the level is complete.

At the moment, I have the level setup( not using physics but can change that if needed) but cannot figure out how to include the drag to target part. Do I set up listeners for each target for a specific id, if so how would I do that?

Thanks! [import]uid: 32253 topic_id: 7119 reply_id: 25136[/import]

I guess it depends on how complicated each level will get. Will there always only be three objects?

You may want to try using transitions to move your objects around.

Give each of the images and targets touch listeners.

Then if image touched it becomes active.

Then if target touched, move image to target position.

If right then stay, if wrong then move image to another location. [import]uid: 10903 topic_id: 7119 reply_id: 25314[/import]

Yes, always three objects on screen for each level. I will give transitions a shot **fingers crossed** Thanks again for getting back to me. [import]uid: 32253 topic_id: 7119 reply_id: 25326[/import]