# Making MovieClip go in Reverse W/constantLoop

**URL:** https://forum.kirupa.com/t/making-movieclip-go-in-reverse-w-constantloop/249796
**Category:** flash
**Created:** [January 22, 2008, 4:50pm UTC](https://forum.kirupa.com/t/making-movieclip-go-in-reverse-w-constantloop/249796 "2008-01-22T16:50:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scott1969](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@scott1969](https://forum.kirupa.com/u/scott1969)
#### Post date: [January 22, 2008, 4:50pm UTC](https://forum.kirupa.com/t/making-movieclip-go-in-reverse-w-constantloop/249796/1 "2008-01-22T16:50:37Z")

</div>

Hey Folks,

I could really use you’re help on this one. I am building a site in flash that contains a number of cog movie clips. In this animation I have a lever that can shut off the cogs and make the cogs go forward and reverse. I seem to have the forward and stop functionality working, but I can’t seem to get the cogs to go in reverse in a constant loop. They will only go in reverse until the beginning of the timeline. Below is the script I am using:

**CODE TO STOP CLIP:**

function stopClip() {

this.stop();  
}

lever1\_mc.onPress = function() {

```
cog1_mc.onEnterFrame = stopClip;
cog2_mc.onEnterFrame = stopClip;
wmncg.onEnterFrame = stopClip;
cog3_mc.onEnterFrame = stopClip;
cog4_mc.onEnterFrame = stopClip;
cog5_mc.onEnterFrame = stopClip;
cog6_mc.onEnterFrame = stopClip;
cnvyr .onEnterFrame = stopClip;
logo.onEnterFrame = stopClip;
balls.onEnterFrame = stopClip;
chn.onEnterFrame = stopClip;
swish_mc.onEnterFrame = stopClip;
gotoAndStop(2);

```

};

**CODE TO REVERSE CLIP:**

function rewindClip() {

```
this.prevFrame();

if (this._currentframe == 1) { delete this.onEnterFrame;

```

}  
for(var i:Number =0; i \< 20; i++)  
{

```
this.rotation.prevFrame();

```

}  
}

rewind\_bttn.onPress = function() {

```
cog1_mc.onEnterFrame = rewindClip;
cog2_mc.onEnterFrame = rewindClip;
wmncg.onEnterFrame = rewindClip;
cog3_mc.onEnterFrame = rewindClip;
cog4_mc.onEnterFrame = rewindClip;
cog5_mc.onEnterFrame = rewindClip;
cog6_mc.onEnterFrame = rewindClip;
cnvyr .onEnterFrame = rewindClip;
logo.onEnterFrame = rewindClip;
chn.onEnterFrame = rewindClip;
balls.onEnterFrame = rewindClip;
swish_mc.onEnterFrame = rewindClip;
gotoAndStop(5);

```

};
