Scrolling with mouse wheel in Flex application – even on Mac
By default Flex components do not scroll as you scroll using the wheel on your mouse. You can achieve this by writing a mouseWheel event handler, checked the delta value and scrolling up or down depending on whether it’s positive or negative.
But that does not work on Mac OS X.
The solution involves tracking mouse move events at browser level using JavaScript, and passing them to Flex. A handler in Flex will then scroll the application / component as you specify.
It works well! Except that you can only scroll one way – either vertically (as in the code above) or horizontally (by hacking the code above!)
Wish Flex supports this by default someday! Would really help!
What do you think? Do you use mouse wheel / track pad to scroll?
Related posts:
- Notification Components in Flex If you are building a Flex application, you may need...
- Auto Complete Text Component for Flex Was looking for ways to skin a combobox and found...
- Intelligent Time Duration / Estimate Slider in Flex (inspired from The Hit List) I wrote yesterday that I am working on a time...
- Collaborating in web application using SVN What would you do if you wanted to manage document...
- Card Deck Animation in Flex I was trying out a GTD application the other day...

Hi, we created an commercial, but very easy to use, component that enables scrolling on Mac and Safari PC but also fixes some weird behavior on PC is available here at http://www.zillizi.com.
It doesn’t address diagonal scrolling though, which would very nice indeed.
bas
19 Apr 09 at 6:55 pm
Thanks a lot man. So much for Flex as a cross-browser platform!
Steve Kwan
20 Apr 09 at 11:31 pm
Very Nice!
I have seen another solution in another website, but it is not in detail!
Using a JavaScript may be a good solution!
Norris Lin
4 Dec 09 at 6:41 am