diff --git a/cocos2d/actions/CCActionInterval.js b/cocos2d/actions/CCActionInterval.js index 905d72b0a2..e6b86ea906 100644 --- a/cocos2d/actions/CCActionInterval.js +++ b/cocos2d/actions/CCActionInterval.js @@ -3393,8 +3393,8 @@ cc.Animate = cc.ActionInterval.extend(/** @lends cc.Animate# */{ var numberOfFrames = frames.length, locSplitTimes = this._splitTimes; for (var i = this._nextFrame; i < numberOfFrames; i++) { if (locSplitTimes[i] <= dt) { - _currFrameIndex = i; - this.target.setSpriteFrame(frames[_currFrameIndex].getSpriteFrame()); + this._currFrameIndex = i; + this.target.setSpriteFrame(frames[this._currFrameIndex].getSpriteFrame()); this._nextFrame = i + 1; } else { // Issue 1438. Could be more than one frame per tick, due to low frame rate or frame delta < 1/FPS diff --git a/cocos2d/core/platform/CCInputExtension.js b/cocos2d/core/platform/CCInputExtension.js index e61f58459a..882baf6576 100644 --- a/cocos2d/core/platform/CCInputExtension.js +++ b/cocos2d/core/platform/CCInputExtension.js @@ -136,4 +136,4 @@ _p.didAccelerate = function (eventData) { } }; -delete _p; \ No newline at end of file +_p = null; \ No newline at end of file diff --git a/cocos2d/core/platform/CCScreen.js b/cocos2d/core/platform/CCScreen.js index 8bc1e4d758..cecf6a13b9 100644 --- a/cocos2d/core/platform/CCScreen.js +++ b/cocos2d/core/platform/CCScreen.js @@ -82,7 +82,7 @@ cc.screen = /** @lends cc.screen# */{ init: function () { this._fn = {}; var i, val, map = this._fnMap, valL; - for (i = 0, l = map.length; i < l; i++) { + for (i = 0; i < map.length; i++) { val = map[i]; if (val && val[1] in document) { for (i = 0, valL = val.length; i < valL; i++) {