SWiSH Player Support
SWF4 or later - Supported Internally
Syntax
on(mouseEvent) {
statements;
}
Arguments
mouseEvent: One of the defined mouse / keyboard Events.
statements: A list of any valid scripting commands that are executed if the Event has occurred.
Description
An Event Handler. Code is executed when the Mouse Event condition applies to the named button.
Unlike onSelfEvent(), the statements executed are with respect to the containing Object.
Sample
Stop Movie playing if button is pressed.
on(press) {
stop();// stops containing sprite. If this button is contained by the main movie (_root) then it stops the movie.
}
See Also
dragOut, dragOver, keyPress(key), press, release, releaseOutside, rollOut, rollOver, on() and onSelfEvent().