# How to play a movie clip in reverse

**URL:** https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071
**Category:** flash
**Created:** [June 3, 2008, 3:34am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071 "2008-06-03T03:34:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kidyi](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@kidyi](https://forum.kirupa.com/u/kidyi)
#### Post date: [June 3, 2008, 3:34am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/1 "2008-06-03T03:34:15Z")

</div>

I have a movie clip which I want to play part of it in reverse when I click the button.

For example before I click the button, the movie clip will play from frame 150 to 155 then stop. Then when the button is clicked, the movie clip should play from frame 155 to 150.

Is there a way to do it using ActionScript 3?

---

<div class="post-metadata">

### Author: ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)
#### Post date: [June 3, 2008, 4:55am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/2 "2008-06-03T04:55:28Z")

</div>

The general idea is something like this:

```auto

addEventListener(Event.ENTER_FRAME, reverseClip);

function reverseClip(e:Event):void
{
	clip.gotoAndStop(clip.currentFrame - 1);
}

```

Best of luck. :thumb:

---

<div class="post-metadata">

### Author: ![Nineteen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nineteen/32/2679_2.png) [@Nineteen](https://forum.kirupa.com/u/Nineteen)
#### Post date: [June 3, 2008, 5:15am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/3 "2008-06-03T05:15:56Z")

</div>

[quote=Anogar;2335311]The general idea is something like this:

```
ActionScript Code:
[LEFT]addEventListener[COLOR=#000000]([/COLOR]Event.[COLOR=#000080]ENTER_FRAME[/COLOR], reverseClip[COLOR=#000000])[/COLOR];

```

[COLOR=#000000] **function** [/COLOR] reverseClipCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR]  
[COLOR=#000000]{[/COLOR]  
&nbsp;&nbsp;&nbsp;&nbsp;clip.[COLOR=#0000FF]gotoAndStop[/COLOR][COLOR=#000000]([/COLOR]clip.[COLOR=#000080]currentFrame[/COLOR] - [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[/LEFT]

Best of luck. :thumb:[/quote]

Instead of using

```auto
clip.gotoAndStop(clip.currentFrame - 1)

```

you could use

```auto
clip.prevFrame();

```

---

<div class="post-metadata">

### Author: ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)
#### Post date: [June 3, 2008, 5:25am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/4 "2008-06-03T05:25:48Z")

</div>

_\<doublepost\>_

---

<div class="post-metadata">

### Author: ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)
#### Post date: [June 3, 2008, 5:26am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/5 "2008-06-03T05:26:57Z")

</div>

That’s probably a better idea. :lol:

I haven’t used frames since AS2, heh.

---

<div class="post-metadata">

### Author: ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)
#### Post date: [June 3, 2008, 8:47am UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/6 "2008-06-03T08:47:39Z")

</div>

or you can tween the playhead position with tweenLite/Max, and send it from the end to the start.

“Frame tweening - Now you can tween to any frame in a MovieClip, like TweenLite.to(my\_mc, 2, {frame:125});”

[http://blog.greensock.com/tweenliteas3/](http://blog.greensock.com/tweenliteas3/)

---

<div class="post-metadata">

### Author: ![Alex\_Lexcuk](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Alex\_Lexcuk](https://forum.kirupa.com/u/Alex_Lexcuk)
#### Post date: [June 3, 2008, 7:33pm UTC](https://forum.kirupa.com/t/how-to-play-a-movie-clip-in-reverse/262071/7 "2008-06-03T19:33:12Z")

</div>

[http://dnadillo.dn.ua/php\_flash/MUS/gerl.swf](http://dnadillo.dn.ua/php_flash/MUS/gerl.swf)  
music version  
[http://dnadillo.dn.ua/php\_flash/MUS/gerl.html](http://dnadillo.dn.ua/php_flash/MUS/gerl.html)  
[http://murmadillo.tut.su/fla/gerl.zip](http://murmadillo.tut.su/fla/gerl.zip)

[http://murmadillo.tut.su/fla/goto-first-frame.swf](http://murmadillo.tut.su/fla/goto-first-frame.swf)  
[http://murmadillo.tut.su/fla/goto-first-frame.zip](http://murmadillo.tut.su/fla/goto-first-frame.zip)
