Reverse movieclip timeline

I am trying to play and reverse a movieclip using the following script:


my_mc.addEventListener(MouseEvent.MOUSE_OVER, forward);
  
function forward(Event:MouseEvent):void {
var backAmount:Number = my_mc.currentFrame + 1;
my_mc.gotoAndStop(backAmount);
}
  
my_mc.addEventListener(MouseEvent.MOUSE_OUT, reverse);
  
function reverse(Event:MouseEvent):void {
var backAmount:Number = my_mc.currentFrame - 1;
my_mc.gotoAndStop(backAmount);
} 			 

It works but just only one frame. Do I need to loop this function - if so how.
I would appreciate help!