Frame 1
function MakeConstsAndVariables() {
NOTHING = "0";
GRASS = "1";
STONES = "2";
METAL1 = "3";
METAL2 = "4";
METAL3 = "5";
METAL4 = "6";
METAL5 = "7";
METAL6 = "8";
MAN = "p";
ROBO1 = "r";
ROBO2 = "t";
ROBO3 = "y";
ROBO4 = "u";
ROBO5 = "i";
ROBO6 = "o";
ROBO7 = "l";
ROBO8 = "k";
ROBO9 = "j";
EXIT1 = "e";
EXIT2 = "w";
BONUSSHIELD = "m";
BONUSMATRIX = "n";
BONUSLIFE = "b";
BONUSROCKET = "v";
BONUSFUGAS = "c";
BONUSCANNON = "x";
ExitCol = 0;
matrix = 0;
Cannon = 0;
if (HardLevel == "novice") {
RocketCol = 10;
}
if (HardLevel == "expert") {
RocketCol = 8;
}
if (HardLevel == "master") {
RocketCol = 4;
}
if (HardLevel == "novice") {
FugasCol = 7;
}
if (HardLevel == "expert") {
FugasCol = 6;
}
if (HardLevel == "master") {
FugasCol = 5;
}
POLYH = 34;
POLYW = 34;
NUMBERX = 11;
NUMBERY = 11;
LEFT = Key.LEFT;
RIGHT = Key.RIGHT;
UP = Key.UP;
DOWN = Key.DOWN;
FIRE = 122;
ROCKET_FIRE = 120;
FUGAS_FIRE = 99;
d = 4;
depth = 0;
herodepth = 99999 /* 0x01869F */;
nothing = 1;
moveright = 0;
moveleft = 0;
moveup = 0;
movedown = 0;
FireMode = 0;
FireFramesD = 3;
FireCurFrame = 0;
BulletN = 0;
BulletSpeed = 25;
RocketCond = 0;
FugasFrame = 0;
numberstones = 0;
CurrentLevel = 1;
RealLevel = 1;
if (HardLevel == "novice") {
HeroLives = 4;
}
if (HardLevel == "expert") {
HeroLives = 3;
}
if (HardLevel == "master") {
HeroLives = 2;
}
HeroScoreForLife = 500;
HeroStartScoreForLife = 500;
HeroState = 0;
HeroFramesBlink = 100;
HeroRotate = "left";
HeroExplode = false;
AviableScore = 0;
HintNumber = 0;
HintDepth = 4000;
PauseMode = 0;
}
function CreateArray() {
field = new Array();
x = 0;
while (x < NUMBERX) {
field[x] = new Array();
x++;
}
}
function LevelToArray(levelnumber) {
var x;
var y;
CreateLevels(levelnumber);
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
field[x][y] = _root["lev" + y].subString(x, x + 1);
y++;
}
x++;
}
}
function RemoveFuel() {
removeMovieClip(_root.game.mask.fuel);
}
function GotoNextLevel() {
UnloadCurrentLevel();
RealLevel++;
Robocol = 0;
HintNumber = 0;
SymbolNumber = 0;
_root.score.sc = _root.score.sc + (RealLevel * 200);
_root.AviableScore = _root.AviableScore + (RealLevel * 200);
_root.CheckExtraLife();
if ((0 < DemoMode) && (3 < RealLevel)) {
RealLevel = 1;
_root.ammo.rocket = 10;
_root.ammo.fugas = 7;
_root.score.sc = 0;
_root.AviableScore = 0;
}
LevelToArray(RealLevel);
}
function UnloadGrass() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == GRASS) {
removeMovieClip(_root.game.mask["grass_mc" + counter]);
counter++;
}
y++;
}
x++;
}
}
function UnloadStones() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (((((((field[x][y] == STONES) || (field[x][y] == METAL1)) || (field[x][y] == METAL2)) || (field[x][y] == METAL3)) || (field[x][y] == METAL4)) || (field[x][y] == METAL5)) || (field[x][y] == METAL6)) {
removeMovieClip(_root.game.mask["stones_mc" + counter]);
counter++;
}
y++;
}
x++;
}
}
function UnloadCurrentLevel() {
UnloadGrass();
UnloadStones();
RemoveAllRobots();
}
function RemoveAllRobots() {
var i;
i = 1;
while (Robocol >= i) {
_root.game.mask["robo_" + i].removeMovieClip();
i++;
}
Robocol = 0;
i = 0;
while (ExitCol >= i) {
_root.game.mask["exit_" + i].removeMovieClip();
i++;
}
ExitCol = 0;
i = 0;
while (BulletN >= i) {
_root.game.mask["bullet_" + i].removeMovieClip();
i++;
}
BulletN = 0;
}
function LoadMassiveToField() {
RefreshLevel();
LoadRocket();
LoadGrass();
LoadStones();
LoadRobots();
LoadBonuses();
LoadExit();
PlaceSpaceMan();
}
function LoadBonuses() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == BONUSSHIELD) {
Robocol++;
_root.game.mask.attachMovie("bonusshield", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x * POLYW;
_root.game.mask["robo_" + Robocol]._y = y * POLYH;
}
if (field[x][y] == BONUSMATRIX) {
Robocol++;
_root.game.mask.attachMovie("bonusmatrix", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x * POLYW;
_root.game.mask["robo_" + Robocol]._y = y * POLYH;
}
if (field[x][y] == BONUSLIFE) {
Robocol++;
_root.game.mask.attachMovie("bonuslife", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x * POLYW;
_root.game.mask["robo_" + Robocol]._y = y * POLYH;
}
if (field[x][y] == BONUSROCKET) {
Robocol++;
_root.game.mask.attachMovie("bonusrocket", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x * POLYW;
_root.game.mask["robo_" + Robocol]._y = y * POLYH;
}
if (field[x][y] == BONUSFUGAS) {
Robocol++;
_root.game.mask.attachMovie("bonusfugas", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x * POLYW;
_root.game.mask["robo_" + Robocol]._y = y * POLYH;
}
if (field[x][y] == BONUSCANNON) {
Robocol++;
_root.game.mask.attachMovie("bonuscannon", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x * POLYW;
_root.game.mask["robo_" + Robocol]._y = y * POLYH;
}
y++;
}
x++;
}
}
function LoadRobots() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == ROBO1) {
AttachRobo1(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO2) {
AttachRobo2(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO3) {
AttachRobo3(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO4) {
AttachRobo4(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO5) {
AttachRobo5(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO6) {
AttachRobo6(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO7) {
AttachRobo7(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO8) {
AttachRobo8(x * POLYW, y * POLYH);
}
if (field[x][y] == ROBO9) {
AttachRobo9(x * POLYW, y * POLYH);
}
y++;
}
x++;
}
}
function LoadExit() {
var x;
var y;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == EXIT1) {
AttachExit1(x * POLYW, y * POLYH);
}
if (field[x][y] == EXIT2) {
AttachExit2(x * POLYW, y * POLYH);
}
y++;
}
x++;
}
}
function AttachExit1(x, y) {
ExitCol++;
_root.game.mask.attachMovie("exit1", "exit_" + ExitCol, herodepth--);
_root.game.mask["exit_" + ExitCol]._x = x;
_root.game.mask["exit_" + ExitCol]._y = y;
}
function AttachExit2(x, y) {
ExitCol++;
_root.game.mask.attachMovie("exit2", "exit_" + ExitCol, herodepth--);
_root.game.mask["exit_" + ExitCol]._x = x;
_root.game.mask["exit_" + ExitCol]._y = y;
}
function AttachGrass(i, x, y) {
_root.game.mask.attachMovie("grass_mc", "grass_mc" + i, depth++);
_root.game.mask["grass_mc" + i]._x = x * POLYW;
_root.game.mask["grass_mc" + i]._y = y * POLYH;
}
function PlaceSpaceMan() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == MAN) {
_root.game.mask.man._x = x * POLYW;
_root.game.mask.man._y = y * POLYH;
_root.game.mask.man._visible = true;
}
y++;
}
x++;
}
}
function LoadGrass() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == GRASS) {
AttachGrass(counter, x, y);
counter++;
}
y++;
}
x++;
}
}
function AttachStones(i, x, y) {
_root.game.mask.attachMovie("stones_mc", "stones_mc" + i, depth++);
_root.game.mask["stones_mc" + i]._x = x * POLYW;
_root.game.mask["stones_mc" + i]._y = y * POLYH;
_root.game.mask["stones_mc" + i]._visible = true;
}
function LoadStones() {
var x;
var y;
var counter = 0;
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == STONES) {
AttachStones(counter, x, y);
counter++;
}
if (field[x][y] == METAL1) {
_root.game.mask.attachMovie("metal1", "stones_mc" + counter, depth++);
_root.game.mask["stones_mc" + counter]._x = x * POLYW;
_root.game.mask["stones_mc" + counter]._y = y * POLYH;
_root.game.mask["stones_mc" + counter]._visible = true;
counter++;
}
if (field[x][y] == METAL2) {
_root.game.mask.attachMovie("metal3", "stones_mc" + counter, depth++);
_root.game.mask["stones_mc" + counter]._x = x * POLYW;
_root.game.mask["stones_mc" + counter]._y = y * POLYH;
_root.game.mask["stones_mc" + counter]._visible = true;
counter++;
}
if (field[x][y] == METAL3) {
_root.game.mask.attachMovie("metal4", "stones_mc" + counter, depth++);
_root.game.mask["stones_mc" + counter]._x = x * POLYW;
_root.game.mask["stones_mc" + counter]._y = y * POLYH;
_root.game.mask["stones_mc" + counter]._visible = true;
counter++;
}
if (field[x][y] == METAL4) {
_root.game.mask.attachMovie("metal2", "stones_mc" + counter, depth++);
_root.game.mask["stones_mc" + counter]._x = x * POLYW;
_root.game.mask["stones_mc" + counter]._y = y * POLYH;
_root.game.mask["stones_mc" + counter]._visible = true;
counter++;
}
if (field[x][y] == METAL5) {
_root.game.mask.attachMovie("metal6", "stones_mc" + counter, depth++);
_root.game.mask["stones_mc" + counter]._x = x * POLYW;
_root.game.mask["stones_mc" + counter]._y = y * POLYH;
_root.game.mask["stones_mc" + counter]._visible = true;
counter++;
}
if (field[x][y] == METAL6) {
_root.game.mask.attachMovie("metal5", "stones_mc" + counter, depth++);
_root.game.mask["stones_mc" + counter]._x = x * POLYW;
_root.game.mask["stones_mc" + counter]._y = y * POLYH;
_root.game.mask["stones_mc" + counter]._visible = true;
counter++;
}
y++;
}
x++;
}
numberstones = counter;
}
function AttachGame() {
_root.attachMovie("game", "game", depth++);
_root.game._x = 0;
_root.game._y = 0;
_root.game._height = POLYH * NUMBERY;
_root.game._width = POLYW * NUMBERX;
}
function AttachPlayer() {
_root.game.mask.attachMovie("man", "man", herodepth--);
_root.game.mask.man._x = (POLYW * NUMBERX) / 2;
_root.game.mask.man._y = 100;
}
function RemoveRobots() {
RemoveRobos1();
RemoveRobos2();
RemoveRobos3();
RemoveRobos4();
RemoveRobos5();
RemoveRobos6();
RemoveRobos7();
}
function UnloadRobots() {
UnloadRobos1();
UnloadRobos2();
UnloadRobos3();
UnloadRobos4();
UnloadRobos5();
UnloadRobos6();
UnloadRobos7();
CheckExtraLife();
}
function RemoveRobos1() {
var i;
i = 0;
while (i < ROBO1COL) {
removeMovieClip(_root.game.mask["robo1_" + i]);
i++;
}
}
function RemoveRobos2() {
var i;
i = 0;
while (i < ROBO2COL) {
removeMovieClip(_root.game.mask["robo2_" + i]);
i++;
}
}
function RemoveRobos3() {
var i;
i = 0;
while (i < ROBO3COL) {
removeMovieClip(_root.game.mask["robo3_" + i]);
i++;
}
}
function RemoveRobos4() {
var i;
i = 0;
while (i < ROBO4COL) {
removeMovieClip(_root.game.mask["robo4_" + i]);
i++;
}
}
function RemoveRobos5() {
var i;
i = 0;
while (i < ROBO5COL) {
removeMovieClip(_root.game.mask["robo5_" + i]);
i++;
}
}
function RemoveRobos6() {
var i;
i = 0;
while (i < ROBO6COL) {
removeMovieClip(_root.game.mask["robo6_" + i]);
i++;
}
}
function RemoveRobos7() {
var i;
i = 0;
while (i < ROBO7COL) {
removeMovieClip(_root.game.mask["robo7_" + i]);
i++;
}
}
function UnloadRobos1() {
var i;
i = 0;
while (i < ROBO1COL) {
if (SoundState == "on") {
explode_snd.start();
}
_root.game.mask["robo1_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function UnloadRobos2() {
var i;
i = 0;
while (i < ROBO2COL) {
if (SoundState == "on") {
explode_snd.start();
}
_root.game.mask["robo2_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function UnloadRobos3() {
var i;
i = 0;
while (i < ROBO3COL) {
if (SoundState == "on") {
explode_snd.start();
}
_root.game.mask["robo3_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function UnloadRobos4() {
var i;
i = 0;
while (i < ROBO4COL) {
if (SoundState == "on") {
explode_snd.start();
}
_root.game.mask["robo4_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function UnloadRobos5() {
var i;
i = 0;
while (i < ROBO5COL) {
if (SoundState == "on") {
explode_snd.start();
}
_root.game.mask["robo5_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function UnloadRobos6() {
var i;
i = 0;
while (i < ROBO6COL) {
if (SoundState == "on") {
explode_snd.start();
}
_root.score.sc = _root.score.sc + _root.robo6score;
_root.AviableScore = _root.AviableScore + _root.robo6score;
_root.game.mask["robo6_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function UnloadRobos7() {
var i;
i = 0;
while (i < ROBO7COL) {
_root.score.sc = _root.score.sc + _root.robo7score;
_root.AviableScore = _root.AviableScore + _root.robo7score;
if (SoundState == "on") {
explode_snd.start();
}
_root.game.mask["robo7_" + i].rb.gotoAndStop("RoboExplode");
i++;
}
}
function AttachRobo1(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo1", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x + 1;
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].dy = 2.5;
_root.game.mask["robo_" + Robocol].score = 0;
}
function AttachRobo2(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo2", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x + 1;
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].dy = 5;
_root.game.mask["robo_" + Robocol].mode = "stop";
_root.game.mask["robo_" + Robocol].immortal = true;
_root.game.mask["robo_" + Robocol].score = 30;
_root.game.mask["robo_" + Robocol].sleep = 0;
}
function AttachRobo3(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo3", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x + 1;
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].dy = 5;
_root.game.mask["robo_" + Robocol].mode = "stop";
_root.game.mask["robo_" + Robocol].immortal = true;
_root.game.mask["robo_" + Robocol].score = 50;
_root.game.mask["robo_" + Robocol].sleep = 0;
}
function AttachRobo4(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo4", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x + 1;
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].counter = 0;
_root.game.mask["robo_" + Robocol].minfrequency = 60;
_root.game.mask["robo_" + Robocol].maxfrequency = 80;
}
function AttachRobo5(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo5", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x + 1;
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].counter = 0;
_root.game.mask["robo_" + Robocol].minfrequency = 60;
_root.game.mask["robo_" + Robocol].maxfrequency = 80;
}
function AttachRobo6(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo6", "robo_" + Robocol, herodepth--);
if (x < ((POLYW * NUMBERY) / 2)) {
_root.game.mask["robo_" + Robocol]._x = -_root.game.mask["robo_" + Robocol]._width;
_root.game.mask["robo_" + Robocol].dx = 5;
_root.game.mask["robo_" + Robocol].mc.gotoAndStop("right");
_root.game.mask["robo_" + Robocol].rotation = "right";
} else {
_root.game.mask["robo_" + Robocol]._x = (POLYW * NUMBERX) + _root.game.mask["robo_" + Robocol]._width;
_root.game.mask["robo_" + Robocol].dx = -5;
_root.game.mask["robo_" + Robocol].mc.gotoAndStop("left");
_root.game.mask["robo_" + Robocol].rotation = "left";
}
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].x = _root.game.mask["robo_" + Robocol]._x;
_root.game.mask["robo_" + Robocol].y = _root.game.mask["robo_" + Robocol]._y;
_root.game.mask["robo_" + Robocol].dy = 2;
_root.game.mask["robo_" + Robocol].counter = 0;
_root.game.mask["robo_" + Robocol].frequency = 10;
var k = random(3);
_root.game.mask["robo_" + Robocol].kind = k;
_root.game.mask["robo_" + Robocol].immortal = false;
_root.game.mask["robo_" + Robocol].outdoors = true;
_root.game.mask["robo_" + Robocol].mode = "fly";
_root.game.mask["robo_" + Robocol].sleep = 5;
_root.game.mask["robo_" + Robocol].score = 30;
}
function AttachRobo7(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo7", "robo_" + Robocol, herodepth--);
if (x < ((POLYW * NUMBERY) / 2)) {
_root.game.mask["robo_" + Robocol]._x = -_root.game.mask["robo_" + Robocol]._width;
_root.game.mask["robo_" + Robocol].dx = 5;
_root.game.mask["robo_" + Robocol].mc.gotoAndStop("right");
_root.game.mask["robo_" + Robocol].rotation = "right";
} else {
_root.game.mask["robo_" + Robocol]._x = (POLYW * NUMBERX) + _root.game.mask["robo_" + Robocol]._width;
_root.game.mask["robo_" + Robocol].dx = -5;
_root.game.mask["robo_" + Robocol].mc.gotoAndStop("left");
_root.game.mask["robo_" + Robocol].rotation = "left";
}
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].x = _root.game.mask["robo_" + Robocol]._x;
_root.game.mask["robo_" + Robocol].y = _root.game.mask["robo_" + Robocol]._y;
_root.game.mask["robo_" + Robocol].dy = 2;
_root.game.mask["robo_" + Robocol].counter = 0;
_root.game.mask["robo_" + Robocol].frequency = 10;
var k = random(3);
_root.game.mask["robo_" + Robocol].kind = k;
_root.game.mask["robo_" + Robocol].immortal = false;
_root.game.mask["robo_" + Robocol].outdoors = true;
_root.game.mask["robo_" + Robocol].mode = "fly";
_root.game.mask["robo_" + Robocol].fired = "fly";
_root.game.mask["robo_" + Robocol].sleep = 8;
_root.game.mask["robo_" + Robocol].score = 50;
}
function AttachRobo8(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo8", "robo_" + Robocol, herodepth--);
if (x < ((POLYW * NUMBERY) / 2)) {
_root.game.mask["robo_" + Robocol]._x = -_root.game.mask["robo_" + Robocol]._width;
_root.game.mask["robo_" + Robocol].dx = 5;
_root.game.mask["robo_" + Robocol].mc.gotoAndStop("right");
_root.game.mask["robo_" + Robocol].rotation = "right";
} else {
_root.game.mask["robo_" + Robocol]._x = (POLYW * NUMBERX) + _root.game.mask["robo_" + Robocol]._width;
_root.game.mask["robo_" + Robocol].dx = -5;
_root.game.mask["robo_" + Robocol].mc.gotoAndStop("left");
_root.game.mask["robo_" + Robocol].rotation = "left";
}
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].x = _root.game.mask["robo_" + Robocol]._x;
_root.game.mask["robo_" + Robocol].y = _root.game.mask["robo_" + Robocol]._y;
_root.game.mask["robo_" + Robocol].dy = 2;
_root.game.mask["robo_" + Robocol].counter = 0;
_root.game.mask["robo_" + Robocol].frequency = 10;
var k = random(3);
_root.game.mask["robo_" + Robocol].kind = k;
_root.game.mask["robo_" + Robocol].immortal = false;
_root.game.mask["robo_" + Robocol].outdoors = true;
_root.game.mask["robo_" + Robocol].mode = "fly";
_root.game.mask["robo_" + Robocol].fired = "fly";
_root.game.mask["robo_" + Robocol].sleep = 8;
_root.game.mask["robo_" + Robocol].score = 80;
}
function AttachRobo9(x, y) {
Robocol++;
_root.game.mask.attachMovie("robo9", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = x + 1;
_root.game.mask["robo_" + Robocol]._y = y;
_root.game.mask["robo_" + Robocol].immortal = false;
_root.game.mask["robo_" + Robocol].score = 0;
}
function CheckForHitStoneRobos(mc) {
var n;
var k;
n = numberstones;
k = 0;
while (k < n) {
if (mc.hittest(game.mask["stones_mc" + k]) == true) {
return(true);
}
k++;
}
return(false);
}
function AttachSounds() {
fire_snd = new Sound(this);
fire_snd.attachSound("fire");
hit_snd = new Sound(this);
hit_snd.attachSound("hit");
explode_snd = new Sound(this);
explode_snd.attachSound("robo_explode");
hero_explode = new Sound(this);
hero_explode.attachSound("hero_explode");
fugas_hit = new Sound(this);
fugas_hit.attachSound("fugas_hit");
fugas_shoot = new Sound(this);
fugas_shoot.attachSound("fugas_shoot");
rocket_hit = new Sound(this);
rocket_hit.attachSound("fugas_hit");
rocket_shoot = new Sound(this);
rocket_shoot.attachSound("rocket_shoot");
}
function RefreshLevel() {
_root.level.level_number = RealLevel;
}
function GameOverCheck() {
if (_root.live.lives_num == 0) {
_root.game.removeMovieClip();
OpenedWindow = 1;
attachMovie("game_over", "game_over", 1000);
_root.game_over._x = 187.5 - (game_over._width / 2);
_root.game_over._y = 187.5 - (game_over._height / 2);
return(true);
}
return(false);
}
function AttachButtonsAndCaptions() {
_root.live.lives_num = HeroLives;
}
function AttachDemomode() {
attachMovie("demomodeon", "demomodeon", 900);
_root.demomodeon._x = 187.5 - (demomodeon._width / 2);
_root.demomodeon._y = 375 - (demomodeon._height * 2);
attachMovie("pauseon", "pauseon", 901);
_root.pauseon._x = 187.5 - (pauseon._width / 2);
_root.pauseon._y = 187.5;
_root.pauseon._visible = false;
}
function AttachHint(s, x, y) {
attachMovie("hint", "hint_" + HintNumber, HintDepth++);
_root["hint_" + HintNumber]._x = x;
_root["hint_" + HintNumber]._y = y;
_root["hint_" + HintNumber].text = s;
HintNumber++;
}
function MinusLife() {
_root.live.lives_num--;
if (!GameOverCheck()) {
PlaceSpaceMan();
RecreateRobots();
_root.game.mask.matrix.removeMovieClip();
_root.game.mask.man.mc.prevFrame();
_root.game.mask.man.mc.prevFrame();
matrix = 0;
HeroState = 25;
HeroExplode = false;
Cannon = 0;
}
}
function Explode() {
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
if (SoundState == "on") {
hero_explode.start();
}
HeroExplode = true;
}
function CheckExtraLife() {
if (HardLevel == "novice") {
if (AviableScore >= 1000) {
_root.live.lives_num++;
AviableScore = 0;
}
} else if (HardLevel == "expert") {
if (AviableScore >= 2000) {
_root.live.lives_num++;
AviableScore = AviableScore - HeroScoreForLife;
}
} else if (HardLevel == "master") {
if (AviableScore >= 4000) {
_root.live.lives_num++;
AviableScore = AviableScore - HeroScoreForLife;
}
}
}
function initalization() {
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
_quality = "BEST";
quality = "hight";
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
VisibleRobots();
_root.ammo.rocket = RocketCol;
_root.ammo.fugas = FugasCol;
AttachDemoMode();
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
function AbsLink() {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + (("/?r=" + GetPrefix()) + "cyb");
getURL (sd, "blank");
}
function SendResult() {
var stSend = ((((((((_root.score + "\t") + 0) + "\t") + stName) + "\t") + "cyb") + "\t") + "web");
getURL ("http://absolutist.com/cgi-bin/gameres.pl?g=cyb&e=" + _root.Crypto(stSend), "blank");
_root.gotoAndPlay(4);
}
function LinkPC() {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + (("/boa/?r=" + GetPrefix()) + "cyb");
getURL (sd, "blank");
}
function GetPrefix() {
return(_root._url.charAt(_root._url.length - 3));
}
function CreateLevels(level) {
if (level == 1) {
lev0 = "00003030000";
lev1 = "00003040000";
lev2 = "ee003000000";
lev3 = "we003050000";
lev4 = "we003r30000";
lev5 = "ee00303000p";
lev6 = "00004030766";
lev7 = "00000030000";
lev8 = "c0005030000";
lev9 = "66803030000";
lev10 = "11113131111";
LevelToArray();
LoadMassiveToField();
} else if (level == 2) {
lev0 = "00000000000";
lev1 = "000000000ee";
lev2 = "000000000ew";
lev3 = "000000000ew";
lev4 = "000000000ee";
lev5 = "ni00000t000";
lev6 = "68007666666";
lev7 = "0i000000000";
lev8 = "68005x505p0";
lev9 = "00003535355";
lev10 = "11113333333";
LevelToArray();
LoadMassiveToField();
} else if (level == 3) {
lev0 = "00000000000";
lev1 = "00000000000";
lev2 = "o000000000p";
lev3 = "00000000000";
lev4 = "000v0000000";
lev5 = "00766666666";
lev6 = "00000000000";
lev7 = "o0000000000";
lev8 = "00000000000";
lev9 = "00000eeee00";
lev10 = "00000ewwe00";
LevelToArray();
LoadMassiveToField();
} else if (level == 4) {
lev0 = "00000000000";
lev1 = "0000000000o";
lev2 = "p000000000l";
lev3 = "00000000000";
lev4 = "0000000000v";
lev5 = "66666680076";
lev6 = "00000000000";
lev7 = "00000000000";
lev8 = "0000000000o";
lev9 = "00000eeee00";
lev10 = "00000ewwe00";
LevelToArray();
LoadMassiveToField();
} else if (level == 5) {
lev0 = "00333333000";
lev1 = "00343343000";
lev2 = "ee303303000";
lev3 = "we304403000";
lev4 = "we30000300p";
lev5 = "ee3r5503000";
lev6 = "00303304000";
lev7 = "004033r0000";
lev8 = "00003305000";
lev9 = "00503303000";
lev10 = "11313313b11";
LevelToArray();
LoadMassiveToField();
} else if (level == 6) {
lev0 = "00000000000";
lev1 = "ee0000000u0";
lev2 = "we000000076";
lev3 = "we000000000";
lev4 = "ee000000000";
lev5 = "xtt00000000";
lev6 = "66680000000";
lev7 = "00000000000";
lev8 = "mi00000000p";
lev9 = "68000000076";
lev10 = "11111t1y111";
LevelToArray();
LoadMassiveToField();
} else if (level == 7) {
lev0 = "b0000300000";
lev1 = "6800030000p";
lev2 = "ee000300076";
lev3 = "we000300000";
lev4 = "we00030000o";
lev5 = "ee00030000o";
lev6 = "00000400000";
lev7 = "00000000000";
lev8 = "l0000000000";
lev9 = "l0000000000";
lev10 = "11111111111";
LevelToArray();
LoadMassiveToField();
} else if (level == 8) {
lev0 = "00333333000";
lev1 = "00343343000";
lev2 = "ee303303000";
lev3 = "we304403000";
lev4 = "we30000300p";
lev5 = "ee3r5503000";
lev6 = "00303304000";
lev7 = "004033r0000";
lev8 = "00003305000";
lev9 = "00503303000";
lev10 = "11313313b11";
LevelToArray();
LoadMassiveToField();
Robocol++;
_root.game.mask.attachMovie("robo10_2", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = 0;
_root.game.mask["robo_" + Robocol]._y = 0;
_root.game.mask["robo_" + Robocol].cherep = true;
} else if (level == 9) {
lev0 = "0003330000c";
lev1 = "00034300076";
lev2 = "00030300000";
lev3 = "000304000ee";
lev4 = "0004rj000ew";
lev5 = "000j05000ew";
lev6 = "p00503000ee";
lev7 = "68030300000";
lev8 = "00035300000";
lev9 = "00033300000";
lev10 = "11133311111";
LevelToArray();
LoadMassiveToField();
} else if (level == 10) {
lev0 = "00000300000";
lev1 = "0000b300000";
lev2 = "000763000ee";
lev3 = "000003000ew";
lev4 = "000003000ew";
lev5 = "0i0u040i0ee";
lev6 = "68076668076";
lev7 = "00000000000";
lev8 = "000000000p0";
lev9 = "00000000076";
lev10 = "11111111111";
LevelToArray();
LoadMassiveToField();
} else if (level == 11) {
lev0 = "0003330000c";
lev1 = "00034300076";
lev2 = "00030300000";
lev3 = "000304000ee";
lev4 = "0004r0000ew";
lev5 = "000005000ew";
lev6 = "p00503000ee";
lev7 = "68030300000";
lev8 = "00035300000";
lev9 = "00033300000";
lev10 = "11133311111";
LevelToArray();
LoadMassiveToField();
Robocol++;
_root.game.mask.attachMovie("robo10_1", "robo_" + Robocol, herodepth--);
_root.game.mask["robo_" + Robocol]._x = 0;
_root.game.mask["robo_" + Robocol]._y = 0;
_root.game.mask["robo_" + Robocol].cherep = true;
} else if (level == 12) {
lev0 = "ee000000000";
lev1 = "we00000000o";
lev2 = "we000000000";
lev3 = "ee00000000k";
lev4 = "000000000vb";
lev5 = "00000000766";
lev6 = "k000000000p";
lev7 = "00000000076";
lev8 = "o0000000000";
lev9 = "00000000000";
lev10 = "x1111111111";
LevelToArray();
LoadMassiveToField();
} else if (level == 13) {
lev0 = "ee303030000";
lev1 = "we304030000";
lev2 = "we300030000";
lev3 = "ee3r5030000";
lev4 = "00303030000";
lev5 = "00303030000";
lev6 = "0030303000p";
lev7 = "00403r40076";
lev8 = "00003000000";
lev9 = "00503050000";
lev10 = "cv313131111";
LevelToArray();
LoadMassiveToField();
} else if (level == 14) {
lev0 = "b0000000000";
lev1 = "68000000000";
lev2 = "0000000000o";
lev3 = "00000000000";
lev4 = "k0000000000";
lev5 = "ee00000000p";
lev6 = "we000000076";
lev7 = "we000000000";
lev8 = "ee00000000o";
lev9 = "k0000000000";
lev10 = "11111111111";
LevelToArray();
LoadMassiveToField();
} else if (level == 15) {
lev0 = "00000000000";
lev1 = "o000000000p";
lev2 = "00000000076";
lev3 = "00000000000";
lev4 = "eel00000000";
lev5 = "wel0000000l";
lev6 = "wel00000000";
lev7 = "ee000000000";
lev8 = "000000000vb";
lev9 = "o0000000766";
lev10 = "11111111111";
LevelToArray();
LoadMassiveToField();
} else if (level == 16) {
lev0 = "00000300000";
lev1 = "0i0nv300000";
lev2 = "680763000ee";
lev3 = "0i0u03000ew";
lev4 = "680763000ew";
lev5 = "0i0u03ii0ee";
lev6 = "68076668076";
lev7 = "00000000000";
lev8 = "k0000000000";
lev9 = "l0000p00000";
lev10 = "1ttt111tt11";
LevelToArray();
LoadMassiveToField();
} else if (level == 17) {
lev0 = "0004r3030ee";
lev1 = "0p0j04r30ew";
lev2 = "68050j040ew";
lev3 = "0003050j0ee";
lev4 = "66630305076";
lev5 = "00030363000";
lev6 = "000363r3000";
lev7 = "nc000404000";
lev8 = "66800j0j000";
lev9 = "00000505000";
lev10 = "bx111313111";
LevelToArray();
LoadMassiveToField();
} else if (level == 18) {
lev0 = "ee000000000";
lev1 = "we00000000k";
lev2 = "wel00000000";
lev3 = "ee00000000m";
lev4 = "66666680766";
lev5 = "000000000uu";
lev6 = "o0000000766";
lev7 = "l00000000lo";
lev8 = "00000000muu";
lev9 = "p0000000766";
lev10 = "1111111t111";
LevelToArray();
LoadMassiveToField();
} else if (level == 19) {
lev0 = "00000000000";
lev1 = "0000000000k";
lev2 = "000000000ee";
lev3 = "0p000000lew";
lev4 = "80000000kew";
lev5 = "000000000ee";
lev6 = "0000000000l";
lev7 = "00000000000";
lev8 = "00000000000";
lev9 = "00000000000";
lev10 = "my1ytt1yy1b";
LevelToArray();
LoadMassiveToField();
} else if (level == 20) {
lev0 = "00000000000";
lev1 = "i0000000000";
lev2 = "68000000000";
lev3 = "i000000000p";
lev4 = "68000000076";
lev5 = "i0000000000";
lev6 = "68000000000";
lev7 = "i0000000000";
lev8 = "68000000000";
lev9 = "eeee0000000";
lev10 = "ewwe1ttyycv";
LevelToArray();
LoadMassiveToField();
} else if (level == 21) {
lev0 = "00000000000";
lev1 = "00000000000";
lev2 = "p000u0u0uyb";
lev3 = "68076666666";
lev4 = "00000000000";
lev5 = "k000000000o";
lev6 = "k000000000o";
lev7 = "00000000000";
lev8 = "l000000000l";
lev9 = "0000000eeee";
lev10 = "cvy1yxtewwe";
LevelToArray();
LoadMassiveToField();
} else if (level == 22) {
lev0 = "000030300ww";
lev1 = "000030300ww";
lev2 = "000040300ww";
lev3 = "p00000300ww";
lev4 = "6800503000l";
lev5 = "0000303000o";
lev6 = "00003r3000o";
lev7 = "0000304000k";
lev8 = "0000300000k";
lev9 = "0000305000l";
lev10 = "11113131111";
LevelToArray();
LoadMassiveToField();
} else if (level == 23) {
_root.game.removeMovieClip();
OpenedWindow = 1;
attachMovie("win", "win", 1000);
_root.win._x = 187.5 - (win._width / 2);
_root.win._y = 187.5 - (win._height / 2);
}
}
function OnMovieKeyDown() {
if (_root.DemoMode == 0) {
if (Key.getCode() == LEFT) {
moveleft = 1;
_root.game.mask.man.mc.fire._visible = true;
}
if (Key.getCode() == RIGHT) {
moveright = 1;
_root.game.mask.man.mc.fire._visible = true;
}
if (Key.getCode() == UP) {
moveup = 1;
}
if (Key.getCode() == DOWN) {
movedown = 1;
}
if (Key.getAscii() == FIRE) {
FireMode = 1;
}
if (Key.getAscii() == ROCKET_FIRE) {
FireRocket = 1;
}
if (Key.getAscii() == FUGAS_FIRE) {
FireFugas = 1;
}
} else if (_root.OpenedWindow == 0) {
_root.NewGameYes();
_root.DemoMode = 0;
}
}
function OnMovieKeyUp() {
if (_root.DemoMode == 0) {
if (Key.getCode() == LEFT) {
moveleft = 0;
_root.game.mask.man.mc.fire._visible = false;
}
if (Key.getCode() == RIGHT) {
moveright = 0;
_root.game.mask.man.mc.fire._visible = false;
}
if (Key.getCode() == UP) {
moveup = 0;
}
if (Key.getCode() == DOWN) {
movedown = 0;
}
if (Key.getAscii() == FIRE) {
FireMode = 0;
}
if (Key.getAscii() == ROCKET_FIRE) {
FireRocket = 0;
}
if (Key.getAscii() == FUGAS_FIRE) {
FireFugas = 0;
}
if (Key.getAscii() == 112) {
if (PauseMode == 1) {
PauseMode = 0;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
_root.pauseon._visible = false;
} else {
_root.pauseon._visible = true;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
PauseMode = 1;
}
}
}
}
function CheckStonesForHit() {
var n;
var k;
n = numberstones;
k = 0;
while (k < n) {
if (game.mask.man.mc.ftr.hittest(game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function CheckBounds() {
var t;
t = _root.game.mask.man.mc.ftr;
return(((((!t._x) < 0) or (t._y < 0)) or ((POLYW * (NUMBERX + 1)) < (t._x + t._width))) or ((POLYH * (NUMBERY + 1)) < (t._y + t._height)));
}
function CheckMoveRight() {
if (((moveright == 1) && ((((game.mask.man._x + game.mask.man._width) + d) - 8) < (POLYW * NUMBERX))) && (_root.HeroExplode == false)) {
game.mask.man._x = game.mask.man._x + d;
HeroRotate = "right";
if (HeroState == 0) {
game.mask.man.mc.gotoAndStop("right");
} else {
game.mask.man.mc.gotoAndStop("right1");
}
if ((CheckStonesForHit() == 1) or (CheckBounds == 1)) {
game.mask.man._x = game.mask.man._x - d;
}
}
}
function CheckMoveLeft() {
if (((moveleft == 1) && (0 < (game.mask.man._x - d))) && (_root.HeroExplode == false)) {
game.mask.man._x = game.mask.man._x - d;
HeroRotate = "left";
if (HeroState == 0) {
game.mask.man.mc.gotoAndStop("left");
} else {
game.mask.man.mc.gotoAndStop("left1");
}
if ((CheckStonesForHit() == 1) or (CheckBounds == 1)) {
game.mask.man._x = game.mask.man._x + d;
}
}
}
function CheckMoveUp() {
if (((moveup == 1) && (0 < (game.mask.man._y - d))) && (_root.HeroExplode == false)) {
game.mask.man._y = (game.mask.man._y - d) - 2;
if ((CheckStonesForHit() == 1) or (CheckBounds == 1)) {
game.mask.man._y = (game.mask.man._y + d) + 2;
}
}
}
function CheckMoveDown() {
if (((movedown == 1) && ((((game.mask.man._y + game.mask.man._height) + d) - 1) < (POLYH * NUMBERY))) && (_root.HeroExplode == false)) {
game.mask.man._y = (game.mask.man._y + d) - 1;
if (CheckStonesForHit() == 1) {
game.mask.man._y = (game.mask.man._y - d) + 1;
}
}
}
function CheckGM() {
if (((nothing == 1) && (((game.mask.man._y + game.mask.man._height) + 1) < (POLYH * NUMBERY))) && (_root.HeroExplode == false)) {
game.mask.man._y = game.mask.man._y + 2;
if (CheckStonesForHit() == 1) {
game.mask.man._y = game.mask.man._y - 2;
}
}
}
function BlinkCheck() {
if (0 < HeroState) {
HeroState--;
if (HeroState < 20) {
_root.game.mask.man.mc.obolon._alpha = _root.game.mask.man.mc.obolon._alpha - 2;
}
if (HeroState == 0) {
_root.game.mask.man.mc.obolon._alpha = 40;
_root.game.mask.man.mc.prevFrame();
_root.game.mask.man.mc.prevFrame();
}
}
}
function FireCheck() {
if (((FireMode == 1) and (FireCurFrame == 0)) and (OpenedWindow == 0)) {
FireCurFrame = FireFramesD;
BulletN++;
_root.game.mask.attachMovie("bullet", "bullet_" + BulletN, depth++);
_root.game.mask["bullet_" + BulletN]._x = _root.game.mask.man._x;
_root.game.mask["bullet_" + BulletN]._y = _root.game.mask.man._y + 15;
_root.game.mask["bullet_" + BulletN].direct = HeroRotate;
if (Cannon == 1) {
BulletN++;
_root.game.mask.attachMovie("bullet", "bullet_" + BulletN, depth++);
_root.game.mask["bullet_" + BulletN]._x = _root.game.mask.man._x;
_root.game.mask["bullet_" + BulletN]._y = _root.game.mask.man._y + 15;
if (HeroRotate == "left") {
_root.game.mask["bullet_" + BulletN].direct = "right";
} else {
_root.game.mask["bullet_" + BulletN].direct = "left";
}
}
if (SoundState == "on") {
fire_snd.start();
}
}
if ((((FireRocket == 1) and (RocketCond == 0)) and (OpenedWindow == 0)) && (0 < _root.RocketCol)) {
_root.RocketCol--;
_root.ammo.rocket = _root.RocketCol;
RocketCond = 1;
BulletN++;
_root.game.mask.attachMovie("rocket", "bullet_" + BulletN, depth++);
_root.game.mask["bullet_" + BulletN]._x = _root.game.mask.man._x;
_root.game.mask["bullet_" + BulletN]._y = _root.game.mask.man._y + 15;
_root.game.mask["bullet_" + BulletN].direct = HeroRotate;
if (!LocateEnemy()) {
_root.game.mask["bullet_" + BulletN].gotoAndStop(HeroRotate);
if (HeroRotate == "left") {
_root.game.mask["bullet_" + BulletN].dx = -30;
}
if (HeroRotate == "right") {
_root.game.mask["bullet_" + BulletN].dx = 30;
}
_root.game.mask["bullet_" + BulletN]._rotation = 0;
_root.game.mask["bullet_" + BulletN].dy = 0;
}
if (SoundState == "on") {
rocket_shoot.start();
}
}
if ((((FireFugas == 1) && (FugasFrame == 0)) && (OpenedWindow == 0)) && (0 < _root.FugasCol)) {
BulletN++;
_root.FugasCol--;
_root.ammo.fugas = _root.FugasCol;
_root.game.mask.attachMovie("fugas", "bullet_" + BulletN, depth++);
_root.game.mask["bullet_" + BulletN]._x = _root.game.mask.man._x;
_root.game.mask["bullet_" + BulletN]._y = _root.game.mask.man._y + 15;
if (_root.HeroRotate == "left") {
_root.game.mask["bullet_" + BulletN].dx = -15;
_root.game.mask["bullet_" + BulletN].mc.gotoAndStop("left");
} else {
_root.game.mask["bullet_" + BulletN].dx = 15;
_root.game.mask["bullet_" + BulletN].mc.gotoAndStop("right");
}
_root.game.mask["bullet_" + BulletN].dy = 5;
_root.game.mask["bullet_" + BulletN].count = 0;
BulletN++;
_root.game.mask.attachMovie("fugas", "bullet_" + BulletN, depth++);
_root.game.mask["bullet_" + BulletN]._x = _root.game.mask.man._x;
_root.game.mask["bullet_" + BulletN]._y = _root.game.mask.man._y + 15;
if (_root.HeroRotate == "left") {
_root.game.mask["bullet_" + BulletN].dx = -15;
_root.game.mask["bullet_" + BulletN].mc.gotoAndStop("left");
} else {
_root.game.mask["bullet_" + BulletN].dx = 15;
_root.game.mask["bullet_" + BulletN].mc.gotoAndStop("right");
}
_root.game.mask["bullet_" + BulletN].dy = -5;
_root.game.mask["bullet_" + BulletN].count = 0;
if (SoundState == "on") {
fugas_shoot.start();
}
FugasFrame = 20;
}
if (0 < FireCurFrame) {
FireCurFrame--;
}
if (0 < FugasFrame) {
FugasFrame--;
}
}
function LocateEnemy() {
var man;
var mind;
var robo;
var d;
var mini;
var l;
var b;
man = _root.game.mask.man;
mind = 375;
b = false;
if (HeroRotate == "left") {
i = 0;
while (Robocol >= i) {
robo = _root.game.mask["robo_" + i];
if ((0 < (man._x - robo._x)) && ((robo.immortal == true) || (robo.immortal == false))) {
d = Math.SQRT(((man._x - robo._x) * (man._x - robo._x)) + ((man._y - robo._y) * (man._y - robo._y)));
if (d < mind) {
mind = d;
mini = i;
b = true;
}
}
i++;
}
robo = _root.game.mask["robo_" + mini];
l = (robo._y - man._y) / (robo._x - man._x);
_root.game.mask["bullet_" + BulletN].mc.gotoAndStop("left");
_root.game.mask["bullet_" + BulletN].dx = -Math.sqrt(900 / (1 + (l * l)));
_root.game.mask["bullet_" + BulletN].dy = Math.sqrt(900 - (_root.game.mask["bullet_" + BulletN].dx * _root.game.mask["bullet_" + BulletN].dx));
if (robo._y < man._y) {
_root.game.mask["bullet_" + BulletN].dy = -_root.game.mask["bullet_" + BulletN].dy;
}
var bullet = _root.game.mask["bullet_" + BulletN];
bullet._rotation = (Math.atan(Bullet.dy / bullet.dx) * 180) / Math.pi;
} else {
i = 0;
while (Robocol >= i) {
robo = _root.game.mask["robo_" + i];
if (((man._x - robo._x) < 0) && ((robo.immortal == true) || (robo.immortal == false))) {
d = Math.SQRT(((man._x - robo._x) * (man._x - robo._x)) + ((man._y - robo._y) * (man._y - robo._y)));
if (d < mind) {
mind = d;
mini = i;
b = true;
}
}
i++;
}
robo = _root.game.mask["robo_" + mini];
l = (robo._y - man._y) / (robo._x - man._x);
_root.game.mask["bullet_" + BulletN].mc.gotoAndStop("right");
_root.game.mask["bullet_" + BulletN].dx = Math.sqrt(900 / (1 + (l * l)));
_root.game.mask["bullet_" + BulletN].dy = Math.sqrt(900 - (_root.game.mask["bullet_" + BulletN].dx * _root.game.mask["bullet_" + BulletN].dx));
if (robo._y < man._y) {
_root.game.mask["bullet_" + BulletN].dy = -_root.game.mask["bullet_" + BulletN].dy;
}
var bullet = _root.game.mask["bullet_" + BulletN];
bullet._rotation = (Math.atan(Bullet.dy / bullet.dx) * 180) / Math.pi;
}
return(b);
}
function DemoRecord() {
if (RealLevel == 3) {
if (moveleft == 1) {
democodeleft = democodeleft + "1";
} else {
democodeleft = democodeleft + "5";
}
if (moveright == 1) {
democoderight = democoderight + "2";
} else {
democoderight = democoderight + "6";
}
if (movedown == 1) {
democodedown = democodedown + "4";
} else {
democodedown = democodedown + "8";
}
if (moveup == 1) {
democodeup = democodeup + "3";
} else {
democodeup = democodeup + "7";
}
if (FireFugas == 1) {
democodefire = democodefire + "F";
} else {
democodefire = democodefire + "S";
}
}
}
function OnFrame() {
if (PauseMode == 0) {
if (DemoMode == 1) {
DemoOnFrame();
}
CheckMoveRight();
CheckMoveLeft();
CheckMoveUp();
CheckMoveDown();
CheckGM();
BlinkCheck();
FireCheck();
}
}
function OnLogoClick() {
if (DemoMode == 0) {
_root.pauseon._visible = true;
PauseMode = 1;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
}
_root.AbsLink();
}
function OnMoreGamesClick() {
if (DemoMode == 0) {
_root.pauseon._visible = true;
PauseMode = 1;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
}
_root.AbsLink();
}
function onPauseClick() {
if (OpenedWindow == 0) {
if (PauseMode == 0) {
_root.pauseon._visible = true;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
PauseMode = 1;
} else {
PauseMode = 0;
_root.pauseon._visible = false;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
}
}
}
function NewGame() {
if (OpenedWindow == 0) {
temp = PauseMode;
PauseMode = 1;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
attachMovie("perf", "perf", 1000);
_root.perf._x = 187.5 - (perf._width / 2);
_root.perf._y = 187.5 - (perf._height / 2);
OpenedWindow = 1;
}
}
function onHelpClick() {
if (OpenedWindow == 0) {
temp = PauseMode;
PauseMode = 1;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
attachMovie("help", "help", 1000);
_root.help._x = 187.5 - (help._width / 2);
_root.help._y = 187.5 - (help._height / 2);
OpenedWindow = 1;
}
}
function HelpOK() {
PauseMode = temp;
OpenedWindow = 0;
if (PauseMode == 0) {
_root.pauseon._visible = false;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
} else {
_root.pauseon._visible = true;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
}
_root.help.removeMovieClip();
}
function NewGameYes() {
_root.demomodeon._visible = false;
_root.game.removeMovieClip();
MakeConstsAndVariables();
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
_root.ammo.rocket = RocketCol;
_root.ammo.fugas = FugasCol;
DemoMode = 0;
PauseMode = 0;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
OpenedWindow = 0;
_root.pauseon._visible = false;
_root.perf.removeMovieClip();
}
function NewGameNo() {
PauseMode = temp;
OpenedWindow = 0;
if (PauseMode == 0) {
_root.pauseon._visible = false;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
} else {
_root.pauseon._visible = true;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
}
_root.perf.removeMovieClip();
}
function GameOverOK() {
OpenedWindow = 0;
MakeConstsAndVariables();
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
_root.ammo.rocket = RocketCol;
_root.ammo.fugas = FugasCol;
_root.pauseon._visible = false;
_root.game_over.removeMovieClip();
}
function WinOK() {
OpenedWindow = 0;
MakeConstsAndVariables();
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
_root.ammo.rocket = RocketCol;
_root.ammo.fugas = FugasCol;
_root.pauseon._visible = false;
_root.win.removeMovieClip();
}
function onOptionsClick() {
if (OpenedWindow == 0) {
temp = PauseMode;
PauseMode = 1;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
OpenedWindow = 1;
attachMovie("options", "options", 1000);
_root.options._x = 187.5 - (options._width / 2);
_root.options._y = 187.5 - (options._height / 2);
if (HardLevel == "novice") {
_root.options.hardlevel_chk._x = _root.options.novice._x;
_root.options.hardlevel_chk._y = _root.options.novice._y;
} else if (HardLevel == "expert") {
_root.options.hardlevel_chk._x = _root.options.expert._x;
_root.options.hardlevel_chk._y = _root.options.expert._y;
} else if (HardLevel == "master") {
_root.options.hardlevel_chk._x = _root.options.master._x;
_root.options.hardlevel_chk._y = _root.options.master._y;
}
if (SoundState == "on") {
_root.options.sound_chk._x = _root.options.snd_on._x;
_root.options.sound_chk._y = _root.options.snd_on._y;
} else if (SoundState == "off") {
_root.options.sound_chk._x = _root.options.snd_off._x;
_root.options.sound_chk._y = _root.options.snd_off._y;
}
if (_root.Effects == "low") {
_root.options.effect_chk._x = _root.options.low._x;
_root.options.effect_chk._y = _root.options.low._y;
} else if (_root.Effects == "medium") {
_root.options.effect_chk._x = _root.options.medium._x;
_root.options.effect_chk._y = _root.options.medium._y;
} else if (_root.Effects == "hight") {
_root.options.effect_chk._x = _root.options.hight._x;
_root.options.effect_chk._y = _root.options.hight._y;
}
if (_root.quality == "low") {
_root.options.effect_chkq._x = _root.options.lowq._x;
_root.options.effect_chkq._y = _root.options.lowq._y;
} else if (_root.quality == "medium") {
_root.options.effect_chkq._x = _root.options.mediumq._x;
_root.options.effect_chkq._y = _root.options.mediumq._y;
} else if (_root.quality == "hight") {
_root.options.effect_chkq._x = _root.options.hightq._x;
_root.options.effect_chkq._y = _root.options.hightq._y;
}
}
}
function QualityLowClick() {
if (_root.options.lowq.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.effect_chkq._x = _root.options.lowq._x;
_root.options.effect_chkq._y = _root.options.lowq._y;
_root.quality = "low";
_quality = "LOW";
}
}
function QualityMediumClick() {
if (_root.options.mediumq.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.effect_chkq._x = _root.options.mediumq._x;
_root.options.effect_chkq._y = _root.options.mediumq._y;
_root.quality = "medium";
_quality = "MEDIUM";
}
}
function QualityHightClick() {
if (_root.options.hightq.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.effect_chkq._x = _root.options.hightq._x;
_root.options.effect_chkq._y = _root.options.hightq._y;
_root.quality = "hight";
_quality = "BEST";
}
}
function EffectsLowClick() {
if (_root.options.low.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.effect_chk._x = _root.options.low._x;
_root.options.effect_chk._y = _root.options.low._y;
_root.Effects = "low";
_root.StopWeed();
_root.StopAll();
}
}
function EffectsMediumClick() {
if (_root.options.medium.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.effect_chk._x = _root.options.medium._x;
_root.options.effect_chk._y = _root.options.medium._y;
_root.Effects = "medium";
_root.StopWeed();
_root.StopAll();
_root.PlayAll();
}
}
function EffectsHightClick() {
if (_root.options.hight.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.effect_chk._x = _root.options.hight._x;
_root.options.effect_chk._y = _root.options.hight._y;
_root.Effects = "hight";
_root.PlayWeed();
_root.PlayAll();
}
}
function OptionsExpertClick() {
if (_root.options.expert.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.hardlevel_chk._x = _root.options.expert._x;
_root.options.hardlevel_chk._y = _root.options.expert._y;
_root.options.HardLevel = "expert";
_root.options.changed = 1;
}
}
function OptionsNoviceClick() {
if (_root.options.novice.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.hardlevel_chk._x = _root.options.novice._x;
_root.options.hardlevel_chk._y = _root.options.novice._y;
_root.options.HardLevel = "novice";
_root.options.changed = 1;
}
}
function OptionsMasterClick() {
if (_root.options.master.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.hardlevel_chk._x = _root.options.master._x;
_root.options.hardlevel_chk._y = _root.options.master._y;
_root.options.HardLevel = "master";
_root.options.changed = 1;
}
}
function OptionsOffClick() {
if (_root.options.snd_off.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.sound_chk._x = _root.options.snd_off._x;
_root.options.sound_chk._y = _root.options.snd_off._y;
SoundState = "off";
}
}
function OptionsOnClick() {
if (_root.options.snd_on.hitTest(_root._xmouse, _root._ymouse, false)) {
_root.options.sound_chk._x = _root.options.snd_on._x;
_root.options.sound_chk._y = _root.options.snd_on._y;
SoundState = "on";
}
}
function OptionsCancelClick() {
PauseMode = temp;
OpenedWindow = 0;
if (PauseMode == 0) {
_root.pauseon._visible = false;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
} else {
_root.pauseon._visible = true;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
}
_root.options.removeMovieClip();
}
function OptionsOkClick() {
if ((_root.options.changed == 1) and (DemoMode == 0)) {
attachMovie("perf2", "perf2", 1925);
} else {
if (_root.options.changed == 1) {
HardLevel = _root.options.HardLevel;
NewGameYes();
}
OpenedWindow = 0;
PauseMode = temp;
if (PauseMode == 0) {
_root.pauseon._visible = false;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
} else {
_root.pauseon._visible = true;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
}
_root.options.removeMovieClip();
}
}
function OptionsPerfCancelClick() {
_root.pauseon._visible = false;
_root.perf2.removeMovieClip();
}
function OptionsPerfOkClick() {
if (_root.options.changed == 1) {
_root.demomodeon._visible = false;
DemoMode = 0;
HardLevel = _root.options.HardLevel;
_root.demomodeon._visible = false;
_root.game.removeMovieClip();
MakeConstsAndVariables();
var k;
MakeConstsAndVariables();
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
_root.ammo.rocket = RocketCol;
_root.ammo.fugas = FugasCol;
_root.pauseon._visible = false;
if (_quality == "BEST") {
_root.AttachBubbles();
}
_root.score.sc = 0;
PauseMode = 0;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
OpenedWindow = 0;
_root.pauseon._visible = false;
}
OpenedWindow = 0;
PauseMode = 0;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
_root.pauseon._visible = false;
_root.options.removeMovieClip();
_root.perf2.removeMovieClip();
}
function onDemoClick() {
var s;
if (OpenedWindow == 0) {
if (DemoMode == 0) {
temp = PauseMode;
PauseMode = 1;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.stop();
}
attachMovie("perf1", "perf1", 1000);
_root.perf1._x = 187.5 - (perf1._width / 2);
_root.perf1._y = 187.5 - (perf1._height / 2);
OpenedWindow = 1;
} else {
NewGameYes();
DemoMode = 0;
_root.demomodeon._visible = false;
}
}
}
function onDemoYes() {
var s;
s = HardLevel;
HardLevel = "novice";
DemoMode = 1;
_root.game.removeMovieClip();
MakeConstsAndVariables();
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
_root.ammo.rocket = RocketCol;
_root.ammo.fugas = FugasCol;
_root.pauseon._visible = false;
PauseMode = 0;
if (_root.game.mask["robo_" + _root.Robocol].cherep == true) {
_root.game.mask["robo_" + _root.Robocol].mc.play();
}
OpenedWindow = 0;
_root.pauseon._visible = false;
_root.perf.removeMovieClip();
_root.perf1.removeMovieClip();
AttachDemoMode();
symbolnumber = 0;
_root.demomodeon._visible = true;
HardLevel = s;
}
function onDemoNo() {
_root.pauseon._visible = true;
OpenedWindow = 0;
_root.perf1.removeMovieClip();
}
function DecodeHero(value) {
if (value == 1) {
moveleft = 1;
} else if (value == 2) {
moveright = 1;
} else if (value == 3) {
moveup = 1;
} else if (value == 4) {
movedown = 1;
} else if (value == 5) {
moveleft = 0;
} else if (value == 6) {
moveright = 0;
} else if (value == 7) {
moveup = 0;
} else if (value == 8) {
movedown = 0;
} else if (value == "F") {
if (RealLevel == 2) {
FireRocket = 1;
} else {
FireFugas = 1;
}
} else if (value == "S") {
if (RealLevel == 2) {
FireRocket = 0;
} else {
FireFugas = 0;
}
}
}
function DemoOnFrame() {
if (PauseMode == 0) {
if (RealLevel == 1) {
DecodeHero(DemoLineUp.substr(symbolnumber, 1));
DecodeHero(DemoLineDown.substr(symbolnumber, 1));
DecodeHero(DemoLineLeft.substr(symbolnumber, 1));
DecodeHero(DemoLineRight.substr(symbolnumber, 1));
if (Symbolnumber < DemoLineUp.length) {
Symbolnumber++;
}
}
if (RealLevel == 2) {
DecodeHero(DemoLineUp1.substr(symbolnumber, 1));
DecodeHero(DemoLineDown1.substr(symbolnumber, 1));
DecodeHero(DemoLineLeft1.substr(symbolnumber, 1));
DecodeHero(DemoLineRight1.substr(symbolnumber, 1));
DecodeHero(DemoLineFire1.substr(symbolnumber, 1));
if (Symbolnumber < DemoLineUp1.length) {
Symbolnumber++;
}
}
if (RealLevel == 3) {
DecodeHero(DemoLineUp2.substr(symbolnumber, 1));
DecodeHero(DemoLineDown2.substr(symbolnumber, 1));
DecodeHero(DemoLineLeft2.substr(symbolnumber, 1));
DecodeHero(DemoLineRight2.substr(symbolnumber, 1));
DecodeHero(DemoLineFire2.substr(symbolnumber, 1));
if (Symbolnumber < DemoLineUp2.length) {
Symbolnumber++;
}
}
}
}
HardLevel = "novice";
SoundState = "on";
OpenedWindow = 0;
DemoMode = 1;
MakeConstsAndVariables();
initalization();
DemoLineUp = "77777777777777733333333333333333333333333333377777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777733333333333333333333";
DemoLineDown = "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888444448888888844888888888844888888888444888888888888888888888888888888888888888888888888888888888888";
DemoLineLeft = "55555511111111111111111115555555555115551111111111111111111155555555555555155555555555555555555555555555555555555555555555555555555555555555555555555555555555555511111111111111155555555555555555555555555555555555555555555555555555515111111111111111111111111111111111111111";
DemoLineRight = "66666666666666666666666666666666666666666666666666666666666666662222226666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666";
DemoLineUp1 = "33337777777777333333333333333333333333333333333333333333333333333333333333333337777773333777777733333333333333333333333333333777777773333333333333333377777777777777777777777777";
DemoLineDown1 = "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888";
DemoLineLeft1 = "11155555111111111111111111111111111111111111111111111111111111111111111115555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555";
DemoLineRight1 = "66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666662222666662222662222222222222222266666666666622222222222222222222222222222";
DemoLineFire1 = "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSFFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS";
DemoLineUp2 = "7777777777773333333377777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777";
DemoLineDown2 = "8888888888888888888888888888888888888888888888888888888888888888888888888888884444444444444444444444444444444444444448888888888888";
DemoLineLeft2 = "5555551111111111111111111111111111111111111111111111111111111111111111111111111111155555555555555555555555555555555555555555555555";
DemoLineRight2 = "2666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666222222222222222222222222222222222222";
DemoLineFire2 = "SSSSSSSSSSSSSSSSSSFFFFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSFFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS";
symbolnumber = 0;
Frame 2
_root.OnFrame();
Frame 3
gotoAndPlay (2);
Symbol 20 Button
on (release) {
_root.winOK();
}
Symbol 26 Button
on (release) {
_root.onDemoNo();
}
Symbol 27 Button
on (release) {
_root.onDemoYes();
}
Symbol 33 Button
on (release) {
_root.NewGameNo();
}
Symbol 34 Button
on (release) {
_root.NewGameYes();
}
Symbol 37 Button
on (release) {
_root.OptionsPerfCancelClick();
}
Symbol 38 Button
on (release) {
_root.OptionsPerfOkClick();
}
Symbol 42 Button
on (release) {
_root.onDemoNo();
}
Symbol 43 Button
on (release) {
_root.onDemoYes();
}
Symbol 46 Button
on (release) {
_root.NewGameNo();
}
Symbol 47 Button
on (release) {
_root.NewGameYes();
}
Symbol 50 Button
on (release) {
_root.OptionsPerfCancelClick();
}
Symbol 51 Button
on (release) {
_root.OptionsPerfOkClick();
}
Symbol 55 Button
on (release) {
_root.winOK();
}
Symbol 90 Button
on (release) {
_root.OptionsCancelClick();
}
Symbol 91 Button
on (release) {
_root.OptionsOKClick();
}
Instance of Symbol 67 MovieClip "lowq" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.QualityLowClick();
}
Instance of Symbol 75 MovieClip "mediumq" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.QualityMediumClick();
}
Instance of Symbol 76 MovieClip "hightq" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.QualityHightClick();
}
Instance of Symbol 84 MovieClip "novice" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.OptionsNoviceClick();
}
Instance of Symbol 85 MovieClip "expert" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.OptionsExpertClick();
}
Instance of Symbol 86 MovieClip "master" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.OptionsMasterClick();
}
Instance of Symbol 88 MovieClip "snd_on" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.OptionsOnClick();
}
Instance of Symbol 89 MovieClip "snd_off" in Symbol 93 MovieClip [options] Frame 1
onClipEvent (mouseUp) {
_root.OptionsOffClick();
}
Symbol 140 MovieClip Frame 9
_root.MinusLife();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 3
stop();
Symbol 141 MovieClip Frame 4
stop();
Symbol 141 MovieClip Frame 5
stop();
Symbol 141 MovieClip Frame 6
stop();
Symbol 142 MovieClip [man] Frame 1
stop();
Instance of Symbol 141 MovieClip "mc" in Symbol 142 MovieClip [man] Frame 1
onClipEvent (keyDown) {
_root.OnMovieKeyDown();
}
onClipEvent (keyUp) {
_root.OnMovieKeyUp();
}
Instance of Symbol 146 MovieClip "mask" in Symbol 148 MovieClip [game] Frame 1
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse, false)) {
if ((_root.DemoMode == 1) and (_root.OpenedWindow == 0)) {
_root.NewGameYes();
_root.demomodeon.removeMovieClip;
}
}
}
Instance of Symbol 150 MovieClip in Symbol 151 MovieClip [fuel] Frame 1
onClipEvent (enterFrame) {
_root.OnFuelEnter();
}
Symbol 160 MovieClip Frame 3
stop();
Symbol 163 Button
on (release) {
_root.HelpOK();
}
Symbol 166 Button
on (release) {
_root.HelpOK();
}
Symbol 167 Button
on (release) {
this.nextFrame();
}
Symbol 188 Button
on (release) {
this.prevFrame();
}
Symbol 204 MovieClip [help] Frame 1
stop();
Symbol 204 MovieClip [help] Frame 2
stop();
Symbol 204 MovieClip [help] Frame 3
stop();
Symbol 210 Button
on (release) {
_root.GameOverOK();
}
Symbol 213 MovieClip [cannon_bullet2] Frame 1
function onBulletFrame() {
if (_root.PauseMode == 0) {
if (this.direct == "right") {
this._x = this._x + 4;
} else {
this._x = this._x - 4;
}
if ((this.hittest(_root.game.mask.man.mc.ftr) && (_root.HeroState == 0)) && (!_root.HeroExplode)) {
_root.Explode();
this.removeMovieClip();
}
if ((_root.CheckForHitStoneRobos(this) || (this._x < 0)) || (((_root.POLYW * _root.NUMBERX) + 10) < this._x)) {
this.removeMovieClip();
}
}
}
Symbol 213 MovieClip [cannon_bullet2] Frame 2
onBulletFrame();
Symbol 213 MovieClip [cannon_bullet2] Frame 3
gotoAndPlay (2);
Symbol 214 MovieClip [cannon_bullet1] Frame 1
function onBulletFrame() {
if (_root.PauseMode == 0) {
if (this.direct == "right") {
this._x = this._x + 4;
} else {
this._x = this._x - 4;
}
if ((this.hittest(_root.game.mask.man.mc.ftr) && (_root.HeroState == 0)) && (!_root.HeroExplode)) {
_root.Explode();
this.removeMovieClip();
}
if ((_root.CheckForHitStoneRobos(this) || (this._x < 0)) || (((_root.POLYW * _root.NUMBERX) + 10) < this._x)) {
this.removeMovieClip();
}
}
}
Symbol 214 MovieClip [cannon_bullet1] Frame 2
onBulletFrame();
Symbol 214 MovieClip [cannon_bullet1] Frame 3
gotoAndPlay (2);
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 2
stop();
Symbol 220 MovieClip [fugas] Frame 1
function onFrame() {
if (_root.PauseMode == 0) {
CheckBulletHitBounds();
CheckBulletHitStones();
CheckRobos();
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.count++;
if (this.count == 6) {
CreateCopy();
this.count = 0;
}
}
}
function CheckRobos() {
var i;
i = 1;
while (_root.Robocol >= i) {
if (this.hittest(_root.game.mask["robo_" + i])) {
if ((((_root.game.mask["robo_" + i].sleep == 0) && (0 < _root.game.mask["robo_" + i].score)) && (_root.game.mask["robo_" + i].mode != "explode")) && ((_root.game.mask["robo_" + i].immortal == false) || (_root.game.mask["robo_" + i].immortal == true))) {
_root.game.mask["robo_" + i].RoboExplode();
_root.AttachHint("+" + _root.game.mask["robo_" + i].score, _root.game.mask["robo_" + i]._x, _root.game.mask["robo_" + i]._y);
_root.score.sc = _root.score.sc + _root.game.mask["robo_" + i].score;
_root.AviableScore = _root.AviableScore + _root.game.mask["robo_" + i].score;
_root.CheckExtraLife();
if (_root.SoundState == "on") {
_root.fugas_hit.start();
}
}
}
i++;
}
}
function CheckBulletHitBounds() {
if (this._x < 0) {
_root.RocketCond = 0;
this.removeMovieClip();
}
if ((_root.POLYW * _root.NUMBERX) < this._x) {
_root.RocketCond = 0;
this.removeMovieClip();
}
}
function CheckBulletHitStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
_root.RocketCond = 0;
this.removeMovieClip();
}
k++;
}
}
function CreateCopy() {
_root.BulletN++;
_root.game.mask.attachMovie("fugas", "bullet_" + _root.BulletN, _root.depth++);
_root.game.mask["bullet_" + _root.BulletN]._x = this._x;
_root.game.mask["bullet_" + _root.BulletN]._y = this._y;
_root.game.mask["bullet_" + _root.BulletN].dx = this.dx;
_root.game.mask["bullet_" + _root.BulletN].dy = -this.dy;
_root.game.mask["bullet_" + _root.BulletN].count = 0;
if (0 < this.dx) {
_root.game.mask["bullet_" + _root.BulletN].mc.gotoAndStop("right");
} else {
_root.game.mask["bullet_" + _root.BulletN].mc.gotoAndStop("left");
}
if (_root.SoundState == "on") {
_root.fugas_shoot.start();
}
}
Symbol 220 MovieClip [fugas] Frame 2
onFrame();
Symbol 220 MovieClip [fugas] Frame 3
gotoAndPlay (2);
Symbol 223 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 2
stop();
Symbol 224 MovieClip [rocket] Frame 1
function onFrame() {
if (_root.PauseMode == 0) {
CheckBulletHitBounds();
CheckBulletHitStones();
CheckRobos();
this._x = this._x + this.dx;
this._y = this._y + this.dy;
}
}
function CheckRobos() {
var i;
i = 1;
while (_root.Robocol >= i) {
if (this.hittest(_root.game.mask["robo_" + i])) {
if ((((_root.game.mask["robo_" + i].sleep == 0) && (0 < _root.game.mask["robo_" + i].score)) && (_root.game.mask["robo_" + i].mode != "explode")) && ((_root.game.mask["robo_" + i].immortal == false) || (_root.game.mask["robo_" + i].immortal == true))) {
_root.game.mask["robo_" + i].RoboExplode();
_root.AttachHint("+" + _root.game.mask["robo_" + i].score, _root.game.mask["robo_" + i]._x, _root.game.mask["robo_" + i]._y);
_root.score.sc = _root.score.sc + _root.game.mask["robo_" + i].score;
_root.AviableScore = _root.AviableScore + _root.game.mask["robo_" + i].score;
_root.CheckExtraLife();
_root.RocketCond = 0;
if (_root.SoundState == "on") {
_root.rocket_hit.start();
}
this.removeMovieClip();
}
}
i++;
}
}
function CheckBulletHitBounds() {
if (this._x < 0) {
_root.RocketCond = 0;
if (_root.SoundState == "on") {
_root.rocket_hit.start();
}
this.removeMovieClip();
}
if ((_root.POLYW * _root.NUMBERX) < this._x) {
_root.RocketCond = 0;
if (_root.SoundState == "on") {
_root.rocket_hit.start();
}
this.removeMovieClip();
}
}
function CheckBulletHitStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
_root.RocketCond = 0;
if (_root.SoundState == "on") {
_root.rocket_hit.start();
}
this.removeMovieClip();
}
k++;
}
}
Symbol 224 MovieClip [rocket] Frame 2
onFrame();
Symbol 224 MovieClip [rocket] Frame 3
gotoAndPlay (2);
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 2
stop();
Symbol 228 MovieClip [robo8rocket] Frame 1
function onFrame() {
if (_root.PauseMode == 0) {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if ((this.hittest(_root.game.mask.man.mc.ftr) && (_root.HeroState == 0)) && (!_root.HeroExplode)) {
_root.Explode();
this.removeMovieClip();
}
if ((_root.CheckForHitStoneRobos(this) || (this._x < 0)) || (((_root.POLYW * _root.NUMBERX) + 10) < this._x)) {
this.removeMovieClip();
}
}
}
Symbol 228 MovieClip [robo8rocket] Frame 2
onFrame();
Symbol 228 MovieClip [robo8rocket] Frame 3
gotoAndPlay (2);
Symbol 232 MovieClip [robo7bul] Frame 1
function onBulletFrame() {
if (_root.PauseMode == 0) {
if (this.direct == "right") {
this._x = this._x + 16;
} else {
this._x = this._x - 16;
}
if ((this.hittest(_root.game.mask.man.mc.ftr) && (_root.HeroState == 0)) && (!_root.HeroExplode)) {
_root.Explode();
this.removeMovieClip();
}
if ((_root.CheckForHitStoneRobos(this) || (this._x < 0)) || (((_root.POLYW * _root.NUMBERX) + 10) < this._x)) {
this.removeMovieClip();
}
}
}
Symbol 232 MovieClip [robo7bul] Frame 2
onBulletFrame();
Symbol 232 MovieClip [robo7bul] Frame 3
gotoAndPlay (2);
Symbol 234 MovieClip [bullet] Frame 1
function onBulletFrame() {
if (_root.PauseMode == 0) {
CheckBulletHitBounds();
CheckBulletHitStones();
CheckRobos();
if (this.direct == "left") {
this._x = this._x - _root.BulletSpeed;
}
if (this.direct == "right") {
this._x = this._x + _root.BulletSpeed;
}
}
}
function CheckRobos() {
var i;
i = 0;
while (_root.Robocol >= i) {
if (this.hittest(_root.game.mask["robo_" + i])) {
if ((_root.game.mask["robo_" + i].mode != "explode") && (_root.game.mask["robo_" + i].immortal == false)) {
_root.game.mask["robo_" + i].RoboExplode();
_root.AttachHint("+" + _root.game.mask["robo_" + i].score, _root.game.mask["robo_" + i]._x, _root.game.mask["robo_" + i]._y);
_root.score.sc = _root.score.sc + _root.game.mask["robo_" + i].score;
_root.AviableScore = _root.AviableScore + _root.game.mask["robo_" + i].score;
_root.CheckExtraLife();
_root.game.mask["robo_" + i].mode = "explode";
_root.RocketCond = 0;
this.removeMovieClip();
}
}
i++;
}
}
function CheckBulletHitBounds() {
if ((this._x < 0) || ((_root.POLYW * _root.NUMBERX) < this._x)) {
this.removeMovieClip();
}
}
function CheckBulletHitStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this.removeMovieClip();
}
k++;
}
}
Symbol 234 MovieClip [bullet] Frame 2
onBulletFrame();
Symbol 234 MovieClip [bullet] Frame 3
gotoAndPlay (2);
Symbol 235 MovieClip [bonuslife] Frame 1
function onTimer() {
if (this.hittest(_root.game.mask.man.mc.ftr)) {
_root.live.lives_num++;
this.removeMovieClip();
}
}
Symbol 235 MovieClip [bonuslife] Frame 2
onTimer();
Symbol 235 MovieClip [bonuslife] Frame 3
gotoAndPlay (2);
Symbol 237 MovieClip [bonusmatrix] Frame 1
function onTimer() {
if (this.hittest(_root.game.mask.man.mc.ftr)) {
if (_root.matrix == 0) {
_root.game.mask.attachMovie("matrix", "matrix", _root.herodepth--);
_root.game.mask.matrix._x = _root.game.mask.man._x;
_root.game.mask.matrix._y = _root.game.mask.man._y;
_root.matrix = 1;
}
this.removeMovieClip();
}
}
Symbol 237 MovieClip [bonusmatrix] Frame 2
onTimer();
Symbol 237 MovieClip [bonusmatrix] Frame 3
gotoAndPlay (2);
Symbol 239 MovieClip [bonusfugas] Frame 1
function onTimer() {
if (this.hittest(_root.game.mask.man.mc.ftr)) {
if (_root.HardLevel == "novice") {
_root.FugasCol = _root.FugasCol + 3;
}
if (_root.HardLevel == "expert") {
_root.FugasCol = _root.FugasCol + 2;
}
if (_root.HardLevel == "master") {
_root.FugasCol = _root.FugasCol + 1;
}
_root.ammo.fugas = _root.FugasCol;
this.removeMovieClip();
}
}
Symbol 239 MovieClip [bonusfugas] Frame 2
onTimer();
Symbol 239 MovieClip [bonusfugas] Frame 3
gotoAndPlay (2);
Symbol 241 MovieClip [bonusrocket] Frame 1
function onTimer() {
if (this.hittest(_root.game.mask.man.mc.ftr)) {
if (_root.HardLevel == "novice") {
_root.RocketCol = _root.RocketCol + 5;
}
if (_root.HardLevel == "expert") {
_root.RocketCol = _root.RocketCol + 4;
}
if (_root.HardLevel == "master") {
_root.RocketCol = _root.RocketCol + 2;
}
_root.ammo.rocket = _root.RocketCol;
this.removeMovieClip();
}
}
Symbol 241 MovieClip [bonusrocket] Frame 2
onTimer();
Symbol 241 MovieClip [bonusrocket] Frame 3
gotoAndPlay (2);
Symbol 243 MovieClip [bonusCannon] Frame 1
function onTimer() {
if (this.hittest(_root.game.mask.man.mc.ftr)) {
_root.Cannon = 1;
this.removeMovieClip();
}
}
Symbol 243 MovieClip [bonusCannon] Frame 2
onTimer();
Symbol 243 MovieClip [bonusCannon] Frame 3
gotoAndPlay (2);
Symbol 245 MovieClip [bonusshield] Frame 1
function onTimer() {
if (this.hittest(_root.game.mask.man.mc.ftr)) {
if ((_root.HeroState == 0) && (!_root.HeroExplode)) {
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
_root.HeroState = _root.HeroState + 100;
this.removeMovieClip();
}
}
Symbol 245 MovieClip [bonusshield] Frame 2
onTimer();
Symbol 245 MovieClip [bonusshield] Frame 3
gotoAndPlay (2);
Symbol 254 MovieClip [hint] Frame 1
function onFrame() {
this._alpha = this._alpha - 5;
this._y = this._y - 3;
this.framenumber++;
if (20 < this.framenumber) {
this.removeMovieClip();
}
}
function Initelize() {
this.framenumber = 0;
}
initalize();
Symbol 254 MovieClip [hint] Frame 2
onFrame();
Symbol 254 MovieClip [hint] Frame 3
gotoAndPlay (2);
Symbol 256 MovieClip [robo10_2] Frame 1
function onTimer() {
if (_root.PauseMode == 0) {
if ((RoboManCheck() == true) && (!_root.HeroExplode)) {
_root.Explode();
}
}
}
function RoboExplode() {
this.removeMovieClip();
}
function RoboManCheck() {
if (this.mc.rob1.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
if (this.mc.rob2.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
if (this.mc.rob3.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
return(false);
}
Symbol 256 MovieClip [robo10_2] Frame 2
onTimer();
Symbol 256 MovieClip [robo10_2] Frame 3
gotoAndPlay (2);
Symbol 258 MovieClip [robo10_1] Frame 1
function onTimer() {
if (_root.PauseMode == 0) {
if ((RoboManCheck() == true) && (!_root.HeroExplode)) {
_root.Explode();
}
}
}
function RoboExplode() {
this.removeMovieClip();
}
function RoboManCheck() {
if (this.mc.rob1.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
if (this.mc.rob2.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
if (this.mc.rob3.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
return(false);
}
Symbol 258 MovieClip [robo10_1] Frame 2
onTimer();
Symbol 258 MovieClip [robo10_1] Frame 3
gotoAndPlay (2);
Symbol 260 MovieClip [robo9] Frame 1
function onTimer() {
if (_root.PauseMode == 0) {
if ((RoboManCheck() == true) && (!_root.HeroExplode)) {
var man = _root.game.mask.man;
if (this._x < man._x) {
_root.game.mask.man._x = _root.game.mask.man._x + _root.d;
}
if (man._x < this._x) {
_root.game.mask.man._x = _root.game.mask.man._x - _root.d;
}
}
}
}
function RoboExplode() {
this.removeMovieClip();
}
function RoboManCheck() {
if (this.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
if (this.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
return(false);
}
Symbol 260 MovieClip [robo9] Frame 2
onTimer();
Symbol 260 MovieClip [robo9] Frame 3
gotoAndPlay (2);
Symbol 262 MovieClip [robo5] Frame 1
function OnTimer() {
if (_root.PauseMode == 0) {
if (this.counter == 0) {
GenerateFrequency();
}
if (0 < this.counter) {
this.counter++;
}
if (this.counter == this.frequency) {
AttachAmmo();
GenerateFrequency();
this.counter = 0;
}
}
}
function GenerateFrequency() {
this.frequency = random(this.maxfrequency - this.minfrequency) + this.minfrequency;
if (_root.DemoMode == 1) {
this.frequency = 65;
}
this.counter++;
}
function AttachAmmo() {
_root.BulletN++;
_root.game.mask.attachMovie("cannon_bullet2", "bullet_" + _root.BulletN, _root.depth++);
_root.game.mask["bullet_" + _root.BulletN]._x = this._x + 5;
_root.game.mask["bullet_" + _root.BulletN]._y = this._y + 14;
_root.game.mask["bullet_" + _root.BulletN].direct = "right";
}
Symbol 262 MovieClip [robo5] Frame 2
OnTimer();
Symbol 262 MovieClip [robo5] Frame 3
gotoAndPlay (2);
Symbol 264 MovieClip [robo4] Frame 1
function OnTimer() {
if (_root.PauseMode == 0) {
if (this.counter == 0) {
GenerateFrequency();
}
if (0 < this.counter) {
this.counter++;
}
if (this.counter == this.frequency) {
AttachAmmo();
GenerateFrequency();
this.counter = 0;
}
}
}
function GenerateFrequency() {
this.frequency = random(this.maxfrequency - this.minfrequency) + this.minfrequency;
this.counter++;
}
function AttachAmmo() {
_root.BulletN++;
_root.game.mask.attachMovie("cannon_bullet1", "bullet_" + _root.BulletN, _root.depth++);
_root.game.mask["bullet_" + _root.BulletN]._x = this._x;
_root.game.mask["bullet_" + _root.BulletN]._y = this._y + 14;
_root.game.mask["bullet_" + _root.BulletN].direct = "left";
}
Symbol 264 MovieClip [robo4] Frame 2
OnTimer();
Symbol 264 MovieClip [robo4] Frame 3
gotoAndPlay (2);
Symbol 280 MovieClip Frame 6
if (_parent._parent.kill) {
_root.Explode();
}
_parent._parent.Recreate();
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 2
stop();
Symbol 281 MovieClip Frame 3
stop();
Symbol 282 MovieClip [robo8] Frame 1
function onTimer() {
if (_root.PauseMode == 0) {
if (this.outdoors == true) {
if (0 < this.sleep) {
this.sleep--;
} else {
this._x = this._x + this.dx;
if ((0 < this._x) && ((this._x + this._width) < (_root.POLYW * _root.NUMBERX))) {
this.outdoors = false;
}
}
} else {
if ((this.counter < this.frequency) && (this.mode != "explode")) {
this.counter++;
if (this.kind == 0) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
this._y = this._y + this.dy;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._y = this._y - this.dy;
this.dy = -this.dy;
}
} else if (this.kind == 1) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
this._y = this._y - this.dy;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._y = this._y + this.dy;
this.dy = -this.dy;
}
} else if (this.kind == 2) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
}
if (this.counter == this.frequency) {
this.kind = random(3);
this.counter = 0;
}
}
CheckMan();
if ((counter == 7) && (this.mode != "explode")) {
Fire();
}
}
}
}
function CheckMan() {
var man = _root.game.mask.man.mc.ftr;
if ((this.hittest(man) && (_root.HeroState == 0)) && (_root.HeroExplode == false)) {
RoboExplode();
_root.Explode();
}
}
function Fire() {
if ((((this._x + 50) < _root.game.mask.man._x) && (this.rotation == "right")) && (Math.abs(this._y - _root.game.mask.man._y) < 70)) {
_root.BulletN++;
_root.game.mask.attachMovie("robo8rocket", "bullet_" + _root.BulletN, _root.depth++);
_root.game.mask["bullet_" + _root.BulletN]._x = this._x;
_root.game.mask["bullet_" + _root.BulletN]._y = this._y + 14;
_root.game.mask["bullet_" + _root.BulletN].dx = 10;
var man = _root.game.mask.man;
_root.game.mask["bullet_" + _root.BulletN].dy = ((man._y - this._y) * 10) / (man._x - this._x);
_root.game.mask["bullet_" + _root.BulletN].direct = this.rotation;
_root.game.mask["bullet_" + _root.BulletN].mc.gotoAndStop(this.rotation);
var bullet = _root.game.mask["bullet_" + _root.BulletN];
bullet._rotation = (Math.atan(Bullet.dy / bullet.dx) * 180) / Math.pi;
_root.game.mask["bullet_" + _root.BulletN]._x = _root.game.mask["bullet_" + _root.BulletN]._x + 40;
if (_root.SoundState == "on") {
_root.rocket_shoot.start();
}
}
if (((_root.game.mask.man._x < (this._x - 50)) && (this.rotation == "left")) && (Math.abs(this._y - _root.game.mask.man._y) < 70)) {
_root.BulletN++;
_root.game.mask.attachMovie("robo8rocket", "bullet_" + _root.BulletN, _root.depth++);
_root.game.mask["bullet_" + _root.BulletN]._x = this._x;
_root.game.mask["bullet_" + _root.BulletN]._y = this._y + 14;
_root.game.mask["bullet_" + _root.BulletN].dx = -10;
var man = _root.game.mask.man;
_root.game.mask["bullet_" + _root.BulletN].dy = ((this._y - man._y) * 10) / (man._x - this._x);
_root.game.mask["bullet_" + _root.BulletN].direct = this.rotation;
_root.game.mask["bullet_" + _root.BulletN].mc.gotoAndStop(this.rotation);
var bullet = _root.game.mask["bullet_" + _root.BulletN];
bullet._rotation = (Math.atan(Bullet.dy / bullet.dx) * 180) / Math.pi;
_root.game.mask["bullet_" + _root.BulletN]._x = _root.game.mask["bullet_" + _root.BulletN]._x + 40;
if (_root.SoundState == "on") {
_root.rocket_shoot.start();
}
}
}
function Recreate() {
if (this.mode == "explode") {
this.mc.gotoAndStop(this.rotation);
this._x = this.x;
this._y = this.y;
this.counter = 0;
this.frequency = 10;
var k = random(3);
this.kind = k;
this.outdoors = true;
this.mode = "fly";
this.sleep = 40;
}
}
function CheckBounds() {
return((((this._x < 0) || ((_root.POLYW * _root.NUMBERX) < (this._x + this._width))) || (this._y < 0)) || ((_root.POLYH * _root.NUMBERY) < (this._y + this._height)));
}
function RoboExplode() {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
Symbol 282 MovieClip [robo8] Frame 2
onTimer();
Symbol 282 MovieClip [robo8] Frame 3
gotoAndPlay (2);
Symbol 286 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 2
stop();
Symbol 286 MovieClip Frame 3
stop();
Symbol 287 MovieClip [robo7] Frame 1
function onTimer() {
if (_root.PauseMode == 0) {
if (this.outdoors == true) {
if (0 < this.sleep) {
this.sleep--;
} else {
this._x = this._x + this.dx;
if ((0 < this._x) && ((this._x + this._width) < (_root.POLYW * _root.NUMBERX))) {
this.outdoors = false;
}
}
} else {
if ((this.counter < this.frequency) && (this.mode != "explode")) {
this.counter++;
if (this.kind == 0) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
this._y = this._y + this.dy;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._y = this._y - this.dy;
this.dy = -this.dy;
}
} else if (this.kind == 1) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
this._y = this._y - this.dy;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._y = this._y + this.dy;
this.dy = -this.dy;
}
} else if (this.kind == 2) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
}
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
RoboExplode();
}
if (this.counter == this.frequency) {
this.kind = random(3);
this.counter = 0;
}
}
CheckMan();
if ((counter == 7) && (this.mode != "explode")) {
Fire();
}
}
}
}
function CheckMan() {
var man = _root.game.mask.man.mc.ftr;
if ((this.hittest(man) && (_root.HeroState == 0)) && (_root.HeroExplode == false)) {
_root.Explode();
RoboExplode();
}
}
function Fire() {
_root.BulletN++;
_root.game.mask.attachMovie("robo7bul", "bullet_" + _root.BulletN, _root.depth++);
_root.game.mask["bullet_" + _root.BulletN]._x = this._x;
_root.game.mask["bullet_" + _root.BulletN]._y = this._y + 14;
_root.game.mask["bullet_" + _root.BulletN].direct = this.rotation;
_root.game.mask["bullet_" + _root.BulletN].mc.gotoAndStop(this.rotation);
if (this.rotation == "right") {
_root.game.mask["bullet_" + _root.BulletN]._x = _root.game.mask["bullet_" + _root.BulletN]._x + 40;
}
if (_root.SoundState == "on") {
_root.fire_snd.start();
}
}
function Recreate() {
if (this.mode == "explode") {
this.mc.gotoAndStop(this.rotation);
this._x = this.x;
this._y = this.y;
this.counter = 0;
this.frequency = 10;
var k = random(3);
this.kind = k;
this.outdoors = true;
this.mode = "fly";
this.sleep = 40;
}
}
function CheckBounds() {
return((((this._x < 0) || ((_root.POLYW * _root.NUMBERX) < (this._x + this._width))) || (this._y < 0)) || ((_root.POLYH * _root.NUMBERY) < (this._y + this._height)));
}
function RoboExplode() {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
Symbol 287 MovieClip [robo7] Frame 2
onTimer();
Symbol 287 MovieClip [robo7] Frame 3
gotoAndPlay (2);
Symbol 291 MovieClip Frame 6
if (_parent._parent.kill) {
_root.Explode();
}
_parent._parent.Recreate();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
stop();
Symbol 292 MovieClip Frame 3
stop();
Symbol 293 MovieClip [robo6] Frame 1
function onTimer() {
if ((_root.PauseMode == 0) && (this.mode != "explode")) {
if (this.outdoors == true) {
if (0 < this.sleep) {
this.sleep--;
} else {
this._x = this._x + this.dx;
if ((0 < this._x) && ((this._x + this._width) < (_root.POLYW * _root.NUMBERX))) {
this.outdoors = false;
}
}
} else {
if ((this.counter < this.frequency) && (this.mode != "explode")) {
this.counter++;
if (this.kind == 0) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
this._y = this._y + this.dy;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._y = this._y - this.dy;
this.dy = -this.dy;
}
} else if (this.kind == 1) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
this._y = this._y - this.dy;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._y = this._y + this.dy;
this.dy = -this.dy;
}
} else if (this.kind == 2) {
this._x = this._x + this.dx;
if (_root.CheckForHitStoneRobos(this) || (this.CheckBounds())) {
this._x = this._x - this.dx;
this.dx = -this.dx;
if (this.dx < 0) {
this.mc.gotoAndStop("left");
this.rotation = "left";
} else {
this.mc.gotoAndStop("right");
this.rotation = "right";
}
}
}
if (this.counter == this.frequency) {
this.kind = random(3);
this.counter = 0;
}
}
CheckMan();
}
}
}
function CheckMan() {
var man = _root.game.mask.man.mc.ftr;
if ((this.hittest(man) && (_root.HeroState == 0)) && (_root.HeroExplode == false)) {
_root.Explode();
RoboExplode();
}
}
function Recreate() {
if (this.mode == "explode") {
this.mc.gotoAndPlay(this.rotation);
this._x = this.x;
this._y = this.y;
this.counter = 0;
this.frequency = 10;
var k = random(3);
this.kind = k;
this.outdoors = true;
this.mode = "fly";
this.sleep = 40;
}
}
function CheckBounds() {
return((((this._x < 0) || ((_root.POLYW * _root.NUMBERX) < (this._x + this._width))) || (this._y < 0)) || ((_root.POLYH * _root.NUMBERY) < (this._y + this._height)));
}
function RoboExplode() {
if (this.mode == "fly") {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
}
Symbol 293 MovieClip [robo6] Frame 2
onTimer();
Symbol 293 MovieClip [robo6] Frame 3
gotoAndPlay (2);
Symbol 298 MovieClip Frame 6
if (_parent._parent.kill) {
_root.Explode();
}
_parent._parent.removeMovieClip();
Symbol 299 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 2
stop();
Symbol 299 MovieClip Frame 3
stop();
Symbol 300 MovieClip [robo3] Frame 1
function robomovement() {
if (_root.PauseMode == 0) {
if (this.mode == "stop") {
var man = _root.game.mask.man;
if ((!(((man._x + man._width) < this._x) || ((this._x + this._width) < man._x))) || (this.hittest(man))) {
if (man._y < this._y) {
this.mode = "fly";
this.mc.gotoAndStop("fly");
}
}
}
if (this.mode == "fly") {
var man = _root.game.mask.man.mc.ftr;
if (!this.hittest(man)) {
this._y = this._y - 5;
if (this._x < _root.game.mask.man._x) {
this._x++;
} else {
this._x--;
}
} else {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = true;
this.mc.gotoAndStop("explode");
}
if (_root.CheckForHitStoneRobos(this.mc.rct.rctf) || (0 >= this._y)) {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
}
}
}
function Recreate() {
this.removeMovieClip();
}
function RoboExplode() {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
Symbol 300 MovieClip [robo3] Frame 2
robomovement();
Symbol 300 MovieClip [robo3] Frame 3
gotoAndPlay (2);
Symbol 305 MovieClip Frame 6
if (_parent._parent.kill) {
_root.Explode();
}
_parent._parent.removeMovieClip();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
stop();
Symbol 306 MovieClip Frame 3
stop();
Symbol 307 MovieClip [robo2] Frame 1
function robomovement() {
if (_root.PauseMode == 0) {
if (this.mode == "stop") {
var man = _root.game.mask.man;
if (this.hittest(man) || (!(((this._x + this._width) < man._x) || ((man._x + man._width) < this._x)))) {
if (man._y < this._y) {
this.mode = "fly";
this.mc.gotoAndStop("fly");
}
}
}
if (this.mode == "fly") {
var man = _root.game.mask.man.mc.ftr;
if (!this.hittest(man)) {
this._y = this._y - 6;
} else {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = true;
this.mc.gotoAndStop("explode");
}
if (_root.CheckForHitStoneRobos(this.mc.rct.rctf) || (0 >= this._y)) {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
}
}
}
function Recreate() {
this.removeMovieClip();
}
function RoboExplode() {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.mode = "explode";
this.kill = false;
this.mc.gotoAndStop("explode");
}
Symbol 307 MovieClip [robo2] Frame 2
robomovement();
Symbol 307 MovieClip [robo2] Frame 3
gotoAndPlay (2);
Symbol 309 MovieClip Frame 1
stop();
Symbol 310 MovieClip [robo1] Frame 1
function robomovement() {
if (_root.PauseMode == 0) {
if (((RoboManCheck() == true) && (_root.HeroState == 0)) && (!_root.HeroExplode)) {
_root.Explode();
}
this._y = this._y + dy;
if ((RoboCheckBounds() == true) || (RoboCheckStones() == true)) {
this._y = this._y - dy;
dy = -dy;
}
}
}
function RoboCheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(true);
}
k++;
}
return(false);
}
function RoboCheckBounds() {
if (this._y < 0) {
return(true);
}
if ((_root.POLYH * _root.NUMBERY) < (this._y + this._height)) {
return(true);
}
return(false);
}
function RoboManCheck() {
if (this.mc.mc.p1.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
if (this.mc.mc.p2.hittest(_root.game.mask.man.mc.ftr) == true) {
return(true);
}
return(false);
}
Symbol 310 MovieClip [robo1] Frame 2
robomovement();
Symbol 310 MovieClip [robo1] Frame 3
gotoAndPlay (2);
Symbol 314 MovieClip [exit2] Frame 1
function onFrame() {
if (this.hittest(_root.game.mask.man.mc.ftr) && (!_root.HeroExplode)) {
_root.GotoNextLevel();
}
}
Symbol 314 MovieClip [exit2] Frame 2
onFrame();
Symbol 314 MovieClip [exit2] Frame 3
gotoAndPlay (2);
Symbol 318 MovieClip [matrix] Frame 1
function onTimer() {
var i;
this._x = _root.game.mask.man._x;
this._y = _root.game.mask.man._y;
i = 1;
while (_root.Robocol >= i) {
if (this.hittest(_root.game.mask["robo_" + i])) {
if ((((_root.game.mask["robo_" + i].sleep == 0) && (0 < _root.game.mask["robo_" + i].score)) && (_root.game.mask["robo_" + i].mode != "explode")) && ((_root.game.mask["robo_" + i].immortal == false) || (_root.game.mask["robo_" + i].immortal == true))) {
_root.game.mask["robo_" + i].RoboExplode();
_root.AttachHint("+" + _root.game.mask["robo_" + i].score, _root.game.mask["robo_" + i]._x, _root.game.mask["robo_" + i]._y);
_root.score.sc = _root.score.sc + _root.game.mask["robo_" + i].score;
_root.AviableScore = _root.AviableScore + _root.game.mask["robo_" + i].score;
_root.CheckExtraLife();
}
}
i++;
}
}
Symbol 318 MovieClip [matrix] Frame 2
onTimer();
Symbol 318 MovieClip [matrix] Frame 3
gotoAndPlay (2);
Symbol 337 Button
on (release) {
_root.OnLogoClick();
}
Symbol 347 Button
on (release) {
_root.onHelpClick();
}
Symbol 360 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 5
stop();
Symbol 360 MovieClip Frame 8
gotoAndStop (1);
Symbol 360 MovieClip Frame 12
gotoAndStop (1);
Symbol 362 Button
on (rollOver) {
knop1.gotoAndPlay(2);
}
on (rollOut) {
knop1.gotoAndPlay(6);
}
on (release) {
if (_root.DemoMode == 0) {
_root.NewGame();
} else {
_root.NewGameYes();
}
}
Symbol 368 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 5
stop();
Symbol 369 Button
on (rollOver) {
knop2.gotoAndPlay(2);
}
on (rollOut) {
knop2.gotoAndPlay(6);
}
on (release) {
_root.OnMoreGamesClick();
}
Symbol 370 Button
on (release) {
_root.onOptionsClick();
}
Symbol 372 Button
on (release) {
if (_root.DemoMode == 0) {
_root.onPauseClick();
}
}
Symbol 376 Button
on (release) {
_root.onDemoClick();
}