# onMouseWheel + Delta

**URL:** <https://forum.kirupa.com/t/onmousewheel-delta/153568>\
**Category:** flash\
**Created:** [July 2, 2005, 3:56pm UTC](https://forum.kirupa.com/t/onmousewheel-delta/153568 "2005-07-02T15:56:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [July 2, 2005, 3:56pm UTC](https://forum.kirupa.com/t/onmousewheel-delta/153568/1 "2005-07-02T15:56:08Z")

</div>

Hey everyone,  
In the MM documentation, they say the following:

> 

**[size=2]Usage[/size]**

```auto
*someListener*.onMouseWheel = function ( [*delta* [, *scrollTarget*] ] ) { 
// your statements here
}

```

**[size=2]Parameters[/size]**

_delta_ An optional number indicating how many lines should be scrolled for each notch the user rolls the mouse wheel. A positive _delta_ value indicates an upward scroll; a negative value indicates a downward scroll. Typical values are from 1 to 3; faster scrolling can produce larger values.

Yet, where would I actually specify a value for delta?

If I specified a positive value for delta within the onMouseWheel function, scrolling the mouse down did not automaticaly “negativitize” the delta to cause negative scrolling. But, if I never define delta and just use delta as part of my function, the value for it fluctuates between a negative and positve value depending on the direction I scroll the mouse.

Surely there must be a way to specify the magnitude of delta somewhere and let the mousescroll function specify a positive or negative value depending on the direction of the mouse scrolling.

Thanks!  
Kirupa =)
