Lingo Dictionary > L-N > mouseV |
![]() ![]() ![]() |
mouseV
Syntax
the mouseV
mouseV()
Description
System property; indicates the vertical position of the mouse cursor, in pixels, from the top of the Stage. The value increases as the cursor moves down and decreases as the cursor moves up.
The mouseV
property is useful for moving sprites to the vertical position of the mouse cursor and checking whether the cursor is within a region of the Stage. Using the mouseH
and mouseV
properties together, you can identify the cursor's exact location.
The Director player for Java doesn't update the mouseV
property when Lingo is in a repeat loop.
This property can be tested but not set.
Example
This handler moves sprite 1 to the mouse pointer location and updates the Stage when the user clicks the mouse button:
on mouseDown sprite(1).locH = the mouseH sprite(1).locV = the mouseV updateStage end
Example
This statement tests whether the pointer is more than 10 pixels above or below a starting point and if it is, sets the variable vFar
to TRUE
:
if abs(the mouseV - startV) > 10 then draggedEnough = TRUE
See also
![]() ![]() ![]() |