Symbol 141 MovieClip [Target] Frame 1
#initclip 8
Object.registerClass("Target", com.king.countdown.Target);
#endinitclip
Symbol 174 MovieClip [Board] Frame 1
#initclip 7
Object.registerClass("Board", com.king.countdown.Board);
#endinitclip
Symbol 224 Button
on (press) {
board.toggleSound();
}
Symbol 228 Button
on (press) {
board.endGamePressed();
}
Symbol 230 Button
on (press) {
board.toggleSound();
}
Symbol 232 MovieClip [__Packages.com.king.countdown.Board] Frame 0
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.king) {
_global.com.king = new Object();
}
if (!_global.com.king.countdown) {
_global.com.king.countdown = new Object();
}
if (!_global.com.king.countdown.Board) {
var _local1 = function () {
super();
this.dragon._visible = false;
this.soundOn = true;
_root.soundOnButton._visible = !this.soundOn;
_root.soundOffButton._visible = this.soundOn;
this.hiltTime = getTimer() - 60000;
this.hiltDir = 1;
this.lost = false;
this.score = 0;
this.timeLeft = -1;
this.communicator = new com.king.countdown.Communicator();
this.currentLevel = 0;
this.gameStarted = false;
this.face.gotoAndStop(1);
_root.introFeather.gotoAndStop(2);
_root.introFeather.intoFeather.half0.gotoAndStop(34);
_root.introFeather.intoFeather.half1.gotoAndStop(34);
_root.introFeather.sourcey = _root.introFeather._y;
this.scorePaper.xorg = this.scorePaper._x;
this.scorePaper.yorg = this.scorePaper._y;
_root.levelCompleteSign._visible = false;
var _local4 = 0;
while (_local4 < 5) {
this["scoreDigit" + _local4]._alpha = 0;
_local4 = _local4 + 1;
}
};
_global.com.king.countdown.Board = _local1;
//_global.com.king.countdown.Board extends MovieClip
var _local2 = _local1.prototype;
_local2.setup = function (level) {
this.setScoreText(this.score);
this.startLevelScore = this.score;
this.inverted = false;
this.doubles = false;
this.holes = false;
var _local5 = _global.textMappings.level_type_straight;
this.xAnticheatOffset = int((Math.random() * 32) - 16) - 16;
this.yAnticheatOffset = int((Math.random() * 32) - 16) - 16;
this.hasTickedDown = false;
switch (level) {
case 0 :
this.markers = 20;
this.roundTime = 25;
this.timeBonus = 200;
break;
case 1 :
this.markers = 25;
this.roundTime = 30;
this.timeBonus = 200;
break;
case 2 :
this.markers = 30;
this.roundTime = 35;
this.timeBonus = 300;
var _local6 = this.random.nextInt(3);
if (_local6 == 0) {
_local5 = _global.textMappings.level_type_inverted;
this.inverted = true;
} else if (_local6 == 1) {
_local5 = _global.textMappings.level_type_double;
this.doubles = true;
}
break;
case 3 :
this.markers = 40;
this.roundTime = 60;
this.timeBonus = 400;
_local6 = this.random.nextInt(4);
if (_local6 == 0) {
_local5 = _global.textMappings.level_type_inverted_holes;
this.inverted = true;
this.holes = true;
} else if (_local6 == 1) {
_local5 = _global.textMappings.level_type_inverted_double;
this.inverted = true;
this.doubles = true;
} else {
_local5 = _global.textMappings.level_type_holes;
this.holes = true;
}
break;
case 4 :
this.dragon._visible = true;
this.markers = 50;
this.roundTime = 60;
this.timeBonus = 500;
_local6 = this.random.nextInt(3);
if (_local6 == 0) {
_local5 = _global.textMappings.level_type_inverted_holes;
this.inverted = true;
this.holes = true;
} else if (_local6 == 1) {
_local5 = _global.textMappings.level_type_holes;
this.holes = true;
} else {
_local5 = _global.textMappings.level_type_double_holes;
this.holes = true;
this.doubles = true;
}
}
_root.newTypeText = _local5;
this.levelStarted = false;
this.setTimeText(this.roundTime);
var _local7 = 35;
this.timeFan.half0.gotoAndStop(_local7);
this.timeFan.half1.gotoAndStop(_local7);
this.timeFanShadow.half0.gotoAndStop(_local7);
this.timeFanShadow.half1.gotoAndStop(_local7);
this.targets = new Array();
var _local8 = this.random.nextInt(2);
var _local9 = this.random.nextInt(8);
var _local10;
do {
_local10 = this.random.nextInt(8);
} while (_local10 == _local9);
var _local11 = 0;
var _local12 = new Array();
_local12.push(_local9);
_local12.push(_local10);
var _local13 = 0;
while (_local13 < this.markers) {
var _local14 = this.attachMovie("Target", "target" + _local13, _local13);
_local14.cacheAsBitmap = true;
if (this.random.nextDouble() < 0.9) {
_local8 = 1 - _local8;
}
var _local15 = ((_local13 * 100) / this.markers) + 50;
var _local16 = _local15;
var _local17 = ((this.random.nextDouble() * (this.bounds[2] - (_local16 * 2))) + this.bounds[0]) + _local16;
var _local18 = ((this.random.nextDouble() * (this.bounds[3] - (_local16 * 2))) + this.bounds[1]) + _local16;
_local14._x = _local17 + this.xAnticheatOffset;
_local14._y = _local18 + this.yAnticheatOffset;
_local14.hitMiss.gotoAndStop(7);
_local14.x = _local17;
_local14.y = _local18;
if (_local15 > 100) {
_local14.gotoAndStop(3 + (_local12[_local8] * 3));
_local14.sizeOffs = 2;
var _local19 = (_local15 * 100) / 150;
_loc0_ = _local19;
_local14._yscale = _local19;
_local14._xscale = _loc0_;
} else if (_local15 > 50) {
_local14.gotoAndStop(2 + (_local12[_local8] * 3));
_local14.sizeOffs = 1;
var _local19 = (_local15 * 100) / 100;
_loc0_ = _local19;
_local14._yscale = _local19;
_local14._xscale = _loc0_;
} else {
_local14.gotoAndStop(1 + (_local12[_local8] * 3));
_local14.sizeOffs = 0;
var _local19 = (_local15 * 100) / 50;
_loc0_ = _local19;
_local14._yscale = _local19;
_local14._xscale = _loc0_;
}
if ((!this.doubles) || ((_local13 & 1) == 0)) {
_local11 = _local11 + 1;
}
if (this.doubles) {
if ((this.holes && (this.random.nextDouble() < 0.2)) && ((_local13 & 1) == 1)) {
_local11 = _local11 + 1;
}
} else if (this.holes && (this.random.nextDouble() < 0.2)) {
_local11 = _local11 + 1;
}
_local14.init(this, (this.markers - _local13) - 1, _local11, _local8, _local15 / 2);
_local14._visible = false;
this.targets.push(_local14);
_local13 = _local13 + 1;
}
if (!this.inverted) {
_local13 = 0;
while (_local13 < this.markers) {
this.targets[_local13].inverseNum(_local11 + 1);
_local13 = _local13 + 1;
}
}
this.timeLeft = -1;
this.levelMeter.gotoAndStop(level + 1);
this.nextTargetId = 0;
_root.loseScreen._visible = false;
this.lastClickTime = getTimer() - 60000;
};
_local2.onPress = function () {
if ((this.quitAt >= 0) && (this.animationTime < 0)) {
this.communicator.gameQuit();
return(undefined);
}
this.clickAt = -1;
if (this.showMissTime >= 0) {
return(undefined);
}
if (!this.gameStarted) {
return(undefined);
}
if (this.lost) {
return(undefined);
}
var _local4 = getTimer();
var _local5 = this.score;
if (!this.levelStarted) {
com.king.countdown.Sounds.get("introMusic").stop();
if (this.animationTime < 0) {
this.animationTime = getTimer();
_root.introFeather.gotoAndStop(3);
}
return(undefined);
}
var _local6 = int(this._xmouse - this.xAnticheatOffset);
var _local7 = int(this._ymouse - this.yAnticheatOffset);
var _local8 = -1;
var _local9 = 0;
var _local10 = this.markers - 1;
while (_local10 >= 0) {
var _local11 = this.targets[_local10];
if (_local11._visible == true) {
var _local12 = _local11.getClickScore(_local6, _local7);
if (_local12 > 0) {
_local8 = _local10;
_local9 = _local12;
break;
}
}
_local10 = _local10 - 1;
}
if (_local8 >= 0) {
this.click(this.targets[_local8], _local9, _local4);
}
var _local13 = this.score - _local5;
this.communicator.clickAt(_local6, _local7, _local4, this.score - _local5, _local9);
_root.debugText.text = this.score - _local5;
if (this.hasWon) {
this.lose(_global.textMappings.game_won, _local5 + _local9, _local13 - _local9, this.score);
}
};
_local2.setScoreText = function (score) {
var _local3 = score;
var _local4 = 0;
while (_local4 < 5) {
this["scoreDigit" + _local4]._visible = (_local4 == 0) || (_local3 > 0);
this["scoreDigit" + _local4].gotoAndStop((_local3 % 10) + 1);
_local3 = int(_local3 / 10);
_local4 = _local4 + 1;
}
};
_local2.setTimeText = function (time) {
var _local3 = time;
var _local4 = 0;
while (_local4 < 2) {
this["timeDigit" + _local4].gotoAndStop((_local3 % 10) + 1);
_local3 = int(_local3 / 10);
_local4 = _local4 + 1;
}
};
_local2.click = function (target, scoreGained, time) {
var _local7 = -1;
var _local8 = this.markers - 1;
while (_local8 >= 0) {
var _local9 = this.targets[_local8];
if (_local9._visible == true) {
if (_local9.value > _local7) {
_local7 = _local9.value;
}
}
_local8 = _local8 - 1;
}
var _local10 = target.value == _local7;
if (_local10) {
com.king.countdown.Sounds.get("removalSound").play();
var _local11 = time - this.lastClickTime;
var _local12 = 3 - int(_local11 / 500);
if (_local12 < 0) {
_local12 = 0;
}
this.score = this.score + (scoreGained + _local12);
this.setScoreText(this.score);
target._visible = false;
this.lastClickTime = time;
this.nextTargetId = this.nextTargetId + 1;
if (this.nextTargetId == this.markers) {
com.king.countdown.Sounds.get("loopSound").stop();
com.king.countdown.Sounds.get("timewarningSound").stop();
this.hiltTime = getTimer() + 100;
this.hiltDir = 1;
_local11 = time - this.startTime;
var _local13 = this.roundTime - (_local11 / 1000);
var _local14 = int((this.timeBonus * _local13) / this.roundTime);
_root.levelCompleteSign.scoreField.text = this.score;
_root.levelCompleteSign.timeBonusField.text = _local14;
_root.levelCompleteSign.totalScoreField.text = this.score + _local14;
this.currentLevel = this.currentLevel + 1;
if ((this.currentLevel >= 5) || (_global.shortGameMode && (this.currentLevel >= 2))) {
this.hasWon = true;
com.king.countdown.Sounds.get("endSound").play();
} else {
com.king.countdown.Sounds.get("finishLevelSound").play();
this.animationTime = getTimer();
this.animationNum = 2;
this.clickAt = getTimer() + 10000;
}
this.score = this.score + _local14;
}
} else {
com.king.countdown.Sounds.get("missSound").play();
target.hitMiss.gotoAndStop(1 + target.sizeOffs);
_local8 = 0;
while (_local8 < this.markers) {
if ((this.targets[_local8].value == _local7) && (this.targets[_local8]._visible)) {
this.targets[_local8].hitMiss.gotoAndStop(4 + this.targets[_local8].sizeOffs);
}
_local8 = _local8 + 1;
}
this.nextTargetId = 0;
this.showMissTime = getTimer() + 500;
this.lastClickTime = time - 60000;
this.score = this.startLevelScore;
}
};
_local2.hideFeatherAnimation = function (time, t) {
var _local5 = int(34 - (t / 5));
if (_local5 < 0) {
_local5 = 0;
}
_root.introFeather.intoFeather.half0.gotoAndStop(_local5 + 1);
_root.introFeather.intoFeather.half1.gotoAndStop(_local5 + 1);
var _local6 = (t * 1.5) - 400;
if (_local6 < 0) {
_local6 = 0;
}
_root.introFeather._y = _root.introFeather.sourcey + _local6;
if (_local6 > 400) {
t = _local6 - 400;
var _local7 = -0.1;
this.scorePaper._x = this.scorePaper.xorg + (Math.cos(_local7) * t);
this.scorePaper._y = this.scorePaper.yorg + (Math.sin(_local7) * t);
}
if (_local6 > 500) {
t = 100;
var _local7 = -0.1;
this.scorePaper._x = this.scorePaper.xorg + (Math.cos(_local7) * t);
this.scorePaper._y = this.scorePaper.yorg + (Math.sin(_local7) * t);
var _local8 = 0;
while (_local8 < 5) {
this["scoreDigit" + _local8]._alpha = (_local6 - 500) * 0.7;
_local8 = _local8 + 1;
}
}
if (_local6 > 600) {
var _local8 = 0;
while (_local8 < 5) {
this["scoreDigit" + _local8]._alpha = 70;
_local8 = _local8 + 1;
}
this.animationTime = -1;
_root.introFeather._visible = false;
this.animationNum = 4;
this.animationTime = getTimer();
this.roundTypeText.text = _root.newTypeText;
this.hiltTime = getTimer() + 100;
this.hiltDir = -1;
com.king.countdown.Sounds.get("swordSound").playOffs(0.5);
}
};
_local2.showFeatherAnimation = function (time, t) {
t = 1000 - t;
var _local5 = int(34 - (t / 5));
if (_local5 >= 34) {
_local5 = 34;
_root.introFeather.gotoAndStop(1);
this.animationTime = -1;
}
_root.introFeather._visible = true;
if (_local5 < 0) {
_local5 = 0;
}
_root.introFeather.intoFeather.half0.gotoAndStop(_local5 + 1);
_root.introFeather.intoFeather.half1.gotoAndStop(_local5 + 1);
var _local6 = (t * 1.5) - 400;
if (_local6 < 0) {
_local6 = 0;
}
_root.introFeather._y = _root.introFeather.sourcey + _local6;
};
_local2.showEndTurnAnimation = function (time, t) {
t = 500 - (t * 2);
if (t < 0) {
t = 0;
this.animationTime = -1;
this.animationNum = 3;
this.setup(this.currentLevel);
}
_root.levelCompleteSign._y = 22 - (t / 2);
_root.levelCompleteSign._visible = true;
};
_local2.hideEndTurnAnimation = function (time, t) {
t = t * 2;
if (t >= 500) {
t = 500;
}
_root.levelCompleteSign._y = 22 - (t / 2);
_root.levelCompleteSign._visible = true;
if (t >= 500) {
t = 500;
this.animationTime = -1;
this.animationNum = 0;
_root.levelCompleteSign._visible = false;
this.animationNum = 4;
this.animationTime = getTimer();
this.roundTypeText.text = _root.newTypeText;
this.hiltTime = getTimer() + 100;
this.hiltDir = -1;
com.king.countdown.Sounds.get("swordSound").playOffs(0.5);
}
};
_local2.startLevelAnimation = function (time, t) {
var _local4 = (t - 1000) / 250;
if (_local4 > 1) {
_local4 = 1;
this.animationTime = -1;
this.levelStarted = true;
this.startTime = time;
this.communicator.sendStartLevel(this.startTime);
this.levelStarted = true;
var _local5 = 0;
while (_local5 < this.markers) {
this.targets[_local5]._visible = true;
_local5 = _local5 + 1;
}
this.lastClickTime = time - 60000;
com.king.countdown.Sounds.get("loopSound").playLooping();
com.king.countdown.Sounds.get("loopSound").setVolume(20);
}
var _local5 = 0;
while (_local5 < int(_local4 * this.markers)) {
this.targets[_local5]._visible = true;
_local5 = _local5 + 1;
}
};
_local2.updateHilt = function () {
var _local2 = (getTimer() - this.hiltTime) / 250;
if (((this.hiltDir == -1) && (_local2 > 0.5)) && (_local2 < 2)) {
if (_local2 < 1) {
this.twinkle._xscale = (this.twinkle._yscale = (_local2 - 0.5) * 200);
} else {
this.twinkle._xscale = (this.twinkle._yscale = (2 - _local2) * 100);
}
} else {
this.twinkle._xscale = (this.twinkle._yscale = 0);
}
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 1) {
_local2 = 1;
}
if (this.hiltDir == -1) {
_local2 = 1 - _local2;
}
var _local3 = -151 + (_local2 * 150);
if (this.hilt._x != _local3) {
this.hilt._x = _local3;
}
};
_local2.gameDataReceived = function () {
this.clickAt = getTimer() + 15000;
_root.hider._visible = false;
this.gameStarted = true;
this.communicator.parseGameData(_root.gameData);
this.communicator.gameStarted();
this.random = new com.midasplayer.util.Random(this.communicator.randomSeed);
this.setup(this.currentLevel);
this.onEnterFrame();
_root.instructionsTitleText = _global.textMappings.instructions_title;
_root.instructionsText = _global.textMappings.instructions;
_root.featherClickText = _global.textMappings.click_to_start;
_root.txt_endgame_button = _global.textMappings.exit_game;
_root.txt_sound_button = _global.textMappings.sound_on;
_root.txt_click_to_continue = _global.textMappings.click_to_continue;
_root.txt_score = _global.textMappings.score;
_root.txt_time_bonus = _global.textMappings.time_bonus;
_root.txt_total_score = _global.textMappings.total_score;
_root.txt_level_completed = _global.textMappings.level_completed;
this.startAnimTime = getTimer();
com.king.countdown.Sounds.get("introMusic").play();
};
_local2.onEnterFrame = function () {
this.updateHilt();
if (this.quitAt >= 0) {
var _local4 = Math.max(int(((this.quitAt - getTimer()) / 1000) + 0.99), 0);
_root.countdownText = _global.textMappings.game_ends_in.split("{0}").join(_local4);
if (getTimer() > this.quitAt) {
this.communicator.gameQuit();
return(undefined);
}
}
if (this.clickAt >= 0) {
var _local4 = Math.max(int(((this.clickAt - getTimer()) / 1000) + 0.99), 0);
if (this.currentLevel == 0) {
_root.countdownText = _global.textMappings.game_starts_in.split("{0}").join(_local4);
} else {
_root.countdownText = _global.textMappings.level_starts_in.split("{0}").join(_local4);
}
if (getTimer() > this.clickAt) {
this.onPress();
}
}
if (this.showMissTime >= 0) {
if (getTimer() > this.showMissTime) {
this.showMissTime = -1;
var _local5 = 0;
while (_local5 < this.markers) {
this.targets[_local5]._visible = true;
this.targets[_local5].hitMiss.gotoAndStop(7);
_local5 = _local5 + 1;
}
this.setScoreText(this.score);
this.nextTargetId = 0;
}
}
if (this.animationTime >= 0) {
var _local6 = getTimer();
var _local7 = _local6 - this.animationTime;
if (this.animationNum == 0) {
this.hideFeatherAnimation(_local6, _local7);
} else if (this.animationNum == 1) {
this.showFeatherAnimation(_local6, _local7);
} else if (this.animationNum == 2) {
this.showEndTurnAnimation(_local6, _local7);
} else if (this.animationNum == 3) {
this.hideEndTurnAnimation(_local6, _local7);
} else if (this.animationNum == 4) {
this.startLevelAnimation(_local6, _local7);
}
return(undefined);
}
if (!this.gameStarted) {
if (this.DEBUG_MODE) {
_root.gameData = this.DEBUG_GAME_DATA;
}
if (_root.gameData != undefined) {
this.gameDataReceived();
return(undefined);
}
}
if (this.lost) {
return(undefined);
}
if (!this.levelStarted) {
var _local7 = int(((getTimer() - this.startAnimTime) - 1500) / 70);
if (_local7 < 0) {
_local7 = 0;
}
if (this.startAnimTime < 0) {
_local7 = 0;
}
_root.introFeather.instructionsAnimation.gotoAndStop(_local7 + 1);
_root.introFeather.instructionsAnimation.num.num0.gotoAndStop(11);
_root.introFeather.instructionsAnimation.num.num1.gotoAndStop(11);
return(undefined);
}
var _local8 = getTimer() - this.startTime;
var _local9 = this.roundTime - (_local8 / 1000);
if (_local9 < 0) {
_local9 = 0;
}
var _local10 = int((_local9 / this.roundTime) * 34) + 1;
this.timeFan.half0.gotoAndStop(_local10);
this.timeFan.half1.gotoAndStop(_local10);
this.timeFanShadow.half0.gotoAndStop(_local10);
this.timeFanShadow.half1.gotoAndStop(_local10);
var _local11 = this.roundTime - int(_local8 / 1000);
if ((_local11 < 8) && (!this.hasTickedDown)) {
com.king.countdown.Sounds.get("timewarningSound").playLooping();
this.hasTickedDown = true;
}
if (_local11 <= 0) {
com.king.countdown.Sounds.get("timewarningSound").stop();
this.showMissTime = -1;
com.king.countdown.Sounds.get("loopSound").stop();
com.king.countdown.Sounds.get("endSound").play();
this.lose(_global.textMappings.out_of_time, this.score, 0, this.score);
_local11 = 0;
this.setTimeText(0);
}
if (_local11 != _local9) {
_local9 = _local11;
this.setTimeText(_local9);
}
};
_local2.lose = function (reason, score, bonus, totalScore) {
if (!this.lost) {
_root.featherClickText = _global.textMappings.click_to_exit;
this.hiltTime = getTimer() + 500;
this.hiltDir = 1;
_root.endTitleText = reason;
_root.endScoreText = "" + score;
_root.endBonusText = "" + bonus;
_root.endTotalScoreText = "" + totalScore;
this.animationNum = 1;
this.animationTime = getTimer();
this.communicator.gameEnd(totalScore);
this.quitAt = getTimer() + 10000;
this.lost = true;
_root.introFeather.gotoAndStop(3);
_root.introFeather._visble = true;
var _local8 = 0;
while (_local8 < this.markers) {
this.targets[_local8]._visible = false;
_local8 = _local8 + 1;
}
}
};
_local2.toggleSound = function () {
this.soundOn = !this.soundOn;
if (this.soundOn) {
_root.txt_sound_button = _global.textMappings.sound_on;
} else {
_root.txt_sound_button = _global.textMappings.sound_off;
}
_root.soundOnButton._visible = !this.soundOn;
_root.soundOffButton._visible = this.soundOn;
com.king.countdown.Sounds.toggleSound();
};
_local2.endGamePressed = function () {
if (!this.lost) {
this.lost = true;
this.communicator.gameEnd(this.score);
this.quitAt = getTimer() + 2000;
_root.hider._visible = true;
}
};
_local2.DEBUG_MODE = true;
_local2.DEBUG_GAME_DATA = ((((((((((((((((((((("<gamedata randomseed=\"1859686622\" timelimit=\"300\"> <text id=\"instructions_title\">Instr\u00C3\u00BCcti\u00C3\u00B6ns</text> <text id=\"instructions\">Th\u00C3\u00ABse \u00C3\u00A4re the instr\u00C3\u00BCctions of the gameship enterprise!</text>" + " <text id=\"game_starts_in\">G\u00C3\u00A4me starts in {0} sec\u00C3\u00B6nds</text>") + " <text id=\"game_ends_in\">G\u00C3\u00A4me ends in {0} sec\u00C3\u00B6nds</text>") + " <text id=\"level_starts_in\">L\u00C3\u00A4vel starts in {0} sec\u00C3\u00B6nds</text>") + " <text id=\"click_to_start\">CLICK T\u00C3\u2013 START</text>") + " <text id=\"click_to_continue\">CLICK T\u00C3\u2013 CONTINUE</text>") + " <text id=\"click_to_exit\">CLICK T\u00C3\u2013 EXIT</text>") + " <text id=\"score\">Sc\u00C3\u00B6re</text>") + " <text id=\"time_bonus\">Tim\u00C3\u00AB b\u00C3\u00B6nus</text>") + " <text id=\"total_score\">T\u00C3\u00B6tal sc\u00C3\u00B6re</text>") + " <text id=\"level_completed\">Level c\u00C3\u00B6mpleted</text>") + " <text id=\"level_type_straight\">Str\u00C3\u00A4ight\nC\u00C3\u00B6untdown</text>") + " <text id=\"level_type_inverted\">Inv\u00C3\u00ABrted\nC\u00C3\u00B6untdown</text>") + " <text id=\"level_type_double\">D\u00C3\u00B6uble\nC\u00C3\u00B6untdown</text>") + " <text id=\"level_type_holes\">H\u00C3\u00B6les\nC\u00C3\u00B6untdown</text>") + " <text id=\"level_type_inverted_holes\">Inverted H\u00C3\u00B6les\nC\u00C3\u00B6untdown</text>") + " <text id=\"level_type_inverted_double\">Inverted D\u00C3\u00B6uble\nC\u00C3\u00B6untdown</text>") + " <text id=\"game_won\">GAME W\u00C3\u2013N</text>") + " <text id=\"out_of_time\">OUT \u00C3\u2013F TIME</text>") + " <text id=\"sound_off\">S\u00C3\u2013UND \u00C3\u2013FF</text>") + " <text id=\"sound_on\">S\u00C3\u2013UND \u00C3\u2013N</text>") + " <text id=\"exit_game\">EXIT G\u00C3\u201EME</text>") + "</gamedata>";
_local2.roundTime = 20;
_local2.bounds = [206, 31, 515, 356];
_local2.animationTime = -1;
_local2.animationNum = 0;
_local2.quitAt = -1;
_local2.clickAt = -1;
_local2.hasWon = false;
_local2.showMissTime = -1;
_local2.startAnimTime = -1;
(ASSetPropFlags(_global.com.king.countdown.Board.prototype, null, 1));// not popped
}
#endinitclip
Symbol 233 MovieClip [__Packages.com.king.countdown.Communicator] Frame 0
class com.king.countdown.Communicator
{
var randomSeed;
function Communicator () {
}
function gameStarted() {
fscommand ("gameStart");
}
function gameEnd(score) {
if (!hasSentGameEnd) {
hasSentGameEnd = true;
fscommand ("gameEnd", score);
}
}
function gameQuit() {
if (!hasSentGameOver) {
hasSentGameOver = true;
fscommand ("gameQuit");
}
}
function sendEndGamePressed() {
fscommand ("playData", CMD_END_GAME_PRESSED + "=0");
}
function sendStartLevel(startTime) {
fscommand ("playData", ((CMD_START_LEVEL + ",") + startTime) + "=0");
}
function clickAt(x, y, time, scoreGained, baseScore) {
fscommand ("playData", (((((((((CMD_CLICK_AT + ",") + x) + " ") + y) + " ") + time) + " ") + baseScore) + "=") + scoreGained);
}
function parseGameData(gameData) {
var _local6 = new XML(_root.gameData);
_global.shortGameMode = new String(_local6.childNodes[0].attributes.mode) == "short";
_global.textMappings = new Object();
var _local5 = _local6.childNodes[0].childNodes;
randomSeed = new Number(_local6.childNodes[0].attributes.randomseed).valueOf();
var _local4 = 0;
while (_local4 < _local5.length) {
if (_local5[_local4].nodeName == "text") {
_global.textMappings[_local5[_local4].attributes.id] = new String(_local5[_local4].firstChild.nodeValue);
_root.debugText.text = _root.debugText.text + ((("_global.textMappings[\"" + _local5[_local4].attributes.id) + "\"] = ") + new String(_local5[_local4].firstChild.nodeValue + "\r"));
}
_local4++;
}
}
var hasSentGameEnd = false;
var hasSentGameOver = false;
static var VERSION_NUM = 0;
static var CMD_START_LEVEL = 272;
static var CMD_CLICK_AT = 885;
static var CMD_END_GAME_PRESSED = 736;
}
Symbol 234 MovieClip [__Packages.com.king.countdown.Sounds] Frame 0
class com.king.countdown.Sounds
{
static var globalSound;
var soundMc, sound;
function Sounds (ownerMc, soundName) {
var _local2 = ownerMc.getNextHighestDepth();
soundMc = ownerMc.createEmptyMovieClip("soundMcc" + _local2, _local2);
sound = new Sound(soundMc);
sound.attachSound(soundName);
}
static function get(resourceName) {
var _local2 = soundMap[resourceName];
if ((_local2 == undefined) || (_local2 == null)) {
_local2 = new com.king.countdown.Sounds(_root, resourceName);
soundMap[resourceName] = _local2;
}
return(_local2);
}
static function toggleSound() {
if (globalSound == undefined) {
globalSound = new Sound(_root);
}
soundOn = !soundOn;
globalSound.setVolume((soundOn ? 100 : 0));
}
function setVolume(volume) {
sound.setVolume(volume);
}
function playLooping() {
sound.start(0, 9999999);
}
function stopAndPlayOffs(offs) {
sound.stop();
sound.start(offs, 0);
}
function stopAndPlay() {
sound.stop();
sound.start(0);
}
function playOffs(offs) {
sound.start(offs, 0);
}
function playOffsVolPan(offs, vol, pan) {
sound.start(offs, 0);
sound.setVolume(vol);
sound.setPan(pan);
}
function play() {
sound.start(0);
}
function stop() {
sound.stop();
}
static var soundMap = new Object();
static var soundOn = true;
}
Symbol 235 MovieClip [__Packages.com.midasplayer.util.Random] Frame 0
class com.midasplayer.util.Random
{
var mta, mti, lastSeed;
function Random (aSeed) {
mta = new Array(N);
mti = N + 1;
if (aSeed != undefined) {
init_genrand(aSeed);
}
}
function set seed(s) {
init_genrand(s);
//return(seed);
}
function get seed() {
return(lastSeed);
}
function nextInt(n) {
return((genrand_int32() & 2147483647) % n);
}
function nextFloat() {
return(next(24) / 16777216);
}
function nextDouble() {
return(next(24) / 16777216);
}
function next(bits) {
if (bits < 32) {
return(genrand_int32() & ((1 << bits) - 1));
}
return(genrand_int32());
}
function init_genrand(s) {
s = int(s);
trace("Random::init_genrand(): seed=" + s);
var _local5 = getTimer();
lastSeed = s;
mta[0] = s;
var _local2 = s;
var _local3 = new com.midasplayer.util.Integer64();
mti = 1;
while (mti < N) {
_local3.init32((_local2 >>> 30) ^ _local2);
_local3.mulu32(1812433253);
_local2 = (mta[mti] = int(_local3.lsb + mti));
mti++;
}
var _local6 = getTimer();
trace(("Random::init_genrand(): initialization ~" + (_local6 - _local5)) + "ms");
}
function genrand_int32() {
var _local3 = 0;
if (mti >= N) {
if (mti == (N + 1)) {
init_genrand(5489);
}
var _local4 = getTimer();
var _local2 = 0;
_local2 = 0;
while (_local2 < (N - M)) {
_local3 = (mta[_local2] & UPPER_MASK) | (mta[_local2 + 1] & LOWER_MASK);
mta[_local2] = (mta[_local2 + M] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
_local2++;
}
while (_local2 < (N - 1)) {
_local3 = (mta[_local2] & UPPER_MASK) | (mta[_local2 + 1] & LOWER_MASK);
mta[_local2] = (mta[_local2 + (M - N)] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
_local2++;
}
_local3 = (mta[N - 1] & UPPER_MASK) | (mta[0] & LOWER_MASK);
mta[N - 1] = (mta[M - 1] ^ (_local3 >>> 1)) ^ mag01[_local3 & 1];
mti = 0;
var _local5 = getTimer();
trace(((("Random::genrand_int32(): precalc " + N) + " new numbers ~") + (_local5 - _local4)) + "ms");
}
_local3 = mta[mti++];
_local3 = _local3 ^ (_local3 >>> 11);
_local3 = _local3 ^ ((_local3 << 7) & 2636928640);
_local3 = _local3 ^ ((_local3 << 15) & 4022730752);
_local3 = _local3 ^ (_local3 >>> 18);
return(_local3);
}
static var N = 624;
static var M = 397;
static var MATRIX_A = 2567483615;
static var UPPER_MASK = 2147483648;
static var LOWER_MASK = 2147483647;
static var mag01 = [0, 2567483615];
}
Symbol 236 MovieClip [__Packages.com.midasplayer.util.Integer64] Frame 0
class com.midasplayer.util.Integer64
{
var r, p, s;
function Integer64 (lowInt) {
r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
p = [0, 0, 0, 0, 0];
s = [0, 0, 0];
if (lowInt != undefined) {
merge(lowInt);
}
}
function init(v) {
var _local2 = 0;
while (_local2 < p.length) {
p[_local2] = v.p[_local2];
_local2++;
}
}
function init32(n) {
p[0] = n & 32767;
n = n >>> 15;
p[1] = n & 32767;
n = n >>> 15;
p[2] = n & 3;
p[3] = 0;
p[4] = 0;
}
function get lsb() {
return((p[0] | (p[1] << SH)) | ((p[2] & 3) << 30));
}
function get msb() {
return((((p[2] >> 2) | ((p[3] << SH) >> 2)) | ((p[4] << (SH * 2)) >> 2)) & 2147483647);
}
function binaryShiftLeft(step) {
var _local2 = 0;
while (_local2 < step) {
shl();
_local2++;
}
}
function binaryShiftRight(step) {
var _local4 = (step / SH) >> 0;
var _local5 = step - (_local4 * SH);
var _local2 = p.length - 1;
while (_local2 > 0) {
var _local3 = 0;
while (_local3 < _local4) {
p[_local3] = p[_local3 + 1];
_local3++;
}
p[_local2--] = 0;
}
if (_local5 > 0) {
var _local3 = 0;
while (_local3 < _local5) {
shr();
_local3++;
}
}
}
function binaryNot(o) {
p[0] = p[0] ^ o.p[0];
p[1] = p[1] ^ o.p[1];
p[2] = p[2] ^ o.p[2];
p[3] = p[3] ^ o.p[3];
p[4] = p[4] ^ o.p[4];
}
function add64(o) {
var _local4 = 0;
var _local3 = 1;
var _local2 = 0;
while ((_local3 < p.length) && (o.p[_local2] != 0)) {
_local3++;
}
_local2 = 0;
while (_local2 < _local3) {
_local4 = _local4 + (p[_local2] + o.p[_local2]);
p[_local2] = _local4 & MASK;
_local4 = _local4 >> SH;
_local2++;
}
}
function add32(num) {
var _local2 = 0;
var _local5 = num & MASK;
num = num >> SH;
var _local6 = num & MASK;
num = num >> SH;
var _local4 = num & 3;
_local2 = _local2 + (p[0] + _local5);
p[0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (p[1] + _local6);
p[1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (p[2] + _local4);
p[2] = _local2 & MASK;
}
function mulu32(num) {
var _local3 = 0;
s[0] = num & MASK;
num = num >>> 15;
s[1] = num & MASK;
num = num >>> 15;
s[2] = num & 3;
var _local2 = 0;
while (_local2 < 3) {
var _local4 = s[_local2];
_local3 = _local4 * p[0];
r[_local2][0] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (_local4 * p[1]);
r[_local2][1] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (_local4 * p[2]);
r[_local2][2] = _local3 & 3;
_local2++;
}
_local3 = r[0][0];
p[0] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + (r[0][1] + r[1][0]);
p[1] = _local3 & MASK;
_local3 = _local3 >> SH;
_local3 = _local3 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local3 & 3;
p[3] = 0;
p[4] = 0;
}
function mul64(o) {
var _local2 = 0;
var _local3 = 0;
while (_local3 < 5) {
var _local4 = o.p[_local3];
_local2 = _local4 * p[0];
r[_local3][0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[1]);
r[_local3][1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[2]);
r[_local3][2] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[3]);
r[_local3][3] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (_local4 * p[4]);
r[_local3][4] = _local2 & MASK;
_local3++;
}
_local2 = r[0][0];
p[0] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (r[0][1] + r[1][0]);
p[1] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]);
p[3] = _local2 & MASK;
_local2 = _local2 >> SH;
_local2 = _local2 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]);
p[4] = _local2 & 7;
}
function mul32(value) {
mul64(new com.midasplayer.util.Integer64(value));
}
function merge(a) {
var _local2 = 0;
while (_local2 < 3) {
p[_local2] = p[_local2] + (a & 32767);
a = a >>> 15;
_local2++;
}
return(a);
}
function shl() {
var _local5 = 0;
var _local4 = 0;
var _local2 = 0;
var _local3 = p.length;
while (_local2 < _local3) {
_local5 = (p[_local2] & 16384) >> 14;
p[_local2] = p[_local2] << 1;
p[_local2] = (p[_local2] | _local4) & 32767;
_local2++;
_local4 = _local5;
}
}
function shr() {
var _local4 = 0;
var _local3 = 0;
var _local2 = p.length - 1;
while (_local2 >= 0) {
_local4 = (p[_local2] & 1) << 14;
p[_local2] = p[_local2] >> 1;
p[_local2] = (p[_local2] | _local3) & 32767;
_local2--;
_local3 = _local4;
}
}
static var MASK = 32767;
static var SH = 15;
}
Symbol 237 MovieClip [__Packages.com.king.countdown.Target] Frame 0
class com.king.countdown.Target extends MovieClip
{
var mc, board, id, num, value, radius, x, y;
function Target () {
super();
}
function init(board, id, num, col, radius) {
if (mc.num0._xorg == undefined) {
mc.num0._xorg = mc.num0._x;
mc.num1._xorg = mc.num1._x;
mc.num0._widthorg = mc.num0._width;
mc.num1._widthorg = mc.num1._width;
}
this.board = board;
this.id = id;
this.num = num;
value = num;
this.radius = radius;
var _local3 = col;
setNum(num);
}
function inverseNum(highest) {
num = highest - num;
setNum(num);
}
function setNum(num) {
this.num = num;
var _local3 = Math.floor(num / 10);
var _local4 = int(num % 10);
mc.num1.gotoAndStop(_local4 + 1);
mc.num0.gotoAndStop(_local3 + 1);
var _local2 = 0;
if (_local3 == 1) {
_local2 = _local2 - (mc.num0._widthorg * 0.1);
}
if (_local4 == 1) {
_local2 = _local2 + (mc.num1._widthorg * 0.1);
}
mc.num0._x = mc.num0._xorg + _local2;
mc.num1._x = mc.num1._xorg + _local2;
}
function getClickScore(xMouse, yMouse) {
var _local2 = xMouse - x;
var _local3 = yMouse - y;
var _local4 = (_local2 * _local2) + (_local3 * _local3);
if (_local4 < (radius * radius)) {
if (_local4 > (((radius * radius) * 0.7) * 0.7)) {
return(12);
}
return(10);
}
return(0);
}
}