Any solutions for a "mouse scroll up/down" trigger?

I want the animation to start when I scroll down with the middle mouse button, and reverse when I scroll up. Additionally, if I stop scrolling, the animation should stop synchronously. In other words, I want to control the animation speed using the middle mouse button.