Mouse messages while down

Jim Ault JimAultWins at yahoo.com
Sat Mar 17 22:50:40 EDT 2007


how about:
Use the within function to determine whether a point is inside the specified
object.

Jim Ault
Las Vegas

On 3/17/07 7:32 PM, "Sarah Reichelt" <sarah.reichelt at gmail.com> wrote:

> I'm having a blank moment here and I can't work out how to solve what
> should be a simple problem.
> 
> I have a grid of about 400 buttons and I have a mouseDown handler in
> the card script to detect which of these buttons is clicked first.
> 
> Then I want the user to be able to drag the mouse around and I want to
> detect which button is under the pointer when the mouse is released.
> Ideally, I want to detect which button is under the pointer at all
> times while the mouse is down.
> 
> The problem is that no other messages seem to be sent while the mouse
> is down (mouseEnter, mouseLeave, mouseStillDown etc). I can detect
> mouseRelease but "the target" is my original button so it doesn't tell
> me where the mouse is now. Checking "the mouseControl" in the
> mouseRelease handler also gives the original target.
> 
> It's looking as if I may have to do some continuous polling, but I
> know that is generally frowned upon, so I would be grateful for any
> other suggestions.





More information about the use-livecode mailing list