Mouse messages while down

Derek Bump list at dreamscapesoftware.com
Mon Mar 19 01:11:53 EDT 2007


I just wanted to throw in my two cents on this thread.  When I was 
working on Pixelution (which is still available on RevOnline) I ran into 
the problem of figuring out what button the mouse was hovering over when 
the mouse was down.

My troubles lead me to post BugZilla # 3668 
(http://quality.runrev.com/qacenter/show_bug.cgi?id=3668) but also lead 
to a solution that worked well considering that the script would handle 
polling 1,024 buttons within a group quite efficiently (but nowhere as 
efficiently as the fulfillment of bug #3668.

To solve the problem, I used a combination of a variable containing all 
of the ID's of the buttons within the group, and a mouseMove handler 
that would check to see if the mouse was within each button ID when the 
handler was issued.  Also, since the mouse could only be within 1 button 
in my grid, I had the repeat handler stop polling as soon as it found a 
button that the mouse was within.

Like I said though, it works, but is very limited by the speed of the 
computer.


Derek Bump
Dreamscape Software
http://www.dreamscapesoftware.com/



More information about the use-livecode mailing list