I am creating a game where you are given a few letters (they are images, each letter is an image) and you you have empty slots (an image of a black box).
When the user touches the image of the letter, it clones the letter, and starts moving that clone where the user is touching, and if he put it into one of the slots (one of the black boxes) then it just drops there, where if he didn't move it to the black box it just resets (the clone disappears, like it was dropped).
Now I am using storyboard here, and I have my level1.lua file ready, with the scene background and all.
What logic should I use here? I tried googling tutorials for drag and drop in corona but couldn't find any.
Can anyone recommend a good logic to do this within storyboard messed up file?
You can use this methods in your logic
The letters and slots have physics bodies, you can drag the letter and when the letter collides on a slot body you can now get the collision data and you can now able to drop the letter.
Rectangle Approach
This is straight forward. You have to get all of the slots' x, y, width and height and compare it to the letter's x and y when you dragged it. Letter's x and y must be between slot's (x to x+width) and (y to y+height) so that you can now drop the letter to the specified slot.
It is up to you how you will code this. This is just my idea about drag and drop.