Button.onDragOver( ) Event Handler

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

occurs when the depressed mouse rolls off and back onto a Flash button
theButton.onDragOver()    on (dragOver) {     statements }

Description

The onDragOver( ) event handler is a seldom-seen woodland creature. It is conjured up when the following sequence is performed:

  1. The mouse pointer moves into the hit area of a button (onRollOver( ) event occurs).

  2. The primary mouse button is pressed and held (onPress( ) event occurs).

  3. The mouse pointer moves out of the button's hit area (onDragOut( ) event occurs).

  4. The mouse pointer moves back into the button's hit area (onDragOver( ) event occurs).

Thus, the dragOver event indicates that the user has moved the mouse pointer out of and back into the hit area, all the while holding down the mouse button. Note that dragOver, instead of the rollOver event, is generated if the mouse button is still down when the pointer reenters the button's hit area.

Example

cancel_btn.onDragOver = function () {   // Handle event...   trace("dragOver detected"); };

See Also

Button.onDragOut( ), Button.onRollOver( ), MovieClip.onDragOver( ); Chapter 10



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net