MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 480

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Listeners enable different pieces of code to cooperate because multiple listeners can receive
notification about a single event.
See also
Mouse.addListener()
Mouse.onMouseWheel
Availability
Flash Player 7 (Windows only).
Usage
someListener.onMouseWheel = function ( [ delta , scrollTarget ]) {
// your statements here
}
Parameters
An optional number indicating how many lines should be scrolled for each notch the
delta
user rolls the mouse wheel. A positive
indicates a downward scroll. Typical values are from 1 to 3, whereas faster scrolling may produce
larger values.
If you don't want to specify a value for
for
.
null
delta
scrollTarget
was scrolled.
Returns
Nothing.
Description
Listener; notified when the user rolls the mouse wheel. To use the
must create a listener object. You can then define a function for
addListener()
Note: Mouse wheel event listeners are available only on Windows versions of Flash Player.
Example
The following example shows how to create a listener object that responds to mouse wheel events.
In this example, the x coordinate of a movie clip object named
each time the user rolls the mouse wheel.
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta) {
clip_mc._x += delta;
}
Mouse.addListener(mouseListener);
See also
Mouse.addListener()
480
Chapter 12: ActionScript Dictionary
delta
The topmost movie clip instance under the mouse when the mouse wheel
to register the listener with the Mouse object.
,
TextField.mouseWheelEnabled
value indicates an upward scroll; a negative value
but want to specify a value for
delta
scrollTarget
listener, you
onMouseWheel
and use
onMouseWheel
(not shown) is changed
clip_mc
, pass

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Table of Contents