Hugh,

Does it make more sense to add:

on mouseUp
  if GrabMe is true then set GrabMe to false
  pass mouseUp
end if

on mouseRelease
  mouseUp
  pass mouseRelease
end mouseRelease

rather than checking for the mouseUp state in the mouseMove handler? That way you are 'constantly polling' mouseUp.

Just my 2 cents...

best,

Chipp

[EMAIL PROTECTED] wrote:
A tidbit for your Scripter's Scrapbook:
- How to use the mouse to grab and drag a scrolling group
(see also the 'Grab' command in the Transcript dictionary to grab and drag an object)

Put this in the script of your scrolling group...
-----
local GrabMe,xOff,yOff

on mouseDown
put "true" into  GrabMe
put item 1 of the mouseLoc into xOff
put item 2 of  the mouseLoc into yOff
end mouseDown

on mouseMove x,y
if  GrabMe then
if the mouse is "up"  then
put "false" into  GrabMe
exit mouseMove
end if
set the hScroll of me to (the hScroll of me + xOff  - x)
set the vScroll of me to (the vScroll of me + yOff -  y)
put x into xoff
put y into  yoff
end if
end mouseMove
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to