diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index c6395f4..6d0d332 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -62,7 +62,7 @@ * @default 0 * @readonly */ - this.totalTime = 0; + this.currentTime = 0; /** * Indicates if the MovieClip is currently playing @@ -111,7 +111,7 @@ { this._textures = value; - this.texture = this._textures[Math.floor(this.totalTime) % this._textures.length]; + this.texture = this._textures[Math.floor(this.currentTime) % this._textures.length]; } }, @@ -124,7 +124,7 @@ currentFrame: { get: function () { - return Math.floor(this.totalTime) % this._texture.length; + return Math.floor(this.currentTime) % this._texture.length; } } @@ -169,9 +169,9 @@ { this.stop(); - this.totalTime = frameNumber; + this.currentTime = frameNumber; - var round = Math.floor(this.totalTime); + var round = Math.floor(this.currentTime); this._texture = this._textures[round % this._textures.length]; }; @@ -182,7 +182,7 @@ */ MovieClip.prototype.gotoAndPlay = function (frameNumber) { - this.totalTime = frameNumber; + this.currentTime = frameNumber; this.play(); }; @@ -193,16 +193,16 @@ MovieClip.prototype.update = function (deltaTime) { - this.totalTime += this.animationSpeed * deltaTime; + this.currentTime += this.animationSpeed * deltaTime; - var floor = Math.floor(this.totalTime); + var floor = Math.floor(this.currentTime); if (floor < 0) { if (this.loop) { - this.totalTime += this._textures.length; - this._texture = this._textures[this.totalTime]; + this.currentTime += this._textures.length; + this._texture = this._textures[this.currentTime]; } else {