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?
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 scenehttp://dl.dropbox.com/u/2197497/playbackwards.rar