We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › mouse x and y, odd behaviour
Page Index Toggle Pages: 1
mouse x and y, odd behaviour (Read 286 times)
mouse x and y, odd behaviour
Mar 22nd, 2008, 7:19am
 
If I click and drag the cursor beyond the window boundary, mouseX and mouseY are able to be negative or greater than the window size.

But I need to know the mouseX and mouseY even if the mouse is not pressed and the cursor is outside the window. Is there anything not mentioned in the reference I can use?

I've tried reading
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseEvent.html#getX()
but I don't know how to implemend it into my code, putting mouseEventMethods.getX() returns an error "Semantic Error: No accessible method with signature "getX()" was found in type "processing.core.PApplet$RegisteredMethods"."
Page Index Toggle Pages: 1