if (this._currentframe > 5) { while(this._currentframe > 5) { function mytimer() { this.gotoAndPlay(this._currentframe - 1); } setInterval( mytimer, 10 ); } }