dist/melonjs.js
function setAnimationFrame(idx) {
         this.current.idx = (idx || 0) % this.current.length;
         return this.setRegion(this.getAnimationFrameObjectByIndex(this.current.idx));
       }
function setAnimationFrame(idx) {
         this.current.idx = (idx || 0) % this.current.length;
         return this.setRegion(this.getAnimationFrameObjectByIndex(this.current.idx));
       }
function setAnimationFrame ( idx ) { this . current . idx = ( idx || 0 ) % this . current . length ; return this . setRegion ( this . getAnimationFrameObjectByIndex ( this . current . idx ) ) ; }
force the current animation frame index.
@name setAnimationFrame
@memberOf me.Sprite.prototype
@function
@param {Number} [index=0] animation frame index
@return {me.Sprite} Reference to this object for method chaining
@example
// reset the current animation to the first frame
this.setAnimationFrame();
force the current animation frame index .