Dynamic frame rate

somebody help me I have a animation and I want to control the frame rate with the slide bar and has has a button that will be able the user to pause and play

pls if somebody know how to do that please help me…