This script seems to work with adequate performance:

on mousemove mh,mv
 if the hilite of btn "constrain" is true then

   if mh <= the left of fld "container" then
     set the screenmouseloc to the globalloc of (the left of fld
"container", mv)
   end if

   if mh >= the right of fld "container" then
     set the screenmouseloc to the globalloc of (the right of fld
"container", mv)
   end if

   if mv <= the top of fld "container" then
     set the screenmouseloc to the globalloc of (mh,the top of fld
"container")
   end if

   if mv >= the bottom of fld "container" then
     set the screenmouseloc to the globalloc of (mh,the bottom of fld
"container")
   end if

 end if
end mousemove


Note two things:

1) The button "Constrain" needs to be within the field "Container" or you'll
never be able to get out. :-)

2) It is possible to move the mouse out of the rect for brief moments, but
then it pops back into the rectangle. I'm assuming it's a function of
slipping out between a mousemove scan.



--
Regards,

Howard Bornstein
-----------------------
www.designeq.com
_______________________________________________
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