stop embedded video and go to next frame in flash

700 Views Asked by At

I have an embedded video(as movieclip) in flash from import video menu (not actionscript), then I want to move to next frame if a button is clicked.. when I cast

gotoAndStop() It goes to next frame for a second and then bounced and play the video again. How to make it go to the next frame and not going back again ?

Here is my button script :

stop();
enter_btn.addEventListener(MouseEvent.CLICK, enter);
function enter(e){  
   gotoAndPlay(5);
}
1

There are 1 best solutions below

0
zemaitis On
gotoAndPlay(5);

Try to use a variable here, for example

int next = 0;

and then

gotoAndPlay(next+1);

In this case every time the function is called it will show next slide.