What exactly is the problem? You can get the speed of the character, and proceed from it to change the speed of the animation.