Onmousemove (Mouse.onmousemove Event Listener) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

this.target_mc.clear();
this.target_mc.lineStyle(1, 0xFF0000, 100);
this.target_mc.moveTo(this.orig_x, this.orig_y);
this.target_mc.lineTo(_xmouse, this.orig_y);
this.target_mc.lineTo(_xmouse, _ymouse);
this.target_mc.lineTo(this.orig_x, _ymouse);
this.target_mc.lineTo(this.orig_x, this.orig_y);
}
updateAfterEvent();
};
mouseListener.onMouseUp = function() {
this.isDrawing = false;
};
Mouse.addListener(mouseListener);
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also
addListener (Mouse.addListener method)
onMouseMove (Mouse.onMouseMove event
listener)
onMouseMove = function() {}
Notified when the mouse moves. To use the
object. You can then define a function for
the listener with the Mouse object, as shown in the following code:
var someListener:Object = new Object();
someListener.onMouseMove = function () { ... };
Mouse.addListener(someListener);
Listeners enable different pieces of code to cooperate because multiple listeners can receive
notification about a single event.
A Flash application can only monitor mouse events that occur within its focus. A Flash
application cannot detect mouse events in another application.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example uses the mouse pointer as a tool to draw lines using
the Drawing API. The user draws a line when they drag the mouse pointer.
this.createEmptyMovieClip("canvas_mc", this.getNextHighestDepth());
810
ActionScript classes
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
onMouseMove
onMouseMove
method.
listener, you must create a listener
and use
addListener()
onMouseMove
to register
and

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?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF