User Guide
402
This statement sets mouseUpScript to the custom handler myCustomHandler. A Lingo custom
handler must be enclosed in quotation marks when used with the
mouseUpScript property.
the mouseUpScript = "myCustomHandler"
See also
stopEvent, mouseDownScript, on mouseDown (event handler), on mouseUp (event handler)
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.
Examples
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
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
mouseH, locH, locV, mouseLoc
on mouseWithin
Syntax
on mouseWithin
statement(s)
end
Description
System message and event handler; contains statements that run when the mouse is within the
active area of the sprite. The mouse button does not have to be pressed.
If the sprite is a bitmap cast member with the matte ink applied, the active area is the portion of
the image that is displayed; otherwise, the sprite’s bounding rectangle is the active area.