> Hi everybody,
> 
> When dragging an image and at the same time clicking the second mouse
> button (Win98) the image "sticks" to the the mouseloc and nothing else can be
done.
>
> Any one have an idea of how I can prevent this?

Hi Eva,

The simple:

on mouseMove x,y
  if the mouse is down then set the loc of me to x,y
end mouseMove

The more efficient:

local lMouseDown

on mouseDown
  put true into lMouseDown
end mousedown

on mouseUp
  put false into lMouseDown
end mouseUp

on mouseMove x,y
  if lMouseDown then set the loc of me to x,y
end mouseMove

The latter example is more efficient because the state of the mouse is not
continuously evaluated using the mouse() function. A variable is queried
instead which is a much less intensive operation, especially on Unix systems
where the mouse() function is slower. Depending on what you are doing, the
first method is likely to be sufficient for your needs. HTH

Cheers,

Alan

-----------------------------------------------------------------
Alan Beattie <[EMAIL PROTECTED]> <http://www.xworlds.com/>
Cross Worlds Computing, MetaCard Distributors, Custom Development.
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.

Reply via email to