Variables according to mouse movement speed. Is it possible?

Can I stablish variables according to the speed the mouse move from spot A to spot B?