The vanilla Scratch mouse x and y blocks are limited to the visible stage area ([240, 180] on either side). This is a way that limit can be bypassed, to detect your mouse position anywhere on the page. Should be accurate to ~1 to 2 pixels. Can detect up to a range of a 16384x16384 square (can be increased if you need to for some reason, but it may cause more lag); the mouse X and Y will be equal to "OUT OF RANGE" when it is outside that range. HOW THIS WORKS: The "touching mouse pointer?" block works off-stage. So, it is possible to use a 2D binary search-like method to find out your mouse position, with increasing precision: - Check some large area if the mouse pointer is touching that area. - If it is, then split that area into 4 smaller quadrants and check those; then check 4 even smaller quadrants in the touching quadrant, and so on, until we get the position accuracy we want. https://en.wikipedia.org/wiki/Binary_search_algorithm
Somewhat inspired by some "button detector" projects