# nextFrame prevFrame Continious Play

**URL:** <https://forum.kirupa.com/t/nextframe-prevframe-continious-play/301602>\
**Category:** flash\
**Created:** [December 11, 2009, 10:34pm UTC](https://forum.kirupa.com/t/nextframe-prevframe-continious-play/301602 "2009-12-11T22:34:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![highaflash](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@highaflash](https://forum.kirupa.com/u/highaflash)\
**Post date:** [December 11, 2009, 10:34pm UTC](https://forum.kirupa.com/t/nextframe-prevframe-continious-play/301602/1 "2009-12-11T22:34:56Z")

</div>

Hello,  
First off, I’m a total noob when it comes to actionscript. I’m attempting to create a flash movie file that basically has a number of thumbnails in a straight line. As the user puts their mouse over a button I’d like the movie to advance to the next frame and keep playing until the user’s mouse leaves that button. I found an online tutorial to accomplish this in AS 2.0 but I would rather do it in 3.0 so it’s current.

I have the following code that sort of works; when I hover over the right\_btn, it advances to the next frame, but only advances 1 frame instead of playing the movie forward. The left\_btn should go to the previous frame and play the movie backwards.

right\_btn.addEventListener(  
MouseEvent.MOUSE\_OVER,  
function(evt:MouseEvent):void {  
nextFrame();  
}  
);  
left\_btn.addEventListener(  
MouseEvent.MOUSE\_OVER,  
function(evt:MouseEvent):void {  
prevFrame();  
}  
);

Any help you guys can lend would be greatly appreciated.
