
Button.onReleaseOutside() Event Handler
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
468
|
ActionScript Language Reference
Button.onReleaseOutside() Event Handler
occurs when the mouse is clicked over the button, then released after rolling off the button
Flash 6; on(releaseOutside) supported since Flash 2
theButton.onReleaseOutside()
on (releaseOutside) {
statements
}
Description
The onReleaseOutside() event typically indicates that the user changed his mind after
clicking on a button, moving the pointer off the button before releasing the mouse button.
The onReleaseOutside() event handler is executed when the following sequence is detected:
1. The mouse pointer is in the hit area of
theButton.
2. The primary mouse button is pressed and held (the onPress() event occurs).
3. The mouse pointer moves out of
theButton’s hit area (the onDragOut() event occurs).
4. The primary mouse button is released while the pointer is no longer in the hit area of
theButton.
You will rarely bother to detect onReleaseOutside() events, as they usually indicate that the
user intended not to perform any action.
Example
cancel_btn.onReleaseOutside = function () {
trace("releaseOutside detected");
}
See Also
Button.onRelease(), MovieClip.onReleaseOutside(); Chapter 10
Button.onRollOut() Event Handler
occurs when the pointer moves off the button (while the mouse is not ...