Grabbing/Dragging (was Re: Swipe-able objects in iOS)
Scott Rossi
scott at tactilemedia.com
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 "http://www.tactilemedia.com/site_files/downloads/drag_sampler.rev"
Since your target is iOS, you may need to substitute handlers with
touchStart/touchEnd, but the principles should be the same.
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
More information about the use-livecode
mailing list