Mac Mouse wheel support class for Flex

A while back Gabriel Bucknall posted a AS3 and JavaScript class that adds support for the mouse wheel on Flash Player on the Mac. If you didn't know mouse wheel support hasn't been available on Mac for a few versions now.

Anyway, I updated the code to add support for MXML and decoupled it from requiring swfobject. I also added a few of the fixes mentioned in the comments and added dynamic loading support which Flash doesn't seem to handle well (slight pause) so by default dynamic loading is off. But so what, you can drop it into your Flex projects willy nilly with one line of code:

XML:
  1. <managers:MouseWheelManager />

I also put the class in the SVN Repository so you can help make any changes. No one will. Lazy. But in case I'm wrong.

Demo - Project Files

Please vote on these issues:

http://bugs.adobe.com/jira/browse/SDK-12415.

8 Responses to “Mac Mouse wheel support class for Flex”

  1. Marc says:

    thanks for sharing!

  2. Peter says:

    Hello,
    Thanks for this mouse driven scrolling! I have a problem though. The swf works fine but when I upload it to my server the scrolling stops working. Am I missing something?

  3. mitch says:

    Me too. I added flexcapacitor.swc to my project, and added these lines to my main mxml file:

    xmlns:managers="com.flexcapacitor.managers.*"

    But the mouse wheel still doesn't work on the Mac. (It does work when I point my browser to the URL of your demo.) Do I have to do something else like merge in your JavaScript files too? Thanks.

  4. Judah says:

    Hi. Yeah you have to modify the html template file (yourflexproject/html-template/index.template.html) and include the js file. in the demo you can view the source code and see how it is working.

  5. kofi says:

    wow..thanks so much! it works perfect !! what an annoying bug it was. thank you !!

  6. Marcus says:

    nice, but this is not working for a Flex 4 spark Application

    Error:

    TypeError: Error #1034: Typumwandlung fehlgeschlagen: index@5bdd10a1 kann nicht in mx.core.Application umgewandelt werden.
    at com.flexcapacitor.managers::MouseWheelManager()[/Users/judahfrangipane/Documents/flex2/flexcapacitor/src/com/flexcapacitor/managers/MouseWheelManager.as:85]
    at index/_index_MouseWheelManager1_i()

  7. Judah says:

    Hi Marcus,
    The version posted here is a few versions behind what's available in the repository. If that doesn't fix the issue could you please post the error message (in english) and I'll take a look! :)

  8. JanS says:

    Hi Judah,

    cool work, but i've the same error marcus has. i need flex 4 spark support. please tell me where i can find the repository for an updated version.

    much thanks!

Leave a Reply