Dragging an object
Geoff Canyon
gcanyon at gmail.com
Sat Jul 12 19:57:36 EDT 2014
On Thu, Jul 10, 2014 at 7:24 PM, Peter Bogdanoff <bogdanoff at me.com> wrote:
> How can I drag it by clicking on one side of this group?
local xOff -- the offset for dragging
local dragging -- the flag set for dragging
on mouseDown
put item 1 of the loc of me - item 1 of the mouseLoc into xOff
put true into dragging
end mouseDown
on mouseUp
put false into dragging
end mouseUp
on mouseRelease
put false into dragging
end mouseRelease
on mouseMove x,y
if dragging then set the loc of me to (x + xOff),(the fixedY of me)
end mouseMove
More information about the use-livecode
mailing list