Table of Contents

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


Table of Contents