To grab or not to grab

Geoff Canyon gcanyon at inspiredlogic.com
Wed Jan 29 01:29:01 EST 2003


You'd be better off doing something like:

local tDragging -- are we currently dragging?

on mouseDown
   -- check the target here to see if it's what you want
   put true into tDragging
end mouseDown

on mouseMove
   if not tDragging then exit mouseMove
   --move the objects here
end mouseMove

on mouseUp
   put false into tDragging
end mouseUp

on mouseRelease
   put false into tDragging
end mouseRelease

On Monday, January 27, 2003, at 09:12 PM, Matt Denton wrote:

> on mouseDown
>   if the optionKey is down then
>     repeat until the mouse is up
>       set the loc of me to the mouseLoc
>     end repeat
>   else grab me
> end mouseDown
>

regards,

Geoff Canyon
gcanyon at inspiredlogic.com




More information about the use-livecode mailing list