# Problem Playing Video Backwards Using AS 3.0

**URL:** https://forum.kirupa.com/t/problem-playing-video-backwards-using-as-3-0/243587
**Category:** flash
**Created:** [November 8, 2007, 4:18pm UTC](https://forum.kirupa.com/t/problem-playing-video-backwards-using-as-3-0/243587 "2007-11-08T16:18:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grayhorses](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@grayhorses](https://forum.kirupa.com/u/grayhorses)
#### Post date: [November 8, 2007, 4:18pm UTC](https://forum.kirupa.com/t/problem-playing-video-backwards-using-as-3-0/243587/1 "2007-11-08T16:18:19Z")

</div>

I have been trying to figure out how to play video backwards using AS 3.0 and I can not figure it out. To give you and example of what I am trying to accomplish visit this link to the Halo 3 ([http://halo3.com/believe/shell.html](http://halo3.com/believe/shell.html)) website. This is a very cool interactive video that allows you to play video forward and backward using the directional pad. I got my movie to play forward using Action Script but I cannot get it to play backwards. Below I have posted my AS. The Red code is what is I am having trouble with and the non red code is where I am have working. Any help I can get would be great.

\_video\_mc.stop();

function playIt(event:KeyboardEvent):void  
{  
if (event.keyCode == 39) {  
\_video\_mc.play();  
stage.removeEventListener(KeyboardEvent.KEY\_DOWN,playIt);  
stage.addEventListener(KeyboardEvent.KEY\_UP, stopIt);  
}  
}

function stopIt(event:KeyboardEvent):void  
{  
if (event.keyCode == 39) {  
\_video\_mc.stop();  
stage.addEventListener(KeyboardEvent.KEY\_DOWN,playIt);  
stage.removeEventListener(KeyboardEvent.KEY\_UP,stopIt);  
}  
}

stage.addEventListener(KeyboardEvent.KEY\_DOWN,playIt);  
stage.addEventListener(KeyboardEvent.KEY\_UP,stopIt );

[COLOR=“Red”]function backIt(event:KeyboardEvent):void  
{  
if (event.keyCode == 37) {  
trace(\_video\_mc.playheadTime);  
\_video\_mc.playheadTime = (\_video\_mc.playheadTime - 0.010);  
stage.removeEventListener(KeyboardEvent.KEY\_DOWN,backIt);  
stage.addEventListener(KeyboardEvent.KEY\_UP, backStop);  
}  
}

function backStop(event:KeyboardEvent):void  
{  
if (event.keyCode == 37) {  
\_video\_mc.stop();  
stage.addEventListener(KeyboardEvent.KEY\_DOWN,backIt);  
stage.removeEventListener(KeyboardEvent.KEY\_UP,backStop);  
}  
}

stage.addEventListener(KeyboardEvent.KEY\_DOWN,backIt);  
stage.addEventListener(KeyboardEvent.KEY\_UP,backStop);  
[/COLOR]
