How to change drag to click

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Kae
Posts: 7
Joined: Thu May 09, 2013 4:46 am

How to change drag to click

Post by Kae » Fri May 17, 2013 7:16 am

hi…I have read and got the sample of drag and drop images. However, I want to change drag to click. Someone could solve this problem ? THx
Attachments
imageDragDrop_Re-Revised.zip
(120.61 KiB) Downloaded 165 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: How to change drag to click

Post by dunbarx » Fri May 17, 2013 2:05 pm

Hi.

This is a much simpler task. Make a copy of the "imageDragDrop" stack. In that copy, comment out the entire card script. You do not want any of those handlers to interfere with what you are going to do. In the script of one of the images,write:

on mouseup
set the rect of me to the rect of fld "dragYourImagehere"
end mouseup

This should get you started.

Now you will have to manage restoring whatever image might already be in that field area back to its original place This is so that you can click on whatever image you want and if there is one already there, it pops back down and the new one takes its place. You will likely need a few custom properties to be set. Can you do that?

Craig Newman

Kae
Posts: 7
Joined: Thu May 09, 2013 4:46 am

Re: How to change drag to click

Post by Kae » Tue May 21, 2013 5:49 am

Sorry I didn't understand which the words are needed to delete. Is there any sample for me to watch???

Post Reply