Frame 1
_root.gVersionNum = "1.0";
fscommand ("showmenu", "false");
loadVariablesNum ("TestVariables.txt", 0);
pLoadInit = false;
pTrackLoadCalled = false;
if (/:gGameID eq "") {
Set("/:gGameID", "game_template_NO_ID");
}
if (/:gHSRoot_swf eq "") {
Set("/:gHSRoot_swf", "/games/med/");
}
if (/:gHSRoot_jsp eq "") {
Set("/:gHSRoot_jsp", "/web/load_variables/games/");
}
if (/:gHSRoot_top100 eq "") {
Set("/:gHSRoot_top100", "/web/games/");
}
function cTimer() {
this.startTime = getTimer();
}
cTimer.prototype.restartTimer = function () {
this.startTime = getTimer();
};
cTimer.prototype.milliseconds = function () {
return(getTimer() - this.startTime);
};
cTimer.prototype.seconds = function () {
return(int((getTimer() - this.startTime) / 1000));
};
iLevelPauseTimer = new cTimer();
Frame 4
Set("_level0:gWTE_FL", _framesloaded);
Set("_level0:gWTE_PL", int((_level0:gWTE_FL / _level0.gWTE_TF) * 100));
Set("_level0:gWTE_PLtxt", _level0:gWTE_PL add "%");
Set("/:gHS_bypass", true);
ifFrameLoaded (148) {
if ((/hs_scripts/:gLoaded == true) || (/:gHS_bypass == true)) {
gotoAndPlay ("loaded");
}
}
if (pLoadInit != true) {
Set("/:gGameState", "LOADING");
pLoadStartTime = int(getTimer() / 1000);
tellTarget ("/hs_scripts") {
call("mLoading");
};
pLoadInit = true;
}
if (/:gHSTrackLoad && (pTrackLoadCalled != true)) {
loadVariablesNum ((((("/tracking.html?game=" add /:gGameID) add "&stage=0&timer=") add pLoadStartTime) add "&random_id=") add pLoadStartTime, 0);
pTrackLoadCalled = true;
}
Frame 14
gotoAndPlay ("loading");
Frame 17
function newGame() {
_root.gScore = 0;
_root.gLevel = 1;
a = 0;
while (a < 20) {
meteors[a] = 0;
meteors_x[a] = 0;
meteors_y[a] = 0;
a++;
}
gotoAndPlay ("NextLevel");
}
function displayScore(countup) {
if (countup == true) {
scoregoal = ((scoregoal < _root.gScore) ? (scoregoal + 5) : (_root.gScore));
} else {
scoregoal = _root.gScore;
}
tmpscore = "" add scoregoal;
zeros = "";
a = tmpscore.length;
while (a < 10) {
zeros = zeros add "0";
a++;
}
score_display = zeros add scoregoal;
collectedtext = ((collected < 10) ? ("0" add collected) : ("" add collected));
maxmeteortext = ((maxmeteors < 10) ? ("0" add maxmeteors) : ("" add maxmeteors));
statustext = (collectedtext add " / ") add maxmeteortext;
}
meteors = Array[20];
meteors_speed = Array[20];
player_x = 0;
player_y = 0;
spped = 0;
altitude = 0;
piecesize = 64;
livesleft = 0;
meteorsleft = 0;
meteorcounter = 0;
hits = 0;
misses = 0;
tellTarget ("/hs_scripts") {
call("mLoaded");
};
Frame 38
skyline_back_x = MC_gameboard.MC_skyline_back._x;
skyline_front_x = MC_gameboard.MC_skyline_front._x;
speed = 15;
skyline_back_x = skyline_back_x - (Math.abs(speed) / 2);
skyline_front_x = skyline_front_x - Math.abs(speed);
if (skyline_back_x < -1189) {
skyline_back_x = -1189;
}
if (skyline_front_x < -1459) {
skyline_front_x = 0;
}
MC_gameboard.MC_skyline_back._x = skyline_back_x;
MC_gameboard.MC_skyline_front._x = skyline_front_x;
gotoAndPlay(_currentframe - 1);
Frame 40
newGame();
Instance of Symbol 225 MovieClip "Cr_clip" in Frame 40
onClipEvent (load) {
function mKeyStroke() {
var i;
var key_down = -1;
if (400 < (getTimer() - pCrTimer)) {
i = 1;
while (i < 91) {
if (Key.isDown(i)) {
key_down = i;
if (2 < i) {
trace("Code: " + i);
}
}
i++;
}
if (key_down >= 48) {
pCrCheck = (pCrCheck + key_down) + ":";
trace("CrCheck: " + pCrCheck);
pCrTimer = getTimer();
if (pCrCheck == "87:66:67:72:48:50:") {
trace("OK");
pCrCheck = "";
pCrOn = true;
mCr();
}
} else if ((key_down == 13) || (key_down == 32)) {
pCrCheck = "";
pCrTimer = getTimer();
}
}
}
function mCr() {
trace("mCr");
this.gotoAndPlay("show");
_root.debug_clip._visible = true;
_root.debug_clip._x = 50;
}
}
onClipEvent (enterFrame) {
mKeyStroke();
}
Frame 42
tellTarget ("/hs_scripts") {
call("mPlay");
};
Frame 45
collected = 0;
health = 50;
xgoal = 18;
ygoal = 0;
facing = 0;
speed = 0;
heatdelay = 0;
maxmeteors = ((_root.gLevel < 12) ? (13 + _root.gLevel) : 25);
maxmeteortext = ((maxmeteors < 10) ? ("0" add maxmeteors) : ("" add maxmeteors));
_root.introtext = ("Stop " add maxmeteortext) add " Meteors";
hit_damage = ((_root.gLevel < 10) ? (9 + _root.gLevel) : 20);
missscale = ((levelnum < 11) ? (9 + levelnum) : 20);
missed = 0;
rattlecounter = 0;
hitcounter = 0;
setdir = -1;
dropdelay = ((_root.gLevel < 6) ? (35 - (_root.gLevel * 3)) : 18);
displayScore(false);
stopAllSounds();
tellTarget ("/hs_scripts") {
call("mLevelStart");
};
Frame 47
digit0 = 1;
tmplevel = _root.gLevel;
while (10 < tmplevel) {
tmplevel = tmplevel - 10;
digit0++;
}
digit1 = 1 + tmplevel;
MC_gameboard.MC_leveltext.MC_level.MC_digit0.gotoAndStop(digit0);
MC_gameboard.MC_leveltext.MC_level.MC_digit1.gotoAndStop(digit1);
Frame 58
MC_gameboard.MC_leveltext.play();
_root.iLevelPauseTimer.restartTimer();
Frame 76
if (_root.iLevelPauseTimer.seconds() < 1.5) {
gotoAndPlay(_currentframe - 1);
}
Frame 77
player_x = MC_gameboard.MC_player._x;
player_y = MC_gameboard.MC_player._y;
player_frame = MC_gameboard.MC_player._currentframe;
skyline_back_x = MC_gameboard.MC_skyline_back._x;
skyline_front_x = MC_gameboard.MC_skyline_front._x;
meteors_x = MC_gameboard.MC_meteors._x;
level_display_x = MC_gameboard.MC_leveltext._x;
meteorcounter++;
if (dropdelay < meteorcounter) {
meteorcounter = 0;
r = random(16) + 1;
if (eval ("MC_gameboard.MC_meteors.MC_meteor" add r)._currentframe == 1) {
tmprnd = random(17) + 1;
tmpframe = 2;
if ((_root.gLevel + 1) >= tmprnd) {
tmpframe = 3;
}
eval ("MC_gameboard.MC_meteors.MC_meteor" add r).gotoAndStop(tmpframe);
eval ("MC_map.MC_meteors.MC_meteor" add r).gotoAndStop(tmpframe);
}
}
a = 1;
while (a < 17) {
if (eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe == 19) {
eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._y = 0;
eval ("MC_map.MC_meteors.MC_meteor" add a)._y = 0;
eval ("MC_map.MC_meteors.MC_meteor" add a).gotoAndStop(1);
eval ("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndStop(1);
}
if (1 < eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe) {
tmpy = eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._y + 3;
if (tmpy < 500) {
eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._y = tmpy;
eval ("MC_map.MC_meteors.MC_meteor" add a)._y = tmpy;
} else {
gOrig_x = MC_gameboard._x;
gOrig_y = MC_gameboard._y;
rattlecounter = 1;
eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._y = 0;
eval ("MC_map.MC_meteors.MC_meteor" add a)._y = 0;
eval ("MC_map.MC_meteors.MC_meteor" add a).gotoAndPlay(20);
eval ("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(20);
missed = missed + missscale;
}
if (MC_gameboard.MC_player.hitTest(eval (("MC_gameboard.MC_meteors.MC_meteor" add a) add ".MC_collission"))) {
tmptype = eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe;
tmpframe = MC_gameboard.MC_player.MC_heat_vision._currentframe;
if (tmptype == 2) {
_root.gScore = _root.gScore + 50;
eval ("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
eval ("MC_map.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
collected++;
}
if (tmptype == 3) {
if (((14 < player_frame) && (player_frame < 26)) || ((69 < player_frame) && (player_frame < 81))) {
_root.gScore = _root.gScore + 100;
eval ("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
eval ("MC_map.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
collected++;
} else {
eval ("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(31);
if (facing == 0) {
MC_gameboard.MC_player.gotoAndPlay(24);
} else {
MC_gameboard.MC_player.gotoAndPlay(83);
}
if (0 < speed) {
speed = 5;
} else {
speed = -5;
}
hitcounter = 30;
health = health - hit_damage;
}
}
}
}
a++;
}
if (0 < rattlecounter) {
rattlecounter++;
tmprnd = ((4 < random(10)) ? 1 : -1);
MC_gameboard._x = gOrig_x + (random(10) * tmprnd);
MC_gameboard._y = gOrig_y + (random(10) * tmprnd);
}
if (10 < rattlecounter) {
rattlecounter = 0;
MC_gameboard._x = gOrig_x;
MC_gameboard._y = gOrig_y;
}
a = 0;
while (a < 5) {
if (speed < xgoal) {
speed = speed + 1;
}
if (xgoal < speed) {
speed = speed - 1;
}
a++;
}
player_x = player_x + speed;
a = 0;
while (a < 3) {
if (ygoal < altitude) {
altitude--;
}
if (altitude < ygoal) {
altitude++;
}
a++;
}
player_y = player_y + altitude;
if (player_y < 120) {
player_y = 120;
}
if (360 < player_y) {
player_y = 360;
}
if (300 < player_x) {
player_x = 300;
skyline_back_x = skyline_back_x - (Math.abs(speed) / 2);
skyline_front_x = skyline_front_x - Math.abs(speed);
meteors_x = meteors_x - speed;
level_display_x = level_display_x - speed;
}
if (player_x < 240) {
player_x = 240;
skyline_back_x = skyline_back_x - (speed / 2);
skyline_front_x = skyline_front_x - speed;
meteors_x = meteors_x - speed;
level_display_x = level_display_x - speed;
}
if (skyline_back_x < -1139) {
skyline_back_x = 0;
}
if (0 < skyline_back_x) {
skyline_back_x = -1139;
}
if (skyline_front_x < -1459) {
skyline_front_x = 0;
}
if (0 < skyline_front_x) {
skyline_front_x = -1459;
}
if (meteors_x < -2535) {
meteors_x = 0;
}
if (0 < meteors_x) {
meteors_x = -2535;
}
MC_map.MC_player._x = 15 - (MC_gameboard.MC_meteors._x / 9);
MC_map.MC_player._y = 10 + (player_y / 10);
if (1 < health) {
MC_health_bar.gotoAndStop(50 - health);
}
MC_gameboard.MC_player._x = player_x;
MC_gameboard.MC_player._y = player_y;
if (rattlecounter == 0) {
MC_gameboard.MC_skyline_back._x = skyline_back_x;
MC_gameboard.MC_skyline_front._x = skyline_front_x;
MC_gameboard.MC_meteors._x = meteors_x;
}
displayScore(true);
MC_missed.gotoAndStop(missed + 1);
MC_gameboard.MC_leveltext._x = level_display_x;
hitcounter--;
if (hitcounter == 1) {
setdir = facing;
}
keycounter = 0;
if (hitcounter < 1) {
checkcounter = 0;
if (Key.isDown(81)) {
_root.gotoAndPlay("GameOver");
}
if ((Key.isDown(Key.Right) || (setdir == 0)) && (keycounter == 0)) {
keycounter++;
setdir = -1;
xgoal = 18;
facing = 0;
if (55 < MC_gameboard.MC_player._currentframe) {
MC_gameboard.MC_player.gotoAndPlay(1);
MC_map.MC_player.gotoAndPlay(1);
}
} else {
checkcounter++;
}
if ((Key.isDown(Key.Left) || (setdir == 2)) && (keycounter == 0)) {
keycounter++;
setdir = -1;
xgoal = -18;
facing = 1;
if (MC_gameboard.MC_player._currentframe < 56) {
MC_gameboard.MC_player.gotoAndPlay(56);
MC_map.MC_player.gotoAndPlay(56);
}
} else {
checkcounter++;
}
if (Key.isDown(Key.Shift)) {
if (facing == 0) {
xgoal = 46;
} else {
xgoal = -46;
}
} else {
if (facing == 0) {
xgoal = 22;
} else if (facing == 1) {
xgoal = -22;
}
checkcounter++;
}
if (Key.isDown(Key.Down) && (keycounter == 0)) {
keycounter++;
if (facing == 0) {
if ((player_frame < 11) || (13 < player_frame)) {
MC_gameboard.MC_player.gotoAndPlay(11);
MC_map.MC_player.gotoAndPlay(11);
}
} else if ((player_frame < 66) || (69 < player_frame)) {
MC_gameboard.MC_player.gotoAndPlay(66);
MC_map.MC_player.gotoAndPlay(66);
}
ygoal = 12;
} else if (Key.isDown(Key.Up) && (keycounter == 0)) {
keycounter++;
if (facing == 0) {
if ((player_frame < 7) || (10 < player_frame)) {
MC_gameboard.MC_player.gotoAndPlay(7);
MC_map.MC_player.gotoAndPlay(7);
}
} else if ((player_frame < 62) || (64 < player_frame)) {
MC_gameboard.MC_player.gotoAndPlay(62);
MC_map.MC_player.gotoAndPlay(62);
}
ygoal = -12;
} else {
checkcounter++;
ygoal = 0;
}
if (Key.isDown(Key.Space) && (keycounter == 0)) {
keycounter++;
if (facing == 0) {
if ((player_frame < 15) || (35 < player_frame)) {
MC_gameboard.MC_player.gotoAndPlay(15);
MC_map.MC_player.gotoAndPlay(15);
}
xgoal = 4;
} else {
if ((player_frame < 70) || (90 < player_frame)) {
MC_gameboard.MC_player.gotoAndPlay(70);
MC_map.MC_player.gotoAndPlay(70);
}
xgoal = -4;
}
heatdelay = 5;
} else {
if (facing == 0) {
if ((14 < player_frame) && (player_frame < 36)) {
MC_gameboard.MC_player.gotoAndPlay(5);
MC_map.MC_player.gotoAndPlay(5);
}
} else if ((69 < player_frame) && (player_frame < 91)) {
MC_gameboard.MC_player.gotoAndPlay(60);
MC_map.MC_player.gotoAndPlay(60);
}
checkcounter++;
heatdelay--;
}
if (checkcounter == 5) {
if (facing == 0) {
MC_gameboard.MC_player.gotoAndPlay(5);
} else {
MC_gameboard.MC_player.gotoAndPlay(60);
}
}
}
Frame 78
if (collected >= maxmeteors) {
gotoAndPlay ("LevelComplete");
} else if ((health < 2) || (99 < missed)) {
gotoAndPlay ("GameOver");
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 105
if (facing == 0) {
MC_gameboard.MC_player.gotoAndStop(1);
} else {
MC_gameboard.MC_player.gotoAndStop(56);
}
a = 0;
while (a < 17) {
tmpframe = eval ("MC_gameboard.MC_meteors.MC_meteor" add a)._currentframe;
if ((tmpframe == 2) || (tmpframe == 3)) {
eval ("MC_gameboard.MC_meteors.MC_meteor" add a).gotoAndPlay(7);
}
a++;
}
Frame 124
_root.iLevelPauseTimer.restartTimer();
Frame 125
if (3 < _root.iLevelPauseTimer.seconds()) {
_root.gLevel = ((_root.gLevel < 99) ? (_root.gLevel + 1) : 1);
_root.gotoAndPlay("NextLevel");
}
Frame 126
_root.gotoAndPlay(_currentframe - 1);
Frame 129
stopAllSounds();
tellTarget ("/hs_scripts") {
call("mGameOver");
};
Frame 147
displayScore(false);
stop();
Frame 153
stop();
Symbol 7 Button
on (press) {
startDrag ("");
}
on (release) {
stopDrag();
}
Symbol 8 Button
on (release) {
Set("/:gDebug", "");
}
Symbol 9 MovieClip Frame 1
if (/:gDebugMode == true) {
_x = 50;
}
Symbol 9 MovieClip Frame 5
stop();
Symbol 11 MovieClip Frame 1
loadMovie (/:gHSRoot_swf add "HSScripts.swf", "");
Symbol 11 MovieClip Frame 4
stop();
Symbol 17 MovieClip Frame 1
r = random(5) * 20;
gotoAndPlay(r);
Symbol 17 MovieClip Frame 33
stop();
Symbol 17 MovieClip Frame 40
r = random(5) * 20;
gotoAndPlay(r);
Symbol 17 MovieClip Frame 53
stop();
Symbol 17 MovieClip Frame 60
r = random(5) * 20;
gotoAndPlay(r);
Symbol 17 MovieClip Frame 73
stop();
Symbol 17 MovieClip Frame 80
r = random(5) * 20;
gotoAndPlay(r);
Symbol 17 MovieClip Frame 93
stop();
Symbol 18 MovieClip Frame 3
x = int(_xmouse);
y = int(_ymouse);
if ((x != lastx) || (y != lasty)) {
acounter++;
duplicateMovieClip ("logo", "logo" add acounter, 100 + acounter);
eval ("logo" add acounter)._x = x;
eval ("logo" add acounter)._y = y;
eval ("logo" add acounter).gotoAndPlay(2);
}
lastx = x;
lasty = y;
gotoAndPlay (2);
Symbol 54 MovieClip Frame 12
gotoAndPlay (2);
Symbol 71 MovieClip Frame 5
stop();
Symbol 71 MovieClip Frame 9
stop();
Symbol 71 MovieClip Frame 13
stop();
Symbol 71 MovieClip Frame 23
stop();
Symbol 71 MovieClip Frame 54
gotoAndPlay (1);
Symbol 71 MovieClip Frame 60
stop();
Symbol 71 MovieClip Frame 64
stop();
Symbol 71 MovieClip Frame 68
stop();
Symbol 71 MovieClip Frame 80
stop();
Symbol 71 MovieClip Frame 113
gotoAndPlay (56);
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 19
stop();
Symbol 112 MovieClip Frame 30
gotoAndStop (19);
Symbol 112 MovieClip Frame 38
gotoAndStop (19);
Symbol 136 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 53
stop();
Symbol 143 MovieClip Frame 30
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 154 Button
on (press) {
newGame();
}
Symbol 155 Button
on (press) {
play();
}
Symbol 187 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 2
if (_parent._currentframe < 65) {
gotoAndPlay (1);
}
Symbol 194 MovieClip Frame 22
gotoAndPlay (3);
Symbol 201 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 28
stop();
Symbol 216 Button
on (release) {
play();
}
Symbol 225 MovieClip Frame 4
stop();
Symbol 225 MovieClip Frame 9
stop();
Symbol 256 MovieClip Frame 41
stop();
Symbol 260 MovieClip Frame 1
_visible = 0;
Symbol 260 MovieClip Frame 5
stop();
Symbol 270 Button
on (press) {
newGame();
}