392
Examples
This handler checks whether the user clicks anywhere on the Stage and sends the playhead to
another frame if a click occurs:
on mouseDown
if the clickOn = 0 then go to frame "AddSum"
end
This handler, assigned to a sprite script, plays a sound when the sprite is clicked:
on mouseDown
puppetSound "Crickets"
end
See also
clickOn
,
mouseDownScript
,
mouseUpScript
the mouseDown (system property)
Syntax
the mouseDown
Description
System property; indicates whether the mouse button is currently being pressed (
TRUE
) or
not (
FALSE
).
The Director player for Java doesn’t update the
mouseDown
property when Lingo is in a repeat
loop. If you try to test
mouseDown
inside a repeat loop in an applet, the applet hangs.
Example
This handler causes the movie to beep until the user clicks the mouse:
on enterFrame
repeat while the mouseDown = FALSE
beep
end repeat
end
This statement instructs Lingo to exit the repeat loop or handler it is in when the user clicks
the mouse:
if the mouseDown then exit
See also
mouseH
,
the mouseUp (system property)
,
mouseV
,
on mouseDown (event handler)
,
on mouseUp
(event handler)
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.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...