User Guide

stopEvent() 553
Example
The following examples stop sprite 2 and the cast member Real from playing:
-- Lingo syntax
sprite(2).stop()
member("Real").stop()
// JavaScript syntax
sprite(2).stop();
member("Real").stop();
See also
RealMedia, Windows Media
stopEvent()
Usage
-- Lingo syntax
_movie.stopEvent()
// JavaScript syntax
_movie.stopEvent();
Description
Movie method; prevents scripts from passing an event message to subsequent locations in the
message hierarchy.
This method also applies to sprite scripts.
Use the
stopEvent() method to stop the message in a primary event handler or a sprite script,
thus making the message unavailable for subsequent sprite scripts.
By default, messages are available first to a primary event handler (if one exists) and then to any
scripts attached to a sprite involved in the event. If more than one script is attached to the sprite,
the message is available to each of the sprite’s scripts. If no sprite script responds to the message,
the message passes to a cast member script, frame script, and movie script, in that order.
The
stopEvent() method applies only to the current event being handled. It does not affect
future events. The
stopEvent() method applies only within primary event handlers, handlers
that primary event handlers call, or multiple sprite scripts. It has no effect elsewhere.
Parameters
None.
Example
This statement shows the mouseUp event being stopped in a behavior if the global variable
grandTotal is equal to 500:
-- Lingo syntax
global grandTotal
on mouseUp me
if (grandTotal = 500) then
_movie.stopEvent()
end if
end