dragging a stack around
Scott Rossi
scott at tactilemedia.com
Sat Mar 27 14:48:05 EDT 2010
Recently, Marty Knapp wrote:
> Here's a script from Scott Rossi's WindowLab example stack:
The above was an old script -- one other handler (mouseEnter) should be
added, just in case the routine ever gets "stuck". I place the following in
the script of the first card (watch line wrap):
local allowDrag
on mouseEnter
put "" into allowDrag
end mouseEnter
on mouseDown
put mouseLoc() into allowDrag
end mouseDown
on mouseMove X,Y
if allowDrag = "" then exit mouseMove
set topLeft of this stack to globalLoc(X - item 1 of allowDrag & "," & Y -
item 2 of allowDrag)
end mouseMove
on mouseUp
put "" into allowDrag
end mouseUp
on mouseRelease
mouseUp
end mouseRelease
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
More information about the use-livecode
mailing list