Mousemove action outside the card

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Mousemove action outside the card

Post by dunbarx » Tue Feb 22, 2022 1:07 am

This started with the thread:
viewtopic.php?f=8&t=36761

With this in a card script:

Code: Select all

on mouseMove x,y
   put the mouseLoc
end mouseMove
Anywhere in the card a value is returned as one moves the cursor. The handler stops working if one leaves the card window. But if one holds the mouse down while moving, a value is returned wherever on screen the cursor might be. This is not really addressed in the dictionary, and was only discovered by accident while fooling around in the thread mentioned above.

Craig

mrcoollion
Posts: 719
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Mousemove action outside the card

Post by mrcoollion » Tue Feb 22, 2022 3:54 pm

It is mentioned here : https://livecode.fandom.com/wiki/MouseMove
If the mouse button is down, the mouseMove message continues to be sent to the object that was clicked, even if the [[mouse pointer]] moves outside that object.

Post Reply

Return to “Talking LiveCode”