Bouncing ball with slow motion button

Hello and thanks in advance for your help.

I have a ball bouncing that works great. What I want is a button that will make the ball look like its in slow motion and another button to put it back in regular motion. After hours of experimenting I still couldn’t get it perfect. The following code is on the ball movieclip.


onClipEvent (load) {
    var acceleration = 0.005;
    var termVelocity = 20;
    var yVel = 0;
    var e = 1.3;
}
onClipEvent (enterFrame) {
    yVel += (termVelocity-yVel)*acceleration;
    this._y += yVel;
    if (_root.ground.hitTest(this)) {
        yVel *= -1*e;
    }
}