Speed up FPS in flash

Out of context: Reply #3

  • Started
  • Last post
  • 3 Responses
  • caseyc0

    Something like this will work if your mc is frame based...

    MovieClip.prototype.setFPS = function(fps)
    {
    this.stop();
    clearInterval(this._fpsint);
    this._fpsint = setInterval(this,"doFPS",1000/fp...
    }
    MovieClip.prototype.doFPS = function()
    {
    var curframe = this._currentframe;
    var goframe = ( curframe == this._totalframes) ? 1 : curframe + 1;
    this.gotoAndStop(goframe);
    updateAfterEvent();
    }
    MovieClip.prototype.clearFPS = function()
    {
    clearInterval(this._fpsint);
    }

    my_mc.setFPS(60);

View thread