User Guide

393
When the mouse button is pressed and the mouseDownScript property is defined, Lingo executes
the instructions specified for the
mouseDownScript property first. No other on mouseDown
handlers are executed, unless the instructions include the pass command so that the mouseDown
message can be passed to other objects in the movie.
Setting the
mouseDownScript property performs the same function as the when keyDown then
command in earlier versions of Director.
To turn off the instructions youve specified for the
mouseDownScript property, use the statement
set the mouseDownScript to empty.
This property can be tested and set.
Example
In this statement, when the user clicks the mouse button, the playhead always branches to the
next marker in the movie:
the mouseDownScript = "go next"
In this statement, when the user clicks anywhere on the Stage, the computer beeps:
the mouseDownScript = "if the clickOn = 0 then beep"
The following statement sets mouseDownScript to the custom handler myCustomHandler. A
Lingo custom handler must be enclosed in quotation marks when used with the
mouseDownScript property.
the mouseDownScript = "myCustomHandler"
See also
stopEvent, mouseUpScript, on mouseDown (event handler), on mouseUp (event handler)
on mouseEnter
Syntax
on mouseEnter
statement(s)
end
Description
System message and event handler; contains statements that run when the mouse pointer first
contacts the active area of the sprite. The mouse button does not have to be pressed.
If the sprite is a bitmap cast member with matte ink applied, the active area is the portion of the
image that is displayed; otherwise, the active area is the sprites bounding rectangle.
If used in a behavior, this event is passed the sprite script or frame script reference
me.