AS3 MouseEvent Wheel Question
I have put a 3072 height Movie clip on the stage that I would like to scroll up and down on. Searching help I have came up with the code below:
import flash.events.MouseEvent;
function mouseWheel (event : MouseEvent):void {
if ((event.delta < 0 && box_mc.y > 0 )||
(event.delta > 0 && box_mc.y < stage.stageHeight - box_mc.height)){
box_mc.y = box_mc.y + (event.delta * 2);
}
}
stage.addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheel);
I will scroll down but not up. I was seeing about reversing this function but am lost on how to do so. How would I got about reversing this function so that I may mouse wheel up and mouse wheel down?
Where would I look in help to find if I was to scroll and have it ease into the mouse wheel event rather than just slowing moving without ease?
Thank you in advanced for any help and advice.
