prova così

onClipEvent(load){
avanti = 0;
}
onClipEvent(enterFrame){
if (this.muovi == 1) {
if(this._currentframe < 8){
this.nextFrame();
}else{
this.gotoAndStop(1)
}
}
if (this.muovi == 2 && this._currentframe > 1) {
this.prevFrame();
}
}