# Play mc/video backwards

**URL:** https://forum.kirupa.com/t/play-mc-video-backwards/309229
**Category:** Uncategorized
**Created:** [May 10, 2010, 3:56pm UTC](https://forum.kirupa.com/t/play-mc-video-backwards/309229 "2010-05-10T15:56:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rombick](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@rombick](https://forum.kirupa.com/u/rombick)
#### Post date: [May 10, 2010, 3:56pm UTC](https://forum.kirupa.com/t/play-mc-video-backwards/309229/1 "2010-05-10T15:56:41Z")

</div>

I have a video by frames in the timeline on the stage, and i want it to play backwards when i press the button.

i got this code and it works really good, but i need it to stop on certain frames (127, 177) how do i do that?

```auto
stop ();

var rewind:Boolean = true;

playbtn.addEventListener(MouseEvent.MOUSE_DOWN, forward);
backbtn.addEventListener(MouseEvent.MOUSE_DOWN, backward);
addEventListener(Event.ENTER_FRAME, checker);

function forward(event:MouseEvent) {
    rewind = false;
}

function backward(event:MouseEvent) {
    rewind = true;
}

function checker(event:Event) {
    if(rewind) { if(currentFrame > 0) {prevFrame();}} 
	else {if(currentFrame < totalFrames) {nextFrame();}		
    }
}

```

i am new to action script, can someone please help?

or maybe there is better way to achieve same result. thank you.

heres the link on the scene[http://dl.dropbox.com/u/2197497/playbackwards.rar](http://dl.dropbox.com/u/2197497/playbackwards.rar)
