Grabbing/Dragging (was Re: Swipe-able objects in iOS)

Scott Rossi scott at
Sun Feb 27 17:23:49 EST 2011

Recently, Gerry wrote:

> In HyperCard I used to use the "on mousestilldown" message to make
> objects draggable. LiveCode has a zillion new language elements, so
> before I go old school is there now a better way? This is for
> something that'll end up in iOS.

If you simply want to drag an object around a card, you can use the
following in an object script:

on mouseDown
 grab me
end mouseDown

If you need to track anything during a drag, you can see some examples in a
drag sampler stack that is available by executing the following in your LC
message box:

  go url ""

Since your target is iOS, you may need to substitute handlers with
touchStart/touchEnd,  but the principles should be the same.


Scott Rossi
Creative Director
Tactile Media, UX Design

More information about the Use-livecode mailing list