# Reversing Animation

**URL:** https://forum.kirupa.com/t/reversing-animation/6983
**Category:** flash
**Created:** [October 21, 2002, 2:53pm UTC](https://forum.kirupa.com/t/reversing-animation/6983 "2002-10-21T14:53:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)
#### Post date: [October 21, 2002, 2:53pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/1 "2002-10-21T14:53:41Z")

</div>

This is a little hard to explain so please bear with me.

I have a button and a movie clip. I want to tell target the mc using the RollOver and RollOut actions that I have applied to my button. However, I want the movieclip to reverse rather than have the mc just jump to a named frame where the animation is created in reverse.

If I can just get a script that will make the frames of that mc reverse rather than recreate the whole thing in reverse manually then it would say an awful lot of file space, also you wouldn’t get that jerky motion if you were to roll off your button before the first sequence of the animation is played, thus making the mc jump to your rollout sequence before the RollOver sequence had finished. Am I making sence or just babbling?

Anyone who can help would be my new friend!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 3:00pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/2 "2002-10-21T15:00:02Z")

</div>

use prevFrame();  
for the mc  
onClipEvent(enterFrame) {

if(\_root.mcplayreverse) {  
this.prevFrame();  
}  
}

or sumthin’ like this…  
and on the button you put th action to trigger it.

on(rollOver) {  
\_root.mymc.play();  
\_root.mcplayreverse = false;  
}

on(rollOut)  
\_root.mcplayreverse = true;  
}  
And the in the first frame of the anim put the actions  
stop();  
\_root.mcplayreverse = false;  
… it should work… =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 3:24pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/3 "2002-10-21T15:24:48Z")

</div>

It didn’t work. The animation didn’t play.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 4:51pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/4 "2002-10-21T16:51:24Z")

</div>

```auto
Movieclip.prototype.backUp = function(howManyFrames) {
	this.createEmptyMovieClip('revController', 100);
	this.revController.howMany = howManyFrames;
	this.revController.onEnterFrame = function() {
		if (this._parent._currentframe>1 and this.howMany>0) {
			this._parent.gotoAndStop(this._parent._currentframe-1);
			this.howMany--;
		} else {
			this.removeMovieClip();
		}
	};
};
<B>timelineToReverse</B>.backUp(<B>howManyFramesToReverse</B>);

```

I forget where I got that, I think it was [actionscript.org](http://actionscript.org). Anywho… edit what is bold.

Also, you can apply the “\<B\>timelineToReverse\</B\>.backUp(\<B\>howManyFramesToReverse\</B\>);” on a button.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 4:54pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/5 "2002-10-21T16:54:16Z")

</div>

Ah yes… here it is…

[http://www.actionscript.org/actionscripts\_library/main/search.cgi?query=Reverse+Play](http://www.actionscript.org/actionscripts_library/main/search.cgi?query=Reverse+Play)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 6:38pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/6 "2002-10-21T18:38:00Z")

</div>

hum… ok I screwed sumthn’ up :-  
lostinbeta to the rescue!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 21, 2002, 7:38pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/7 "2002-10-21T19:38:24Z")

</div>

And here I’ve been slaving away manualy reversing my MC’s to play out. I’ll have to check this out tonight and see if it works with my animations.:beam:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 22, 2002, 8:01am UTC](https://forum.kirupa.com/t/reversing-animation/6983/8 "2002-10-22T08:01:44Z")

</div>

Thanks everyone!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 22, 2002, 4:08pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/9 "2002-10-22T16:08:42Z")

</div>

no problem 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 22, 2002, 4:20pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/10 "2002-10-22T16:20:55Z")

</div>

Come on, Lost, stop being griddy, he said everyone! 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 22, 2002, 4:29pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/11 "2002-10-22T16:29:04Z")

</div>

Well then you can say no problem too.

I can only speak for myself. I can’t speak for others 🙂 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 22, 2002, 5:42pm UTC](https://forum.kirupa.com/t/reversing-animation/6983/12 "2002-10-22T17:42:04Z")

</div>

no problem 🙂 =) lol
