Limiting MouseWheel activation area on a page (AS3)
Hi,
I am not sure if I have put a good title for this question, but I have tried to makeit as clear as I can.
I have one page with three different scroll texts. I have programmed to scroll them by MouseWheel. They are on three diffrent parts of the page and there is no overlap. Now, the problem is when I scroll down or up one of them, the other ones move as well. How can I disable the other two ones when I am on one of the scroll texts?
The code that I have used for MouseWheel event:
function MouseWheelScroller(event:MouseEvent):void{
if((event.delta < 0 && work_scroller.y > 0)||
(event.delta > 0 && work_scroller.y < 153 - work_scroller.height)){
work_scroller.y = work_scroller.y + (event.delta * 2);
}
}
stage.addEventListener(MouseEvent.MOUSE_WHEEL,MouseWheelScroller);
May be if I make each scroll text as an external SWF, the problem will be solved. But I prefer not to do it.
Has anyone any solution for my problem?
Thank you in advance.