// All the same... this.onEnterFrame = function() { this._y = Math.floor(this._y); this._x = Math.floor(this._x); UpdateStats(); UpdatePosition(); UpdateStance(); stance = "Standing"; } // same... function UpdatePosition() { if (Key.isDown(Key.LEFT)) { stance = "Running"; var check = CheckLeftWall(this._x, this._x-speed); if (check.bool) { this._x = Math.floor(check.wallX); } else { this._x -= speed; } } if (Key.isDown(Key.RIGHT)) { stance = "Running"; var width = Math.floor(this._width); var check = CheckRightWall(this._x+width, this._x+width+speed); if (check.bool) { this._x = Math.floor(check.wallX) - width; } else { this._x += speed; } } if (Key.isDown(Key.SPACE) && !jumping) { StartJump(); } // same... } function UpdateStance() { this.gotoAndStop(this.stance); if (this.stance == "Running") { UpdatePosition(); } } // all the same...