how to capture 'movestack' end?
scott at tactilemedia.com
Fri Jun 14 14:42:00 CDT 2002
Recently, Chipp Walters wrote:
> I need some help. I'd like to execute a command at the
> end of a movestack, but the movestack message is sent
> multiple times while the stack is being dragged
> around. For instance:
> on moveStack
> end moveStack
> will create a sequence of beeps for as long as you
> drag the stack around (PC, not Linux, not sure about
> Mac). If I insert a lock messages, I get a beep at the
> beginning of the movestack and nothing at the end. How
> can I 'trap' the end of the moveStack??
Another way to do this would be to place the following script in a button or
graphic in your stack.
set the uAllowDrag of me to the clickH & "," & the clickV
on mouseMove x,y
if the uAllowDrag of me is empty then exit mouseMove
put globalLoc(x&","&y) into tLoc
set topLeft of this stack to \
item 1 of tLoc - item 1 of the uAllowDrag of me,\
item 2 of tLoc - item 2 of the uAllowDrag of me
set the uAllowDrag of me to empty
# YOUR TRAP SCRIPT HERE
answer "The drag is done."
Tactile Media, Multimedia & Design
Email: scott at tactilemedia.com
More information about the use-livecode