Friday, January 18, 2008

Mouse Wheel Scroll

var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function(delta) {
trace(delta/3);
//result is 1 for up and -1 for down
}
Mouse.addListener(mouseListener);

1 comment:

Ariel Barkan said...

Thanks!

Iv'e implemented in the onMouseWheel function the following code:

var scrollAction = (delta / 3 == 1)?scrollUp():scrollDown();

Simple and working!