Eng:Mouse X (block)

The Mouse X block is a Sensing block and a Reporter block. The block holds (reports) the mouse-pointer's current Mouse X.

Example Uses
As this block helps report where the mouse-pointer's current location, it is useful in sensing things with the mouse.

Some common uses for the Mouse X block:
 * Depending on where the mouse is, performing a different action

when [space v] key pressed if <(mouse x) > [100]> then repeat (10) change [ghost v] effect by (10) end wait (1) secs clear graphic effects else change y by (50) wait (0.5) secs change y by (-50) end


 * Helping to make a virtual slider

forever set x to (mouse x)


 * With the Mouse Y block, giving the mouse's location

forever say (join (mouse x) (join [, ] (mouse y)))

Workaround
This block can be replicated with the following code:

forever go to [mouse-pointer v] set [Mouse X v] to (x position)