ActionScript for Flash MX: The Definitive Guide, Second Edition

ActionScript for Flash MX: The Definitive Guide, 2nd EditionBy Colin Moock
Chapter 18.  ActionScript Language Reference
Button.onReleaseOutside( ) Event Handler Flash 6; on(releaseOutside) supported since Flash 2

occurs when the mouse is clicked over the button, then released after rolling off the button

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

    Категории