How can I drag an image on the iPad?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
EpicBlob
Posts: 3
Joined: Mon Feb 13, 2012 5:00 am

How can I drag an image on the iPad?

Post by EpicBlob » Sun Mar 18, 2012 9:24 pm

I have an image on my app, but I can't figure out how to let the user drag it with his finger.

Any help would be appreciated.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4178
Joined: Sun Jan 07, 2007 9:12 pm

Re: How can I drag an image on the iPad?

Post by bn » Sun Mar 18, 2012 9:42 pm

Hi epicBlob,

have a look at the Help Menu -> Example Stacks and Resources -> Mobile Examples -> Scroller Example.livecode

That should get you started.

If there are any problems please don't hesitate to ask.

Kind regards

Bernd

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: How can I drag an image on the iPad?

Post by Jellicle » Mon Mar 19, 2012 2:18 am

Not sure the OP wants to drag an image in a browser... Perhaps s/he could explain the use case more clearly?

g
14" MacBook Pro
Former LiveCode developer.
Now recovering.

EpicBlob
Posts: 3
Joined: Mon Feb 13, 2012 5:00 am

Re: How can I drag an image on the iPad?

Post by EpicBlob » Mon Mar 19, 2012 2:52 am

So I'm making a statistics program. On a slide, there is an onscreen court that shows a birds eye view of the two teams. Each player is made from a circle and number (two separate objects). I want to be able to move these players around the court.

For now, I don't want to worry about the user dragging the player outside of the court. All I need is for them to move :).

Thanks,
Epic

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: How can I drag an image on the iPad?

Post by Jellicle » Mon Mar 19, 2012 5:31 am

Ok. There are a few ways to do that. Check out the "grab me" command, which is usually placed in a mouse down handler. It'll magically make the object dragable :)

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply