Mouse control timeline?

Ello. I have 40 frames on the timeline that i want to scroll through forwards and backwards depending on the mouse position. Eg, when the mouse is on the top half of the movie it plays forwards, and when it is on the bottom it plays backwards. Ideally, it would stop all together when the mouse is near the midle of the movie, and scroll faster when it’s near the edges. Can anybody help? Can anybody even understand the question?