void gotoAndStop(int frame)

Source

void gotoAndStop(int frame) {
  _currentFrame = min(max(frame, 0), totalFrames - 1);
  this.stop();
}