Actionscript 3.0 help. how to move to next frame and play on mouse click
Hi,
I'm using Adobe animate to make an animated novel. I need some help regarding some coding. Im using the code below to create a function that plays/loops the animation. It works fine but it seems extremely inefficient as I have to define a new function everytime I want the user to advance.
This code is on frame 199
stop ( );
nextbutton.addEventListener(MouseEvent.CLICK.nextclick);
function nextclick(event: MouseEvent):void
{
gotoAndPlay(200);
}
So each time I want the animation to stop and start ONLY when the user presses the next button, I have to define a new function like nextclick1,nextclick2,nextclick3...... I mean there HAS to be a better way of doing this. I had to create 100 function in one of the animation.
Any help would be greatly appreciated.
