# Reversing my frame animation

**URL:** <https://forum.kirupa.com/t/reversing-my-frame-animation/285482>\
**Category:** Uncategorized\
**Created:** [April 1, 2009, 12:43pm UTC](https://forum.kirupa.com/t/reversing-my-frame-animation/285482 "2009-04-01T12:43:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RossKidd](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@RossKidd](https://forum.kirupa.com/u/RossKidd)\
**Post date:** [April 1, 2009, 12:43pm UTC](https://forum.kirupa.com/t/reversing-my-frame-animation/285482/1 "2009-04-01T12:43:42Z")

</div>

I have a 23 frame animation that is moved forward or back on a mouse over. The problem is trying to reverse it. It is ok until it gets to frame 1 then it just stops. I need to get it to jump to frame 23 and to start reversing aagain.

function reverseIt(e:MouseEvent):void{  
rewind = true;  
this.addEventListener(Event.ENTER\_FRAME,revFrame);  
}

function revFrame(e:Event):void{  
if(rewind == true){  
tub.prevFrame();  
if (currentFrame == 1){  
gotoAndPlay(23);  
tub.prevFrame();  
}  
}  
}
