Ondragout (Button.ondragout Handler); Ondragover (Button.ondragover Handler) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
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
statement to the Output panel. Create a button called
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.
on the Stage and enter the following
my_btn
on the Stage and enter the
my_btn
trace()
Button
361

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents