getMouseX and getMouseY


getMouseX ();

getMouseY ();


Get the current x or y co-ordinate of the mouse in relation to the scene; that is, how far across or down the background image the mouse cursor is currently positioned.

Return value:

The functions each returns a number between 0 and the width or height of the background image minus 1 (inclusive). 0 represents the very left (in the case of getMouseX) or top (in the case of getMouseY) of the background.

See also:

getMouseScreenX and getMouseScreenY