For a couple of reasons, I don't want to make my sprite moveable, yet I do 
want the user to be able to move it with the mouse. So I use this script:

on mouseDown me
   pLeftMouseOffset = the mouseH - sprite(me.spriteNum).loc[1]
   pTopMouseOffset = the mouseV - sprite(me.spriteNum).loc[2]
   if the stillDown then
     locLeft = the mouseH - pLeftMouseOffset
     locTop = the mouseV - pTopMouseOffset
     sprite(me.spriteNum).loc = point(locLeft, locTop)
   end if
end mouseDown

It generally works, but when you move the mouse quickly, the handler stops 
working. I get the same results placing this script in a mouseWithin handler.

I remember a discussion a while ago about how often mouse events are polled 
at various frame rates. The problem I'm describing is much worse at 3 
f/sec, and better--but still a problem--at 20 f/sec.

What's the solution? Thanks!

Slava


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to