0
我有一個flash遊戲,它顯示在下面的代碼錯誤的Actionscript錯誤#1056
private function onAddingTimer(event:TimerEvent) : void
{
var _loc_2:int = 0;
var _loc_3:MovieClip = null;
var _loc_4:MovieClip = null;
var _loc_5:String = this;
var _loc_6:* = this.timerAddCounter + 1;
_loc_5.timerAddCounter = _loc_6;
this.bonusIntervalDiff = int(this.levelData[this.level].enemyCount/this.levelData[this.level].bonusCount);
if (this.timerAddCounter >= this.levelData[this.level].createDelay)
{
var _loc_5:String = this;
var _loc_6:* = this.timerAddCount + 1;
_loc_5.timerAddCount = _loc_6;
if (int(this.timerAddCount % this.bonusIntervalDiff) == 0)
{
_loc_2 = this.rangeRandom(0, this.LIFE_CLASSES.length);
trace("Ran:: " + _loc_2);
_loc_3 = new this.LIFE_CLASSES[_loc_2].className() as MovieClip;
this.spLifeGround.addChild(_loc_3);
_loc_3.y = 500;
this.previousX = this.rangeRandomWithPreviousDifference(100, 700, 210, this.previousX);
_loc_3.x = this.previousX;
this.lifes.push({mc:_loc_3, score:this.LIFE_CLASSES[_loc_2].score, cls:this.LIFE_CLASSES[_loc_2].className});
}
else
{
_loc_4 = new this.EMENY_CLASSES[this.rangeRandom(0, this.EMENY_CLASSES.length)] as MovieClip;
this.spEnemyGround.addChild(_loc_4);
_loc_4.y = 450;
this.previousX = this.rangeRandomWithPreviousDifference(75, 725, 210, this.previousX);
_loc_4.x = this.previousX;
this.enemys.push(_loc_4);
}
this.timerAddCounter = 0;
}
return;
}// end function
從控制檯錯誤是
ReferenceError: Error #1056: Cannot create property timerAddCounter on String. at JuegoGame/onAddingTimer() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick()
請問哪位知道,爲什麼不好好工作。
這看起來不像你自己的代碼,而是它的反編譯代碼。 – Vesper
因爲它被混淆器保護,反編譯的代碼不等於原始代碼? – alxx
是的,它是反編譯的代碼, –