How do I stop the application from scrolling when zooming with the mousewheel?
Hi
I am using the TweenMap in Flex and enabled zooming with the mousewheel something like this:
This works fine, but unfortunately when I use the mousewheel to zoom into the map, the application will also scroll down (if the application is bigger than the screen and has scrollbars).
Is there a way I can stop the application from scrolling down aswell?
Thanks for the help
Chris
I am using the TweenMap in Flex and enabled zooming with the mousewheel something like this:
flexTweenMap.addEventListener(MouseEvent.MOUSE_WHEEL, (flexTweenMap.map as TweenMap).onMouseWheel);
This works fine, but unfortunately when I use the mousewheel to zoom into the map, the application will also scroll down (if the application is bigger than the screen and has scrollbars).
Is there a way I can stop the application from scrolling down aswell?
Thanks for the help
Chris
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hi Chris,
The answer to this question is "maybe". I think the problem only occurs in some browser/OS combinations and there might be workarounds, but likely they'll be complex and one-browser-at-a-time workarounds: the worst kind.
Can you put up a demo somewhere so we can see if all browsers have the same problem? That will help narrow down which platforms to target for a fix. -
Yes of course.
I put a demo right here: http://web0.36214.vs.webtropia.com/sa...
That is the program i'm playing around with at the moment.
as you can see, when you use the mousewheel to scroll the map, the application will also scroll. however when you use the mousewheel to scroll the textarea on the bottom right, the application will not scroll.
I tested this with windows firefox and internet explorer and also with linux firefox and konqueror and got the same result in all combinations.
if you need anymore information dont hesitate to ask. thanks for you help.
Chris -
Inappropriate?Does anybody have any helpful advice on this problem?
-
Inappropriate?I found the solution. I had to stop the event propagation like this:
flexMap.map.addEventListener(MouseEvent.MOUSE_WHEEL, disableEventPropagation);
private function disableEventPropagation(e:Event):void {
e.stopPropagation();
}
I’m happy
1 person says
this answers the question
-
Inappropriate?Hi Chris,
I'm sorry this one slipped through the cracks and I'm glad you found the solution.
Loading Profile...



EMPLOYEE