stop()
btn2.addEventListener(MouseEvent.CLICK, backward);
btn1.addEventListener(MouseEvent.CLICK, forward);
function forward(event:MouseEvent) {
if (this.currentFrame == this.totalFrames) {
gotoAndStop(1);
}
else {
nextFrame();
}
}
function backward(event:MouseEvent) {
if (this.currentFrame == 1) {
gotoAndStop(this.totalFrames);
}
else
{
prevFrame();
}
}