Button
361
onDragOut (Button.onDragOut handler)
onDragOut = function() {}
Invoked when the mouse button is clicked over the button and the pointer then dragged
outside of the button. You must define a function that executes when the event handler is
invoked.
Availability:
ActionScript 1.0; Flash Player 6
Example
The following example demonstrates how you can execute statements when the pointer is
dragged off a button. Create a button called
my_btn
on the Stage and enter the following
ActionScript in a frame on the Timeline:
my_btn.onDragOut = function() {
trace("onDragOut: "+this._name);
};
my_btn.onDragOver = function() {
trace("onDragOver: "+this._name);
};
onDragOver (Button.onDragOver handler)
onDragOver = function() {}
Invoked when the user presses and drags the mouse button outside and then over the button.
You must define a function that executes when the event handler is invoked.
Availability:
ActionScript 1.0; Flash Player 6
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 holding
the mouse button, drag onto the button instance again. Notice that the Output panel tracks
your movements.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...