EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Onmouseup (Mouse.onmouseup Event Listener)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
436 ActionScript classes
The following example sets the x and y positions of the pointer_mc movie clip instance to
the
x and y pointer positions. The device must support a stylus or mouse for this example to
work. To use the example, you create a movie clip and set its Linkage identifier to
pointer_id. Then add the following ActionScript code to Frame 1 of the Timeline:
this.attachMovie("pointer_id", "pointer_mc", this.getNextHighestDepth());
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
pointer_mc._x = _xmouse;
pointer_mc._y = _ymouse;
};
Mouse.addListener(mouseListener);
See also
addListener (Mouse.addListener method)
onMouseUp (Mouse.onMouseUp event listener)
onMouseUp = function() {}
Notified when the mouse button is released. To use the onMouseUp listener, you must create a
listener object. You can then define a function for
onMouseUp and use addListener() to
register the listener with the Mouse object, as shown in the following code:
var someListener:Object = new Object();
someListener.onMouseUp = function () { ... };
Mouse.addListener(someListener);
Listeners enable different pieces of code to cooperate because multiple listeners can receive
notification about a single event.
Note: This event listener is supported in Flash Lite only if
System.capabilities.hasMouse
is
true or System.capabilities.hasStylus is true.
Availability: ActionScript 1.0; Flash Lite 2.0

Table of Contents

Related product manuals