Reall stuck on drag me example

Hey guys, can anyone help me? I am really stuck on the drag me example app. I am trying to replace the blocks with pictures, but for the life of me I can’t figure out how. I have searched the tutorials, and I understand what’s going on, I am just not sure where or what script to use to spawn 3 or more images of different sizes instead of the 3 blocks with rounded edges that are spawned. I have tried display.newImageRect, but with no luck! Big headache. Please help!
Thanks.
SM [import]uid: 79586 topic_id: 16247 reply_id: 316247[/import]

At line 30, replace what you’ve got in arguments with this;
[lua]{ name=“Icon.png”, x=50, y=10, w=100, h=100 },
{ name=“Icon.png”, x=120, y=50, w=100, h=100 },
{ name=“Icon.png”, x=190, y=90, w=100, h=100 },
{ name=“Icon.png”, x=260, y=110, w=100, h=100 }[/lua]

I chose to use Icon.png as the image just because it’s already in the DragMe folder.

Then go to line 85 and switch out what is there with this;
[lua]local button = display.newImageRect( item.name, item.w, item.h)
button.x = item.x
button.y = item.y[/lua]

Removing the lines below up to (but not including adding the event listener.)

You can add more images or change the names up top, just add another line for each image you wish to use and change the size and position accordingly.

Peach :slight_smile:

PS - Please read the forum rules and guidelines here; http://developer.anscamobile.com/forum/2011/05/05/forum-rules-and-guidelines (We don’t like dupe threads ;)) [import]uid: 52491 topic_id: 16247 reply_id: 60512[/import]

Thanks so much, I wasn’t sure which forum to post it in, I didn’t mean to double post, I will avoid that in the future. Thanks again! [import]uid: 79586 topic_id: 16247 reply_id: 60526[/import]

hmm. I am still having a little trouble with it, but thanks for getting me on the right track. Did it work for you in the simulator? I am still getting a blank screen. [import]uid: 79586 topic_id: 16247 reply_id: 60527[/import]

got it! I hand an end in the wrong place! Thanks peaches you rock! [import]uid: 79586 topic_id: 16247 reply_id: 60528[/import]

hmm… I seem to be stuck again, now I am trying to put a different mask over each picture. I can do it when the pictures are separate but I can’t figure out how to put in here. Does it go in the for loop? That would be my guess, I have 4 different masks to cover different parts of each piece. Thanks tons!
SM [import]uid: 79586 topic_id: 16247 reply_id: 60533[/import]