One of my students is creating an app that needs to capture the x-y mouse position when the mouse is clicked. I thought there would be an event handler for this built into app lab, but I’m not having any luck finding this. Any advice how to do this? He is trying to make a basketball shot chart tracker that shows where shots were taken from…
I think what you are looking for is built into App Lab. This example app reports to the console the X and Y coordinates of the mouse pointer when “screen1” is clicked.
Does this help?
WOW! You’re a prince!
This might be a dumb question, but how did you find this?
The documentation for event.x and event.y is located with the documentation for the onEvent block. Hover over the block and click ‘see examples’.
I see. It really was there the whole time! Got it. Thanks.