I am working on a game, and it involves a bucket that has realistic physics depending on how you move the mouse. I want the bucket to rotate to the right if I accelerate the mouse to the right. I am using FlashPunk for my engine. I know how to set the angle and everything, I just would like to see a code snippet of receiving an acceleration variable every frame, and then I could probably handle applying the frame by frame acceleration to the angle of the image. This is pretty general, so I hope that someone more experienced than I could figure out how to do that. It sounds pretty simple, yet I just don't know where to start.
TL;DR how do you keep frame by frame acceleration of the mouse in a variable to perform conditional statements on to apply to rotation assuming I already have means of receiving Mouse coordinates? Any help would be greatly appreciated.