# Forward reverse effect

**URL:** <https://forum.kirupa.com/t/forward-reverse-effect/33626>\
**Category:** Uncategorized\
**Created:** [October 21, 2003, 7:55pm UTC](https://forum.kirupa.com/t/forward-reverse-effect/33626 "2003-10-21T19:55:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.kirupa.com/u/Ryan)\
**Post date:** [October 21, 2003, 7:55pm UTC](https://forum.kirupa.com/t/forward-reverse-effect/33626/1 "2003-10-21T19:55:30Z")

</div>

i have a video in the center of my project, at the bottom are 2 bottons (forward and reverse)

when you roll over the ‘forward’ button i want to play the video one frame at a time forwards, and vice versa for the reverse. could someone help me with the code please.

thank you.

---

<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, 2003, 1:23pm UTC](https://forum.kirupa.com/t/forward-reverse-effect/33626/2 "2003-10-22T13:23:46Z")

</div>

Is that video contained in a movieclip ? And also, how fast do you want it to move forward and backward ? One frame at a time doesn’t really say much …

---

<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, 2003, 2:23pm UTC](https://forum.kirupa.com/t/forward-reverse-effect/33626/3 "2003-10-22T14:23:00Z")

</div>

This is a very ez way of creating the effect you are looking for. This is the code you put on the movie in question.

onClipEvent (load){  
\_root.speed=0;   
}

onClipEvent (enterFrame){  
if(\_root.speed\<0){  
gotoAndStop(prevFrame());  
}  
if(\_root.speed\>0){  
gotoAndStop(nextFrame());  
}  
}

Then on the button, you can simply add this:  
//for reserve  
on (rollOver){  
\_root.speed=-1;  
}  
on (rollOut){   
\_root.speed=0;  
}

//for foward  
on (rollOver){  
\_root.speed=1;  
}  
on (rollOut){   
\_root.speed=0;  
}

🙂 woj
