The mouse y is the position of the mouse-pointer on the Y-axis (vertical) of the Stage. The value gets higher or lower depending on how far up on the Stage it is. The value is set to 180 if the mouse is above the Stage, or -180 if the mouse is below the stage.

Related Block

This block can be used in conjunction with this value:

Example Uses

Some common uses for the Mouse Y value are below:

  • Sliders

In a project, if something needs to be adjustable, then a slider can be used that can be controlled using the mouse.

The slider button (the sprite that will slide back and forth) should have these scripts:

when this sprite clicked
repeat until <not<mouse down>>
    set [main value v] to (mouse y)
    go to x: (180) y: (main value)
end

The X position can be any value, and the main value is the value that will be controlled by the slider.

  • Moving vertically
  • Finding the mouse's Y position
  • Mousing over an area

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.