Frame 1
function MakeConstsAndVariables() {
NOTHING = "0";
GRASS = "1";
STONES = "2";
ROCKET1 = "a";
ROCKET2 = "b";
ROCKET3 = "c";
POLYH = 25;
POLYW = 25;
NUMBERX = 15;
NUMBERY = 15;
LEFT = Key.LEFT;
RIGHT = Key.RIGHT;
UP = Key.UP;
DOWN = Key.DOWN;
FIRE = 122;
d = 5;
robo1MAXdx = 6;
robo1MINdx = 2;
robo1MAXdy = 6;
robo1MINdy = 2;
robo1mode = 0;
ROBO1COL = 0;
Robo1Lives = 0;
robo1startscore = 20;
robo1score = 20;
robo1frezetime = 100;
robo2MAXdx = 6;
robo2MINdx = 2;
robo2MAXdy = 6;
robo2MINdy = 2;
robo2mode = 0;
ROBO2COL = 0;
Robo2Lives = 0;
robo2startscore = 10;
robo2score = 10;
robo2frezetime = 100;
robo3MAXdx = 6;
robo3MINdx = 2;
robo3MAXdy = 6;
robo3MINdy = 2;
robo3mode = 0;
ROBO3COL = 0;
Robo3Lives = 0;
robo3startscore = 40;
robo3score = 40;
robo3frezetime = 100;
robo4MAXdx = 6;
robo4MINdx = 2;
robo4MAXdy = 6;
robo4MINdy = 2;
robo4mode = 0;
ROBO4COL = 0;
Robo4Lives = 0;
robo4startscore = 40;
robo4score = 40;
robo4MAXLENGTH = 80;
robo4MINLENGTH = 30;
robo4frezetime = 100;
robo5MAXdx = 6;
robo5MINdx = 1;
robo5MAXdy = 6;
robo5MINdy = 1;
robo5mode = 0;
ROBO5COL = 0;
Robo5Lives = 0;
robo5startscore = 40;
robo5score = 40;
robo5MAXLENGTH = 80;
robo5MINLENGTH = 30;
robo5frezetime = 100;
robo6MAXdx = 8;
robo6MINdx = 5;
robo6MAXdy = 2;
robo6MINdy = 1;
robo6mode = 0;
ROBO6COL = 0;
Robo6Lives = 0;
robo6startscore = 20;
robo6score = 20;
robo6MAXLENGTH = 80;
robo6MINLENGTH = 30;
robo6frezetime = 50;
robo7MAXdx = 9;
robo7MINdx = 6;
robo7MAXdy = 4;
robo7mode = 0;
ROBO7COL = 0;
Robo7Lives = 0;
robo7startscore = 40;
robo7score = 40;
robo7MAXLENGTH = 80;
robo7MINLENGTH = 30;
robo7frezetime = 50;
bonus1framesmin = 500;
bonus1framesmax = 1000;
bonus1frames = 0;
bonus1curframe = 0;
bonus2framesmin = 1500;
bonus2framesmax = 2000;
bonus2curframe = 0;
bonus2frames = 0;
bonus3framesmin = 2500;
bonus3framesmax = 3000;
bonus3curframe = 0;
bonus3frames = 0;
bonuslifeframesmin = 1000;
bonuslifeframesmax = 2000;
bonuslifecurframe = 0;
bonuslifeframes = 0;
bonusfireframesmin = 500;
bonusfireframesmax = 1000;
bonusfirecurframe = 0;
bonusfireframes = 0;
bonusfirelength = 0;
bonusDQDframesmin = 750;
bonusDQDframesmax = 1500;
bonusDQDcurframe = 0;
bonusDQDframes = 0;
bonusKillAllframesmin = 500;
bonusKillAllframesmax = 1000;
bonusKillAllcurframe = 0;
bonusKillAllframes = 0;
bonusframesblink = 50;
bonusframesstay = 200;
bonus1score = 100;
bonus2score = 300;
bonus3score = 600;
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;
numberstones = 0;
RocketCondition = "not started";
FirePlusX = 7;
FirePlusY = 14;
FuelCondition = "not started";
FuelNumber = 0;
FuelNecessary = 2;
CurrentLevel = 1;
RealLevel = 1;
HeroLives = 3;
HeroScoreForLife = 500;
HeroStartScoreForLife = 500;
HeroState = 0;
HeroFramesBlink = 100;
HeroRotate = "left";
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() {
if (DemoMode == 1) {
SymbolNumber = 0;
}
UnloadCurrentLevel();
if (CurrentLevel == 15) {
CurrentLevel = 1;
} else {
CurrentLevel++;
}
RealLevel++;
LevelToArray(CurrentLevel);
}
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) {
removeMovieClip(_root.game.mask["stones_mc" + counter]);
counter++;
}
y++;
}
x++;
}
}
function UnloadCurrentLevel() {
UnloadGrass();
UnloadStones();
RemoveRobots();
}
function LoadMassiveToField() {
RefreshLevel();
LoadRocket();
LoadGrass();
LoadStones();
}
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 RemoveRocket() {
removeMovieClip(_root.game.mask.rocket1);
removeMovieClip(_root.game.mask.rocket2);
removeMovieClip(_root.game.mask.rocket3);
removeMovieClip(_root.game.mask.rocketfire);
}
function AttachRocket(piecenumber, x, y) {
if (piecenumber == 1) {
_root.game.mask.attachMovie("rocketfire", "rocketfire", depth++);
_root.game.mask.rocketfire._x = (x * POLYW) + FirePlusX;
_root.game.mask.rocketfire._y = (y * POLYH) + FirePlusY;
_root.game.mask.rocketfire._visible = false;
_root.game.mask.attachMovie("rocket1", "rocket1", depth++);
_root.game.mask.rocket1._x = x * POLYW;
_root.game.mask.rocket1._y = y * POLYH;
}
if (piecenumber == 2) {
_root.game.mask.attachMovie("rocket2", "rocket2", depth++);
_root.game.mask.rocket2._x = x * POLYW;
_root.game.mask.rocket2._y = y * POLYH;
}
if (piecenumber == 3) {
_root.game.mask.attachMovie("rocket3", "rocket3", depth++);
_root.game.mask.rocket3._x = x * POLYW;
_root.game.mask.rocket3._y = y * POLYH;
}
}
function LoadRocket() {
var x;
var y;
if (RocketCondition == "flying") {
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == ROCKET1) {
_root.game.mask.rocket1._x = x * POLYW;
_root.game.mask.rocket2._x = x * POLYW;
_root.game.mask.rocket3._x = x * POLYW;
_root.game.mask.rocketfire._x = (x * POLYW) + FirePlusX;
RocketCondition = "lending";
RefreshRocketFuel();
}
y++;
}
x++;
}
} else {
x = 0;
while (x < NUMBERX) {
y = 0;
while (y < NUMBERY) {
if (field[x][y] == ROCKET1) {
AttachRocket(1, x, y);
}
if (field[x][y] == ROCKET2) {
AttachRocket(2, x, y);
}
if (field[x][y] == ROCKET3) {
AttachRocket(3, x, y);
}
y++;
}
x++;
}
}
}
function VisibleRobots() {
var i;
i = 0;
while (i < ROBO1COL) {
_root.game.mask["robo1_" + i]._visible = true;
i++;
}
i = 0;
while (i < ROBO2COL) {
_root.game.mask["robo2_" + i]._visible = true;
i++;
}
i = 0;
while (i < ROBO3COL) {
_root.game.mask["robo3_" + i]._visible = true;
i++;
}
i = 0;
while (i < ROBO4COL) {
_root.game.mask["robo4_" + i]._visible = true;
i++;
}
i = 0;
while (i < ROBO5COL) {
_root.game.mask["robo5_" + i]._visible = true;
i++;
}
i = 0;
while (i < ROBO6COL) {
_root.game.mask["robo6_" + i]._visible = true;
i++;
}
i = 0;
while (i < ROBO7COL) {
_root.game.mask["robo7_" + i]._visible = true;
i++;
}
}
function UnvisibleRobots() {
var i;
i = 0;
while (i < ROBO1COL) {
_root.game.mask["robo1_" + i]._visible = false;
i++;
}
i = 0;
while (i < ROBO2COL) {
_root.game.mask["robo2_" + i]._visible = false;
i++;
}
i = 0;
while (i < ROBO3COL) {
_root.game.mask["robo3_" + i]._visible = false;
i++;
}
i = 0;
while (i < ROBO4COL) {
_root.game.mask["robo4_" + i]._visible = false;
i++;
}
i = 0;
while (i < ROBO5COL) {
_root.game.mask["robo5_" + i]._visible = false;
i++;
}
i = 0;
while (i < ROBO6COL) {
_root.game.mask["robo6_" + i]._visible = false;
i++;
}
i = 0;
while (i < ROBO7COL) {
_root.game.mask["robo7_" + i]._visible = false;
i++;
}
}
function PlayDemoAgain() {
Symbolnumber = 0;
_root.game.removeMovieClip();
MakeConstsAndVariables();
DemoMode = 1;
AttachGame();
AttachButtonsAndCaptions();
CreateArray();
DemoMode = 1;
LevelToArray(CurrentLevel);
AttachPlayer();
_root.score.sc = 0;
VisibleRobots();
}
function RocketFireEnterFrame() {
if (PauseMode == 0) {
if ((_root.game.mask.rocketfire._y + _root.game.mask.rocketfire._height) < -10) {
if ((DemoMode == 1) and (CurrentLevel == 2)) {
PlayDemoAgain();
} else {
GotoNextLevel();
}
}
}
}
function RemoveBonuses() {
_root.game.mask.bonus1.removeMovieClip();
_root.game.mask.bonus2.removeMovieClip();
_root.game.mask.bonus3.removeMovieClip();
_root.game.mask.bonusKillAll.removeMovieClip();
_root.game.mask.bonusLife.removeMovieClip();
_root.game.mask.bonusfire.removeMovieClip();
_root.game.mask.bonusDQD.removeMovieClip();
bonus1curframe = -1000;
bonus2curframe = -1000;
bonus3curframe = -1000;
bonusKillAllcurframe = -1000;
bonusLifecurframe = -1000;
bonusfirecurframe = -1000;
bonusDQDcurframe = -1000;
}
function ResumeBonuses() {
bonus1curframe = 0;
bonus2curframe = 0;
bonus3curframe = 0;
bonusKillAllcurframe = 0;
bonusLifecurframe = 0;
bonusfirecurframe = 0;
bonusDQDcurframe = 0;
}
function Rocket1EnterFrame() {
if (PauseMode == 0) {
if (RocketCondition == "flying") {
_root.game.mask.rocket1._y = _root.game.mask.rocket1._y - d;
_root.game.mask.rocket2._y = _root.game.mask.rocket2._y - d;
_root.game.mask.rocket3._y = _root.game.mask.rocket3._y - d;
_root.game.mask.rocketfire._y = _root.game.mask.rocketfire._y - d;
}
if (RocketCondition == "lending") {
_root.game.mask.rocket1._y = _root.game.mask.rocket1._y + d;
_root.game.mask.rocket2._y = _root.game.mask.rocket2._y + d;
_root.game.mask.rocket3._y = _root.game.mask.rocket3._y + d;
_root.game.mask.rocketfire._y = _root.game.mask.rocketfire._y + d;
if ((_root.game.mask.rocket1._y + _root.game.mask.rocket1._height) >= (NUMBERY * POLYH)) {
var k;
k = (POLYH * NUMBERY) - _root.game.mask.rocket1._height;
_root.game.mask.rocket1._y = k;
k = k + FirePlusY;
_root.game.mask.rocketfire._y = k;
k = k - FirePlusY;
k = k - (_root.game.mask.rocket2._height - 1);
_root.game.mask.rocket2._y = k;
k = k - (_root.game.mask.rocket3._height - 1);
_root.game.mask.rocket3._y = k;
_root.game.mask.rocketfire._visible = false;
RocketCondition = "finished";
_root.game.mask.man._visible = true;
_root.game.mask.man._x = _root.game.mask.rocket1._x + _root.game.mask.rocket1._width;
_root.game.mask.man._y = (POLYH * NUMBERY) - _root.game.mask.man._height;
VisibleRobots();
}
}
}
}
function Rocket3EnterFrame() {
if (PauseMode == 0) {
if (RocketCondition == "just finished") {
if (Math.abs(_root.game.mask.rocket3._x - _root.game.mask.rocket1._x) < 10) {
_root.game.mask.rocket3._x = _root.game.mask.rocket1._x;
_root.game.mask.rocket3._y = _root.game.mask.rocket3._y + (2 * d);
if (Math.abs(_root.game.mask.rocket3._y - _root.game.mask.rocket2._y) < _root.game.mask.rocket2._height) {
_root.game.mask.rocket3._y = (_root.game.mask.rocket2._y - _root.game.mask.rocket2._height) + 2;
RocketCondition = "finished";
}
} else {
_root.game.mask.rocket3._x = _root.game.mask.man._x;
_root.game.mask.rocket3._y = _root.game.mask.man._y;
}
}
}
}
function Rocket2EnterFrame() {
if (PauseMode == 0) {
if (RocketCondition == "started") {
if (Math.abs(_root.game.mask.rocket2._x - _root.game.mask.rocket1._x) < 10) {
_root.game.mask.rocket2._x = _root.game.mask.rocket1._x;
_root.game.mask.rocket2._y = _root.game.mask.rocket2._y + (2 * d);
if (Math.abs(_root.game.mask.rocket2._y - _root.game.mask.rocket1._y) < _root.game.mask.rocket2._height) {
_root.game.mask.rocket2._y = (_root.game.mask.rocket1._y - _root.game.mask.rocket1._height) + 1;
RocketCondition = "processing";
}
} else {
_root.game.mask.rocket2._x = _root.game.mask.man._x;
_root.game.mask.rocket2._y = _root.game.mask.man._y;
}
}
}
}
function GenerateFuel() {
var x;
_root.game.mask.attachMovie("fuel", "fuel", depth++);
_root.game.mask.fuel._y = -_root.game.mask.fuel._height;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.fuel._x = x * POLYW;
if ((DemoMode == 1) and (CurrentLevel == 1)) {
x = 4;
_root.game.mask.fuel._x = x * POLYW;
}
if ((DemoMode == 1) and (CurrentLevel == 2)) {
x = 4;
_root.game.mask.fuel._x = x * POLYW;
}
}
function PlaceFuel() {
var x;
_root.game.mask.fuel._y = -_root.game.mask.fuel._height;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.fuel._x = x * POLYW;
if ((DemoMode == 1) and (CurrentLevel == 1)) {
x = 6;
_root.game.mask.fuel._x = x * POLYW;
}
if (((DemoMode == 1) and (CurrentLevel == 2)) and (FuelNumber == 1)) {
x = 3;
_root.game.mask.fuel._x = x * POLYW;
}
if (((DemoMode == 1) and (CurrentLevel == 2)) and (FuelNumber == 2)) {
x = 4;
_root.game.mask.fuel._x = x * POLYW;
}
}
function CheckManForHitFuel() {
if (_root.game.mask.man.hittest(game.mask.fuel) == true) {
_root.game.mask.fuel._y = _root.game.mask.man._y;
_root.game.mask.fuel._x = _root.game.mask.man._x;
return(1);
}
return(0);
}
function CheckStonesForHitFuel() {
var n;
var k;
n = numberstones;
k = 0;
while (k < n) {
if (game.mask.fuel.hittest(game.mask["stones_mc" + k]) == true) {
_root.game.mask.fuel._y = game.mask["stones_mc" + k]._y - _root.game.mask.fuel._height;
return(1);
}
if ((POLYH * NUMBERY) < Math.abs((game.mask.fuel._y + game.mask.fuel._height) + 10)) {
game.mask.fuel._y = POLYH * (NUMBERY - 1);
}
k++;
}
return(0);
}
function RefreshRocketFuel() {
if ((FuelNumber / FuelNecessary) >= 0.333333333333333) {
_root.game.mask.rocket1.r1.gotoAndStop(6);
} else {
_root.game.mask.rocket1.r1.gotoAndStop(1);
}
if ((FuelNumber / FuelNecessary) >= 0.666666666666667) {
_root.game.mask.rocket2.r2.gotoAndStop(6);
} else {
_root.game.mask.rocket2.r2.gotoAndStop(1);
}
_root.game.mask.rocket3.r3.gotoAndStop(1);
if (0.0666666666666667 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket1.r1.gotoAndStop(2);
} else if (0.133333333333333 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket1.r1.gotoAndStop(3);
} else if (0.2 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket1.r1.gotoAndStop(4);
} else if (0.266666666666667 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket1.r1.gotoAndStop(5);
} else if (0.333333333333333 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket1.r1.gotoAndStop(6);
} else if (0.4 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket2.r2.gotoAndStop(2);
} else if (0.466666666666667 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket2.r2.gotoAndStop(3);
} else if (0.533333333333333 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket2.r2.gotoAndStop(4);
} else if (0.6 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket2.r2.gotoAndStop(5);
} else if (0.666666666666667 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket2.r2.gotoAndStop(6);
} else if (0.733333333333333 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket3.r3.gotoAndStop(2);
} else if (0.8 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket3.r3.gotoAndStop(3);
} else if (0.866666666666667 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket3.r3.gotoAndStop(4);
} else if (0.933333333333333 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket3.r3.gotoAndStop(5);
} else if (1 >= (FuelNumber / FuelNecessary)) {
_root.game.mask.rocket3.r3.gotoAndStop(6);
}
if (FuelNumber == 0) {
_root.game.mask.rocket1.r1.gotoAndStop(1);
}
_root.fuel_left.fuel = FuelNecessary - FuelNumber;
}
function OnFuelEnter() {
if (PauseMode == 0) {
if (FuelCondition == "falling") {
_root.game.mask.fuel._y = _root.game.mask.fuel._y + (2 * d);
if (CheckStonesForHitFuel() == 1) {
FuelCondition = "falled";
}
if (CheckManForHitFuel() == 1) {
FuelCondition = "caught";
}
}
if (FuelCondition == "falled") {
if (CheckManForHitFuel() == 1) {
FuelCondition = "caught";
}
}
if (FuelCondition == "caught") {
if (Math.abs(_root.game.mask.fuel._x - _root.game.mask.rocket1._x) < 10) {
_root.game.mask.fuel._x = _root.game.mask.rocket1._x;
_root.game.mask.fuel._y = _root.game.mask.fuel._y + (2 * d);
if (Math.abs(_root.game.mask.fuel._y - _root.game.mask.rocket1._y) < _root.game.mask.fuel._height) {
FuelCondition = "not started";
FuelNumber++;
RefreshRocketFuel();
if (FuelNumber == FuelNecessary) {
FuelCondition = "finished";
RemoveFuel();
}
}
} else {
_root.game.mask.fuel._x = _root.game.mask.man._x;
_root.game.mask.fuel._y = _root.game.mask.man._y;
}
}
}
}
function PlaceSpaceMan() {
_root.game.mask.man._x = (POLYW * NUMBERX) / 2;
_root.game.mask.man._x = (POLYH * NUMBERY) - _root.game.mask.man._height;
_root.game.mask.man._visible = true;
}
function CheckForFuel() {
if ((RocketCondition == "finished") and (FuelCondition == "not started")) {
if (FuelNumber == 0) {
GenerateFuel();
} else {
PlaceFuel();
}
FuelCondition = "falling";
}
}
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++;
}
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 AttachRobos1(robo1number) {
var i;
ROBO1COL = robo1number;
i = 0;
while (i < robo1number) {
AttachRobo1(i);
i++;
}
}
function AttachRobo1(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo1", "robo1_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
k = random(2);
if (DemoMode == 1) {
k = 0;
}
if (k == 0) {
_root.game.mask["robo1_" + robonumber]._x = (random(NUMBERX - 3) + 1) * POLYW;
_root.game.mask["robo1_" + robonumber]._y = 1;
if (CheckForHitStoneRobos(_root.game.mask["robo1_" + robonumber]) == 0) {
_root.game.mask["robo1_" + robonumber]._y = -_root.game.mask["robo1_" + robonumber]._height;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo1_" + robonumber]._x = 1;
_root.game.mask["robo1_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
if (CheckForHitStoneRobos(_root.game.mask["robo1_" + robonumber]) == 0) {
_root.game.mask["robo1_" + robonumber]._x = -_root.game.mask["robo1_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo1_" + robonumber].dx = random(robo1MAXdx - robo1MINdx) + robo1MINdx;
_root.game.mask["robo1_" + robonumber].dy = random(robo1MAXdy - robo1MINdy) + robo1MINdy;
_root.game.mask["robo1_" + robonumber].lives = Robo1Lives;
_root.game.mask["robo1_" + robonumber]._visible = false;
_root.game.mask["robo1_" + robonumber].frezetime = 0;
_root.game.mask["robo1_" + robonumber].explode = 0;
if (DemoMode == 1) {
_root.game.mask["robo1_" + robonumber]._x = 9 * _root.POLYW;
_root.game.mask["robo1_" + robonumber].dx = -3;
_root.game.mask["robo1_" + robonumber].dy = 5;
}
}
function AttachRobos2(robo2number) {
var i;
ROBO2COL = robo2number;
i = 0;
while (i < robo2number) {
AttachRobo2(i);
i++;
}
}
function AttachRobo2(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo2", "robo2_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
k = random(2);
if (DemoMode == 1) {
k = 1;
}
if (k == 0) {
_root.game.mask["robo2_" + robonumber]._x = (random(NUMBERX - 3) + 1) * POLYW;
_root.game.mask["robo2_" + robonumber]._y = 1;
_root.game.mask["robo2_" + robonumber].dx = 0;
_root.game.mask["robo2_" + robonumber].dy = random(robo2MAXdy - robo2MINdy) + robo2MINdy;
if (CheckForHitStoneRobos(_root.game.mask["robo2_" + robonumber]) == 0) {
_root.game.mask["robo2_" + robonumber]._y = -_root.game.mask["robo2_" + robonumber]._height;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo2_" + robonumber]._x = 1;
_root.game.mask["robo2_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo2_" + robonumber].dx = random(robo2MAXdx - robo2MINdx) + robo2MINdx;
_root.game.mask["robo2_" + robonumber].dy = 0;
if (CheckForHitStoneRobos(_root.game.mask["robo2_" + robonumber]) == 0) {
_root.game.mask["robo2_" + robonumber]._x = -_root.game.mask["robo2_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo2_" + robonumber].lives = Robo2Lives;
_root.game.mask["robo2_" + robonumber]._visible = false;
_root.game.mask["robo2_" + robonumber].frezetime = 0;
_root.game.mask["robo2_" + robonumber].freemove = random(2);
_root.game.mask["robo2_" + robonumber].explode = 0;
if (DemoMode == 1) {
_root.game.mask["robo2_" + robonumber]._x = -_root.game.mask["robo2_" + robonumber]._width;
_root.game.mask["robo2_" + robonumber]._y = 1 * POLYH;
_root.game.mask["robo2_" + robonumber].dx = 2;
}
}
function CheckForHitStoneRobos(mc) {
var n;
var k;
n = numberstones;
k = 0;
while (k < n) {
if (mc.hittest(game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function AttachRobos3(robo3number) {
var i;
ROBO3COL = robo3number;
i = 0;
while (i < robo3number) {
AttachRobo3(i);
i++;
}
}
function AttachRobo3(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo3", "robo3_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
_root.game.mask["robo3_" + robonumber]._x = (random(NUMBERX - 3) + 1) * POLYW;
_root.game.mask["robo3_" + robonumber]._y = 1;
if (CheckForHitStoneRobos(_root.game.mask["robo3_" + robonumber]) == 0) {
_root.game.mask["robo3_" + robonumber]._y = -_root.game.mask["robo3_" + robonumber]._height;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo3_" + robonumber]._x = 1;
_root.game.mask["robo3_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
if (CheckForHitStoneRobos(_root.game.mask["robo3_" + robonumber]) == 0) {
_root.game.mask["robo3_" + robonumber]._x = -_root.game.mask["robo3_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo3_" + robonumber].dx = random(robo3MAXdx - robo3MINdx) + robo3MINdx;
_root.game.mask["robo3_" + robonumber].dy = random(robo3MAXdy - robo3MINdy) + robo3MINdy;
_root.game.mask["robo3_" + robonumber].lives = Robo3Lives;
_root.game.mask["robo3_" + robonumber]._visible = false;
_root.game.mask["robo3_" + robonumber].frezetime = 0;
_root.game.mask["robo3_" + robonumber].explode = 0;
}
function AttachRobos4(robo4number) {
var i;
ROBO4COL = robo4number;
i = 0;
while (i < robo4number) {
AttachRobo4(i);
i++;
}
}
function AttachRobo4(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo4", "robo4_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
_root.game.mask["robo4_" + robonumber]._x = (random(NUMBERX - 3) + 1) * POLYW;
_root.game.mask["robo4_" + robonumber]._y = 1;
_root.game.mask["robo4_" + robonumber].dx = 0;
_root.game.mask["robo4_" + robonumber].dy = random(robo4MAXdy - robo4MINdy) + robo4MINdy;
if (CheckForHitStoneRobos(_root.game.mask["robo4_" + robonumber]) == 0) {
_root.game.mask["robo4_" + robonumber]._y = -_root.game.mask["robo4_" + robonumber]._height;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo4_" + robonumber]._x = 1;
_root.game.mask["robo4_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo4_" + robonumber].dx = random(robo4MAXdx - robo4MINdx) + robo4MINdx;
_root.game.mask["robo4_" + robonumber].dy = 0;
if (CheckForHitStoneRobos(_root.game.mask["robo4_" + robonumber]) == 0) {
_root.game.mask["robo4_" + robonumber]._x = -_root.game.mask["robo4_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo4_" + robonumber].framelength = robo4MINLENGTH + random(robo4MAXLENGTH - robo4MINLENGTH);
_root.game.mask["robo4_" + robonumber].lives = Robo4Lives;
_root.game.mask["robo4_" + robonumber]._visible = false;
_root.game.mask["robo4_" + robonumber].frezetime = 0;
_root.game.mask["robo4_" + robonumber].explode = 0;
}
function AttachRobos5(robo5number) {
var i;
ROBO5COL = robo5number;
i = 0;
while (i < robo5number) {
AttachRobo5(i);
i++;
}
}
function AttachRobo5(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo5", "robo5_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
var k;
k = random(2);
if (k == 0) {
_root.game.mask["robo5_" + robonumber]._x = (random(NUMBERX - 3) + 1) * POLYW;
_root.game.mask["robo5_" + robonumber]._y = 1;
_root.game.mask["robo5_" + robonumber].dx = random(robo5MAXdx - robo5MINdx) + robo5MINdx;
_root.game.mask["robo5_" + robonumber].dy = random(robo5MAXdy - robo5MINdy) + robo5MINdy;
if (CheckForHitStoneRobos(_root.game.mask["robo5_" + robonumber]) == 0) {
_root.game.mask["robo5_" + robonumber]._y = -_root.game.mask["robo5_" + robonumber]._height;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo5_" + robonumber]._x = 1;
_root.game.mask["robo5_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo5_" + robonumber].dx = random(robo5MAXdx - robo5MINdx) + robo5MINdx;
_root.game.mask["robo5_" + robonumber].dy = random(robo5MAXdy - robo5MINdy) + robo5MINdy;
if (CheckForHitStoneRobos(_root.game.mask["robo5_" + robonumber]) == 0) {
_root.game.mask["robo5_" + robonumber]._x = -_root.game.mask["robo5_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo5_" + robonumber].framelength = robo5MINLENGTH + random(robo5MAXLENGTH - robo5MINLENGTH);
_root.game.mask["robo5_" + robonumber].lives = Robo5Lives;
_root.game.mask["robo5_" + robonumber]._visible = false;
_root.game.mask["robo5_" + robonumber].frezetime = 0;
_root.game.mask["robo5_" + robonumber].explode = 0;
}
function AttachRobos6(robo6number) {
var i;
ROBO6COL = robo6number;
i = 0;
while (i < robo6number) {
AttachRobo6(i);
i++;
}
}
function AttachRobo6(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo6", "robo6_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
_root.game.mask["robo6_" + robonumber]._x = (POLYW * NUMBERX) - _root.game.mask["robo6_" + robonumber]._width;
_root.game.mask["robo6_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo6_" + robonumber].dx = -(random(robo6MAXdx - robo6MINdx) + robo6MINdx);
_root.game.mask["robo6_" + robonumber].dy = random(robo6MAXdy - robo6MINdy) + robo6MINdy;
if (CheckForHitStoneRobos(_root.game.mask["robo6_" + robonumber]) == 0) {
_root.game.mask["robo6_" + robonumber]._x = POLYW * NUMBERX;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo6_" + robonumber]._x = 1;
_root.game.mask["robo6_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo6_" + robonumber].dx = random(robo6MAXdx - robo6MINdx) + robo6MINdx;
_root.game.mask["robo6_" + robonumber].dy = random(robo6MAXdy - robo6MINdy) + robo6MINdy;
if (CheckForHitStoneRobos(_root.game.mask["robo6_" + robonumber]) == 0) {
_root.game.mask["robo6_" + robonumber]._x = -_root.game.mask["robo6_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo6_" + robonumber].lives = 1;
_root.game.mask["robo6_" + robonumber]._visible = false;
_root.game.mask["robo6_" + robonumber].frezetime = 0;
_root.game.mask["robo6_" + robonumber].explode = 0;
}
function AttachRobos7(robo7number) {
var i;
ROBO7COL = robo7number;
i = 0;
while (i < robo7number) {
AttachRobo7(i);
i++;
}
}
function AttachRobo7(robonumber) {
var k;
var f;
var b;
_root.game.mask.attachMovie("robo7", "robo7_" + robonumber, herodepth--);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
_root.game.mask["robo7_" + robonumber]._x = (POLYW * NUMBERX) - _root.game.mask["robo7_" + robonumber]._width;
_root.game.mask["robo7_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo7_" + robonumber].dx = -(random(robo7MAXdx - robo7MINdx) + robo7MINdx);
_root.game.mask["robo7_" + robonumber].dy = 0;
if (CheckForHitStoneRobos(_root.game.mask["robo7_" + robonumber]) == 0) {
_root.game.mask["robo7_" + robonumber]._x = POLYW * NUMBERX;
b = 1;
}
}
if (k == 1) {
_root.game.mask["robo7_" + robonumber]._x = 1;
_root.game.mask["robo7_" + robonumber]._y = (random(NUMBERY - 3) + 1) * POLYH;
_root.game.mask["robo7_" + robonumber].dx = random(robo7MAXdx - robo7MINdx) + robo7MINdx;
_root.game.mask["robo7_" + robonumber].dy = 0;
if (CheckForHitStoneRobos(_root.game.mask["robo7_" + robonumber]) == 0) {
_root.game.mask["robo7_" + robonumber]._x = -_root.game.mask["robo7_" + robonumber]._width;
b = 1;
}
}
}
_root.game.mask["robo7_" + robonumber].lives = 1;
_root.game.mask["robo7_" + robonumber]._visible = false;
_root.game.mask["robo7_" + robonumber].frezetime = 0;
_root.game.mask["robo7_" + robonumber].explode = 0;
}
function GenerateLives() {
if (HardLevel == "novice") {
if (RealLevel < 15) {
Robo1Lives = RealLevel;
Robo2Lives = RealLevel;
Robo3Lives = RealLevel;
Robo4Lives = RealLevel;
Robo5Lives = RealLevel;
} else {
Robo1Lives = 15;
Robo2Lives = 15;
Robo3Lives = 15;
Robo4Lives = 15;
Robo5Lives = 15;
}
} else if (HardLevel == "expert") {
if (RealLevel < 15) {
Robo1Lives = RealLevel * 2;
Robo2Lives = RealLevel * 2;
Robo3Lives = RealLevel * 2;
Robo4Lives = RealLevel * 2;
Robo5Lives = RealLevel * 2;
} else {
Robo1Lives = 30;
Robo2Lives = 30;
Robo3Lives = 30;
Robo4Lives = 30;
Robo5Lives = 30;
}
} else if (HardLevel == "master") {
if (RealLevel < 15) {
Robo1Lives = RealLevel * 3;
Robo2Lives = RealLevel * 3;
Robo3Lives = RealLevel * 3;
Robo4Lives = RealLevel * 3;
Robo5Lives = RealLevel * 3;
} else {
Robo1Lives = 45;
Robo2Lives = 45;
Robo3Lives = 45;
Robo4Lives = 45;
Robo5Lives = 45;
}
}
}
function GenerateRoboScores() {
robo1score = robo1startscore * Robo1Lives;
robo2score = robo2startscore * Robo2Lives;
robo3score = robo3startscore * Robo3Lives;
robo4score = robo4startscore * Robo4Lives;
robo5score = robo5startscore * Robo5Lives;
robo6score = robo6startscore * Robo5Lives;
robo7score = robo7startscore * Robo5Lives;
bonus1score = robo7score * 2;
bonus2score = robo7score * 5;
bonus3score = robo7score * 10;
if (HardLevel == "novice") {
bonusframesstay = bonusframesblink * 5;
} else if (HardLevel == "expert") {
bonusframesstay = bonusframesblink * 3;
} else if (HardLevel == "master") {
bonusframesstay = bonusframesblink * 2;
}
}
function GenerateFuelCol() {
if (HardLevel == "novice") {
if (RealLevel < 10) {
FuelNecessary = RealLevel + 1;
} else {
FuelNecessary = 10;
}
} else if (HardLevel == "expert") {
if (RealLevel < 20) {
FuelNecessary = RealLevel + 1;
} else {
FuelNecessary = 20;
}
} else if (HardLevel == "master") {
if (RealLevel < 30) {
FuelNecessary = RealLevel + 1;
} else {
FuelNecessary = 30;
}
}
}
function GenerateRobots() {
GenerateLives();
GenerateRoboScores();
var sc;
var k;
var r1c;
var r2c;
var r3c;
var r4c;
var r5c;
var r6c;
var r7c;
r1c = 0;
r2c = 0;
r3c = 0;
r4c = 0;
r5c = 0;
r6c = 0;
r7c = 0;
sc = RealLevel * 10;
if (HardLevel == "expert") {
sc = sc * 2;
}
if (HardLevel == "master") {
sc = sc * 3;
}
while (0 < sc) {
if ((4 < ((((((r1c + r2c) + r3c) + r4c) + r5c) + r6c) + r7c)) and (HardLevel == "novice")) {
break;
}
if ((5 < ((((((r1c + r2c) + r3c) + r4c) + r5c) + r6c) + r7c)) and (HardLevel == "expert")) {
break;
}
if ((6 < ((((((r1c + r2c) + r3c) + r4c) + r5c) + r6c) + r7c)) and (HardLevel == "master")) {
break;
}
if (sc >= robo7startscore) {
k = random(4);
if (k == 0) {
r3c++;
sc = sc - robo3startscore;
continue;
}
if (k == 1) {
r4c++;
sc = sc - robo4startscore;
continue;
}
if (k == 2) {
r5c++;
sc = sc - robo5startscore;
continue;
}
if (k == 3) {
r7c++;
sc = sc - robo7startscore;
continue;
}
}
if (sc >= robo1startscore) {
k = random(2);
if (DemoMode == 1) {
k = 0;
}
if (k == 0) {
r1c++;
sc = sc - robo1startscore;
continue;
}
if (k == 1) {
r6c++;
sc = sc - robo6startscore;
continue;
}
}
if (sc >= robo2startscore) {
r2c++;
sc = sc - robo2startscore;
continue;
}
}
if (0 < r1c) {
AttachRobos1(r1c);
}
if (0 < r2c) {
AttachRobos2(r2c);
}
if (0 < r3c) {
AttachRobos3(r3c);
}
if (0 < r4c) {
AttachRobos4(r4c);
}
if (0 < r5c) {
AttachRobos5(r5c);
}
if (0 < r6c) {
AttachRobos6(r6c);
}
if (0 < r7c) {
AttachRobos7(r7c);
}
}
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");
}
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);
}
}
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 CheckExtraLife() {
if (AviableScore >= HeroScoreForLife) {
_root.live.lives_num++;
AviableScore = AviableScore - HeroScoreForLife;
if (HeroScoreForLife < 10000) {
HeroScoreForLife = HeroScoreForLife + HeroStartScoreForLife;
}
}
}
function initalization() {
AttachGame();
AttachSounds();
AttachButtonsAndCaptions();
AttachPlayer();
_root.score.sc = 0;
CreateArray();
LevelToArray(CurrentLevel);
VisibleRobots();
AttachDemoMode();
}
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()) + "jpk");
getURL (sd, "blank");
}
function SendResult() {
var stSend = ((((((((_root.score + "\t") + 0) + "\t") + stName) + "\t") + "jpk") + "\t") + "web");
getURL ("http://absolutist.com/cgi-bin/gameres.pl?g=jpk&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()) + "jpk");
getURL (sd, "blank");
}
function GetPrefix() {
return(_root._url.charAt(_root._url.length - 3));
}
function CreateLevels(level) {
if (level == 1) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "0000c0000000000";
lev3 = "002220000000000";
lev4 = "000000000000000";
lev5 = "000000000000000";
lev6 = "000000b00000000";
lev7 = "000000222000000";
lev8 = "000000000000000";
lev9 = "000000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "000000000000000";
lev13 = "000000000000000";
lev14 = "1111111111a1111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
RefreshRocketFuel();
ResumeBonuses();
} else if (level == 2) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000000000000";
lev4 = "000002220022000";
lev5 = "000000000000000";
lev6 = "000000000000000";
lev7 = "000000000000000";
lev8 = "000000000000000";
lev9 = "000022200000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "000000000c00000";
lev13 = "000000000b00000";
lev14 = "111111111a11111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 3) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000002222000";
lev4 = "000000000000000";
lev5 = "222000000000000";
lev6 = "000000000000000";
lev7 = "000000000000000";
lev8 = "000000000002222";
lev9 = "000000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "000000c00000000";
lev13 = "000000b00000000";
lev14 = "111111a11111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 4) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000022";
lev3 = "000000000000000";
lev4 = "000000000000000";
lev5 = "000000000000000";
lev6 = "000000000000000";
lev7 = "000000000002222";
lev8 = "000000000000000";
lev9 = "220000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "0000000000c0000";
lev13 = "0000000000b0000";
lev14 = "1111111111a1111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 5) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000222000222000";
lev4 = "000200000002000";
lev5 = "000200000002000";
lev6 = "000000000000000";
lev7 = "000000000000000";
lev8 = "000200000002000";
lev9 = "000200000002000";
lev10 = "000222000222000";
lev11 = "000000000000000";
lev12 = "000000c00000000";
lev13 = "000000b00000000";
lev14 = "111111a11111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 6) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000022";
lev3 = "000002000000200";
lev4 = "000020000002000";
lev5 = "000200000020000";
lev6 = "002000000200000";
lev7 = "220000000000000";
lev8 = "000000000000000";
lev9 = "000000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "000000c00000000";
lev13 = "000000b00000000";
lev14 = "111111a11111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 7) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000000000000";
lev4 = "000020000002000";
lev5 = "222222000022222";
lev6 = "000000000000000";
lev7 = "000000000000000";
lev8 = "000000000000000";
lev9 = "222000000000022";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "00000000c000000";
lev13 = "00000000b000000";
lev14 = "11111111a111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 8) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000000000000";
lev4 = "000000000000000";
lev5 = "222220000000000";
lev6 = "000000000000000";
lev7 = "000000000002000";
lev8 = "000000000020000";
lev9 = "000000000200000";
lev10 = "000000002000000";
lev11 = "000000020000000";
lev12 = "000000200000c00";
lev13 = "000002000000b00";
lev14 = "111111111111a11";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 9) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000200000";
lev3 = "220000000200000";
lev4 = "000000000000000";
lev5 = "000000000000000";
lev6 = "000000000000000";
lev7 = "000000000200000";
lev8 = "000000000200000";
lev9 = "000000000200000";
lev10 = "222200000200000";
lev11 = "000000000000000";
lev12 = "000000c00000000";
lev13 = "000000b00000000";
lev14 = "111111a11111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 10) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "200000000000222";
lev4 = "020000000002000";
lev5 = "002000000020000";
lev6 = "000200000200000";
lev7 = "000020002000000";
lev8 = "000000000000000";
lev9 = "000000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "000000c00000000";
lev13 = "000000b00000000";
lev14 = "111111a11111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 11) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000000000000";
lev4 = "000000000000000";
lev5 = "000000000000000";
lev6 = "222222222200222";
lev7 = "000000000000000";
lev8 = "000000000000000";
lev9 = "000000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "00000000000c000";
lev13 = "00000000000b000";
lev14 = "11111111111a111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 12) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000220000022000";
lev4 = "000220000022000";
lev5 = "000000000000000";
lev6 = "000000000000000";
lev7 = "000000000000000";
lev8 = "000000000000000";
lev9 = "000220000022000";
lev10 = "000220000022000";
lev11 = "000000000000000";
lev12 = "0000000c0000000";
lev13 = "0000000b0000000";
lev14 = "1111111a1111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 13) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000000000000";
lev4 = "000000000000000";
lev5 = "000000222000000";
lev6 = "000000222000000";
lev7 = "000000222000000";
lev8 = "000000000000000";
lev9 = "000000000000000";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "00c000000000000";
lev13 = "00b000000000000";
lev14 = "11a111111111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 14) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000000000000";
lev3 = "000000000000000";
lev4 = "000000000200000";
lev5 = "000000000200000";
lev6 = "000000000200000";
lev7 = "000000000200000";
lev8 = "000000000200000";
lev9 = "222220022222222";
lev10 = "000000000000000";
lev11 = "000000000000000";
lev12 = "000000c00000000";
lev13 = "000000b00000000";
lev14 = "111111a11111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
} else if (level == 15) {
lev0 = "000000000000000";
lev1 = "000000000000000";
lev2 = "000000020000000";
lev3 = "222200020002222";
lev4 = "000000020000000";
lev5 = "000000020000000";
lev6 = "000000020000000";
lev7 = "000000020000000";
lev8 = "000000020000000";
lev9 = "000000020000000";
lev10 = "000000020000000";
lev11 = "000000020000000";
lev12 = "00000002c000000";
lev13 = "00000002b000000";
lev14 = "11111111a111111";
FuelNumber = 0;
GenerateFuelCol();
FuelCondition = "not started";
LevelToArray();
LoadMassiveToField();
GenerateRobots();
ResumeBonuses();
}
}
function OnMovieKeyDown() {
if (_root.DemoMode == 0) {
if (Key.getCode() == LEFT) {
moveleft = 1;
}
if (Key.getCode() == RIGHT) {
moveright = 1;
}
if (Key.getCode() == UP) {
moveup = 1;
}
if (Key.getCode() == DOWN) {
movedown = 1;
}
if (Key.getAscii() == FIRE) {
FireMode = 1;
}
} else if (_root.OpenedWindow == 0) {
_root.NewGameYes();
_root.DemoMode = 0;
}
}
function OnMovieKeyUp() {
if (_root.DemoMode == 0) {
if (Key.getCode() == LEFT) {
moveleft = 0;
}
if (Key.getCode() == RIGHT) {
moveright = 0;
}
if (Key.getCode() == UP) {
moveup = 0;
}
if (Key.getCode() == DOWN) {
movedown = 0;
}
if (Key.getAscii() == FIRE) {
FireMode = 0;
}
if (Key.getAscii() == 112) {
if (PauseMode == 1) {
PauseMode = 0;
_root.pauseon._visible = false;
} else {
_root.pauseon._visible = true;
PauseMode = 1;
}
}
}
}
function CheckStonesForHit() {
var n;
var k;
n = numberstones;
k = 0;
while (k < n) {
if (game.mask.man.hittest(game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function CheckBounds() {
if (_root.game.mask.man.hittest(_root.bounds) == true) {
return(1);
}
if (_root.game.mask.man.hittest(_root.bounds1) == true) {
return(1);
}
if (_root.game.mask.man.hittest(_root.bounds2) == true) {
return(1);
}
if (_root.game.mask.man.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function CheckMoveRight() {
if ((moveright == 1) and (((game.mask.man._x + game.mask.man._width) + d) < (POLYW * NUMBERX))) {
game.mask.man._x = game.mask.man._x + d;
if ((CheckStonesForHit() == 1) or (CheckBounds == 1)) {
game.mask.man._x = game.mask.man._x - d;
} else {
HeroRotate = "right";
if (HeroState == 0) {
game.mask.man.mc.gotoAndStop("right");
} else {
game.mask.man.mc.gotoAndStop("right1");
}
}
}
}
function CheckMoveLeft() {
if ((moveleft == 1) and (0 < (game.mask.man._x - d))) {
game.mask.man._x = game.mask.man._x - d;
if ((CheckStonesForHit() == 1) or (CheckBounds == 1)) {
game.mask.man._x = game.mask.man._x + d;
} else {
HeroRotate = "left";
if (HeroState == 0) {
game.mask.man.mc.gotoAndStop("left");
} else {
game.mask.man.mc.gotoAndStop("left1");
}
}
}
}
function CheckMoveUp() {
if ((moveup == 1) and (0 < (game.mask.man._y - d))) {
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) and ((((game.mask.man._y + game.mask.man._height) + d) - 1) < (POLYH * NUMBERY))) {
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) and (((game.mask.man._y + game.mask.man._height) + 1) < (POLYH * NUMBERY))) {
game.mask.man._y = game.mask.man._y + 2;
if (CheckStonesForHit() == 1) {
game.mask.man._y = game.mask.man._y - 2;
}
}
}
function CheckForRocket2() {
if (_root.game.mask.man.hittest(_root.game.mask.rocket2) == true) {
RocketCondition = "started";
}
}
function CheckForRocket3() {
if (_root.game.mask.man.hittest(_root.game.mask.rocket3) == true) {
RocketCondition = "just finished";
}
}
function CheckRocket() {
if (RocketCondition == "not started") {
CheckForRocket2();
}
if (RocketCondition == "processing") {
CheckForRocket3();
}
}
function CheckForFly() {
if (FuelCondition == "finished") {
if ((_root.game.mask.man.hittest(_root.game.mask.rocket1) == true) and (RocketCondition != "flying")) {
UnloadRobots();
RemoveBonuses();
RocketCondition = "flying";
_root.game.mask.man._visible = false;
_root.game.mask.rocketfire._visible = true;
}
if ((_root.game.mask.man.hittest(_root.game.mask.rocket2) == true) and (RocketCondition != "flying")) {
UnloadRobots();
RemoveBonuses();
RocketCondition = "flying";
_root.game.mask.man._visible = false;
_root.game.mask.rocketfire._visible = true;
}
if ((_root.game.mask.man.hittest(_root.game.mask.rocket3) == true) and (RocketCondition != "flying")) {
UnloadRobots();
RemoveBonuses();
RocketCondition = "flying";
_root.game.mask.man._visible = false;
_root.game.mask.rocketfire._visible = true;
}
}
}
function BlinkCheck() {
if (0 < HeroState) {
HeroState--;
if (HeroState == 0) {
_root.game.mask.man.mc.prevFrame();
_root.game.mask.man.mc.prevFrame();
}
}
}
function FireCheck() {
if ((_root.RocketCondition != "flying") and (_root.RocketCondition != "lending")) {
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;
_root.game.mask["bullet_" + BulletN].direct = HeroRotate;
if (SoundState == "on") {
fire_snd.start();
}
}
if (0 < FireCurFrame) {
FireCurFrame--;
}
}
if (0 < _root.bonusfirelength) {
_root.bonusfirelength--;
if (_root.bonusfirelength == 0) {
_root.FireFramesD = 3;
}
}
}
function AttachBonus1() {
_root.game.mask.attachMovie("bonus1", "bonus1", depth++);
var x;
_root.game.mask.bonus1._y = -_root.game.mask.bonus1._height;
_root.game.mask.bonus1._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonus1._x = x * POLYW;
_root.game.mask.bonus1.frame = 0;
_root.game.mask.bonus1.alphad = -10;
}
function AttachBonus2() {
_root.game.mask.attachMovie("bonus2", "bonus2", depth++);
var x;
_root.game.mask.bonus2._y = -_root.game.mask.bonus2._height;
_root.game.mask.bonus2._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonus2._x = x * POLYW;
_root.game.mask.bonus2.frame = 0;
_root.game.mask.bonus2.alphad = -10;
}
function AttachBonus3() {
_root.game.mask.attachMovie("bonus3", "bonus3", depth++);
var x;
_root.game.mask.bonus3._y = -_root.game.mask.bonus3._height;
_root.game.mask.bonus3._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonus3._x = x * POLYW;
_root.game.mask.bonus3.frame = 0;
_root.game.mask.bonus3.alphad = -10;
}
function AttachBonuslife() {
_root.game.mask.attachMovie("bonuslife", "bonuslife", depth++);
var x;
_root.game.mask.bonuslife._y = -_root.game.mask.bonuslife._height;
_root.game.mask.bonuslife._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonuslife._x = x * POLYW;
_root.game.mask.bonuslife.frame = 0;
_root.game.mask.bonuslife.alphad = -10;
}
function AttachBonusDQD() {
_root.game.mask.attachMovie("bonusDQD", "bonusDQD", depth++);
var x;
_root.game.mask.bonusDQD._y = -_root.game.mask.bonusDQD._height;
_root.game.mask.bonusDQD._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonusDQD._x = x * POLYW;
_root.game.mask.bonusDQD.frame = 0;
_root.game.mask.bonusDQD.alphad = -10;
}
function AttachBonusKillAll() {
_root.game.mask.attachMovie("bonusKillAll", "bonusKillAll", depth++);
var x;
_root.game.mask.bonusKillAll._y = -_root.game.mask.bonusKillAll._height;
_root.game.mask.bonusKillAll._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonusKillAll._x = x * POLYW;
_root.game.mask.bonusKillAll.frame = 0;
_root.game.mask.bonusKillAll.alphad = -10;
}
function AttachBonusFire() {
_root.game.mask.attachMovie("bonusfire", "bonusfire", depth++);
var x;
_root.game.mask.fire._y = -_root.game.mask.fire._height;
_root.game.mask.bonusfire._visible = true;
x = random(NUMBERX - 1);
if (field[x][NUMBERY - 1] == ROCKET1) {
x--;
}
_root.game.mask.bonusfire._x = x * POLYW;
_root.game.mask.bonusfire.frame = 0;
_root.game.mask.bonusfire.alphad = -10;
}
function CheckBonus() {
bonus1curframe++;
bonus2curframe++;
bonus3curframe++;
bonuslifecurframe++;
bonusKillAllcurframe++;
bonusDQDcurframe++;
bonusfirecurframe++;
if (bonus1curframe == bonus1framesmin) {
bonus1frames = bonus1framesmin + random(bonus1framesmax - bonus1framesmin);
}
if (bonus2curframe == bonus2framesmin) {
bonus2frames = bonus2framesmin + random(bonus2framesmax - bonus2framesmin);
}
if (bonus3curframe == bonus3framesmin) {
bonus3frames = bonus3framesmin + random(bonus3framesmax - bonus3framesmin);
}
if (bonuslifecurframe == bonuslifeframesmin) {
bonuslifeframes = bonuslifeframesmin + random(bonuslifeframesmax - bonuslifeframesmin);
}
if (bonusfirecurframe == bonusfireframesmin) {
bonusfireframes = bonusfireframesmin + random(bonusfireframesmax - bonusfireframesmin);
}
if (bonusDQDcurframe == bonusDQDframesmin) {
bonusDQDframes = bonusDQDframesmin + random(bonusDQDframesmax - bonusDQDframesmin);
}
if (bonusKillAllcurframe == bonusKillAllframesmin) {
bonusKillAllframes = bonusKillAllframesmin + random(bonusKillAllframesmax - bonusKillAllframesmin);
}
if (bonus1curframe == bonus1frames) {
AttachBonus1();
}
if (bonus2curframe == bonus2frames) {
AttachBonus2();
}
if (bonus3curframe == bonus3frames) {
AttachBonus3();
}
if (bonuslifecurframe == bonuslifeframes) {
AttachBonuslife();
}
if (bonusfirecurframe == bonusfireframes) {
AttachBonusFire();
}
if (bonusKillAllcurframe == bonusKillAllframes) {
AttachBonusKillAll();
}
if (bonusDQDcurframe == bonusDQDframes) {
AttachBonusDQD();
}
}
function DemoRecord() {
if (CurrentLevel == 2) {
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 (firemode == 1) {
democodefire = democodefire + "F";
} else {
democodefire = democodefire + "S";
}
}
}
function OnFrame() {
if (PauseMode == 0) {
if (DemoMode == 1) {
DemoOnFrame();
}
CheckMoveRight();
CheckMoveLeft();
CheckMoveUp();
CheckMoveDown();
CheckGM();
CheckRocket();
CheckForFuel();
CheckForFly();
BlinkCheck();
FireCheck();
CheckBonus();
}
}
function OnLogoClick() {
if (DemoMode == 0) {
_root.pauseon._visible = true;
PauseMode = 1;
_root.AbsLink();
}
}
function OnMoreGamesClick() {
if (DemoMode == 0) {
_root.pauseon._visible = true;
PauseMode = 1;
_root.AbsLink();
}
}
function onPauseClick() {
if (OpenedWindow == 0) {
if (PauseMode == 0) {
_root.pauseon._visible = true;
PauseMode = 1;
} else {
PauseMode = 0;
_root.pauseon._visible = false;
}
}
}
function NewGame() {
if (OpenedWindow == 0) {
PauseMode = 1;
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) {
PauseMode = 1;
attachMovie("help", "help", 1000);
_root.help._x = 187.5 - (help._width / 2);
_root.help._y = 187.5 - (help._height / 2);
OpenedWindow = 1;
}
}
function HelpOK() {
_root.pauseon._visible = false;
PauseMode = 0;
OpenedWindow = 0;
_root.help.removeMovieClip();
}
function NewGameYes() {
_root.demomodeon._visible = false;
_root.game.removeMovieClip();
MakeConstsAndVariables();
AttachGame();
AttachButtonsAndCaptions();
CreateArray();
DemoMode = 0;
LevelToArray(CurrentLevel);
AttachPlayer();
_root.score.sc = 0;
VisibleRobots();
PauseMode = 0;
OpenedWindow = 0;
_root.pauseon._visible = false;
_root.perf.removeMovieClip();
}
function NewGameNo() {
PauseMode = 0;
OpenedWindow = 0;
_root.pauseon._visible = false;
_root.perf.removeMovieClip();
}
function GameOverOK() {
OpenedWindow = 0;
MakeConstsAndVariables();
AttachGame();
AttachButtonsAndCaptions();
CreateArray();
LevelToArray(CurrentLevel);
AttachPlayer();
_root.score.sc = 0;
VisibleRobots();
_root.pauseon._visible = false;
_root.game_over.removeMovieClip();
}
function onOptionsClick() {
if (OpenedWindow == 0) {
PauseMode = 1;
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._y = 33;
} else if (HardLevel == "expert") {
_root.options.hardlevel_chk._y = 62;
} else if (HardLevel == "master") {
_root.options.hardlevel_chk._y = 90;
}
if (SoundState == "on") {
_root.options.sound_chk._y = 62;
} else if (SoundState == "off") {
_root.options.sound_chk._y = 90;
}
}
}
function OptionsExpertClick() {
_root.options.hardlevel_chk._y = 62;
_root.options.HardLevel = "expert";
_root.options.changed = 1;
}
function OptionsNoviceClick() {
_root.options.hardlevel_chk._y = 33;
_root.options.HardLevel = "novice";
_root.options.changed = 1;
}
function OptionsMasterClick() {
_root.options.hardlevel_chk._y = 90;
_root.options.HardLevel = "master";
_root.options.changed = 1;
}
function OptionsSoundOffClick() {
_root.options.sound_chk._y = 90;
SoundState = "off";
}
function OptionsSoundOnClick() {
_root.options.sound_chk._y = 62;
SoundState = "on";
}
function OptionsCancelClick() {
PauseMode = 0;
OpenedWindow = 0;
_root.pauseon._visible = false;
_root.options.removeMovieClip();
}
function OptionsOkClick() {
if ((_root.options.changed == 1) and (DemoMode == 0)) {
attachMovie("perf2", "perf2", 1925);
} else {
if (_root.options.changed == 1) {
_root.demomodeon._visible = false;
DemoMode = 0;
HardLevel = _root.options.HardLevel;
_root.game.removeMovieClip();
MakeConstsAndVariables();
AttachGame();
AttachButtonsAndCaptions();
CreateArray();
LevelToArray(CurrentLevel);
AttachPlayer();
_root.score.sc = 0;
VisibleRobots();
PauseMode = 0;
}
OpenedWindow = 0;
PauseMode = 0;
_root.pauseon._visible = false;
_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.game.removeMovieClip();
MakeConstsAndVariables();
AttachGame();
AttachButtonsAndCaptions();
CreateArray();
LevelToArray(CurrentLevel);
AttachPlayer();
_root.score.sc = 0;
VisibleRobots();
PauseMode = 0;
}
OpenedWindow = 0;
PauseMode = 0;
_root.pauseon._visible = false;
_root.options.removeMovieClip();
_root.perf2.removeMovieClip();
}
function onDemoClick() {
var s;
if (OpenedWindow == 0) {
if (DemoMode == 0) {
PauseMode = 1;
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;
}
}
}
function onDemoYes() {
var s;
s = HardLevel;
HardLevel = "novice";
DemoMode = 1;
_root.game.removeMovieClip();
MakeConstsAndVariables();
AttachGame();
AttachButtonsAndCaptions();
CreateArray();
DemoMode = 1;
LevelToArray(CurrentLevel);
AttachPlayer();
_root.score.sc = 0;
VisibleRobots();
PauseMode = 0;
OpenedWindow = 0;
_root.perf.removeMovieClip();
symbolnumber = 0;
_root.demomodeon._visible = true;
HardLevel = s;
OpenedWindow = 0;
PauseMode = 0;
_root.pauseon._visible = false;
_root.perf1.removeMovieClip();
}
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") {
firemode = 1;
} else if (value == "S") {
firemode = 0;
}
}
function DemoOnFrame() {
if (PauseMode == 0) {
if (CurrentLevel == 1) {
DecodeHero(DemoLineUp.substr(symbolnumber, 1));
DecodeHero(DemoLineDown.substr(symbolnumber, 1));
DecodeHero(DemoLineLeft.substr(symbolnumber, 1));
DecodeHero(DemoLineRight.substr(symbolnumber, 1));
DecodeHero(DemoLineFire.substr(symbolnumber, 1));
if (Symbolnumber < DemoLineUp.length) {
Symbolnumber++;
}
}
if (CurrentLevel == 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++;
}
}
}
}
HardLevel = "novice";
SoundState = "on";
OpenedWindow = 0;
DemoMode = 1;
MakeConstsAndVariables();
initalization();
DemoLineUp = "777777773333333333333333333333333333333337777777777777733333333337777777777777777777777777777777777777773333333333333333333333377777777333333337777777777777777777777777777777777777777777777777777777777777777777333333333333333333333333333333333333333333333333333333777777777777777777777777777777777777777777777777777777777777777777777733333333333333377777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777";
DemoLineDown = "888888888888888888888888888888888888888888888448888888888888888888888888888888888888888888844444444444888888888888888888888888888888888888888888888444444888888884444448888884444444444488444444444444444444448888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888884488444444888844448888888888888844444444444444444444444444444444888888888888888888888888888888888";
DemoLineLeft = "555551111155555555555555555555555555555555555555555555555111111111111555555555555555555555555555555555555555111111111111111111111111111111111111155555555555555555555555555555555555555555555511111111111111111111111111111155555511111155555555555555555555555555555511111155555555111111111111555555555555555555555555555555555555555555555555555511111111111111111111111115555555511111111111111555555555555555555555555555555555555555555555555555555555555555";
DemoLineRight = "666666666666666666666666666666666666666666666666666666666666666666666662222222222222222222222222222222222266666666666666666666666666666666666666666662222222222222222222222222222222222222226666666666666666666666666666666666666666666666622222666662266666666666666666666666666666666666666622222222222222222222222222222222222222222222222222666666666666666666666666666666666666666666666666666666622226666666666666666666622222222222222222222222222222666666";
DemoLineFire = "SSSSSSSSSSSSSSSSSSSSSSSSSSSSFFFFFFFFFFFFFFFFFFFFFFFFFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS";
DemoLineUp1 = "77777777777777777777777777777777777777777777777777777777777777777777777777777777777777773333333333333333333333333333333333337777777777777773333333333333333337777777777777777777777777777733337777777777777777777777777733777777333333333777777777777777777777777777777777777777777777777777733333333333333333333333333333333333333333333337777777777777777777777777777777733333333377777777777777777777777777777777777773333333333333333333377777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777";
DemoLineDown1 = "88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888444444444448888888888888888888888888888888888888888888888888888888888888888888888888888888888888844444444444444444444444488888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888444444444444444888888844444448888888888888888888888888888888888888888888888888888888888888888888888888888888888";
DemoLineLeft1 = "55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555551111111111111155555111111111111111111111111111155555555555555555555555555555555555555555555555555555555555511155555555555555555511111111111111111111111111111111111111155555555555555555555555555555555555555555555555555555555555555555555111111111111111111111111111555555555555551111555555555555555555555555555555555555555555111111111555555555555555555555551111115555555555555555555555555555555555555555555555555555555555555555555555555555555555555555";
DemoLineRight1 = "66666666666666666666666666666666666666666666666666666666666666666666666666666666666622222266666666666666666666666666666666666666666666666666666666666666666666666666662222222222222222222222222222222222222666666666666666666666666666666666666666666666666666666666666666662222226666222222222222222222222222222222266666666666666666666666666666666666666666666662222222222222666666666666666666666222222222222222222222226666666666666666666666666666666666666666666666662222222222226666666666666666666666666666666666666666666666666666666666666666666666";
DemoLineFire1 = "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSFFFFFFFFFFFFFFFFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSFFFFFFFFFFFFFFFFFSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS";
symbolnumber = 0;
Frame 2
_root.OnFrame();
Frame 3
gotoAndPlay (2);
Symbol 21 MovieClip Frame 10
gotoAndPlay (1);
Symbol 22 MovieClip Frame 10
gotoAndPlay (1);
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
stop();
Symbol 23 MovieClip Frame 3
stop();
Symbol 23 MovieClip Frame 4
stop();
Instance of Symbol 23 MovieClip "mc" in Symbol 24 MovieClip [man] Frame 1
onClipEvent (keyDown) {
_root.OnMovieKeyDown();
}
onClipEvent (keyUp) {
_root.OnMovieKeyUp();
}
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 3
stop();
Symbol 34 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 47 MovieClip Frame 6
_parent._parent.Robo7Recreate();
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 2
stop();
Symbol 48 MovieClip Frame 3
stop();
Symbol 49 MovieClip [robo7] Frame 1
function robo7movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((((_root.PauseMode == 0) and (frezetime == 0)) and (_root.RocketCondition != "flying")) and (_root.RocketCondition != "lending")) and (this.explode == 0)) {
if ((((this._x < 3) or (this._y < 3)) or (((_root.POLYW * _root.NUMBERX) - this._width) < this._x)) or (((_root.POLYH * _root.NUMBERY) - this._height) < this._y)) {
this._x = this._x + dx;
if (0 < dx) {
this.rb.robo.gotoAndStop("right");
} else {
this.rb.robo.gotoAndStop("left");
}
if (((Robo7CheckStones() == 1) or (this._y < (-this._height))) or (((_root.POLYH * _root.NUMBERY) + (2 * this._height)) < this._y)) {
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo7frezetime;
this.explode = 1;
}
} else {
this._x = this._x + dx;
if ((Robo7CheckBounds() == 1) or (Robo7CheckStones() == 1)) {
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo7frezetime;
this.explode = 1;
}
if (this._y < (_root.game.mask.man._y - (_root.game.mask.man._height / 2))) {
dy = _root.robo7MAXdy;
} else {
dy = -_root.robo7MAXdy;
}
this._y = this._y + dy;
if ((Robo7CheckBounds() == 1) or (Robo7CheckStones() == 1)) {
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo7frezetime;
this.explode = 1;
}
}
if ((Robo7ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo7frezetime;
this.explode = 1;
}
}
}
function Robo7CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo7CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo7ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo7Recreate() {
var b;
var k;
this.rb.gotoAndPlay(1);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
this._x = (_root.POLYW * _root.NUMBERX) - this._width;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
this.dx = -(random(_root.robo7MAXdx - _root.robo7MINdx) + _root.robo7MINdx);
this.dy = 0;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = _root.POLYW * _root.NUMBERX;
b = 1;
}
}
if (k == 1) {
this._x = 1;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
this.dx = random(_root.robo7MAXdx - _root.robo7MINdx) + _root.robo7MINdx;
this.dy = 0;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
}
this.lives = 1;
this.frezetime = 0;
this.explode = 0;
_root.CheckExtraLife();
frezetime = _root.robo7frezetime;
}
Symbol 49 MovieClip [robo7] Frame 2
robo7movement();
Symbol 49 MovieClip [robo7] Frame 3
gotoAndPlay (2);
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 3
stop();
Symbol 57 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 58 MovieClip Frame 6
_parent._parent.Robo6Recreate();
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 2
stop();
Symbol 59 MovieClip Frame 3
stop();
Symbol 60 MovieClip [robo6] Frame 1
function robo6movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((((_root.PauseMode == 0) and (frezetime == 0)) and (_root.RocketCondition != "flying")) and (_root.RocketCondition != "lending")) and (this.explode == 0)) {
if ((((this._x < 3) or (this._y < 3)) or (((_root.POLYW * _root.NUMBERX) - this._width) < this._x)) or (((_root.POLYH * _root.NUMBERY) - this._height) < this._y)) {
this._x = this._x + dx;
if (0 < dx) {
this.rb.robo.gotoAndStop("right");
} else {
this.rb.robo.gotoAndStop("left");
}
if (((Robo6CheckStones() == 1) or (this._y < (-this._height))) or (((_root.POLYH * _root.NUMBERY) + (2 * this._height)) < this._y)) {
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo6frezetime;
this.explode = 1;
}
} else {
this._x = this._x + dx;
if ((Robo6CheckBounds() == 1) or (Robo6CheckStones() == 1)) {
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo6frezetime;
this.explode = 1;
}
this._y = this._y + dy;
if ((Robo6CheckBounds() == 1) or (Robo6CheckStones() == 1)) {
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo6frezetime;
this.explode = 1;
}
}
if ((Robo6ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
this.lives = 0;
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
this.rb.gotoAndPlay("RoboExplode");
frezetime = _root.robo7frezetime;
this.explode = 1;
}
}
}
function Robo6CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo6CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo6ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo6Recreate() {
var b;
var k;
this.rb.gotoAndPlay(1);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
this._x = (_root.POLYW * _root.NUMBERX) - this._width;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
this.dx = -(random(_root.robo6MAXdx - _root.robo6MINdx) + _root.robo6MINdx);
this.dy = random(_root.robo6MAXdy - _root.robo6MINdy) + _root.robo6MINdy;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = _root.POLYW * _root.NUMBERX;
b = 1;
}
}
if (k == 1) {
this._x = 1;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
this.dx = random(_root.robo6MAXdx - _root.robo6MINdx) + _root.robo6MINdx;
this.dy = random(_root.robo6MAXdy - _root.robo6MINdy) + _root.robo6MINdy;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
}
this.lives = 1;
frezetime = _root.robo6frezetime;
_root.CheckExtraLife();
this.explode = 0;
}
Symbol 60 MovieClip [robo6] Frame 2
robo6movement();
Symbol 60 MovieClip [robo6] Frame 3
gotoAndPlay (2);
Symbol 69 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 70 MovieClip Frame 6
_parent._parent.Robo5Recreate();
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 2
stop();
Symbol 71 MovieClip Frame 3
stop();
Symbol 72 MovieClip [robo5] Frame 1
function robo5movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((((_root.PauseMode == 0) and (frezetime == 0)) and (_root.RocketCondition != "flying")) and (_root.RocketCondition != "lending")) and (this.explode == 0)) {
if ((this._x < 3) or (this._y < 3)) {
this._x = this._x + dx;
if (((Robo5CheckStones() == 1) or ((_root.POLYW * _root.NUMBERX) < (this._x + (2 * this._width)))) or (this._x < (-2 * this._width))) {
this._x = this._x - dx;
dx = -dx;
}
this._y = this._y + dy;
if (((Robo5CheckStones() == 1) or ((_root.POLYH * _root.NUMBERY) < (this._y + (2 * this._height)))) or (this._y < (-2 * this._height))) {
this._y = this._y - dy;
dy = -dy;
}
} else {
this.framelength--;
this._x = this._x + dx;
if ((Robo5CheckBounds() == 1) or (Robo5CheckStones() == 1)) {
this._x = this._x - dx;
dx = -dx;
}
this._y = this._y + dy;
if ((Robo5CheckBounds() == 1) or (Robo5CheckStones() == 1)) {
this._y = this._y - dy;
dy = -dy;
}
if (this.framelength == 0) {
var k;
k = random(2);
if (k == 0) {
dx = random(_root.robo5MAXdx - _root.robo5MINdx) + _root.robo5MINdx;
}
if (k == 1) {
dx = -(random(_root.robo5MAXdx - _root.robo5MINdx) + _root.robo5MINdx);
}
k = random(2);
if (k == 0) {
dy = random(_root.robo5MAXdy - _root.robo5MINdy) + _root.robo5MINdy;
}
if (k == 1) {
dy = -(random(_root.robo5MAXdy - _root.robo5MINdy) + _root.robo5MINdy);
}
this.framelength = _root.robo5MINLENGTH + random(_root.robo5MAXLENGTH - _root.robo5MINLENGTH);
}
}
if ((Robo5ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
}
}
function Robo5CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo5CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo5ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo5Recreate() {
var b;
var k;
this.rb.gotoAndPlay(1);
b = 0;
while (b == 0) {
k = random(2);
if (k == 1) {
this._x = (random(_root.NUMBERX - 3) + 1) * _root.POLYW;
this._y = 1;
this.dx = random(_root.robo5MAXdx - _root.robo5MINdx) + _root.robo5MINdx;
this.dy = random(_root.robo5MAXdy - _root.robo5MINdy) + _root.robo5MINdy;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._y = -this._height;
b = 1;
}
}
if (k == 0) {
this._x = 1;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
this.dx = random(_root.robo5MAXdx - _root.robo5MINdx) + _root.robo5MINdx;
this.dy = random(_root.robo5MAXdy - _root.robo5MINdy) + _root.robo5MINdy;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
}
this.lives = _root.Robo5Lives;
_root.score.sc = _root.score.sc + _root.robo5score;
_root.AviableScore = _root.AviableScore + _root.robo5score;
_root.CheckExtraLife();
this.frezetime = _root.robo5frezetime;
this.explode = 0;
}
Symbol 72 MovieClip [robo5] Frame 2
robo5movement();
Symbol 72 MovieClip [robo5] Frame 3
gotoAndPlay (2);
Symbol 81 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 82 MovieClip Frame 6
_parent._parent.Robo4Recreate();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 3
stop();
Symbol 84 MovieClip [robo4] Frame 1
function robo4movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((((_root.PauseMode == 0) and (frezetime == 0)) and (_root.RocketCondition != "flying")) and (_root.RocketCondition != "lending")) and (this.explode == 0)) {
if ((this._x < 1) or (this._y < 1)) {
this._x = this._x + dx;
if (((Robo4CheckStones() == 1) or ((_root.POLYW * _root.NUMBERX) < (this._x + (2 * this._width)))) or (this._x < (-2 * this._width))) {
this._x = this._x - dx;
dx = -dx;
}
this._y = this._y + dy;
if (((Robo4CheckStones() == 1) or ((_root.POLYH * _root.NUMBERY) < (this._y + (2 * this._height)))) or (this._y < (-2 * this._height))) {
this._y = this._y - dy;
dy = -dy;
}
} else {
this.framelength--;
this._x = this._x + dx;
if ((Robo4CheckBounds() == 1) or (Robo4CheckStones() == 1)) {
this._x = this._x - dx;
dx = -dx;
}
this._y = this._y + dy;
if ((Robo4CheckBounds() == 1) or (Robo4CheckStones() == 1)) {
this._y = this._y - dy;
dy = -dy;
}
if (this.framelength == 0) {
var k;
k = random(2);
if (dx == 0) {
if (k == 0) {
dx = random(_root.robo4MAXdx - _root.robo4MINdx) + _root.robo4MINdx;
}
if (k == 1) {
dx = -(random(_root.robo4MAXdx - _root.robo4MINdx) + _root.robo4MINdx);
}
dy = 0;
} else if (dy == 0) {
if (k == 0) {
dy = random(_root.robo4MAXdy - _root.robo4MINdy) + _root.robo4MINdy;
}
if (k == 1) {
dy = -(random(_root.robo4MAXdy - _root.robo4MINdy) + _root.robo4MINdy);
}
dx = 0;
}
this.framelength = _root.robo4MINLENGTH + random(_root.robo4MAXLENGTH - _root.robo4MINLENGTH);
}
if ((Robo4ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
}
}
}
function Robo4CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo4CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo4ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo4Recreate() {
var b;
var k;
this.rb.gotoAndPlay(1);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
this._x = (random(_root.NUMBERX - 3) + 1) * _root.POLYW;
this._y = 1;
this.dx = 0;
this.dy = random(_root.robo4MAXdy - _root.robo4MINdy) + _root.robo4MINdy;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._y = -this._height;
b = 1;
}
}
if (k == 1) {
this._x = 1;
this._y = (_root.random(NUMBERY - 3) + 1) * _root.POLYH;
this.dx = random(_root.robo4MAXdx - _root.robo4MINdx) + _root.robo4MINdx;
this.dy = 0;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
if (_root.CheckForHitStoneRobos(this) == 0) {
b = 1;
}
}
this.lives = _root.Robo4Lives;
_root.score.sc = _root.score.sc + _root.robo4score;
_root.AviableScore = _root.AviableScore + _root.robo4score;
_root.CheckExtraLife();
this.frezetime = _root.robo4frezetime;
this.explode = 0;
}
Symbol 84 MovieClip [robo4] Frame 2
robo4movement();
Symbol 84 MovieClip [robo4] Frame 3
gotoAndPlay (2);
Symbol 95 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 96 MovieClip Frame 6
_parent._parent.Robo3Recreate();
Symbol 97 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 2
stop();
Symbol 97 MovieClip Frame 3
stop();
Symbol 98 MovieClip [robo3] Frame 1
function robo3movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((((_root.PauseMode == 0) and (frezetime == 0)) and (_root.RocketCondition != "flying")) and (_root.RocketCondition != "lending")) and (this.explode == 0)) {
if ((1 >= this._x) or (1 >= this._y)) {
this._x = this._x + dx;
if ((Robo3CheckStones() == 1) or ((this._x + this._width) >= (_root.POLYW * _root.NUMBERX))) {
this._x = this._x - dx;
if (((Robo3CheckStones() == 1) or ((this._x + this._width) >= (_root.POLYW * _root.NUMBERX))) or (this._x < (-2 * this._width))) {
this._x = this._x - dx;
dx = -dx;
}
dx = -dx;
}
this._y = this._y + dy;
if ((Robo3CheckStones() == 1) or ((this._y + this._height) >= (_root.POLYH * _root.NUMBERY))) {
this._y = this._y - dy;
if (((Robo1CheckStones() == 1) or ((this._y + this._height) >= (_root.POLYH * _root.NUMBERY))) or (this._y < (-2 * this._height))) {
this._y = this._y - dy;
dy = -dy;
}
dy = -dy;
}
} else {
this._x = this._x + dx;
if ((Robo3CheckBounds() == 1) or (Robo3CheckStones() == 1)) {
this._x = this._x - dx;
if (0 < dx) {
dx = -(random(_root.robo3MAXdx - _root.robo3MINdx) + _root.robo3MINdx);
} else {
dx = random(_root.robo3MAXdx - _root.robo3MINdx) + _root.robo3MINdx;
}
var k;
k = random(2);
if (k == 0) {
dy = -dy;
}
}
this._y = this._y + dy;
if ((Robo3CheckBounds() == 1) or (Robo3CheckStones() == 1)) {
this._y = this._y - dy;
if (0 < dy) {
dy = -(random(_root.robo3MAXdy - _root.robo3MINdy) + _root.robo3MINdy);
} else {
dy = random(_root.robo3MAXdy - _root.robo3MINdy) + _root.robo3MINdy;
}
var k;
k = random(2);
if (k == 0) {
dx = -dx;
}
}
if ((Robo3ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
}
}
}
function Robo3CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo3CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo3ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo3Recreate() {
var b;
var k;
this.rb.gotoAndPlay(1);
b = 0;
while (b == 0) {
k = random(2);
if (k == 0) {
this._x = (random(_root.NUMBERX - 3) + 1) * _root.POLYW;
this._y = 1;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._y = -this._height;
b = 1;
}
}
if (k == 1) {
this._x = 1;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
}
this.dx = random(_root.robo3MAXdx - _root.robo3MINdx) + _root.robo3MINdx;
this.dy = random(_root.robo3MAXdy - _root.robo3MINdy) + _root.robo3MINdy;
this.lives = _root.Robo3Lives;
_root.score.sc = _root.score.sc + _root.robo3score;
_root.AviableScore = _root.AviableScore + _root.robo3score;
_root.CheckExtraLife();
this.frezetime = _root.robo3frezetime;
this.explode = 0;
}
Symbol 98 MovieClip [robo3] Frame 2
robo3movement();
Symbol 98 MovieClip [robo3] Frame 3
gotoAndPlay (2);
Symbol 110 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 111 MovieClip Frame 6
_parent._parent.Robo2Recreate();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
stop();
Symbol 112 MovieClip Frame 3
stop();
Symbol 113 MovieClip [robo2] Frame 1
function robo2movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((_root.PauseMode == 0) and (frezetime == 0)) and (this.explode == 0)) {
if ((1 >= this._x) or (1 >= this._y)) {
this._x = this._x + dx;
this._y = this._y + dy;
} else if ((_root.RocketCondition != "flying") and (_root.RocketCondition != "lending")) {
this._x = this._x + dx;
if ((Robo2CheckBounds() == 1) or (Robo2CheckStones() == 1)) {
this._x = this._x - dx;
dx = -dx;
if (freemove == 0) {
this._y++;
}
if (freemove == 1) {
this._y--;
}
if ((Robo2CheckBounds() == 1) or (Robo2CheckStones() == 1)) {
if (freemove == 0) {
this._y--;
freemove = 1;
} else if (freemove == 1) {
this._y++;
freemove = 0;
}
}
}
this._y = this._y + dy;
if ((Robo2CheckBounds() == 1) or (Robo2CheckStones() == 1)) {
this._y = this._y - dy;
dy = -dy;
if (freemove == 0) {
this._x++;
}
if (freemove == 1) {
this._x--;
}
if ((Robo2CheckBounds() == 1) or (Robo2CheckStones() == 1)) {
if (freemove == 0) {
this._x--;
freemove = 1;
} else if (freemove == 1) {
this._x++;
freemove = 0;
}
}
}
if ((Robo2ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
}
}
}
function Robo2CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo2CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo2ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo2Recreate() {
var b;
var k;
this.rb.gotoAndPlay(1);
b = 0;
while (b == 0) {
k = random(2);
if (_root.DemoMode == 1) {
k = 0;
}
if (k == 0) {
this._x = (random(_root.NUMBERX - 3) + 1) * _root.POLYW;
this._y = 1;
this.dx = 0;
this.dy = random(_root.robo2MAXdy - _root.robo2MINdy) + _root.robo2MINdy;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._y = -this._height;
b = 1;
}
}
if (k == 1) {
this._x = 1;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
this.dx = random(_root.robo2MAXdx - _root.robo2MINdx) + _root.robo2MINdx;
this.dy = 0;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
}
this.lives = _root.Robo2Lives;
_root.score.sc = _root.score.sc + _root.robo2score;
_root.AviableScore = _root.AviableScore + _root.robo2score;
_root.CheckExtraLife();
this.frezetime = _root.robo2frezetime;
this.explode = 0;
if (_root.DemoMode == 1) {
this._x = 12 * _root.POLYW;
this.dy = 3;
}
}
Symbol 113 MovieClip [robo2] Frame 2
robo2movement();
Symbol 113 MovieClip [robo2] Frame 3
gotoAndPlay (2);
Symbol 120 MovieClip Frame 3
_parent.gotoAndPlay(1);
Symbol 121 MovieClip Frame 6
_parent._parent.Robo1Recreate();
Symbol 122 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 2
stop();
Symbol 122 MovieClip Frame 3
stop();
Symbol 123 MovieClip [robo1] Frame 1
function robo1movement() {
if ((0 < frezetime) and (_root.PauseMode == 0)) {
frezetime--;
}
if (((((this.explode == 0) and (_root.PauseMode == 0)) and (frezetime == 0)) and (_root.RocketCondition != "flying")) and (_root.RocketCondition != "lending")) {
if ((1 >= this._x) or (1 >= this._y)) {
this._x = this._x + dx;
if (((Robo1CheckStones() == 1) or ((this._x + this._width) >= (_root.POLYW * _root.NUMBERX))) or (this._x < (-2 * this._width))) {
this._x = this._x - dx;
dx = -dx;
}
this._y = this._y + dy;
if (((Robo1CheckStones() == 1) or ((this._y + this._height) >= (_root.POLYH * _root.NUMBERY))) or (this._y < (-2 * this._height))) {
this._y = this._y - dy;
dy = -dy;
}
} else {
if ((Robo1ManCheck() == 1) and (_root.HeroState == 0)) {
_root.live.lives_num--;
_root.GameOverCheck();
_root.HeroState = _root.HeroFramesBlink;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
}
this._x = this._x + dx;
if ((Robo1CheckBounds() == 1) or (Robo1CheckStones() == 1)) {
this._x = this._x - dx;
dx = -dx;
}
this._y = this._y + dy;
if ((Robo1CheckBounds() == 1) or (Robo1CheckStones() == 1)) {
this._y = this._y - dy;
dy = -dy;
}
}
}
}
function Robo1CheckStones() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
return(1);
}
k++;
}
return(0);
}
function Robo1CheckBounds() {
if (this.hittest(_root.bounds) == true) {
return(1);
}
if (this.hittest(_root.bounds1) == true) {
return(1);
}
if (this.hittest(_root.bounds2) == true) {
return(1);
}
if (this.hittest(_root.bounds3) == true) {
return(1);
}
return(0);
}
function Robo1ManCheck() {
if (this.hittest(_root.game.mask.man) == true) {
return(1);
}
return(0);
}
function Robo1Recreate() {
this.rb.gotoAndPlay(1);
var b;
var k;
b = 0;
while (b == 0) {
k = random(2);
if (_root.DemoMode == 1) {
k = 1;
}
if (k == 0) {
this._x = (random(_root.NUMBERX - 3) + 1) * _root.POLYW;
this._y = 1;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._y = -this._height;
b = 1;
}
}
if (k == 1) {
this._x = 1;
this._y = (random(_root.NUMBERY - 3) + 1) * _root.POLYH;
if (_root.CheckForHitStoneRobos(this) == 0) {
this._x = -this._width;
b = 1;
}
}
}
this.dx = random(_root.robo1MAXdx - _root.robo1MINdx) + _root.robo1MINdx;
this.dy = random(_root.robo1MAXdy - _root.robo1MINdy) + _root.robo1MINdy;
this.lives = _root.Robo1Lives;
_root.score.sc = _root.score.sc + _root.robo1score;
_root.AviableScore = _root.AviableScore + _root.robo1score;
this.frezetime = _root.robo1frezetime;
_root.CheckExtraLife();
this.explode = 0;
if ((_root.DemoMode == 1) and (_root.FuelNumber == 1)) {
this._y = _root.POLYH;
this.dx = 6;
this.dy = 3;
}
}
Symbol 123 MovieClip [robo1] Frame 2
robo1movement();
Symbol 123 MovieClip [robo1] Frame 3
gotoAndPlay (2);
Instance of Symbol 126 MovieClip "mask" in Symbol 127 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;
}
}
}
Symbol 135 MovieClip Frame 1
stop();
Instance of Symbol 135 MovieClip "r3" in Symbol 136 MovieClip [rocket3] Frame 1
onClipEvent (enterFrame) {
_root.Rocket3EnterFrame();
}
Symbol 144 MovieClip Frame 1
stop();
Instance of Symbol 144 MovieClip "r2" in Symbol 145 MovieClip [rocket2] Frame 1
onClipEvent (enterFrame) {
_root.Rocket2EnterFrame();
}
Symbol 152 MovieClip Frame 1
stop();
Instance of Symbol 152 MovieClip "r1" in Symbol 153 MovieClip [rocket1] Frame 1
onClipEvent (enterFrame) {
_root.Rocket1EnterFrame();
}
Instance of Symbol 155 MovieClip in Symbol 156 MovieClip [fuel] Frame 1
onClipEvent (enterFrame) {
_root.OnFuelEnter();
}
Instance of Symbol 160 MovieClip in Symbol 161 MovieClip [rocketfire] Frame 1
onClipEvent (enterFrame) {
_root.RocketFireEnterFrame();
}
Symbol 170 MovieClip Frame 3
stop();
Symbol 173 Button
on (release) {
_root.HelpOK();
}
Symbol 182 Button
on (release) {
this.nextFrame();
}
Symbol 184 Button
on (release) {
_root.HelpOK();
}
Symbol 194 Button
on (release) {
this.prevFrame();
}
Symbol 206 MovieClip [help] Frame 1
stop();
Symbol 206 MovieClip [help] Frame 2
stop();
Symbol 206 MovieClip [help] Frame 3
stop();
Symbol 212 Button
on (release) {
_root.GameOverOK();
}
Symbol 215 MovieClip [bullet] Frame 1
function onBulletFrame() {
if (_root.PauseMode == 0) {
CheckBulletHitBounds();
CheckBulletHitStones();
CheckRobo1Hit();
CheckRobo2Hit();
CheckRobo3Hit();
CheckRobo4Hit();
CheckRobo5Hit();
CheckRobo6Hit();
CheckRobo7Hit();
if (this.direct == "left") {
this._x = this._x - _root.BulletSpeed;
}
if (this.direct == "right") {
this._x = this._x + _root.BulletSpeed;
}
}
}
function CheckRobo1Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO1COL) {
if (((this.hittest(_root.game.mask["robo1_" + i]) == true) and (_root.game.mask["robo1_" + i].frezetime == 0)) and (_root.game.mask["robo1_" + i].explode == 0)) {
_root.game.mask["robo1_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo1_" + i].lives--;
if (_root.game.mask["robo1_" + i].lives == 0) {
_root.game.mask["robo1_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo1_" + i].explode = 1;
_root.AttachHint("+" + _root.robo1score, _root.game.mask["robo1_" + i]._x, _root.game.mask["robo1_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckRobo2Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO2COL) {
if (((this.hittest(_root.game.mask["robo2_" + i]) == true) and (_root.game.mask["robo2_" + i].frezetime == 0)) and (_root.game.mask["robo2_" + i].explode == 0)) {
_root.game.mask["robo2_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo2_" + i].lives--;
if (_root.game.mask["robo2_" + i].lives == 0) {
_root.game.mask["robo2_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo2_" + i].explode = 1;
_root.AttachHint("+" + _root.robo2score, _root.game.mask["robo2_" + i]._x, _root.game.mask["robo2_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckRobo3Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO3COL) {
if (((this.hittest(_root.game.mask["robo3_" + i]) == true) and (_root.game.mask["robo3_" + i].frezetime == 0)) and (_root.game.mask["robo3_" + i].explode == 0)) {
_root.game.mask["robo3_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo3_" + i].lives--;
if (_root.game.mask["robo3_" + i].lives == 0) {
_root.game.mask["robo3_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo3_" + i].explode = 1;
_root.AttachHint("+" + _root.robo3score, _root.game.mask["robo3_" + i]._x, _root.game.mask["robo3_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckRobo4Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO4COL) {
if (((this.hittest(_root.game.mask["robo4_" + i]) == true) and (_root.game.mask["robo4_" + i].frezetime == 0)) and (_root.game.mask["robo4_" + i].explode == 0)) {
_root.game.mask["robo4_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo4_" + i].lives--;
if (_root.game.mask["robo4_" + i].lives == 0) {
_root.game.mask["robo4_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo4_" + i].explode = 1;
_root.AttachHint("+" + _root.robo4score, _root.game.mask["robo4_" + i]._x, _root.game.mask["robo4_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckRobo5Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO5COL) {
if (((this.hittest(_root.game.mask["robo5_" + i]) == true) and (_root.game.mask["robo5_" + i].frezetime == 0)) and (_root.game.mask["robo5_" + i].explode == 0)) {
_root.game.mask["robo5_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo5_" + i].lives--;
if (_root.game.mask["robo5_" + i].lives == 0) {
_root.game.mask["robo5_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo5_" + i].explode = 1;
_root.AttachHint("+" + _root.robo5score, _root.game.mask["robo5_" + i]._x, _root.game.mask["robo5_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckRobo6Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO6COL) {
if (((this.hittest(_root.game.mask["robo6_" + i]) == true) and (_root.game.mask["robo6_" + i].frezetime == 0)) and (_root.game.mask["robo6_" + i].explode == 0)) {
_root.game.mask["robo6_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo6_" + i].lives--;
if (_root.game.mask["robo6_" + i].lives == 0) {
_root.score.sc = _root.score.sc + _root.robo6score;
_root.AviableScore = _root.AviableScore + _root.robo6score;
_root.game.mask["robo6_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo6_" + i].explode = 1;
_root.AttachHint("+" + _root.robo6score, _root.game.mask["robo6_" + i]._x, _root.game.mask["robo6_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckRobo7Hit() {
var i;
var k;
var b;
i = 0;
while (i < _root.ROBO7COL) {
if (((this.hittest(_root.game.mask["robo7_" + i]) == true) and (_root.game.mask["robo7_" + i].frezetime == 0)) and (_root.game.mask["robo7_" + i].explode == 0)) {
_root.game.mask["robo7_" + i].rb.gotoAndStop("RoboUnderAttack");
_root.game.mask["robo7_" + i].lives--;
if (_root.game.mask["robo7_" + i].lives == 0) {
_root.score.sc = _root.score.sc + _root.robo7score;
_root.AviableScore = _root.AviableScore + _root.robo7score;
_root.game.mask["robo7_" + i].rb.gotoAndStop("RoboExplode");
_root.game.mask["robo7_" + i].explode = 1;
_root.AttachHint("+" + _root.robo7score, _root.game.mask["robo7_" + i]._x, _root.game.mask["robo7_" + i]._y);
if (_root.SoundState == "on") {
_root.explode_snd.start();
}
} else if (_root.SoundState == "on") {
_root.hit_snd.start();
}
this.removeMovieClip();
}
i++;
}
}
function CheckBulletHitBounds() {
if (this._x < 0) {
this.removeMovieClip();
}
if ((_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 215 MovieClip [bullet] Frame 2
onBulletFrame();
Symbol 215 MovieClip [bullet] Frame 3
gotoAndPlay (2);
Symbol 217 MovieClip [Bonusfire] Frame 1
function onBonusfireFrame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStonesForHitBonusfire();
CheckManForHitBonusfire();
CheckStay();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonusfirecurframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonusfire() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonusfire() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonusfirecurframe = 0;
_root.bonusfirelength = 150;
_root.FireFramesD = 1;
_root.AttachHint("FIRE!", _root.game.mask.man._x, _root.game.mask.man._y);
this.removeMovieClip();
}
}
Symbol 217 MovieClip [Bonusfire] Frame 2
onBonusfireFrame();
Symbol 217 MovieClip [Bonusfire] Frame 3
gotoAndPlay (2);
Symbol 219 MovieClip [Bonuslife] Frame 1
function onBonuslifeFrame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStonesForHitBonuslife();
CheckManForHitBonuslife();
CheckStay();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonuslifecurframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonuslife() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonuslife() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonuslifecurframe = 0;
_root.HeroLives++;
_root.AttachHint("Life", _root.game.mask.man._x, _root.game.mask.man._y);
_root.live.lives_num++;
this.removeMovieClip();
}
}
Symbol 219 MovieClip [Bonuslife] Frame 2
onBonuslifeFrame();
Symbol 219 MovieClip [Bonuslife] Frame 3
gotoAndPlay (2);
Symbol 221 MovieClip [bonusDQD] Frame 1
function onBonusDQDFrame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStonesForHitBonuslife();
CheckManForHitBonusDQD();
CheckStay();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonusDQDcurframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonuslife() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonusDQD() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonusDQDcurframe = 0;
_root.AttachHint("Immortality", _root.game.mask.man._x, _root.game.mask.man._y);
_root.HeroState = 250;
_root.game.mask.man.mc.nextFrame();
_root.game.mask.man.mc.nextFrame();
this.removeMovieClip();
}
}
Symbol 221 MovieClip [bonusDQD] Frame 2
onBonusDQDFrame();
Symbol 221 MovieClip [bonusDQD] Frame 3
gotoAndPlay (2);
Symbol 223 MovieClip [bonusKillAll] Frame 1
function onBonusKillAllFrame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStonesForHitBonusKillAll();
CheckManForHitBonusKillAll();
CheckStay();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonusKillAllcurframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonusKillAll() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonusKillAll() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonusKillAllcurframe = 0;
_root.AttachHint("Kill All", _root.game.mask.man._x, _root.game.mask.man._y);
_root.UnloadRobots();
this.removeMovieClip();
}
}
Symbol 223 MovieClip [bonusKillAll] Frame 2
onBonusKillAllFrame();
Symbol 223 MovieClip [bonusKillAll] Frame 3
gotoAndPlay (2);
Symbol 225 MovieClip [bonus3] Frame 1
function onBonus3Frame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStonesForHitBonus3();
CheckManForHitBonus3();
CheckStay();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonus3curframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonus3() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonus3() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonus3curframe = 0;
_root.AttachHint(_root.bonus3score, _root.game.mask.man._x, _root.game.mask.man._y);
_root.score.sc = _root.score.sc + _root.bonus3score;
_root.CheckExtraLife();
this.removeMovieClip();
}
}
Symbol 225 MovieClip [bonus3] Frame 2
onBonus3Frame();
Symbol 225 MovieClip [bonus3] Frame 3
gotoAndPlay (2);
Symbol 227 MovieClip [bonus2] Frame 1
function onBonus2Frame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStonesForHitBonus2();
CheckManForHitBonus2();
CheckStay();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonus2curframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonus2() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonus2() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonus2curframe = 0;
_root.score.sc = _root.score.sc + _root.bonus2score;
_root.AttachHint(_root.bonus2score, _root.game.mask.man._x, _root.game.mask.man._y);
_root.CheckExtraLife();
this.removeMovieClip();
}
}
Symbol 227 MovieClip [bonus2] Frame 2
onBonus2Frame();
Symbol 227 MovieClip [bonus2] Frame 3
gotoAndPlay (2);
Symbol 229 MovieClip [bonus1] Frame 1
function onBonus1Frame() {
if (_root.PauseMode == 0) {
this._y = this._y + (2 * _root.d);
CheckStay();
CheckStonesForHitBonus1();
CheckManForHitBonus1();
}
}
function CheckStay() {
this.frame++;
if (this.frame >= (_root.bonusframesstay - _root.bonusframesblink)) {
this._alpha = this._alpha + this.alphad;
if (this._alpha < 30) {
this.alphad = -this.alphad;
}
if (90 < this._alpha) {
this.alphad = -this.alphad;
}
}
if (_root.bonusframesstay < this.frame) {
_root.bonus1curframe = 0;
this.removeMovieClip();
}
}
function CheckStonesForHitBonus1() {
var n;
var k;
n = _root.numberstones;
k = 0;
while (k < n) {
if (this.hittest(_root.game.mask["stones_mc" + k]) == true) {
this._y = _root.game.mask["stones_mc" + k]._y - this._height;
return(1);
}
if ((_root.POLYH * _root.NUMBERY) < Math.abs((this._y + this._height) + 10)) {
this._y = _root.POLYH * (_root.NUMBERY - 1);
}
k++;
}
return(0);
}
function CheckManForHitBonus1() {
if (_root.game.mask.man.hittest(this) == true) {
_root.bonus1curframe = 0;
_root.AttachHint(_root.bonus1score, _root.game.mask.man._x, _root.game.mask.man._y);
_root.score.sc = _root.score.sc + _root.bonus1score;
_root.CheckExtraLife();
this.removeMovieClip();
}
}
Symbol 229 MovieClip [bonus1] Frame 2
onBonus1Frame();
Symbol 229 MovieClip [bonus1] Frame 3
gotoAndPlay (2);
Symbol 231 Button
on (release) {
_root.OptionsCancelClick();
}
Symbol 232 Button
on (release) {
_root.OptionsOkClick();
}
Symbol 235 Button
on (release) {
_root.OptionsNoviceClick();
}
Symbol 237 Button
on (release) {
_root.OptionsExpertClick();
}
Symbol 240 Button
on (release) {
_root.OptionsMasterClick();
}
Symbol 244 Button
on (release) {
_root.OptionsSoundOnClick();
}
Symbol 245 Button
on (release) {
_root.OptionsSoundOffClick();
}
Symbol 252 Button
on (release) {
_root.OptionsPerfCancelClick();
}
Symbol 253 Button
on (release) {
_root.OptionsPerfOkClick();
}
Symbol 262 Button
on (release) {
_root.onDemoNo();
}
Symbol 263 Button
on (release) {
_root.onDemoYes();
}
Symbol 268 Button
on (release) {
_root.NewGameNo();
}
Symbol 269 Button
on (release) {
_root.NewGameYes();
}
Symbol 279 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 279 MovieClip [hint] Frame 2
onFrame();
Symbol 279 MovieClip [hint] Frame 3
gotoAndPlay (2);
Symbol 301 Button
on (release) {
_root.OnLogoClick();
}
Symbol 304 Button
on (release) {
_root.onHelpClick();
}
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 5
stop();
Symbol 317 MovieClip Frame 8
gotoAndStop (1);
Symbol 317 MovieClip Frame 12
gotoAndStop (1);
Symbol 319 Button
on (rollOver) {
knop1.gotoAndPlay(2);
}
on (rollOut) {
knop1.gotoAndPlay(6);
}
on (release) {
if (_root.DemoMode == 0) {
_root.NewGame();
} else {
_root.NewGameYes();
}
}
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 5
stop();
Symbol 326 Button
on (rollOver) {
knop2.gotoAndPlay(2);
}
on (rollOut) {
knop2.gotoAndPlay(6);
}
on (release) {
_root.OnMoreGamesClick();
}
Symbol 327 Button
on (release) {
_root.onOptionsClick();
}
Symbol 329 Button
on (release) {
if (_root.DemoMode == 0) {
_root.onPauseClick();
}
}
Symbol 334 Button
on (release) {
_root.onDemoClick();
}