Lingo Dictionary > L-N > on mouseUp (event handler) |
![]() ![]() ![]() |
on mouseUp (event handler)
Syntax
on mouseUp
statement(s)
end
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 objectssuch as buttonsafter 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
.
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:
on mouseUp sprite(10).member = member "Dimmed" end
See also
![]() ![]() ![]() |