on mouseUp (event handler)
185
on mouseUp (event handler)
Usage
-- Lingo syntax
on mouseUp
statement(s)
end
// JavaScript syntax
function mouseUp() {
statement(s);
}
Description
System message and event handler; contains statements that are activated when the mouse button
is released.
When the mouse button is released, Lingo searches the following locations, in order, for an
on
mouseUp
handler: primary event handler, sprite script, cast member script, frame script, and
movie script. Lingo stops searching when it reaches the first location that has an
on mouseUp
handler, unless the handler includes the
pass
command to explicitly pass the
mouseUp
message on
to the next location.
To create the same response throughout the movie when the user releases the mouse button, set
the mouseUpScript
.
An
on mouseUp
event handler is a good place to put Lingo that changes the appearance of
objects—such as buttons—after they are clicked. You can do this by switching the cast member
assigned to the sprite after the sprite is clicked and the mouse button is released.
Where you place an
on mouseUp
handler can affect when it runs, as follows:
•
To apply the handler to a specific sprite, put it in a sprite script.
•
To apply the handler to a cast member in general, put it in a cast member script.
•
To apply the handler to an entire frame, put it in a frame script.
•
To apply the handler throughout the entire movie, put it in a movie script.
You can override an
on mouseUp
handler by placing an alternative
on mouseUp
handler in a
location that Lingo checks before it gets to the handler you want to override. For example, you
can override an
on mouseUp
handler assigned to a cast member by placing an
on mouseUp
handler in a sprite script.
If used in a behavior, this event is passed the sprite script or frame script reference
me
.
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...