At 12:46 PM +0200 13/10/1999, Eva Isotalo wrote:
>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?

>The script in the image looks something like following:
>
>on mouseDown
>   repeat until the mouse is up
>     set loc of me to the mouseLoc
>   end repeat
># and other stuff here
>end mouseDown
>
>I've found the 'repeat' to be better in my case than the 'grab'.
>
>Thanks in advance.

Hi Eva

I have some experience of this. Not pleasant. :(

I don't have the scripts to hand, so this is from memory. But I think 
when a user clicks the second mouse button while the first one is 
down, a second mouseDown is sent. The problem is with the mouseUps. I 
can't remember exactly, but depending on the organisation of objects, 
the mouseUps may not be received by the object in question, or even 
be received at all. (I think the missing mouseUp problem only occurs 
when the clicked object is part of a group.) In my case, also a 
dragging thing, I set a local (declared at the top of the script) in 
the mouseDown, and checked this before performing any action. And 
then forced a mouseUp if this flag hadn't been set. My dragging 
routine used a mouseMove handler, so your solution may be different. 
It was something like this:

local lcDragging
on mouseDown
   if not lcDragging then
    put true into lcDragging
   -- do stuff here
   else
     mouseUp
   end if
end mouseDown

on mouseMove
if lcDragging then
  --do drag stuff here
end if
end mouseMove

on mouseUp
   if lcDragging then
    -- do stuff here
     put false into lcDragging
   end if
end mouseUp

on mouseRelease
   mouseUp
end mouseRelease

The result was that a click on a second mouse button was the same as 
releasing the mouse button. I liked this, because it discouraged such 
clicking behavior among users, and was far kinder than cutting off 
their fingers. :)

Cheers
Dave Cragg


_____________________________________________
The LACS Centre (Business English Training Resources)
mailto:[EMAIL PROTECTED]
http://www.lacscentre.co.uk
_____________________________________________

Reply via email to