Frame 3
ifFrameLoaded (34) {
gotoAndPlay (6);
}
Frame 4
prevFrame();
Frame 14
ifFrameLoaded (37) {
gotoAndPlay (16);
}
Frame 15
prevFrame();
Frame 24
ifFrameLoaded (65) {
gotoAndPlay (26);
}
Frame 25
prevFrame();
Frame 33
stop();
Frame 34
fscommand ("allowscale", "false");
stop();
Frame 35
stop();
Frame 36
Set("/:score", "0");
Set("/:scoreString", "000000");
Set("/:playerLives", "3");
Set("/:enemyRows", "2");
Frame 37
Set("/:enemyMoveSpeed", "11.5");
Set("/:enemyGridDirection", "1");
Set("/:ufoDirection", "1");
Set("/:ufoTimer", "350" + (random("5") * "50"));
Frame 38
Set("/:enemyCount", "0");
tellTarget ("/lives") {
gotoAndStop(/:playerLives);
};
rowCount = "0";
while (rowCount < /:enemyRows) {
rowEnemy = "/enemyGrid/baseEnemy" add rowCount;
colCount = "0";
while (colCount < "6") {
n = ("6" * rowCount) + colCount;
duplicateMovieClip (rowEnemy, "enemy" add n, n);
setProperty("/enemyGrid/enemy" add n, _x , "100" + ("70" * colCount));
setProperty("/enemyGrid/enemy" add n, _y , "60" + ("50" * rowCount));
Set(("/enemyGrid/enemy" add n) add ":alive", "1");
Set("/:enemyCount", /:enemyCount + "1");
colCount = colCount + "1";
}
rowCount = rowCount + "1";
}
Set("/:numberEnemies", /:enemyCount);
Frame 39
Set("/:playerMoveDirection", "0");
Set("/:laserWait", "0");
Set("/:enemyLaserActive", "0");
Set("/:enemyMoveTimer", "0");
Set("/:ufoActive", "0");
setProperty("/player", _x , "300");
tellTarget ("/player") {
gotoAndStop (1);
}
Frame 40
nextFrame();
Frame 41
stop();
Frame 42
stop();
Frame 43
prevFrame();
Frame 47
removeMovieClip("laser");
removeMovieClip("enemyLaser");
removeMovieClip("UFO");
stop();
Frame 48
prevFrame();
Frame 51
removeMovieClip("laser");
removeMovieClip("enemyLaser");
removeMovieClip("UFO");
stop();
Frame 54
stop();
Frame 55
removeMovieClip("laser");
removeMovieClip("enemyLaser");
removeMovieClip("UFO");
stop();
Frame 58
stop();
Frame 59
removeMovieClip("laser");
removeMovieClip("enemyLaser");
removeMovieClip("UFO");
stop();
tellTarget ("Sound") {
gotoAndPlay ("dah dah");
}
Frame 62
stop();
Frame 63
removeMovieClip("laser");
removeMovieClip("enemyLaser");
removeMovieClip("UFO");
stop();
Frame 65
stop();
Symbol 27 Button
on (release) {
gotoAndPlay (36);
}
Symbol 31 Button
on (release) {
nextFrame();
}
Symbol 58 Button
on (release, keyPress "<Space>") {
nextFrame();
}
Symbol 70 Button
on (release, keyPress "<Space>") {
play();
}
Symbol 72 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 52
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 79 MovieClip Frame 42
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 82 MovieClip Frame 54
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 84 MovieClip Frame 53
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 86 MovieClip Frame 42
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 88 MovieClip Frame 44
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 90 MovieClip Frame 37
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 92 MovieClip Frame 43
tellTarget ("/stuff") {
gotoAndStop(random("8") + "1");
}
Symbol 93 MovieClip Frame 1
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 2
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 3
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 4
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 5
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 6
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 7
setProperty("/stuff", _x , random("580"));
stop();
Symbol 93 MovieClip Frame 8
setProperty("/stuff", _x , random("580"));
stop();
Symbol 95 MovieClip Frame 100
gotoAndPlay (1);
Symbol 106 MovieClip Frame 8
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 2
stop();
Symbol 107 MovieClip Frame 3
gotoAndPlay (1);
Symbol 107 MovieClip Frame 12
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 3
gotoAndPlay (1);
Symbol 110 MovieClip Frame 12
stop();
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 2
stop();
Symbol 113 MovieClip Frame 3
gotoAndPlay (1);
Symbol 113 MovieClip Frame 12
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 2
stop();
Symbol 116 MovieClip Frame 3
gotoAndPlay (1);
Symbol 116 MovieClip Frame 12
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Symbol 119 MovieClip Frame 3
gotoAndPlay (1);
Symbol 119 MovieClip Frame 12
stop();
Symbol 126 MovieClip Frame 4
gotoAndPlay (1);
Symbol 126 MovieClip Frame 17
stop();
removeMovieClip("/ufo");
Symbol 131 MovieClip Frame 4
gotoAndPlay (1);
Symbol 131 MovieClip Frame 17
stop();
removeMovieClip("/ufo");
Symbol 135 MovieClip Frame 4
gotoAndPlay (2);
Symbol 140 MovieClip Frame 4
gotoAndPlay (1);
Symbol 140 MovieClip Frame 17
stop();
removeMovieClip("/ufo");
Symbol 144 MovieClip Frame 4
gotoAndPlay (2);
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 10
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 11
gotoAndStop (1);
Symbol 148 MovieClip Frame 20
gotoAndStop (1);
Symbol 148 MovieClip Frame 31
gotoAndStop (1);
Symbol 148 MovieClip Frame 61
gotoAndStop (1);
Symbol 149 Button
on (keyPress "<Space>") {
play();
}
Symbol 153 Button
on (keyPress "<Right>") {
if (/:playerMoveDirection < "1") {
Set("/:playerMoveDirection", "1");
}
}
on (keyPress "<Left>") {
if ((-"1") < /:playerMoveDirection) {
Set("/:playerMoveDirection", -"1");
}
}
on (keyPress "<Down>") {
Set("/:playerMoveDirection", "0");
}
on (keyPress "<Space>") {
if (/:laserWait == "0") {
duplicateMovieClip ("/baseLaser", "laser", "1");
setProperty("/laser", _x , getProperty("/player", _x));
setProperty("/laser", _y , "355");
Set("/:laserWait", "1");
}
}
on (keyPress "c") {
if (/:playerLives < "4") {
Set("/:playerLives", /:playerLives + "1");
tellTarget ("/lives") {
gotoAndStop(/:playerLives);
};
}
}
Symbol 155 MovieClip Frame 1
Set("/:ufoTimer", /:ufoTimer + "1");
enemyGridXPos = getProperty("/enemyGrid", _x);
enemyGridYPos = getProperty("/enemyGrid", _y);
call("PlayerMove");
call("EnemyMoveTimer");
call("EnemyFire");
call("LaserMove");
call("EnemyLaserMove");
call("UFOTimer");
Symbol 155 MovieClip Frame 2
gotoAndPlay (1);
Symbol 155 MovieClip Frame 5
playerXPos = getProperty("/player", _x) + (/:playerMoveDirection * "8");
if (playerXPos < "100") {
playerXPos = "100";
Set("/:playerMoveDirection", "0");
}
if ("500" < playerXPos) {
playerXPos = "500";
Set("/:playerMoveDirection", "0");
}
setProperty("/player", _x , playerXPos);
Symbol 155 MovieClip Frame 15
if (/:enemyMoveTimer >= /:enemyMoveSpeed) {
Set("/:enemyMoveTimer", "0");
call("EnemyMove");
} else {
Set("/:enemyMoveTimer", /:enemyMoveTimer + "1");
}
Symbol 155 MovieClip Frame 25
enemyTurn = "0";
enemyLanded = "0";
enemyCount = "0";
while (enemyCount < /:numberEnemies) {
if (eval (("/enemyGrid/enemy" add enemyCount) add ":alive") == "1") {
tellTarget ("/enemyGrid/enemy" add enemyCount) {
play();
};
enemyYPos = getProperty("/enemyGrid/enemy" add enemyCount, _y) + enemyGridYPos;
if (enemyYPos >= "335") {
enemyLanded = "1";
}
enemyXPos = getProperty("/enemyGrid/enemy" add enemyCount, _x) + enemyGridXPos;
if ((("30" >= enemyXPos) and (/:enemyGridDirection == (-"1"))) or ((enemyXPos >= "570") and (/:enemyGridDirection == "1"))) {
enemyTurn = "1";
}
}
enemyCount = enemyCount + "1";
}
if (enemyTurn == "1") {
if (enemyLanded == "1") {
setProperty("/enemyGrid", _y , enemyGridYPos + "40");
call("EnemyLand");
} else {
setProperty("/enemyGrid", _y , enemyGridYPos + "25");
Set("/:enemyGridDirection", /:enemyGridDirection * (-"1"));
}
} else {
setProperty("/enemyGrid", _x , enemyGridXPos + ("10" * /:enemyGridDirection));
}
Symbol 155 MovieClip Frame 35
if (/:enemyLaserActive == "0") {
tellTarget ("/Sound") {
gotoAndPlay ("laser sound");
};
enemyFireNum = "0";
call("ChooseEnemyFire");
duplicateMovieClip ("/baseEnemyLaser", "enemyLaser", "2");
setProperty("/enemyLaser", _x , getProperty("/enemyGrid", _x) + getProperty("/enemyGrid/enemy" add enemyFireNum, _x));
setProperty("/enemyLaser", _y , (getProperty("/enemyGrid", _y) + getProperty("/enemyGrid/enemy" add enemyFireNum, _y)) + "10");
Set("/:enemyLaserActive", "1");
}
Symbol 155 MovieClip Frame 45
column = int((playerXPos - "111") / "65");
if (column == "0") {
column = column + random("2");
} else if (column == "5") {
column = column - random("2");
} else {
column = (column + random("3")) - "1";
}
foundEnemy = "0";
rowCount = /:enemyRows - "1";
while (foundEnemy == "0") {
while (rowCount >= "0") {
enemyNum = column + ("6" * rowCount);
if (eval (("/enemyGrid/enemy" add enemyNum) add ":alive") == "1") {
enemyFireNum = enemyNum;
foundEnemy = "1";
rowCount = -"1";
}
rowCount = rowCount - "1";
}
if (foundEnemy == "0") {
column = random("6");
rowCount = "3";
}
}
Symbol 155 MovieClip Frame 55
if (/:laserWait == "1") {
laserYPos = getProperty("/laser", _y);
if (laserYPos < "0") {
Set("/:laserWait", "0");
removeMovieClip("/laser");
} else {
setProperty("/laser", _y , laserYPos - "15");
call("LaserHit");
}
}
Symbol 155 MovieClip Frame 65
lXPos = getProperty("/laser", _x);
lYPos = getProperty("/laser", _y);
eCount = "0";
while (eCount < /:numberEnemies) {
if (eval (("/enemyGrid/enemy" add eCount) add ":alive") == "1") {
eXPos = getProperty("/enemyGrid/enemy" add eCount, _x) + enemyGridXPos;
eYPos = getProperty("/enemyGrid/enemy" add eCount, _y) + enemyGridYPos;
if (((((-"20") < (lXPos - eXPos)) and ((lXPos - eXPos) < "20")) and ((-"20") < (lYPos - eYPos))) and ((lYPos - eYPos) < "20")) {
tellTarget ("/enemyGrid/enemy" add eCount) {
gotoAndPlay ("die");
};
call("HitEnemy");
}
}
eCount = eCount + "1";
}
if (/:ufoActive == "1") {
ufoXPos = getProperty("/ufo", _x);
if (((((-"20") < (lXPos - ufoXPos)) and ((lXPos - ufoXPos) < "20")) and ("5" < lYPos)) and (lYPos < "35")) {
call("HitUFO");
}
}
Symbol 155 MovieClip Frame 75
removeMovieClip("/laser");
Set(("/enemyGrid/enemy" add eCount) add ":alive", "0");
Set("/:laserWait", "0");
Set("/:enemyMoveSpeed", /:enemyMoveSpeed - "0.5");
Set("/:enemyCount", /:enemyCount - "1");
Set("/:score", /:score + "400");
call("UpdateScoreString");
if ("0" >= /:enemyCount) {
call("PlayerWin");
}
Symbol 155 MovieClip Frame 85
if (/:enemyLaserActive == "1") {
eLaserYPos = getProperty("/enemyLaser", _y);
if ("410" < eLaserYPos) {
Set("/:enemyLaserActive", "0");
removeMovieClip("/enemyLaser");
} else {
setProperty("/enemyLaser", _y , eLaserYPos + "10");
call("EnemyLaserHit");
}
}
Symbol 155 MovieClip Frame 95
elXPos = getProperty("/enemyLaser", _x);
elYPos = getProperty("/enemyLaser", _y);
pXPos = getProperty("/player", _x);
if (((((-"15") < (elXPos - pXPos)) and ((elXPos - pXPos) < "15")) and ("360" < elYPos)) and (elYPos < "400")) {
call("HitPlayer");
}
Symbol 155 MovieClip Frame 105
removeMovieClip("/enemyLaser");
Set("/:enemyLaserActive", "0");
call("PlayerDie");
Symbol 155 MovieClip Frame 115
if ((/:ufoTimer >= "800") and ("2" < /:enemyCount)) {
Set("/:ufoTimer", random("5") * (-"50"));
call("CreateUFO");
}
if (/:ufoActive == "1") {
call("MoveUFO");
}
Symbol 155 MovieClip Frame 125
Set("/:ufoCount", /:ufoCount + "1");
Set("/:ufoActive", "1");
Set("/:ufoDirection", random("2"));
if (/:ufoDirection == "0") {
Set("/:ufoDirection", -"1");
leftorright = "right";
}
if (/:ufoDirection == (-"1")) {
duplicateMovieClip ("/baseUFO1", "ufo", "3");
} else {
duplicateMovieClip ("/baseUFO2", "ufo", "3");
}
setProperty("/ufo", _x , "300" + ((-"330") * /:ufoDirection));
setProperty("/ufo", _y , "20");
Symbol 155 MovieClip Frame 135
setProperty("/ufo", _x , getProperty("/ufo", _x) + ("5" * /:ufoDirection));
if ((getProperty("/ufo", _x) < (-"30")) or ("630" < getProperty("/ufo", _x))) {
removeMovieClip("/ufo");
Set("/:ufoActive", "0");
}
Symbol 155 MovieClip Frame 145
removeMovieClip("/laser");
tellTarget ("/ufo") {
gotoAndPlay ("die");
};
Set("/:ufoActive", "0");
Set("/:laserWait", "0");
if (/:playerLives < "4") {
Set("/:playerLives", /:playerLives + "1");
tellTarget ("/lives") {
gotoAndStop(/:playerLives);
};
}
Set("/:score", /:score + "1000");
call("UpdateScoreString");
Symbol 155 MovieClip Frame 155
Set("/:score", /:score + "2400");
call("UpdateScoreString");
if (/:enemyRows < "5") {
Set("/:enemyRows", /:enemyRows + "1");
tellTarget ("/") {
gotoAndPlay ("PlayerWin");
};
} else {
tellTarget ("/") {
gotoAndPlay ("PlayerFinish");
};
}
Symbol 155 MovieClip Frame 165
tellTarget ("/player") {
gotoAndPlay ("die");
};
if ("1" >= /:playerLives) {
call("PlayerLose");
} else {
Set("/:playerLives", /:playerLives - "1");
tellTarget ("/lives") {
gotoAndStop(/:playerLives);
};
tellTarget ("/") {
gotoAndPlay ("PlayerDie");
};
}
Symbol 155 MovieClip Frame 175
Set("/:score", /:score + "2400");
if (/:score < "0") {
Set("/:score", "0");
}
call("UpdateScoreString");
if ("1" >= /:playerLives) {
call("PlayerLose");
} else {
Set("/:playerLives", /:playerLives - "1");
tellTarget ("/lives") {
gotoAndStop(/:playerLives);
};
tellTarget ("/") {
gotoAndPlay ("EnemyLand");
};
}
Symbol 155 MovieClip Frame 185
tellTarget ("/") {
gotoAndPlay ("PlayerLose");
}
Symbol 155 MovieClip Frame 195
if (/:score < "10") {
Set("/:scoreString", "00000" add /:score);
} else if (/:score < "100") {
Set("/:scoreString", "0000" add /:score);
} else if (/:score < "1000") {
Set("/:scoreString", "000" add /:score);
} else if (/:score < "10000") {
Set("/:scoreString", "00" add /:score);
} else if (/:score < "100000") {
Set("/:scoreString", "0" add /:score);
}
Symbol 157 Button
on (release, keyPress "<Space>") {
gotoAndPlay (39);
}
Symbol 159 Button
on (release, keyPress "<Space>") {
gotoAndPlay (37);
}
Symbol 164 Button
on (release, keyPress "<Space>") {
gotoAndPlay (36);
}