Select to view content in your preferred language

MouseWheel event not being dispatched with the new 3.1 API?

1216
2
Jump to solution
12-18-2012 07:09 AM
RoyceSimpson
Frequent Contributor
I've got an app that needs to do some stuff when a map mousewheel event is dispatched.  With the 3.0 API this worked fine but with the 3.1 API, the event isn't being dispatched.  The map does zoom in/out when mousewheel is used but the mousewheel event simply never gets triggered.

Can anyone verify this?  Is this now by design (cringe)?
-Royce
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
SarthakDatt
Frequent Contributor
Hey Royce,

Thanks for reporting this. It is a regression bug for version 3.1.

As a workaround, you can add the event listener with useCapture = true:

myMap.addEventListener(MouseEvent.MOUSE_WHEEL, myMap_mouseWheelHandler, true);


Here's more information about the capturing phase:

http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf69084-7cdb.html#WS2db45...

Hope that helps.

View solution in original post

0 Kudos
2 Replies
SarthakDatt
Frequent Contributor
Hey Royce,

Thanks for reporting this. It is a regression bug for version 3.1.

As a workaround, you can add the event listener with useCapture = true:

myMap.addEventListener(MouseEvent.MOUSE_WHEEL, myMap_mouseWheelHandler, true);


Here's more information about the capturing phase:

http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf69084-7cdb.html#WS2db45...

Hope that helps.
0 Kudos
RoyceSimpson
Frequent Contributor
Hey Royce,

Thanks for reporting this. It is a regression bug for version 3.1.

As a workaround, you can add the event listener with useCapture = true:

myMap.addEventListener(MouseEvent.MOUSE_WHEEL, myMap_mouseWheelHandler, true);


Here's more information about the capturing phase:

http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf69084-7cdb.html#WS2db45...

Hope that helps.


Great, will do, thanks.

UPDATE:
Worked.  Thanks again.
0 Kudos