
global MouseX, MouseY


on startmovie
  cursor 200     -- Make invisible
  set MouseX = the mouseH
  set MouseY = the mouseV
end startmovie


on stopmovie
  cursor -1      -- Arrow
  halt
  quit
end stopmovie


on idle
  -- !! Allow 1 pixel movement, since NT sometimes gives slightly
  --    different readings, even if the mouse is not moving.
  if (abs(the mouseH - MouseX) > 1  OR  abs(the mouseV - MouseY) > 1) then
    stopmovie()
  else if (the mouseDown  OR  the rightMouseDown) then
    stopmovie()
  else if (the keyPressed <> "") then
    stopmovie()
  else if (the shiftDown  OR  the optionDown  OR  the commandDown) then
    stopmovie()
  end if
end idle
