Flash Lite 2.x and 3.0 ActionScript Language Reference

onDragOver (Button.onDragOver handler)

onDragOver = function() {}

Invoked when the user presses the mouse button outside of the button and then drags the pointer over the button. You must define a function that is executed when the event handler is invoked.

Note: The onDragOver Event Handler is supported for Flash Lite 2.0 only if System.capabilities.hasMouse is true or System.capabilities.hasStylus is true.

Example

The following example defines a function for the onDragOver handler that sends a trace() statement to the Output panel. Create a button called my_btn on the Stage and enter the following ActionScript on the Timeline:

my_btn.onDragOut = function() {
    trace("onDragOut: "+this._name);
};
my_btn.onDragOver = function() {
    trace("onDragOver: "+this._name);
};

When you test the SWF file, drag the pointer off the button instance. Then, while pressing the mouse button, drag onto the button instance again. Notice that the Output panel tracks your movements.

See also

onDragOut (Button.onDragOut handler)