Punching holes in a graphic

BNig niggemann at uni-wh.de
Sun Apr 18 16:41:17 EDT 2010


Alejandro,
I too noticed the lag between the moving hole and the rectangle, in the
revlet it does not show that much, but in the ide it does show. So I went on
my own and it works very well. In the group with the 'hole' I put a handler
---------------------------
local moveMe, xDiff, yDiff

on mouseDown
   put the clickLoc into tClick
   put item 1 of the loc of me - item 1 of tClick into xDiff
   put item 2 of the loc of me - item 2 of tClick into yDiff
   put true into moveMe
   send moveOn to me in 5 milliseconds
end mouseDown
   
on moveOn
   if moveMe then
      put the mouseLoc into tLoc
      add xDiff to item 1 of tLoc
      add yDiff to item 2 of tLoc
       
      lock screen
      set the loc of me to tLoc
      set the loc of grc "Frame2" to tLoc
      unlock screen
      if moveOn is not in the pendingMessages then
         send moveOn to me in 30 milliseconds
      end if
   end if
end moveOn
   
on mouseUp
   put false into moveMe
end mouseUp
   
on mouseRelease
   mouseUp
end mouseRelease
----------------------------------------
grc "frame2" being the framing rectangle.
regards
Bernd
-- 
View this message in context: http://n4.nabble.com/Punching-holes-in-a-graphic-tp1999614p2015151.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list