Hi David, I sent you another suggestion. Maybe it slipped through. Try it.
It's stable. Just put this into the script of a button or rectangle. Try it
---
local constrain,boxL,boxR,boxT,boxB
ON mouseDown
put item 1 of rect of me+4 into boxL -- change 4 to your own needs
put item 3 of rect of me-4 into boxR -- change 4
put item 2 of rect of me+4 into boxT -- change 4
put item 4 of rect of me-4 into boxB -- change 4
put true into constrain
END mouseDown
ON mouseMove x,y
IF not constrain THEN exit mouseMove
set the screenmouseloc to \
globalloc(min(boxR,max(boxL,(x))) & "," &min(boxB,max(boxT,(y))))
END mouseMove
ON mouseUp
put false into constrain
END mouseUp
ON mouseRelease
mouseUp
END mouseRelease
---
Jan
_______________________________________________
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