Example
This statement determines whether the pointer is over a field sprite and changes the content of
the field cast member Instructions to "Please point to a character." when it is not:
-- Lingo syntax
if (_mouse.mouseChar = -1) then
member("Instructions").text = "Please point to a character."
end if
// JavaScript syntax
if (_mouse.mouseChar == -1) {
member("Instructions").text = "Please point to a character.";
}
This statement assigns the character under the pointer in the specified field to the variable
:
currentChar
-- Lingo syntax
currentChar = member(_mouse.mouseMember).char[_mouse.mouseChar]
// JavaScript syntax
var currentChar = member(_mouse.mouseMember).getProp("char",
_mouse.mouseChar);
See also
Mouse, mouseItem,
mouseDown
Usage
-- Lingo syntax
_mouse.mouseDown
// JavaScript syntax
_mouse.mouseDown;
Description
Mouse property; indicates whether the mouse button is currently being pressed (
(
). Read-only.
FALSE
Example
The following
mouseEnter
not down when the mouse enters the sprite, and calls a different handler if the mouse is not down
when the mouse enters the sprite.
-- Lingo syntax
on mouseEnter
if (_mouse.mouseDown) then
runMouseDownScript
else
runMouseUpScript
end if
end
870
Chapter 14: Properties
mouseLine
handler that is attached to a sprite calls one handler if the mouse is
) or not
TRUE
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers