186
Chapter 10: Events and Messages
Example
This handler, assigned to sprite 10, switches the cast member assigned to sprite 10 when the user
releases the mouse button after clicking the sprite:
-- Lingo syntax
on mouseUp
sprite(10).member = member("Dimmed")
end
// JavaScript syntax
function mouseUp() {
sprite(10).member = member("Dimmed");
}
See also
on mouseDown (event handler)
on mouseUpOutside
Usage
-- Lingo syntax
on mouseUpOutside me
statement(s)
end
// JavaScript syntax
function mouseUpOutside() {
statement(s);
}
Description
System message and event handler; sent when the user presses the mouse button on a sprite but
releases it (away from) the sprite.
Example
This statement plays a sound when the user clicks the mouse button over a sprite and then
releases it outside the bounding rectangle of the sprite:
-- Lingo syntax
on mouseUpOutside me
sound(1).play(member("Professor Long Hair"))
end
// JavaScript syntax
function mouseUpOutside() {
sound(1).play(member("Professor Long Hair"));
}
See also
on mouseEnter
,
on mouseLeave
,
on mouseWithin
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...