# Reversing a frame animation

**URL:** <https://forum.kirupa.com/t/reversing-a-frame-animation/260724>\
**Category:** Uncategorized\
**Created:** [May 19, 2008, 11:09am UTC](https://forum.kirupa.com/t/reversing-a-frame-animation/260724 "2008-05-19T11:09:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alber\_Kidd](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Alber\_Kidd](https://forum.kirupa.com/u/Alber_Kidd)\
**Post date:** [May 19, 2008, 11:09am UTC](https://forum.kirupa.com/t/reversing-a-frame-animation/260724/1 "2008-05-19T11:09:05Z")

</div>

I know I can use yoyo() for tweened animations but is there a way to reverse frame based animations?

AK

---

<div class="post-metadata">

**Author:** ![sasxa](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sasxa](https://forum.kirupa.com/u/sasxa)\
**Post date:** [May 19, 2008, 11:19am UTC](https://forum.kirupa.com/t/reversing-a-frame-animation/260724/2 "2008-05-19T11:19:39Z")

</div>

Probably easiest solution would be to create 2 symbols and reverse frames in design mode… But if the file size is an issue, no idea for now ((:

Sasxa

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 19, 2008, 11:57am UTC](https://forum.kirupa.com/t/reversing-a-frame-animation/260724/3 "2008-05-19T11:57:10Z")

</div>

Have a variable for current frame. And a variable that is either 1 or -1 for direction. onEnterFrame goToAndStop (current frame + direction) and then change the direction variable to reverse the play direction.

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 19, 2008, 7:25pm UTC](https://forum.kirupa.com/t/reversing-a-frame-animation/260724/4 "2008-05-19T19:25:08Z")

</div>

```auto
stop();
addEventListener(Event.ENTER_FRAME,reverse)
function reverse(event:Event) {
   prevFrame();
}

```

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 19, 2008, 7:26pm UTC](https://forum.kirupa.com/t/reversing-a-frame-animation/260724/5 "2008-05-19T19:26:48Z")

</div>

err, yeah that’s even better. Damnit!
