Lingo Dictionary > L-N > mouseDownScript |
![]() ![]() ![]() |
mouseDownScript
Syntax
the mouseDownScript
Description
System property; specifies the Lingo that is executed when the mouse button is pressed. The Lingo is written as a string, surrounded by quotation marks and can be a simple statement or a calling script for a handler. The default value is EMPTY
, which means that the mouseDownScript
property has no Lingo assigned to it.
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 you've 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 playback head always branches to the next marker in the movie:
the mouseDownScript = "go next"
Example
In this statement, when the user clicks anywhere on the Stage, the computer beeps:
the mouseDownScript = "if the clickOn = 0 then beep"
Example
This 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)
![]() ![]() ![]() |