Drag command--does this seem right?

Devin Asay devin_asay at byu.edu
Wed Dec 21 16:48:05 EST 2016


On Dec 21, 2016, at 2:02 PM, dunbarx at aol.com<mailto:dunbarx at aol.com> wrote:

Devin.


I don't see it that way. The "mouseMove" message is sent continuously and "me" is always going to be the card, since that is where the handler lives. Try moving the handler to the stack script. You will need to modify it a little:



on mouseMove
  put ""
  wait 1
  put me
  --if the target <> me then
     if the optionkey is down then grab the target
  --end if
end mouseMove


because the "target" is not really applicable from there. but "me" still is.

That wasn’t actually my question. I probably didn’t say it clearly enough.

The question is this:

Why would the mouseMove handler act exactly like the mouseDown handler? That is, nothing happens with the “grabbed” object until the mouse is clicked down. You expect that in the mouseDown handler, obviously, but not in the mouseMove handler, which gets sent each time the mouse moves at least one pixel, regardless of whether the mouse is up or down.

Devin


Devin Asay
Director
Office of Digital Humanities
Brigham Young University



More information about the use-livecode mailing list