Frame 1
function loader() {
var _local3 = Math.round(getBytesTotal());
var _local4 = Math.round(getBytesLoaded());
var _local5 = _local4 / _local3;
loaderBar._width = int(Math.round(200 * _local5));
if (_local4 == _local3) {
if (loaderTimer < getTimer()) {
this.onEnterFrame = undefined;
_root.gotoAndPlay("rIntro");
}
}
}
((undefined <= user2) > "part1,stop ASV!") || (0(false));
user = "part2,stop ASV!";
this.onEnterFrame = loader;
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
var gameQuality = 2;
_quality = "high";
var soundOn = true;
Mouse.hide();
Stage.showMenu = false;
var loaderTimer = (getTimer() + 2000);
stop();
Frame 4
stopAllSounds();
Frame 5
function intro() {
if (introTimer < getTimer()) {
_root.gotoAndPlay("rSetup");
}
}
var mouseListener = new Object();
mouseListener.onMouseDown = function () {
mouseFlag = true;
};
Mouse.addListener(mouseListener);
mouseListener.onMouseUp = function () {
mouseFlag = false;
};
Mouse.addListener(mouseListener);
var gameOn = false;
var mouseCursorFlag = false;
var URLhome = "http://www.dragongamez.com/mm.php";
var introTimer = (getTimer() + 3000);
var hs = new Highscore();
var hs_data = SharedObject.getLocal("madnessHighscore");
var hsAvail = hs_data.data.tableLoaded;
if (hsAvail == "12345") {
var i = 0;
while (i < 10) {
hs.tableScore[i] = hs_data.data.tableScore[i];
hs.tableNames[i] = hs_data.data.tableNames[i];
i++;
}
} else {
hs.init();
}
this.onEnterFrame = intro;
stop();
Frame 9
var music = new Sound();
music.attachSound("mus_hatsofftobenny");
var snd_ambient = new Sound();
music.setVolume(90);
snd_ambient.setVolume(100);
var menuOn = false;
this.onEnterFrame = undefined;
fileXML_level1 = "<leveldata><world>2400,448</world><scene><info>0,0,0,3,12</info><spot>161,171,14</spot><spot>325,224,10</spot><spot>415,303,12</spot><spot>576,404,105</spot><spot>-142,405,5</spot><spot>678,584,104</spot><spot>-197,584,4</spot><spot>400,171,14</spot><spot>535,214,107</spot><spot>221,304,12</spot><spot>-54,214,7</spot><spot>76,250,13</spot></scene><scene><info>1,480,0,4,9</info><spot>172,405,101</spot><spot>642,585,104</spot><spot>-177,585,4</spot><spot>-62,217,7</spot><spot>541,215,107</spot><spot>547,323,106</spot><spot>-88,321,6</spot><spot>152,179,13</spot><swin>258,276,0,11</swin><spot>370,171,14</spot><spot>362,425,8</spot></scene><scene><info>2,960,0,5,15</info><swin>442,157,6,11</swin><swin>261,276,2,11</swin><spot>117,171,14</spot><spot>610,404,105</spot><spot>-105,404,5</spot><spot>554,304,300</spot><spot>-67,304,200</spot><spot>168,250,13</spot><spot>84,250,13</spot><spot>30,223,10</spot></scene><scene><info>3,1440,0,5,15</info><spot>413,265,2</spot><spot>-104,406,5</spot><spot>628,406,105</spot><spot>166,172,14</spot><swin>48,160,8,11</swin><spot>738,586,104</spot><spot>-183,587,4</spot><spot>330,172,14</spot><spot>434,219,10</spot><spot>370,306,12</spot><spot>222,320,9</spot><spot>199,252,13</spot></scene><scene><info>4,1920,0,6,20</info><spot>319,584,0</spot><spot>170,584,100</spot><spot>-100,405,5</spot><spot>605,405,105</spot><spot>293,171,14</spot><spot>-61,214,7</spot><spot>540,214,107</spot><spot>143,170,14</spot><spot>373,250,13</spot><spot>734,313,201</spot><spot>195,280,9</spot></scene><adb><obj>1,5,324,225</obj><obj>1,9,2119,421</obj><obj>1,4,2116,281</obj><obj>1,8,2039,417</obj><obj>1,9,2119,421</obj><obj>4,4,2294,264</obj><obj>1,12,1992,327</obj><obj>1,10,2266,421</obj><obj>4,3,1811,320</obj><obj>4,2,1639,264</obj><obj>1,4,1662,321</obj><obj>1,5,1872,221</obj><obj>1,11,1569,328</obj><obj>1,8,1255,414</obj><obj>1,7,1353,426</obj><obj>1,11,1098,328</obj><obj>1,9,612,423</obj><obj>1,11,890,328</obj><obj>1,8,110,410</obj><obj>4,3,415,319</obj><obj>4,1,221,321</obj><obj>4,2,1128,264</obj><obj>4,2,1043,264</obj><obj>1,5,989,225</obj><obj>3,1,1174,-79</obj><obj>3,2,512,129</obj><obj>1,3,846,426</obj><obj>4,4,75,265</obj></adb></leveldata>";
fileXML_level2 = "<leveldata><world>2400,448</world><scene><info>0,0,0,6,12</info><swin>391,278,0,11</swin><spot>132,214,3</spot><spot>91,171,14</spot><spot>576,404,105</spot><spot>-142,405,5</spot><spot>678,584,104</spot><spot>163,584,100</spot><spot>-54,214,7</spot><spot>80,320,9</spot></scene><scene><info>1,480,0,4,15</info><spot>-225,313,301</spot><spot>410,224,10</spot><spot>112,170,14</spot><spot>241,171,14</spot><spot>404,283,2</spot><spot>576,384,105</spot><spot>-132,385,5</spot><spot>668,584,104</spot><spot>-187,584,4</spot><spot>360,171,14</spot><spot>545,214,107</spot><spot>141,384,101</spot><spot>-54,214,7</spot><spot>79,250,13</spot></scene><scene><info>2,960,0,6,17</info><spot>336,302,9</spot><spot>169,428,8</spot><spot>371,170,14</spot><spot>357,404,1</spot><spot>583,321,300</spot><spot>307,584,0</spot><spot>173,224,10</spot><spot>535,214,107</spot><spot>90,304,12</spot><spot>-54,214,7</spot><spot>250,250,13</spot></scene><scene><info>3,1440,0,6,20</info><spot>59,304,102</spot><spot>568,405,105</spot><swin>352,170,1,11</swin><swin>442,170,4,11</swin><spot>209,170,14</spot><spot>220,251,13</spot><spot>65,224,10</spot><spot>-142,405,5</spot><spot>678,584,104</spot><spot>-197,584,4</spot></scene><scene><info>4,1920,0,7,25</info><spot>-96,321,200</spot><spot>158,404,101</spot><spot>205,584,100</spot><spot>572,321,106</spot><swin>53,288,8,11</swin><spot>365,428,8</spot><swin>413,169,17,11</swin><swin>233,168,12,11</swin><swin>53,168,7,11</swin></scene><adb><obj>1,3,2287,430</obj><obj>1,7,2008,426</obj><obj>1,9,1657,423</obj><obj>4,4,1662,264</obj><obj>1,5,1504,225</obj><obj>1,11,1557,330</obj><obj>3,4,1745,-67</obj><obj>4,2,1365,264</obj><obj>4,1,1050,320</obj><obj>4,4,1210,264</obj><obj>1,5,1132,225</obj><obj>1,4,1295,303</obj><obj>1,3,1132,430</obj><obj>1,8,901,421</obj><obj>1,10,615,421</obj><obj>1,12,815,330</obj><obj>4,4,700,264</obj><obj>1,5,891,225</obj><obj>1,7,246,426</obj><obj>1,4,79,321</obj><obj>4,2,559,264</obj><obj>3,2,163,128</obj></adb></leveldata>";
fileXML_level3 = "<leveldata><world>2400,1344</world><scene><info>0,0,896,5,15</info><spot>-170,584,4</spot><spot>626,404,105</spot><spot>568,321,300</spot><spot>424,170,14</spot><swin>243,299,9,11</swin><swin>157,179,6,11</swin><swin>68,179,4,11</swin><spot>109,304,12</spot><spot>390,250,13</spot><spot>349,170,14</spot></scene><scene><info>1,480,896,6,12</info><spot>365,429,8</spot><spot>212,171,14</spot><spot>-117,304,6</spot><spot>84,252,13</spot><spot>336,171,14</spot><spot>687,313,201</spot><spot>384,250,13</spot><spot>429,214,3</spot><spot>91,171,14</spot><spot>178,404,101</spot><spot>648,584,104</spot><spot>163,584,100</spot><spot>-54,205,7</spot><spot>225,223,10</spot></scene><scene><info>2,960,896,7,12</info><spot>284,179,13</spot><spot>135,171,14</spot><swin>391,278,0,11</swin><spot>126,224,3</spot><spot>41,171,14</spot><spot>-142,405,5</spot><spot>678,584,104</spot><spot>-54,214,7</spot><spot>-74,319,200</spot></scene><scene><info>3,1440,896,5,20</info><spot>274,584,0</spot><spot>70,214,103</spot><spot>338,405,1</spot><spot>171,404,101</spot><spot>360,305,12</spot><spot>296,171,14</spot><spot>432,224,10</spot><spot>171,171,14</spot><spot>140,302,9</spot><spot>200,250,13</spot></scene><scene><info>4,1920,896,5,17</info><spot>748,313,201</spot><swin>60,148,4,11</swin><swin>239,147,15,11</swin><spot>-136,305,200</spot><spot>-68,287,6</spot><spot>316,404,1</spot><spot>-142,405,5</spot><spot>263,584,0</spot><spot>411,319,9</spot></scene><scene><info>5,1920,448,5,20</info><swin>238,355,13,11</swin><swin>329,475,19,11</swin><swin>59,356,2,11</swin><swin>149,477,9,11</swin><swin>327,235,17,11</swin><swin>418,236,23,11</swin><swin>329,357,18,11</swin><swin>151,236,7,11</swin><swin>237,119,11,11</swin><swin>60,117,0,11</swin></scene><scene><info>6,1920,100,8,28</info><swin>419,463,22,11</swin><swin>149,464,6,11</swin><spot>145,254,12</spot><spot>341,237,12</spot><spot>109,113,14</spot><spot>361,115,14</spot><spot>347,336,15</spot><spot>104,336,15</spot><swin>196,209,0,11</swin><spot>104,189,16</spot><spot>291,188,108</spot></scene><adb><obj>1,14,1930,379</obj><obj>1,13,1930,189</obj><obj>1,9,2231,375</obj><obj>1,7,152,1319</obj><obj>4,4,391,1161</obj><obj>4,3,113,1216</obj><obj>1,8,2343,1344</obj><obj>1,7,2038,1315</obj><obj>1,4,2329,1216</obj><obj>3,3,1930,188</obj><obj>1,5,1872,1121</obj><obj>1,4,1579,1200</obj><obj>1,12,1491,1227</obj><obj>1,8,1686,1362</obj><obj>1,10,1587,1334</obj><obj>4,3,1796,1216</obj><obj>4,4,1641,1161</obj><obj>1,7,1196,1316</obj><obj>1,11,1047,1227</obj><obj>3,2,1122,1025</obj><obj>1,5,705,1120</obj><obj>1,8,572,1290</obj><obj>4,4,864,1161</obj><obj>4,2,564,1161</obj><obj>1,3,848,1326</obj><obj>3,5,-70,840</obj><obj>4,1,2262,347</obj><obj>4,3,2065,363</obj><obj>3,6,2065,153</obj><obj>1,16,2069,127</obj><obj>1,16,2375,222</obj><obj>1,16,1957,192</obj><obj>1,15,2372,136</obj><obj>1,15,2288,159</obj><obj>1,15,2211,136</obj><obj>1,15,2022,154</obj><obj>1,15,1966,131</obj></adb></leveldata>";
Frame 10
function menu() {
starR = starR + 2;
if (starR >= 360) {
starR = 0;
}
mStar._rotation = starR;
}
if (!menuOn) {
if (soundOn) {
snd_ambient.stop();
music.start(0, 9999);
}
menuOn = true;
}
if (!mouseCursorFlag) {
var n = getNextHighestDepth();
_root.attachMovie("Aim", "mouseCursor", n, {_x:_xmouse, _y:_ymouse});
mouseCursorFlag = true;
}
mouseListener.onMouseMove = function () {
if (!gameOn) {
if (mouseCursorFlag) {
mouseCursor._x = _xmouse;
mouseCursor._y = _ymouse;
}
}
};
m_start.onRollOver = function () {
m_start.gotoAndStop("fActive");
};
m_start.onRollOut = function () {
m_start.gotoAndStop("fStart");
};
m_start.onRelease = function () {
_root.gotoAndPlay("rNewGame");
};
m_instructions.onRollOver = function () {
m_instructions.gotoAndStop("fActive");
};
m_instructions.onRollOut = function () {
m_instructions.gotoAndStop("fStart");
};
m_instructions.onRelease = function () {
_root.gotoAndPlay("rInstructions");
};
m_credits.onRollOver = function () {
m_credits.gotoAndStop("fActive");
};
m_credits.onRollOut = function () {
m_credits.gotoAndStop("fStart");
};
m_credits.onRelease = function () {
_root.gotoAndPlay("rCredits");
};
m_playmore.onRollOver = function () {
m_playmore.gotoAndStop("fActive");
};
m_playmore.onRollOut = function () {
m_playmore.gotoAndStop("fStart");
};
m_playmore.onRelease = function () {
_root.createEmptyMovieClip("winDragonGamez", _root.getNextHighestDepth());
winDragonGamez.getURL(URLhome, "_blank");
};
m_dragonLogo.onRollOver = function () {
m_dragonLogo.gotoAndStop("fActive");
};
m_dragonLogo.onRollOut = function () {
m_dragonLogo.gotoAndStop("fStart");
};
m_dragonLogo.onRelease = function () {
_root.createEmptyMovieClip("winDragonGamez", _root.getNextHighestDepth());
winDragonGamez.getURL(URLhome, "_blank");
};
var starR = 0;
this.onEnterFrame = menu;
stop();
Frame 14
lvlScrFig2.gotoAndPlay("n1");
menuOn = false;
var _CTYPE_DEFAULT = 1;
var _CTYPE_SOLDIER = 2;
var _CTYPE_BUILDING = 3;
var _CTYPE_OBSTACLE = 4;
var _CTYPE_PICKUP = 5;
var _SOFF1 = 0;
var _SOFF2 = 1;
var _SOFF3 = 2;
var _SOFF4 = 3;
var _SRUN1 = 4;
var _SRUN2 = 5;
var _SRUN3 = 6;
var _SRUN4 = 7;
var _SMAN1 = 8;
var _SMAN2 = 9;
var _SMAN3 = 10;
var _SWIN = 11;
var _SHID1 = 12;
var _SHID2 = 13;
var _SWALL = 14;
var _SROOF = 15;
var _SROOFOFF = 16;
var _SOFF1_L = 100;
var _SOFF2_L = 101;
var _SOFF3_L = 102;
var _SOFF4_L = 103;
var _SRUN1_L = 104;
var _SRUN2_L = 105;
var _SRUN3_L = 106;
var _SRUN4_L = 107;
var _SROOFOFF_L = 108;
var _STAX = 200;
var _STANK = 201;
var _STAX_L = 300;
var _STANK_L = 301;
var _DMANH1 = 3;
var _DMANH2 = 4;
var _DMANH3 = 5;
var _DPAVE = 6;
var _DWELL = 7;
var _DCRACK1 = 8;
var _DCRACK2 = 9;
var _DCRATER = 10;
var _DLAMP1 = 11;
var _DLAMP2 = 12;
var _DDUMWIN = 100;
var _LINE1 = 584;
var _LINE2 = 404;
var _LINE2_2 = 429;
var _LINE3 = 304;
var _LINE3_2 = 320;
var _LINE3_3 = 335;
var _LINE4 = 214;
var _LINE4_2 = 224;
var _LINE5 = 159;
var levelNr = 0;
var levelNames = [fileXML_level1, fileXML_level2, fileXML_level3];
var levelMax = levelNames.length;
var gameOver = false;
var levelComplete = false;
var gameComplete = false;
scrPly.attachMovie("Aim", "player", 100, {_x:150, _y:150}).init();
scrPly.attachMovie("UIbackgroundwallMC", "ui", 5000, {_x:-10, _y:-10});
scrPly.attachMovie("UIfaceMC", "uiFace", 5020, {_x:510, _y:10});
uiHealth = [];
var i = 0;
while (i < 3) {
uiHealth.push(scrPly.attachMovie("numbers01MC", "uiNumHealth" + i, 10000 + i, {_x:555 + (i * 20), _y:200}));
i++;
}
uiAmmo = [];
var i = 0;
while (i < 3) {
uiAmmo.push(scrPly.attachMovie("numbers01MC", "uiNumAmmo" + i, 10200 + i, {_x:555 + (i * 20), _y:240}));
i++;
}
uiBomb = [];
var i = 0;
while (i < 3) {
uiBomb.push(scrPly.attachMovie("numbers01MC", "uiNumBomb" + i, 10300 + i, {_x:555 + (i * 20), _y:280}));
i++;
}
uiScore = [];
var i = 0;
while (i < 6) {
uiScore.push(scrPly.attachMovie("numbers01MC", "uiNumScore" + i, 10100 + i, {_x:495 + (i * 20), _y:400}));
i++;
}
scrPly.attachMovie("UIpanelsMC", "uiPanel", 20000, {_x:485, _y:160});
ply = scrPly.player;
ply._x = _xmouse;
ply._y = _ymouse;
var layerList = [];
var i = 0;
while (i < 43) {
layerList[i] = i * 5000;
i++;
}
var screenW = 480;
var screenH = 448;
var screenX = 16;
var screenY = 16;
music.stop();
music.onLoad = undefined;
if (soundOn) {
snd_ambient.attachSound("snd_ambient");
snd_ambient.start(0, 999);
}
Frame 15
function getReady() {
if (tmpTimer < getTimer()) {
if (levelLoaded) {
_root.scr._x = screenX - int(camX);
_root.scrPar._x = _root.scr._x / 6;
delete headlineXML;
_root.gotoAndPlay("rGame");
}
}
}
function loadXMLData(levelFileName) {
headlineXML = new XML();
headlineXML = new XML();
headlineXML.ignoreWhite = true;
headlineXML.parseXML(levelFileName);
publishXML(headlineXML.firstChild);
initGame();
levelLoaded = true;
}
function publishXML(HeadlineXMLNode) {
if (HeadlineXMLNode.nodeName.toUpperCase() != "LEVELDATA") {
return(undefined);
}
tmpSceneNr = 0;
sceneSpots = [];
content = "";
adb = HeadlineXMLNode.firstChild;
while (adb != null) {
header = adb.nodeName.toUpperCase();
if (header == "WORLD") {
var _local3 = adb.firstChild.nodeValue.split(",");
createLevelStatics(_local3[0], _local3[1]);
}
if (header == "ADB") {
cType = 0;
cNr = 0;
x = 0;
y = 0;
element = adb.firstChild;
while (element != null) {
section = element.nodeName.toUpperCase();
if (!(section === "OBJ")) {
} else {
var _local3 = element.firstChild.nodeValue.split(",");
var _local2 = 0;
while (_local2 < _local3.length) {
switch (_local2) {
case 0 :
cType = parseInt(_local3[_local2]);
break;
case 1 :
cNr = parseInt(_local3[_local2]);
break;
case 2 :
x = parseInt(_local3[_local2]);
break;
case 3 :
y = parseInt(_local3[_local2]);
}
_local2++;
}
switch (cType) {
case _CTYPE_BUILDING :
createHouse(cNr, x, y);
break;
default :
this.obj.push(createObj(cType, cNr, x, y, this.objId));
}
}
element = element.nextSibling;
}
}
if (header == "SCENE") {
sceneSpots[tmpSceneNr] = [];
x = 0;
y = 0;
win = 0;
element = adb.firstChild;
while (element != null) {
section = element.nodeName.toUpperCase();
switch (section) {
case "INFO" :
var _local3 = element.firstChild.nodeValue.split(",");
var _local2 = 0;
var _local4 = 0;
while (_local2 < _local3.length) {
switch (_local2) {
case 0 :
nr = parseInt(_local3[_local2]);
break;
case 1 :
x = parseInt(_local3[_local2]);
break;
case 2 :
y = parseInt(_local3[_local2]);
break;
case 3 :
max = parseInt(_local3[_local2]);
break;
case 4 :
_local4 = parseInt(_local3[_local2]);
}
_local2++;
}
sceneInfo.push([nr, x, y, max, _local4]);
break;
case "SPOT" :
tmpSoldierList = [];
_local3 = element.firstChild.nodeValue.split(",");
_local2 = 0;
while (_local2 < _local3.length) {
switch (_local2) {
case 0 :
x = parseInt(_local3[_local2]);
break;
case 1 :
y = parseInt(_local3[_local2]);
break;
default :
tmpSoldierList.push(parseInt(_local3[_local2]));
}
_local2++;
}
sc = new Scene();
sc.initMe(tmpSceneNr, tmpSoldierList, x, y);
sceneSpots[tmpSceneNr].push(sc);
break;
case "SWIN" :
tmpSoldierList = [];
_local3 = element.firstChild.nodeValue.split(",");
_local2 = 0;
while (_local2 < _local3.length) {
switch (_local2) {
case 0 :
x = parseInt(_local3[_local2]);
break;
case 1 :
y = parseInt(_local3[_local2]);
break;
case 2 :
win = parseInt(_local3[_local2]);
break;
default :
tmpSoldierList.push(parseInt(_local3[_local2]));
}
_local2++;
}
sc = new Scene();
sc.initWin(tmpSceneNr, tmpSoldierList, x, y, win);
sceneSpots[tmpSceneNr].push(sc);
}
element = element.nextSibling;
}
tmpSceneNr++;
}
adb = adb.nextSibling;
}
sceneNr = tmpSceneNr;
}
function initGame() {
regAreas();
correctSceneSpots();
scene = 0;
camX = sceneInfo[scene][1];
camY = sceneInfo[scene][2];
soldierMax = sceneInfo[scene][3];
soldierTotal = sceneInfo[scene][4];
powUpDelay = powUpDelaySave[levelNr];
powUpTimer = 0;
powUp = false;
}
function correctSceneSpots() {
var _local4;
var _local6 = sceneSpots.length;
var _local2 = 0;
while (_local2 < _local6) {
xOff = sceneInfo[_local2][1];
yOff = sceneInfo[_local2][2];
var _local5 = sceneSpots[_local2].length;
var _local3 = 0;
while (_local3 < _local5) {
sc = sceneSpots[_local2][_local3];
antal = sc.sList.length;
nr = 0;
nr = 0;
while (nr < antal) {
_local4 = sc.sList[nr];
switch (_local4) {
case _SMAN1 :
case _SMAN2 :
case _SMAN3 :
x = sc.x + xOff;
y = sc.y + yOff;
jNr = obj.length;
var _local1 = 0;
for(;;){
if (_local1 >= jNr) {
break;
}
o = obj[_local1];
if (o.classNr == _CTYPE_DEFAULT) {
switch (o.type) {
case _DMANH1 :
case _DMANH2 :
case _DMANH3 :
if (!bbColl(x, y, 1, 1, o.x - 16, o.y - 16, 32, 32)) {
break;
}
sc.x = o.x - sceneInfo[_local2][1];
sc.y = o.y - sceneInfo[_local2][2];
}
}
_local1++;
};
}
nr++;
}
_local3++;
}
_local2++;
}
}
function regAreas() {
var _local1;
aX = int(worldW / screenW);
aY = int(worldH / screenH);
var _local3 = 0;
while (_local3 < aY) {
aList[_local3] = [];
var _local2 = 0;
while (_local2 < aX) {
aList[_local3][_local2] = [];
_local2++;
}
_local3++;
}
_local3 = 0;
while (_local3 < aY) {
sy = _local3 * screenH;
var _local2 = 0;
while (_local2 < aX) {
sx = _local2 * screenW;
for (var _local4 in obj) {
_local1 = obj[_local4];
if (bbColl(sx, sy, screenW, screenH, _local1.x, _local1.y, _local1.w, _local1.h)) {
aList[_local3][_local2].push(_local1);
}
}
_local2++;
}
_local3++;
}
}
function createHouse(in_type, in_x, in_y) {
var _local5;
var _local2;
_local2 = createObj(_CTYPE_BUILDING, in_type, in_x, in_y, this.objId);
this.obj.push(_local2);
if (_local2.canHoldSoldier) {
_local5 = sceneSpots.length;
var _local3 = 0;
while (_local3 < _local5) {
xOff = sceneInfo[_local3][1];
yOff = sceneInfo[_local3][2];
var _local6 = sceneSpots[_local3].length;
var _local4 = 0;
while (_local4 < _local6) {
sc = sceneSpots[_local3][_local4];
if (sc.winSpot) {
x = sc.x + xOff;
y = sc.y + yOff;
if (bbColl(x, y, 1, 1, _local2.x, _local2.y, _local2.w, _local2.h)) {
sc.building = _local2;
}
}
_local4++;
}
_local3++;
}
}
if (_local2.haveWindows) {
var _local6 = _local2.windowList.length;
var x = 0;
var y = 0;
var _local4 = 0;
while (_local4 < _local6) {
x = _local2.windowList[_local4][0];
y = _local2.windowList[_local4][1];
if (_local2.windowType[_local4] != -1) {
w = createObj(_CTYPE_OBSTACLE, _local2.windowType[_local4], _local2.x + x, _local2.y + y, this.objId);
this.obj.push(w);
w.building = _local2;
w.windowNr = _local4;
} else {
w = undefined;
}
_local2.windowObjs.push(w);
this.obj.push(createObj(_CTYPE_DEFAULT, _DDUMWIN, _local2.x + x, _local2.y + y, this.objId));
_local4++;
}
}
}
function createObj(in_Obj, in_type, in_x, in_y, in_depth) {
switch (in_Obj) {
case 1 :
var _local1 = new Default();
break;
case 2 :
_local1 = new Soldier();
break;
case 3 :
_local1 = new Building();
break;
case 4 :
_local1 = new Obstacle();
break;
case 5 :
_local1 = new Pickup();
}
_local1.initMe(in_type, "o" + objId, in_x, in_y, in_depth);
objId = objId + 1;
objNr = objNr + 1;
return(_local1);
}
function createLevelStatics(in_worldW, in_worldH) {
var _local6;
var _local9;
worldW = in_worldW;
worldH = in_worldH;
switch (levelNr) {
case 0 :
case 1 :
_root.scrBkg.attachMovie("bkg_sky", "statBkg", 0, {_x:0, _y:0});
_root.scrBkg.attachMovie("bkg_pavement", "statPav", 1, {_x:0, _y:_LINE3_3});
n = int((worldW / 3) / 200) + 1;
var _local3 = 0;
while (_local3 < n) {
_root.scrPar.attachMovie("bkg_houses", "statBld", _local3, {_x:_local3 * 200, _y:70});
_local3++;
}
n = int(worldW / 700) + 1;
_local3 = 0;
while (_local3 < n) {
this.obj.push(createObj(1, 1, _local3 * 700, 152, this.objId));
_local3++;
}
break;
case 2 :
_root.scrBkg.attachMovie("bkg_sky", "statBkg", 0, {_x:0, _y:0});
_root.scrBkg.attachMovie("bkg_pavement", "statPav", 1, {_x:0, _y:_LINE3_3});
n = int((worldW / 3) / 200) + 1;
_local3 = 0;
while (_local3 < n) {
_root.scrPar.attachMovie("bkg_houses", "statBld", _local3, {_x:_local3 * 200, _y:70});
_local3++;
}
n = int(worldW / 700) + 1;
_local3 = 0;
for(;;){
if (_local3 >= n) {
break;
}
this.obj.push(createObj(1, 1, _local3 * 700, 152 + (screenH * 2), this.objId));
_local3++;
};
}
return(undefined);
}
function lvlScr_printNumberMC(_score, nr, mcList) {
var _local2 = Math.pow(10, nr - 1);
var _local1 = 0;
while (_local1 < nr) {
var _local3 = int(_score / _local2);
mcList[_local1].gotoAndPlay("n" + _local3);
_score = _score - (_local3 * _local2);
_local2 = _local2 / 10;
_local1++;
}
}
function bbColl(spr1x, spr1y, spr1w, spr1h, spr2x, spr2y, spr2w, spr2h) {
if ((((spr1x > (spr2x + spr2w)) || (spr2x > (spr1x + spr1w))) || (spr1y > (spr2y + spr2h))) || (spr2y > (spr1y + spr1h))) {
return(false);
}
return(true);
}
lvlScr_printNumberMC(levelNr + 1, 2, [lvlScrFig1, lvlScrFig2]);
for (var n in scr) {
removeMovieClip(scr[n]);
}
for (var n in scrBkg) {
removeMovieClip(scrBkg[n]);
}
if (_root.soundOn) {
for (var n in scrSound) {
removeMovieClip(scrSound[n]);
}
}
for (var n in obj) {
if (obj[n].mc != undefined) {
removeMovieClip(obj[n]);
}
delete obj[n];
}
for (var n in aScreen) {
delete aScreen[n];
}
for (var n in aObjs) {
delete aObjs[n];
}
for (var n in sceneSpots) {
delete sceneSpots[n];
}
for (var n in sceneInfo) {
delete sceneInfo[n];
}
var obj = [];
var objId = 0;
var objNr = 0;
var powUp;
var powUpTimer;
var powUpDelay;
var powUpDelaySave = [7000, 6000, 5000];
var aList = [];
var areaOldX = 1;
var areaOldY = 1;
var aScreen = [];
var aObjs = [];
var worldW = 0;
var worldH = 0;
var camX = 0;
var camY = 0;
var camXold = -1;
var camYold = -1;
var camVx = 0;
var camVy = 0;
var kLe = 37;
var kRi = 39;
var kUp = 38;
var kDn = 40;
var kSpace = 32;
var kSpaceFlag = false;
var kQuality = 81;
var kQualityFlag = false;
var kEsc = 27;
var kEscFlag = false;
var tmpFlag = false;
var scrollSpeed = 10;
var sceneSpots = [];
var scene = 0;
var sceneInfo = [];
var sceneNr = 0;
var soldierMax = 0;
var soldierNr = 0;
var soldierTotal = 0;
var attackTimer = 0;
var levelLoaded = false;
var tmpTimer = (getTimer() + 3000);
this.onEnterFrame = getReady;
var y = 0;
while (y < aY) {
aList[y] = [];
var x = 0;
while (x < aX) {
aList[y][x] = [];
x++;
}
y++;
}
loadXMLData(levelNames[levelNr]);
if (gameOver) {
removeMovieClip(scrPly.textGameOver);
}
if (levelComplete) {
removeMovieClip(scrPly.textLevelComplete);
}
if (gameComplete) {
removeMovieClip(scrPly.textGameComplete);
}
if (levelNr > 0) {
ply.regainPowers();
}
Mouse.hide();
stop();
Frame 20
function oncePerSecond() {
ply.updateMe();
}
function getSoundDepth() {
sndDepth++;
return(sndDepth);
}
function areaAddOne(o) {
var _local4 = int(o.x / screenW);
var _local6 = int(o.y / screenH);
var _local5 = int(o.x + (o.w / screenW));
var _local7 = int(o.y + (o.h / screenH));
var _local2 = _local6;
while (_local2 < (_local7 + 1)) {
var _local1 = _local4;
while (_local1 < (_local5 + 1)) {
aList[_local2][_local1].push(o);
o.areas.push([_local1, _local2]);
_local1++;
}
_local2++;
}
aObjs.push(o);
}
function areaAddToCurrent(o) {
var _local2 = int(camX / screenW);
var _local1 = int(camY / screenH);
aList[_local1][_local2].push(o);
o.areas.push([_local2, _local1]);
aObjs.push(o);
}
function areaDelOne(x, y, o) {
var _local5 = aList[y][x].length;
var _local1 = 0;
while (_local1 < _local5) {
if (aList[y][x][_local1] == o) {
aList[y][x].splice(_local1, 1);
}
_local1++;
}
_local5 = aList[y][x].length;
}
function removeOne(list, item) {
for (var _local3 in list) {
if (list[_local3] == item) {
list.splice(int(_local3), 1);
}
}
}
function explosion(o, x, y) {
var _local4 = o.exploSize;
var _local3 = o.layer;
switch (_local4) {
case 1 :
x = x - 75;
y = y - 75;
w = 150;
h = 150;
break;
case 2 :
x = x - 100;
y = y - 100;
w = 200;
h = 200;
break;
case 3 :
x = x - 150;
y = y - 150;
w = 300;
h = 300;
}
var _local7 = aObjs.length;
var _local2 = 0;
while (_local2 < _local7) {
o = aObjs[_local2];
if (o.onScreen) {
if (o.layer >= (_local3 - 15)) {
if (o.layer <= (_local3 + 15)) {
if (o.explodes) {
if (bbColl(x, y, w, h, o.x - 40, o.y - 20, 80, 40)) {
o.hitMe(1, _local4);
}
}
}
}
}
_local2++;
}
}
function main() {
if (gameOn) {
attackWave();
doPickups();
}
checkComplete();
doCamera();
gameStuff();
drawWorld();
}
function gameStuff() {
if (!messOn) {
if (Key.isDown(kQuality)) {
if (!kQualityFlag) {
gameQuality++;
if (gameQuality == 4) {
gameQuality = 0;
}
messMCList[0] = "uiQuality";
switch (gameQuality) {
case 0 :
_quality = "low";
messMCList[1] = "uiQuality_0";
break;
case 1 :
_quality = "medium";
messMCList[1] = "uiQuality_1";
break;
case 2 :
_quality = "high";
messMCList[1] = "uiQuality_2";
break;
case 3 :
_quality = "best";
messMCList[1] = "uiQuality_3";
}
messTimer = getTimer() + 1400;
messOn = true;
messPut = false;
}
kQualityFlag = true;
} else {
kQualityFlag = false;
}
if (Key.isDown(kEsc)) {
if (!kEscFlag) {
gameOn = false;
_root.gotoAndPlay("rMenu");
}
kEscFlag = true;
} else {
kEscFlag = false;
}
}
if (messOn) {
if (!messPut) {
messMCList[0] = scrPly.attachMovie(messMCList[0], "uiMess0", 7000, {_x:20, _y:20});
messMCList[1] = scrPly.attachMovie(messMCList[1], "uiMess1", 7001, {_x:149, _y:20});
messPut = true;
}
if (messTimer < getTimer()) {
removeMovieClip(messMCList[0]);
removeMovieClip(messMCList[1]);
messOn = false;
}
}
if (gameOver) {
switch (gameOverState) {
case 0 :
gameOn = false;
if ((ply.ammo <= 0) && (ply.bomb <= 0)) {
scrPly.attachMovie("textgameoverammoMC", "textGameOver", 30000, {_x:((screenW - 281) / 2) + screenX, _y:160});
} else {
scrPly.attachMovie("textgameoverMC", "textGameOver", 30000, {_x:((screenW - 252) / 2) + screenX, _y:160});
}
gameOverTimer = getTimer() + 4000;
gameOverState = 1;
break;
case 1 :
if (gameOverTimer >= getTimer()) {
break;
}
if (hs.qualifyTable(ply.score)) {
_root.gotoAndStop("rHighscore");
} else {
_root.gotoAndStop("rGameOver");
}
}
return(undefined);
}
if (levelComplete) {
switch (levelCompleteState) {
case 0 :
gameOn = false;
scrPly.attachMovie("textlevelcompleteMC", "textLevelComplete", 30001, {_x:((screenW - 353) / 2) + screenX, _y:160});
levelCompleteTimer = getTimer() + 3000;
levelCompleteState = 1;
break;
case 1 :
if (levelCompleteTimer >= getTimer()) {
break;
}
newLevel();
_root.gotoAndPlay("rLevelscreen");
}
return(undefined);
}
if (gameComplete) {
switch (gameCompleteState) {
case 0 :
gameOn = false;
scrPly.attachMovie("textgamecompleteMC", "textGameComplete", 30002, {_x:((screenW - 358) / 2) + screenX, _y:160});
gameCompleteTimer = getTimer() + 5000;
gameCompleteState = 1;
break;
case 1 :
if (gameCompleteTimer >= getTimer()) {
break;
}
if (hs.qualifyTable(ply.score)) {
_root.gotoAndStop("rHighscore");
} else {
_root.gotoAndStop("rGameOver");
}
}
return(undefined);
}
}
function newLevel() {
levelNr++;
}
function doPickups() {
if (!powUp) {
if (powUpTimer < getTimer()) {
powUpTimer = getTimer() + powUpDelay;
powUp = spawnPickup();
}
}
}
function spawnPickup() {
switch (levelNr) {
case 0 :
case 1 :
var _local2 = random(100);
if (_local2 > 80) {
_local2 = 0;
} else if (_local2 > 30) {
_local2 = 3;
} else {
_local2 = 6;
}
break;
case 1 :
_local2 = random(100);
if (_local2 > 65) {
_local2 = 0;
} else if (_local2 > 15) {
_local2 = 3;
} else {
_local2 = 6;
}
break;
case 2 :
_local2 = random(100);
if (_local2 > 60) {
_local2 = 0;
} else if (_local2 > 10) {
_local2 = 3;
} else {
_local2 = 6;
}
}
_local2 = random(3) + _local2;
var _local8 = false;
var _local9 = false;
var _local4 = false;
var _local7 = false;
var _local6 = false;
var _local5 = (camX + 80) + random(300);
switch (levelNr) {
case 0 :
case 1 :
if (!(scene === 3)) {
} else {
_local6 = true;
}
break;
case 2 :
switch (scene) {
case 4 :
_local6 = true;
break;
case 5 :
_local7 = true;
break;
case 6 :
var _local10 = random(2);
if (_local10 == 1) {
_local5 = (camX + 80) + random(50);
} else {
_local5 = (camX + 250) + random(130);
}
break;
}
break;
}
if (_local7) {
switch (_local2) {
case 1 :
case 2 :
_local2 = 0;
break;
case 4 :
case 5 :
_local2 = 3;
break;
case 7 :
case 8 :
_local2 = 6;
}
}
if (_local6) {
switch (_local2) {
case 2 :
_local2 = 0;
break;
case 5 :
_local2 = 3;
break;
case 8 :
_local2 = 6;
}
}
o = createObj(_CTYPE_PICKUP, _local2, _local5, camY - 100, this.objId);
var _local3 = 0;
switch (_local2) {
case 0 :
case 3 :
case 6 :
_local3 = _LINE2_2;
_local8 = true;
break;
case 1 :
case 4 :
case 7 :
_local3 = _LINE3_2 + 3;
_local9 = true;
break;
case 2 :
case 5 :
case 8 :
_local3 = _LINE4_2;
_local4 = true;
}
switch (levelNr) {
case 2 :
switch (scene) {
case 5 :
o.destY = 500 + camY;
break;
case 6 :
if (_local8 || (_local4)) {
o.destY = 500 + camY;
}
if (_local4) {
o.depth = (o.depth - layerList[o.layer]) + layerList[0];
o.layer = 0;
}
if (_local9) {
o.destY = ((_LINE3 - o.h) + camY) - 38;
}
break;
default :
o.destY = (_local3 - o.h) + camY;
}
break;
default :
o.destY = (_local3 - o.h) + camY;
}
obj.push(o);
areaAddToCurrent(o);
return(true);
}
function checkComplete() {
if (gameOver) {
return(undefined);
}
if (levelComplete) {
return(undefined);
}
if (gameComplete) {
return(undefined);
}
if (soldierTotal < soldierMax) {
soldierMax = soldierTotal;
}
if (soldierTotal <= 0) {
soldierTotal = 0;
soldierMax = 0;
if (soldierNr > 0) {
soldierTotal = soldierNr;
return(undefined);
}
if (soldierNr <= 0) {
soldierNr = 0;
if ((scene + 1) >= sceneNr) {
if ((levelNr + 1) == levelMax) {
gameComplete = true;
} else {
levelComplete = true;
if (soundOn) {
jingle.attachSound("jingle_levelcomplete");
jingle.start(0, 1);
}
}
return(undefined);
}
gameScroll = true;
gameOn = false;
dx = sceneInfo[scene + 1][1];
dy = sceneInfo[scene + 1][2];
if (camX < dx) {
camVx = scrollSpeed;
}
if (camX > dx) {
camVx = -scrollSpeed;
}
if ((camX + camVx) > (dx - camVx)) {
if ((camX + camVx) < (dx + camVx)) {
camX = dx;
}
}
if (camY < dy) {
camVy = scrollSpeed;
}
if (camY > dy) {
camVy = -scrollSpeed;
}
if ((camY + camVy) > (dy - camVy)) {
if ((camY + camVy) < (dy + camVy)) {
camY = dy;
}
}
if ((camX == dx) && (camY == dy)) {
scene++;
camX = sceneInfo[scene][1];
camY = sceneInfo[scene][2];
camVx = 0;
camVy = 0;
soldierMax = sceneInfo[scene][3];
soldierTotal = sceneInfo[scene][4];
powUp = false;
gameScroll = false;
gameOn = true;
}
}
}
}
function attackWave() {
var _local4;
var _local6;
var _local9;
if (soldierMax == 0) {
return(undefined);
}
_local9 = getTimer();
if (attackTimer > _local9) {
return(undefined);
}
attackTimer = (_local9 + 500) + random(1000 - (levelNr * 200));
if (soldierNr >= soldierMax) {
return(undefined);
}
var _local8 = sceneSpots[scene].length;
var _local10 = random(_local8);
_local4 = sceneSpots[scene][_local10];
if (_local4.busy) {
return(undefined);
}
_local8 = int(random(_local4.sList.length));
var _local7 = _local4.sList[_local8];
if (levelNr == 2) {
if (scene == 4) {
if (_local7 == 9) {
var _local5 = aObjs.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = aObjs[_local2];
if (_local3.type == 201) {
if (_local3.onScreen) {
return(undefined);
}
}
_local2++;
}
}
}
}
_local4.busy = true;
x = _local4.x + camX;
y = _local4.y + camY;
_local6 = createObj(2, _local7, x, y, this.objId);
_local6.spot = _local4;
if (!(_local7 === _SWIN)) {
} else {
_local6.windowNr = _local4.winNr;
_local6.building = _local4.building;
}
obj.push(_local6);
areaAddToCurrent(_local6);
soldierNr++;
}
function doCamera() {
var _local5;
camX = int(camX + camVx);
camY = int(camY + camVy);
if (camX != camXold) {
camXold = camX;
if (camX < 0) {
camX = 0;
}
if (camX > (worldW - screenW)) {
camX = worldW - screenW;
}
_root.scr._x = screenX - int(camX);
_root.scrPar._x = _root.scr._x / 6;
}
if (camY != camYold) {
camYold = camY;
if (camY < 0) {
camY = 0;
}
if (camY > (worldH - screenH)) {
camY = worldH - screenH;
}
_root.scr._y = screenY - int(camY);
if (levelNr == 2) {
if (scene >= 5) {
if (gameScroll) {
if (_root.scrBkg._y < 464) {
_root.scrBkg._y = _root.scrBkg._y + (912 - camY);
}
}
}
if (scene >= 4) {
if (gameScroll) {
var _local3 = 796 - int(camY);
var _local2 = _local3 / 42;
var _local4 = 70 + _local2;
_root.scrPar._y = _local4;
_root.scrBkg.statPav._y = 1231 - camY;
}
}
}
}
}
function drawWorld() {
var _local2;
var _local4;
var _local17 = [0, 0, 1, 0, 1, 1, 0, 1];
var _local10;
var _local9;
var _local16 = int(camX);
var _local15 = int(camY);
var _local12 = int(_local16 / screenW);
var _local11 = int(_local15 / screenH);
if ((_local12 != areaOldX) || (_local11 != areaOldY)) {
if (aObjs.length > 0) {
for (var _local18 in aObjs) {
_local2 = aObjs[_local18];
_local2.inList = false;
if (_local2.onScreen) {
removeMovieClip(_local2.mc);
_local2.onScreen = false;
_local2.mc = undefined;
if (_local2.superTile) {
var _local14 = _local2.buildListMCs.length;
if (_local14 > 0) {
var _local5 = 0;
while (_local5 < _local14) {
removeMovieClip(_local2.buildListMCs[_local14]);
_local5++;
}
_local2.buildListMCs = [];
}
}
}
}
}
aObjs = [];
var _local6 = 0;
while (_local6 < 4) {
_local10 = _local17[_local6 * 2];
_local9 = _local17[(_local6 * 2) + 1];
for (var _local18 in aList[_local11 + _local9][_local12 + _local10]) {
_local2 = aList[_local11 + _local9][_local12 + _local10][_local18];
if (!_local2.inList) {
aObjs.push(_local2);
_local2.inList = true;
}
}
_local6++;
}
areaOldX = _local12;
areaOldY = _local11;
}
var _local18 = aObjs.length;
var _local6 = 0;
while (_local6 < _local18) {
_local2 = aObjs[_local6];
if (!_local2.onScreen) {
if (bbColl(_local16, _local15, screenW, screenH, _local2.x + _local2.offX, _local2.y + _local2.offY, _local2.w, _local2.h)) {
if (_local2.superTile) {
_local2.mc = _root.scr.createEmptyMovieClip(_local2.id, _local2.depth);
var _local13 = _local2.buildList.length;
var _local5 = 0;
while (_local5 < _local13) {
_local4 = _local2.mc.attachMovie(_local2.buildList[_local5][0], (_local2.symName + _local2.id) + _local5, _local5);
_local2.buildListMCs.push(_local4);
_local4._x = _local2.buildList[_local5][1];
_local4._y = _local2.buildList[_local5][2];
_local4.swapDepths(_local5);
_local5++;
}
_local2.mc._x = _local2.x;
_local2.mc._y = _local2.y;
_local2.mc.swapDepths(_local2.depth);
_local2.mc.parent = _local2;
} else {
_local2.mc = _root.scr.attachMovie(_local2.symName, _local2.id, _local2.depth);
_local2.mc._x = _local2.x;
_local2.mc._y = _local2.y;
_local2.mc.swapDepths(_local2.depth);
_local2.mc.parent = _local2;
}
if (_local2.flipH) {
_local2.mc._xscale = -100;
}
if (_local2.state != "") {
_local2.mc.gotoAndPlay(_local2.state);
}
_local2.onScreen = true;
}
} else if (!bbColl(_local16, _local15, screenW, screenH, _local2.x + _local2.offX, _local2.y + _local2.offY, _local2.w, _local2.h)) {
removeMovieClip(_local2.mc);
_local2.onScreen = false;
_local2.mc = undefined;
if (_local2.superTile) {
var _local14 = _local2.buildListMCs.length;
if (_local14 > 0) {
var _local5 = 0;
while (_local5 < _local14) {
removeMovieClip(_local2.buildListMCs[_local14]);
_local5++;
}
_local2.buildListMCs = [];
}
}
}
if (_local2.dead) {
if (_local2.deadRemove) {
if (_local2.doDead) {
if (_local2.classNr == 2) {
_local2.spot.busy = false;
_local2.spot = undefined;
}
removeMovieClip(_local2.mc);
if (_root.soundOn) {
if (_local2.hasSound) {
scrSound.removeMovieClip(_local2.sndDummyMC);
}
}
_local2.onScreen = false;
_local2.mc = undefined;
aObjs.splice(int(_local6), 1);
_local18--;
var _local14 = _local2.areas.length;
var _local3 = 0;
while (_local3 < _local14) {
var _local8 = _local2.areas[_local3][0];
var _local7 = _local2.areas[_local3][1];
areaDelOne(_local8, _local7, _local2);
_local3++;
}
removeOne(obj, _local2);
objNr--;
}
}
} else if (_local2.moveable) {
var _local19 = _local2.updateMe();
}
_local6++;
}
}
drawWorld();
removeMovieClip(mouseCursor);
mouseCursorFlag = false;
gameOn = true;
var gameOver = false;
var gameOverState = 0;
var gameOverTimer = 0;
var levelComplete = false;
var levelCompleteState = 0;
var levelCompleteTimer = 0;
var gameComplete = false;
var gameCompleteState = 0;
var gameCompleteTimer = 0;
var gameScroll = false;
var jingle = new Sound(this);
var messTimer = 0;
var messOn = false;
var messMCList = [undefined, undefined];
var messPut = false;
this.onEnterFrame = main;
var sndDepth = 0;
if (oncePerSecondInterval == undefined) {
oncePerSecondInterval = setInterval(oncePerSecond, 1);
}
stop();
Frame 25
stop();
Frame 30
stop();
Frame 35
this.onEnterFrame = undefined;
stopAllSounds();
if (!mouseCursorFlag) {
var n = getNextHighestDepth();
_root.attachMovie("Aim", "mouseCursor", n, {_x:_xmouse, _y:_ymouse});
mouseCursorFlag = true;
}
m_playmoreRESTART.onRollOver = function () {
m_playmoreRESTART.gotoAndStop("fActive");
};
m_playmoreRESTART.onRollOut = function () {
m_playmoreRESTART.gotoAndStop("fStart");
};
m_playmoreRESTART.onRelease = function () {
_root.gotoAndPlay("rMenu");
};
m_playmoreGO.onRollOver = function () {
m_playmoreGO.gotoAndStop("fActive");
};
m_playmoreGO.onRollOut = function () {
m_playmoreGO.gotoAndStop("fStart");
};
m_playmoreGO.onRelease = function () {
_root.createEmptyMovieClip("winDragonGamez2", _root.getNextHighestDepth());
winDragonGamez2.getURL(URLhome, "_blank");
};
m_dragonLogoGO.onRollOver = function () {
m_dragonLogoGO.gotoAndStop("fActive");
};
m_dragonLogoGO.onRollOut = function () {
m_dragonLogoGO.gotoAndStop("fStart");
};
m_dragonLogoGO.onRelease = function () {
_root.createEmptyMovieClip("winDragonGamez2", _root.getNextHighestDepth());
winDragonGamez2.getURL(URLhome, "_blank");
};
stop();
Frame 40
function doHighScore() {
if (user_name != undefined) {
nameList[hs.qPos].text = user_name;
}
}
this.onEnterFrame = doHighScore;
stopAllSounds();
user_name = "";
var o;
var mcList = [];
hs.enterTable(hs.qScore);
hs.sortTable();
var i = 0;
while (i < 10) {
o = _root.attachMovie("hsNamn" + (i + 1), "MCnamn" + (i + 1), 1000 + i, {_x:204, _y:105 + (i * 29.5)});
mcList.push(o);
o = _root.attachMovie("hsScore" + (i + 1), "MCscore" + (i + 1), 2000 + i, {_x:278, _y:105 + (i * 29.5)});
mcList.push(o);
i++;
}
if (!mouseCursorFlag) {
var n = getNextHighestDepth();
_root.attachMovie("Aim", "mouseCursor", n, {_x:_xmouse, _y:_ymouse});
mouseCursorFlag = true;
}
nameList = [MCnamn1.hsNamNam1, MCnamn2.hsNamNam2, MCnamn3.hsNamNam3, MCnamn4.hsNamNam4, MCnamn5.hsNamNam5, MCnamn6.hsNamNam6, MCnamn7.hsNamNam7, MCnamn8.hsNamNam8, MCnamn9.hsNamNam9, MCnamn10.hsNamNam10];
scoreList = [MCscore1.hsSkoSko1, MCscore2.hsSkoSko2, MCscore3.hsSkoSko3, MCscore4.hsSkoSko4, MCscore5.hsSkoSko5, MCscore6.hsSkoSko6, MCscore7.hsSkoSko7, MCscore8.hsSkoSko8, MCscore9.hsSkoSko9, MCscore10.hsSkoSko10];
var i = 0;
while (i < 10) {
if (i == hs.qPos) {
nameList[i].text = "";
scoreList[i].text = String(hs.qScore);
} else {
scoreList[i].text = String(hs.tableScore[i]);
nameList[i].text = String(hs.tableNames[i]);
}
i++;
}
m_hiButtonOK.onRollOver = function () {
m_hiButtonOK.gotoAndStop("fActive");
};
m_hiButtonOK.onRollOut = function () {
m_hiButtonOK.gotoAndStop("fStart");
};
m_hiButtonOK.onRelease = function () {
hs.tableScore[hs.qPos] = hs.qScore;
hs.tableNames[hs.qPos] = user_name;
hs_data.data.tableScore = hs.tableScore;
hs_data.data.tableNames = hs.tableNames;
hs_data.data.tableLoaded = "12345";
hs_data.flush();
var _local2 = 0;
while (_local2 < 20) {
removeMovieClip(mcList[_local2]);
_local2++;
}
_root.gotoAndStop("rGameOver");
};
user_name.setFocus();
stop();
Symbol 11 MovieClip [textloadingMC] Frame 8
gotoAndPlay (1);
Symbol 18 MovieClip Frame 1
stop();
Symbol 515 MovieClip [__Packages.Player] Frame 0
class Player extends MovieClip
{
var score, scoreOld, health, healthOld, bomb, bombOld, ammo, ammoOld, rekylX, rekylY, rekylT, shootTimer, fireNr, exploSize, kSpaceFlag, scaleExplo, sndList, sndNr_shots, mFlag, isHit, isHitTimer, layer, _x, _y, screenX, screenY, gotoAndPlay;
function Player () {
super();
score = 0;
scoreOld = -1;
health = 100;
healthOld = -1;
bomb = 5;
bombOld = -1;
ammo = 250;
ammoOld = -1;
rekylX = 100;
rekylY = 0;
rekylT = 0;
shootTimer = 0;
fireNr = 0;
exploSize = 3;
kSpaceFlag = false;
scaleExplo = 250;
}
function init() {
sndList = [];
sndList[0] = new Sound(this);
sndList[0].attachSound("player_emptyMag");
sndList[1] = [];
sndList[1][0] = new Sound(this);
sndList[1][0].attachSound("player_shot01");
sndList[1][1] = new Sound(this);
sndList[1][1].attachSound("player_shot02");
sndList[1][2] = new Sound(this);
sndList[1][2].attachSound("player_shot03");
sndList[1][3] = new Sound(this);
sndList[1][3].attachSound("player_shot04");
sndList[1][4] = new Sound(this);
sndList[1][4].attachSound("player_shot05");
sndList[1][5] = new Sound(this);
sndList[1][5].attachSound("player_shot06");
sndNr_shots = 6;
sndList[2] = new Sound(this);
sndList[2].attachSound("snd_powerup");
sndList[3] = new Sound(this);
sndList[3].attachSound("player_grenade");
sndList[4] = new Sound(this);
sndList[4].attachSound("player_hitten");
mFlag = false;
return(this);
}
function updateMe() {
getInput();
updateUI();
}
function updateUI() {
if (isHit > 0) {
if (getTimer() > isHitTimer) {
isHit = 0;
_root.scrPly.uiFace.gotoAndPlay("fStart");
}
}
if (score != scoreOld) {
printNumberMC(score, 6, _root.uiScore);
scoreOld = score;
}
if (health != healthOld) {
printNumberMC(health, 3, _root.uiHealth);
healthOld = health;
}
if (ammo != ammoOld) {
printNumberMC(ammo, 3, _root.uiAmmo);
ammoOld = ammo;
}
if (bomb != bombOld) {
printNumberMC(bomb, 3, _root.uiBomb);
bombOld = bomb;
}
}
function printNumberMC(_score, nr, mcList) {
var _local2 = Math.pow(10, nr - 1);
var _local1 = 0;
while (_local1 < nr) {
var _local3 = int(_score / _local2);
mcList[_local1].gotoAndPlay("n" + _local3);
_score = _score - (_local3 * _local2);
_local2 = _local2 / 10;
_local1++;
}
}
function regainPowers() {
takePowerup(1);
takePowerup(2);
takePowerup(2);
takePowerup(2);
takePowerup(1);
takePowerup(1);
}
function takePowerup(in_type) {
switch (in_type) {
case 1 :
health = health + 10;
if (health > 100) {
health = 100;
}
break;
case 2 :
ammo = ammo + 40;
if (ammo > 999) {
ammo = 999;
}
break;
case 3 :
bomb = bomb + 3;
if (bomb <= 99) {
break;
}
bomb = 99;
}
if (_root.gameOn) {
if (isHit != 2) {
if (_root.soundOn) {
sndList[2].start(0, 1);
}
}
isHit = 2;
isHitTimer = getTimer() + 750;
_root.scrPly.uiFace.gotoAndPlay("fPowerup");
_root.powUp = false;
}
}
function hurtMe(sObj) {
var _local6 = true;
switch (sObj.type) {
case _SRUN3 :
case _SRUN3_L :
case _SRUN4 :
case _SRUN4_L :
var _local4 = _root.aObjs;
var _local7 = _local4.length;
var _local3 = 0;
for(;;){
if (_local3 >= _local7) {
break;
}
if (_local4[_local3].classNr == _CTYPE_BUILDING) {
if (_root.bbColl(sObj.x, sObj.y, 1, 1, _local4[_local3].x, _local4[_local3].y, _local4[_local3].w, _local4[_local3].h)) {
_local6 = false;
}
}
_local3++;
};
}
if (_local6) {
health = health - sObj.damage;
sndList[4].start(0, 1);
var _local10 = (_root.camX + 50) + random(430);
var _local9 = (_root.camY + 50) + random(418);
var _local8 = _root.scr.attachMovie("bloodsplatMC", "plyBloodHurt" + random(10), _root.layerList[42] + random(1000), {_x:_local10, _y:_local9});
_local8._xscale = 400;
_local8._yscale = 400;
_local8._alpha = 50;
if (isHit == 0) {
isHit = 1;
isHitTimer = getTimer() + 750;
_root.scrPly.uiFace.gotoAndPlay("fHit");
}
}
if (health <= 0) {
health = 0;
ply_gameOver();
}
}
function ply_gameOver() {
if (!_root.gameOver) {
if (_root.soundOn) {
_root.jingle.attachSound("jingle_gameover");
_root.jingle.start(0, 1);
}
}
_root.gameOver = true;
}
function launchGrenade() {
if (bomb <= 0) {
if (ammo <= 0) {
health = 0;
ply_gameOver();
}
}
bomb--;
if (bomb < 0) {
bomb = 0;
return(undefined);
}
var _local6 = _root.ply.screenX;
var _local5 = _root.ply.screenY;
var _local9 = _local6 - _root.camX;
var _local4 = _local5 - _root.camY;
var _local3 = 0;
if (_local4 > _root._LINE2_2) {
_local3 = 40;
} else if (_local4 > _root._LINE2) {
_local3 = 35;
} else if (_local4 > _root._LINE3_3) {
_local3 = 30;
} else if (_local4 > _root._LINE3_2) {
_local3 = 25;
} else if (_local4 > _root._LINE3) {
_local3 = 20;
} else if (_local4 > _root._LINE4_2) {
_local3 = 15;
} else if (_local4 > _root._LINE4) {
_local3 = 10;
} else if (_local4 > _root._LINE5) {
_local3 = 5;
}
layer = _local3;
var _local8 = _root.layerList[42];
var _local7 = _root.scr.attachMovie("explosion01MC", "exploGrenade" + random(10), _local8, {_x:_local6, _y:_local5});
_local7._xscale = scaleExplo;
_local7._yscale = scaleExplo;
_root.explosion(this, _local6, _local5);
if (_root.soundOn) {
sndList[3].start(0, 1);
}
}
function drawMe(in_x, in_y) {
_x = in_x + rekylX;
_y = in_y + rekylY;
}
function getInput() {
var _local3;
screenX = ((_root._xmouse + _root.camX) - 16) + rekylX;
screenY = ((_root._ymouse + _root.camY) - 16) + rekylY;
_x = (screenX - _root.camX) + 16;
_y = (screenY - _root.camY) + 16;
if (!_root.gameOn) {
return(undefined);
}
if (Key.isDown(_root.kSpace)) {
if (!kSpaceFlag) {
launchGrenade();
}
kSpaceFlag = true;
} else {
kSpaceFlag = false;
}
if (_root.mouseFlag) {
if (shootTimer < getTimer()) {
if (ammo <= 0) {
shootTimer = getTimer() + 500;
if (_root.soundOn) {
sndList[0].start(0, 1);
}
return(undefined);
}
var _local8 = random(sndNr_shots);
if (_root.soundOn) {
sndList[1][_local8].start(0, 1);
}
fireNr++;
shootTimer = getTimer() + 75;
rekylX = random(fireNr * 4);
if (rekylX > 100) {
rekylX = 100;
}
rekylX = -(rekylX / 2);
rekylY = random(fireNr * 12);
if (rekylY > 200) {
rekylY = 200;
}
rekylY = (-rekylY) * 0.75;
gotoAndPlay("fAttack");
ammo--;
if (ammo <= 0) {
if (bomb <= 0) {
health = 0;
ply_gameOver();
}
}
var _local4 = false;
var _local6 = false;
var _local7;
var _local5 = 0;
for (_local8 in _root.aObjs) {
_local3 = _root.aObjs[_local8];
if (_local3.mc.hitTest(_x, _y, true)) {
if (_local3.onScreen) {
if (_local3.canHit) {
if (_local3.depth > _local5) {
_local5 = _local3.depth;
_local7 = _local3;
_local4 = true;
}
}
if (_local3.makeFire) {
_local6 = true;
} else {
_local4 = true;
}
}
}
}
if (_local4) {
_local7.hitMe();
} else {
var _local9 = false;
if (_root.levelNr != 2) {
if (screenY > 200) {
_local9 = true;
}
} else if (screenY > 1096) {
_local9 = true;
}
if (_local9) {
var _local10 = 1000;
_root.scr.attachMovie("ricochetMC", "fire", _local10, {_x:(_x - 16) + _root.camX, _y:(_y - 16) + _root.camY});
}
}
}
mFlag = true;
} else {
mFlag = false;
fireNr = 0;
rekylX = 0;
rekylY = 0;
}
}
static var _CTYPE_DEFAULT = 1;
static var _CTYPE_SOLDIER = 2;
static var _CTYPE_BUILDING = 3;
static var _CTYPE_OBSTACLE = 4;
static var _SOFF1 = 0;
static var _SOFF2 = 1;
static var _SOFF3 = 2;
static var _SOFF4 = 3;
static var _SRUN1 = 4;
static var _SRUN2 = 5;
static var _SRUN3 = 6;
static var _SRUN4 = 7;
static var _SMAN1 = 8;
static var _SMAN2 = 9;
static var _SMAN3 = 10;
static var _SWIN = 11;
static var _SHID1 = 12;
static var _SHID2 = 13;
static var _SWALL = 14;
static var _SOFF1_L = 100;
static var _SOFF2_L = 101;
static var _SOFF3_L = 102;
static var _SOFF4_L = 103;
static var _SRUN1_L = 104;
static var _SRUN2_L = 105;
static var _SRUN3_L = 106;
static var _SRUN4_L = 107;
static var _STAX = 200;
static var _STAX_L = 300;
}
Symbol 516 MovieClip [__Packages.Highscore] Frame 0
class Highscore
{
var qPos, qScore, tableScore, tableNames;
function Highscore () {
qPos = -1;
qScore = -1;
makeTable();
}
function init() {
var _local2 = ["MAJOR MADNESS", "BARNYARD BENNY", "LETHAL LEMUR", "NORTHMAN", "ACTION ADIS", "LOBO", "BAB", "TOBE", "BALB", "BELI DATA"];
resetTable(_local2, 10000, 1000);
}
function makeTable() {
tableScore = [];
tableNames = [];
var _local2 = 0;
while (_local2 < MAX_SCORES) {
tableScore[_local2] = 0;
tableNames[_local2] = String("");
_local2++;
}
}
function qualifyTable(in_score) {
if (in_score == 0) {
return(false);
}
var _local2 = 0;
while (_local2 < MAX_SCORES) {
if (in_score > tableScore[_local2]) {
qPos = _local2;
qScore = in_score;
return(true);
}
_local2++;
}
return(false);
}
function sortTable() {
var _local2;
var _local4;
var _local5;
var _local3 = 1;
while (_local3 < MAX_SCORES) {
_local2 = _local3;
_local4 = tableScore[_local3];
_local5 = tableNames[_local3];
while ((_local2 != 0) && (_local4 > tableScore[_local2 - 1])) {
tableScore[_local2] = tableScore[_local2 - 1];
tableNames[_local2] = tableNames[_local2 - 1];
_local2--;
}
tableScore[_local2] = _local4;
tableNames[_local2] = _local5;
_local3++;
}
}
function enterTable(postScore) {
var _local3 = 10000000 /* 0x989680 */;
var _local4 = -1;
var _local2 = 0;
while (_local2 < MAX_SCORES) {
if (tableScore[_local2] < _local3) {
_local4 = _local2;
_local3 = tableScore[_local2];
}
_local2++;
}
if (_local4 >= 0) {
tableScore[_local4] = postScore;
tableNames[_local4] = "";
}
}
function resetTable(namn, hi, lo) {
var _local4 = (hi - lo) / MAX_SCORES;
var _local3 = hi;
var _local2 = 0;
while (_local2 < MAX_SCORES) {
tableNames[_local2] = namn[_local2];
tableScore[_local2] = _local3;
_local3 = _local3 - _local4;
_local2++;
}
}
function loadTable() {
}
function saveTable() {
}
static var MAX_SCORES = 10;
}
Symbol 517 MovieClip [__Packages.Obstacle] Frame 0
class Obstacle
{
var onScreen, canHit, makeFire, moveable, inList, areas, deadRemove, state, offX, offY, classNr, exploSize, explodes, fxLayer, fxDepth, scaleExplo, hasSound, type, id, x, y, depth, sndDummyMC, symName, layer, w, h, Snd, dead, mc, windowNr, building;
function Obstacle () {
onScreen = false;
canHit = true;
makeFire = false;
moveable = false;
inList = false;
areas = [];
deadRemove = false;
state = "";
offX = 0;
offY = 0;
classNr = 4;
exploSize = 0;
explodes = false;
fxLayer = 0;
fxDepth = 0;
scaleExplo = 100;
hasSound = false;
}
function initMe(in_type, in_id, in_x, in_y, in_depth) {
type = in_type;
id = in_id;
x = in_x;
y = in_y;
depth = in_depth;
if (_root.soundOn) {
var _local3 = _root.getSoundDepth();
sndDummyMC = _root.scrSound.attachMovie("soundDummy", "sndDum" + _local3, _local3, {_x:0, _y:0});
}
switch (type) {
case _OWIN :
symName = "windowsmashMC";
layer = 20;
w = 40;
h = 40;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_window");
}
explodes = true;
hasSound = true;
break;
case _OBAR1 :
symName = "barrels01MC";
layer = 23;
w = 120;
h = 102;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_explosion_1");
}
exploSize = 1;
explodes = true;
scaleExplo = 150;
hasSound = true;
break;
case _OBAR2 :
symName = "barrels02MC";
layer = 12;
w = 84;
h = 60;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_explosion_1");
}
exploSize = 1;
explodes = true;
scaleExplo = 125;
hasSound = true;
break;
case _OSAND1 :
symName = "sackpile01MC";
layer = 23;
w = 200;
h = 87;
break;
case _OSAND2 :
symName = "sackpile02MC";
layer = 12;
w = 140;
h = 60;
break;
case _OWIN2 :
symName = "window01MC";
layer = 20;
w = 40;
h = 40;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_windowScream");
}
explodes = true;
hasSound = true;
break;
case _OWIN3 :
symName = "window02MC";
layer = 20;
w = 40;
h = 40;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_window");
}
explodes = true;
hasSound = true;
break;
case _OWIN4 :
symName = "window03MC";
layer = 20;
w = 40;
h = 40;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_window");
}
explodes = true;
hasSound = true;
}
fxLayer = layer + 1;
depth = _root.layerList[layer] + in_depth;
fxDepth = _root.layerList[fxLayer] + in_depth;
switch (type) {
case _OBAR1 :
case _OBAR2 :
case _OSAND1 :
case _OSAND2 :
offX = (-w) / 2;
offY = -h;
}
return(this);
}
function updateMe() {
return(0);
}
function hitMe() {
if (dead) {
return(undefined);
}
switch (type) {
case _OWIN2 :
case _OWIN3 :
case _OWIN4 :
_root.scr.removeMovieClip(mc);
mc = _root.scr.attachMovie("windowsmashMC", id, depth, {_x:x, _y:y});
building.windowObjs[windowNr] = undefined;
building.windowList[windowNr][2] = 0;
if (_root.soundOn) {
Snd.start(0, 1);
}
state = "fDead";
mc.gotoAndPlay(state);
dead = true;
deadRemove = true;
break;
case _OWIN :
if (_root.soundOn) {
Snd.start(0, 1);
}
state = "fDead";
mc.gotoAndPlay(state);
dead = true;
building.windowObjs[windowNr] = undefined;
building.windowList[windowNr][2] = 0;
deadRemove = true;
break;
case _OBAR1 :
case _OBAR2 :
if (_root.soundOn) {
Snd.start(0, 1);
}
dead = true;
state = "fDead";
mc.gotoAndPlay(state);
var _local3 = _root.scr.attachMovie("explosion01MC", "explo" + fxDepth, fxDepth, {_x:x, _y:y - (h / 2)});
_local3._xscale = scaleExplo;
_local3._yscale = scaleExplo;
_local3.gotoAndPlay("fStart");
_root.explosion(this, _root.ply.screenX, _root.ply.screenY);
break;
case _OSAND1 :
case _OSAND2 :
}
}
static var _OWIN = 0;
static var _OBAR1 = 1;
static var _OBAR2 = 2;
static var _OSAND1 = 3;
static var _OSAND2 = 4;
static var _OWIN2 = 5;
static var _OWIN3 = 6;
static var _OWIN4 = 7;
}
Symbol 518 MovieClip [__Packages.Building] Frame 0
class Building extends MovieClip
{
var onScreen, canHit, makeFire, moveable, inList, areas, state, offX, offY, windowList, windowObjs, superTile, haveWindows, canHoldSoldier, classNr, explodes, hasSound, type, id, x, y, depth, symName, layer, w, h, windowType, buildList, buildListMCs;
function Building () {
super();
onScreen = false;
canHit = false;
makeFire = false;
moveable = false;
inList = false;
areas = [];
state = "";
offX = 0;
offY = 0;
windowList = [];
windowObjs = [];
superTile = false;
haveWindows = false;
canHoldSoldier = false;
classNr = 3;
explodes = false;
hasSound = false;
}
function initMe(in_type, in_id, in_x, in_y, in_depth) {
type = in_type;
id = in_id;
x = in_x;
y = in_y;
depth = in_depth;
switch (type) {
case 1 :
symName = "bld_house";
layer = 19;
w = 365;
h = 360;
canHit = true;
haveWindows = true;
windowList = [[25, 25, 1], [25, 145, 1], [25, 265, 1], [115, 25, 1], [115, 145, 1], [205, 25, 1], [205, 145, 1], [295, 25, 1], [295, 145, 1], [295, 265, 1]];
windowType = [-1, _OWIN2, _OWIN, -1, _OWIN4, -1, _OWIN, -1, _OWIN, _OWIN];
canHoldSoldier = true;
superTile = true;
buildList = [];
buildList.push(["houseleftMC", 0, 240]);
buildList.push(["housedoorMC", 90, 240]);
buildList.push(["houserightMC", 270, 240]);
buildList.push(["houseleftMC", 0, 120]);
buildList.push(["housemiddleMC", 90, 120]);
buildList.push(["housemiddleMC", 180, 120]);
buildList.push(["houserightMC", 270, 120]);
buildList.push(["houseleftMC", 0, 0]);
buildList.push(["housemiddleMC", 90, 0]);
buildList.push(["housemiddleMC", 180, 0]);
buildList.push(["houserightMC", 270, 0]);
buildListMCs = [];
break;
case 2 :
symName = "barrack01MC";
layer = 19;
w = 295;
h = 175;
canHit = true;
haveWindows = true;
windowList = [[207.5, 55, 1]];
windowType = [_OWIN];
canHoldSoldier = true;
break;
case 3 :
symName = "bld_house2";
layer = 19;
w = 455;
h = 1040;
canHit = true;
haveWindows = true;
windowList = [];
var _local3 = 0;
while (_local3 < 6) {
windowList.push([25, 285 + (_local3 * 120), 1]);
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
windowList.push([115, 285 + (_local3 * 120), 1]);
_local3++;
}
_local3 = 0;
while (_local3 < 5) {
windowList.push([205.5, 285 + (_local3 * 120), 1]);
_local3++;
}
_local3 = 0;
while (_local3 < 6) {
windowList.push([295.5, 285 + (_local3 * 120), 1]);
_local3++;
}
_local3 = 0;
while (_local3 < 6) {
windowList.push([385.5, 285 + (_local3 * 120), 1]);
_local3++;
}
windowType = [_OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN, _OWIN];
canHoldSoldier = true;
superTile = true;
buildList = [];
buildList.push(["houseleftMC", 0, 860]);
buildList.push(["housedoorMC", 90, 860]);
buildList.push(["housemiddleMC", 270, 860]);
buildList.push(["houserightMC", 360, 860]);
_local3 = 0;
while (_local3 < 5) {
buildList.push(["houseleftMC", 0, 740 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 90, 740 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 180, 740 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 270, 740 - (_local3 * 120)]);
buildList.push(["houserightMC", 360, 740 - (_local3 * 120)]);
_local3++;
}
buildListMCs = [];
break;
case 4 :
symName = "bld_house3";
layer = 19;
w = 635;
h = 360;
canHit = true;
haveWindows = true;
canHoldSoldier = true;
windowList = [[25, 25, 1], [25, 145, 1], [25, 265, 1], [115, 25, 1], [115, 145, 1], [115, 265, 1], [205, 25, 1], [205, 145, 1], [205, 265, 1], [295, 25, 1], [295, 145, 1], [385, 25, 1], [385, 145, 1], [475, 25, 1], [475, 145, 1], [475, 265, 1], [565, 25, 1], [565, 145, 1], [565, 265, 1]];
windowType = [-1, _OWIN, _OWIN, -1, _OWIN, _OWIN3, -1, _OWIN, _OWIN, -1, _OWIN, -1, _OWIN4, -1, _OWIN, _OWIN2, -1, _OWIN, _OWIN];
superTile = true;
buildList = [];
buildList.push(["houseleftMC", 0, 240]);
buildList.push(["housemiddleMC", 90, 240]);
buildList.push(["housemiddleMC", 180, 240]);
buildList.push(["housedoorMC", 270, 240]);
buildList.push(["housemiddleMC", 450, 240]);
buildList.push(["houserightMC", 540, 240]);
_local3 = 0;
while (_local3 < 2) {
buildList.push(["houseleftMC", 0, 120 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 90, 120 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 180, 120 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 270, 120 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 360, 120 - (_local3 * 120)]);
buildList.push(["housemiddleMC", 450, 120 - (_local3 * 120)]);
buildList.push(["houserightMC", 540, 120 - (_local3 * 120)]);
_local3++;
}
buildListMCs = [];
break;
case 5 :
symName = "bld_house";
layer = 19;
w = 365;
h = 360;
canHit = true;
haveWindows = true;
windowList = [[25, 25, 1], [25, 145, 1], [25, 265, 1], [115, 25, 1], [115, 145, 1], [205, 25, 1], [205, 145, 1], [295, 25, 1], [295, 145, 1], [295, 265, 1]];
windowType = [-1, _OWIN, _OWIN, -1, _OWIN, -1, _OWIN, -1, _OWIN, _OWIN];
canHoldSoldier = true;
superTile = true;
buildList = [];
buildList.push(["houseleftMC", 0, 240]);
buildList.push(["housedoorMC", 90, 240]);
buildList.push(["houserightMC", 270, 240]);
buildList.push(["houseleftMC", 0, 120]);
buildList.push(["housemiddleMC", 90, 120]);
buildList.push(["housemiddleMC", 180, 120]);
buildList.push(["houserightMC", 270, 120]);
buildList.push(["houseleftMC", 0, 0]);
buildList.push(["housemiddleMC", 90, 0]);
buildList.push(["housemiddleMC", 180, 0]);
buildList.push(["houserightMC", 270, 0]);
buildListMCs = [];
break;
case 6 :
symName = "stairshackMC";
layer = 19;
w = 110;
h = 160;
canHit = true;
haveWindows = true;
windowList = [[35, 66, 1]];
windowType = [_OWIN];
canHoldSoldier = true;
}
depth = _root.layerList[layer] + in_depth;
return(this);
}
function updateMe() {
return(0);
}
function hitMe() {
}
static var _OWIN = 0;
static var _OBAR1 = 1;
static var _OBAR2 = 2;
static var _OSAND1 = 3;
static var _OSAND2 = 4;
static var _OWIN2 = 5;
static var _OWIN3 = 6;
static var _OWIN4 = 7;
}
Symbol 519 MovieClip [__Packages.Pickup] Frame 0
class Pickup
{
var classNr, onScreen, canHit, makeFire, moveable, inList, areas, doDead, offX, offY, explodes, dead, deadRemove, superTile, destY, vY, aMode, hasSound, type, id, x, y, depth, symName, layer, w, h, pickupType, lastTimer, mc;
function Pickup () {
classNr = 5;
onScreen = false;
canHit = true;
makeFire = false;
moveable = true;
inList = false;
areas = [];
doDead = false;
offX = 0;
offY = 0;
explodes = true;
dead = false;
deadRemove = true;
superTile = false;
destY = 0;
vY = 0;
aMode = 0;
hasSound = false;
}
function initMe(in_type, in_id, in_x, in_y, in_depth) {
type = in_type;
id = in_id;
x = in_x;
y = in_y;
depth = in_depth;
switch (type) {
case _PMED1 :
symName = "pickuphealth01MC";
layer = 39;
w = 85;
h = 80;
pickupType = 1;
vY = 8;
break;
case _PMED2 :
symName = "pickuphealth02MC";
layer = 32;
w = 48;
h = 45;
pickupType = 1;
vY = 6;
break;
case _PMED3 :
symName = "pickuphealth03MC";
layer = 9;
w = 33;
h = 31;
pickupType = 1;
vY = 4;
break;
case _PAMMO1 :
symName = "pickupbullets01MC";
layer = 39;
w = 85;
h = 80;
pickupType = 2;
vY = 8;
break;
case _PAMMO2 :
symName = "pickupbullets02MC";
layer = 32;
w = 48;
h = 45;
pickupType = 2;
vY = 6;
break;
case _PAMMO3 :
symName = "pickupbullets03MC";
layer = 9;
w = 33;
h = 31;
pickupType = 2;
vY = 4;
break;
case _PBOMB1 :
symName = "pickupgrenades01MC";
layer = 39;
w = 85;
h = 80;
pickupType = 3;
vY = 8;
break;
case _PBOMB2 :
symName = "pickupgrenades02MC";
layer = 32;
w = 48;
h = 45;
pickupType = 3;
vY = 6;
break;
case _PBOMB3 :
symName = "pickupgrenades03MC";
layer = 9;
w = 33;
h = 31;
pickupType = 3;
vY = 4;
}
depth = _root.layerList[layer] + in_depth;
}
function updateMe() {
switch (aMode) {
case 0 :
y = y + vY;
if (y >= destY) {
y = destY;
aMode = 1;
lastTimer = getTimer() + 3000;
}
break;
case 1 :
if (lastTimer >= getTimer()) {
break;
}
dead = true;
doDead = true;
_root.powUp = false;
}
mc._x = x;
mc._y = y;
return(1);
}
function hitMe() {
if (!dead) {
dead = true;
doDead = true;
_root.ply.takePowerup(pickupType);
}
}
static var _PMED1 = 0;
static var _PMED2 = 1;
static var _PMED3 = 2;
static var _PAMMO1 = 3;
static var _PAMMO2 = 4;
static var _PAMMO3 = 5;
static var _PBOMB1 = 6;
static var _PBOMB2 = 7;
static var _PBOMB3 = 8;
}
Symbol 520 MovieClip [__Packages.Default] Frame 0
class Default
{
var classNr, onScreen, canHit, makeFire, moveable, inList, areas, offX, offY, state, superTile, explodes, hasSound, type, id, x, y, depth, symName, layer, w, h;
function Default () {
classNr = 1;
onScreen = false;
canHit = false;
makeFire = false;
moveable = false;
inList = false;
areas = [];
offX = 0;
offY = 0;
state = "";
superTile = false;
explodes = false;
hasSound = false;
}
function initMe(in_type, in_id, in_x, in_y, in_depth) {
type = in_type;
id = in_id;
x = in_x;
y = in_y;
depth = in_depth;
switch (type) {
case 1 :
symName = "top_wall";
layer = 3;
w = 700;
h = 45;
break;
case 2 :
symName = "bkg_houses";
layer = 0;
w = 200;
h = 100;
makeFire = true;
break;
case _DMANH1 :
symName = "manhole01_dummy";
layer = 34;
w = 162.5;
h = 52;
makeFire = false;
break;
case _DMANH2 :
symName = "manhole02_dummy";
layer = 25;
w = 100;
h = 32;
makeFire = false;
break;
case _DMANH3 :
symName = "manhole03_dummy";
layer = 6;
w = 50;
h = 16;
makeFire = false;
break;
case _DPAVE :
symName = "bkg_pavement";
layer = 7;
w = 480;
h = 15;
makeFire = true;
break;
case _DWELL :
symName = "gnd_grate";
layer = 29;
w = 120;
h = 45;
makeFire = false;
break;
case _DCRACK1 :
symName = "crack01MC";
layer = 3;
w = 116;
h = 33;
makeFire = false;
break;
case _DCRACK2 :
symName = "crack02MC";
layer = 3;
w = 220;
h = 40;
makeFire = false;
break;
case _DCRATER :
symName = "crater01MC";
layer = 3;
w = 208;
h = 34;
makeFire = false;
break;
case _DLAMP1 :
symName = "lamppost01MC";
layer = 31;
w = 60;
h = 295;
makeFire = false;
break;
case _DLAMP2 :
symName = "lamppost02MC";
layer = 31;
w = 40;
h = 136;
makeFire = false;
break;
case 13 :
symName = "roofbackMC";
layer = 3;
w = 455;
h = 190;
makeFire = false;
break;
case 14 :
symName = "rooffrontMC";
layer = 30;
w = 455;
h = 70;
makeFire = false;
break;
case _DSTAR1 :
symName = "star";
layer = 1;
w = 19;
h = 15;
makeFire = false;
break;
case _DSTAR2 :
symName = "star2";
layer = 1;
w = 12;
h = 12;
makeFire = false;
break;
case _DDUMWIN :
symName = "blk_window";
layer = 16;
w = 40;
h = 40;
makeFire = false;
canHit = true;
}
depth = _root.layerList[layer] + in_depth;
switch (type) {
case _DMANH1 :
case _DMANH2 :
case _DMANH3 :
case _DWELL :
case _DCRACK1 :
case _DCRACK2 :
case _DCRATER :
offX = (-w) / 2;
offY = -h;
}
return(this);
}
function updateMe() {
return(0);
}
function hitMe() {
}
static var _DMANH1 = 3;
static var _DMANH2 = 4;
static var _DMANH3 = 5;
static var _DPAVE = 6;
static var _DWELL = 7;
static var _DCRACK1 = 8;
static var _DCRACK2 = 9;
static var _DCRATER = 10;
static var _DLAMP1 = 11;
static var _DLAMP2 = 12;
static var _DSTAR1 = 15;
static var _DSTAR2 = 16;
static var _DDUMWIN = 100;
}
Symbol 521 MovieClip [__Packages.Scene] Frame 0
class Scene
{
var sceneNr, x, y, busy, sList, winSpot, winNr, building;
function Scene () {
sceneNr = 0;
x = 0;
y = 0;
busy = false;
sList = [];
winSpot = false;
winNr = -1;
building = undefined;
}
function initMe(_nr, _sList, _inX, _inY) {
sceneNr = _nr;
sList = _sList;
x = _inX;
y = _inY;
}
function initWin(_nr, _sList, _inX, _inY, _winNr) {
sceneNr = _nr;
sList = _sList;
x = _inX;
y = _inY;
winNr = _winNr;
winSpot = true;
}
}
Symbol 522 MovieClip [__Packages.Soldier] Frame 0
class Soldier
{
var classNr, canHit, makeFire, onScreen, inList, moveable, dead, deadRemove, areas, state, aMode, atkTimer, spot, doDead, doAttack, vX, vY, flipH, atkNumber, superTile, explodes, fxLayer, fxDepth, scaleBlood, scaleExplo, hasSound, type, id, x, y, xOrg, yOrg, sndDummyMC, symName, w, h, layer, vol, giveScore, damage, Snd, exploSize, Snd3, Snd2, energy, depth, offX, offY, mc, windowNr, building;
function Soldier () {
classNr = 2;
canHit = true;
makeFire = false;
onScreen = false;
inList = false;
moveable = false;
dead = false;
deadRemove = true;
areas = [];
state = "";
aMode = 0;
atkTimer = 0;
spot = undefined;
doDead = false;
doAttack = false;
vX = 0;
vY = 0;
flipH = false;
atkNumber = 0;
superTile = false;
explodes = true;
fxLayer = 0;
fxDepth = 0;
scaleBlood = 100;
scaleExplo = 100;
hasSound = true;
}
function initMe(in_type, in_id, in_x, in_y, in_depth) {
type = in_type;
id = in_id;
x = in_x;
y = in_y;
xOrg = x;
yOrg = y;
if (_root.soundOn) {
var _local4 = _root.getSoundDepth();
sndDummyMC = _root.scrSound.attachMovie("soundDummy", "sndDum" + _local4, _local4, {_x:0, _y:0});
}
switch (type) {
case _SOFF1_L :
flipH = true;
case _SOFF1 :
symName = "officer01MC";
w = 174;
h = 396;
layer = 40;
moveable = true;
vol = 100;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 10;
scaleBlood = 300;
break;
case _SOFF2_L :
flipH = true;
case _SOFF2 :
symName = "officer02MC";
w = 150;
h = 250;
layer = 37;
moveable = true;
vol = 75;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 8;
scaleBlood = 250;
break;
case _SROOFOFF_L :
case _SOFF3_L :
flipH = true;
case _SROOFOFF :
case _SOFF3 :
if ((type == _SROOFOFF) || (type == _SROOFOFF_L)) {
layer = 14;
} else {
layer = 21;
}
symName = "officer03MC";
w = 63;
h = 143;
moveable = true;
vol = 50;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 7;
scaleBlood = 200;
break;
case _SOFF4_L :
flipH = true;
case _SOFF4 :
symName = "officer04MC";
w = 28;
h = 64;
layer = 4;
moveable = true;
vol = 30;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 6;
scaleBlood = 100;
break;
case _SRUN1_L :
case _SRUN1 :
if (type == _SRUN1_L) {
flipH = true;
vX = -8;
} else {
vX = 8;
}
symName = "sObj_4_1";
w = 300;
h = 360;
layer = 40;
moveable = true;
vol = 100;
giveScore = 10;
atkTimer = (getTimer() + 1500) + random(500);
damage = 9;
scaleBlood = 300;
break;
case _SRUN2_L :
case _SRUN2 :
if (type == _SRUN2_L) {
flipH = true;
vX = -6;
} else {
vX = 6;
}
symName = "sObj_4_2";
w = 170;
h = 206;
layer = 37;
moveable = true;
vol = 75;
giveScore = 10;
atkTimer = (getTimer() + 1500) + random(500);
damage = 7;
scaleBlood = 250;
break;
case _SRUN3_L :
case _SRUN3 :
if (type == _SRUN3_L) {
flipH = true;
vX = -4;
} else {
vX = 4;
}
symName = "sObj_4_3";
w = 100;
h = 120;
layer = 21;
moveable = true;
vol = 50;
giveScore = 10;
atkTimer = (getTimer() + 1500) + random(500);
damage = 6;
scaleBlood = 200;
break;
case _SRUN4_L :
case _SRUN4 :
if (type == _SRUN4_L) {
flipH = true;
vX = -2;
} else {
vX = 2;
}
symName = "sObj_4_4";
w = 50;
h = 60;
layer = 4;
moveable = true;
vol = 35;
giveScore = 10;
atkTimer = (getTimer() + 1500) + random(500);
damage = 5;
scaleBlood = 100;
break;
case _SMAN1 :
symName = "manhole01MC";
w = 163;
h = 123;
layer = 35;
moveable = true;
vol = 75;
giveScore = 10;
atkNumber = 2 + random(2);
atkTimer = getTimer() + 500;
damage = 8;
scaleBlood = 275;
break;
case _SMAN2 :
symName = "manhole02MC";
w = 100;
h = 75;
layer = 26;
moveable = true;
vol = 50;
giveScore = 10;
atkNumber = 2 + random(2);
atkTimer = getTimer() + 1000;
damage = 7;
scaleBlood = 175;
break;
case _SMAN3 :
symName = "manhole03MC";
w = 50;
h = 37;
layer = 7;
moveable = true;
vol = 30;
giveScore = 10;
atkNumber = 2 + random(2);
atkTimer = getTimer() + 1500;
damage = 6;
scaleBlood = 125;
break;
case _SWIN :
symName = "sObj_3";
w = 58;
h = 95;
layer = 17;
moveable = true;
vol = 75;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 10;
scaleBlood = 150;
break;
case _SROOF :
case _SHID1 :
if (type == _SROOF) {
layer = 28;
} else {
layer = 21;
}
symName = "soldiercrouch01MC";
w = 80;
h = 130;
moveable = true;
vol = 75;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 6;
scaleBlood = 250;
break;
case _SHID2 :
symName = "soldiercrouch02MC";
w = 55;
h = 90;
layer = 10;
moveable = true;
vol = 50;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 6;
scaleBlood = 150;
break;
case _SWALL :
symName = "soldierwallMC";
w = 30;
h = 50;
layer = 1;
moveable = true;
vol = 20;
atkTimer = getTimer() + 2000;
atkNumber = 2 + random(6);
giveScore = 1000;
damage = 5;
scaleBlood = 100;
break;
case _STAX_L :
case _STAX :
if (type == _STAX_L) {
flipH = true;
vX = -8;
} else {
vX = 8;
}
symName = "tax01MC";
w = 113;
h = 66;
layer = 28;
moveable = true;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("snd_tax_incoming");
Snd.start(0, 1);
Snd.attachSound("snd_tax_bomb");
}
atkNumber = 0;
atkTimer = 0;
giveScore = 1000;
damage = 15;
exploSize = 2;
scaleExplo = 100;
break;
case _STANK_L :
case _STANK :
if (type == _STANK) {
vX = -4;
} else {
flipH = true;
vX = 4;
}
symName = "tankMC";
w = 271;
h = 120;
layer = 30;
moveable = true;
if (_root.soundOn) {
Snd = new Sound(sndDummyMC);
Snd.attachSound("tank_break");
Snd3 = new Sound(sndDummyMC);
Snd3.attachSound("tank_motor");
Snd3.start(0, 999);
Snd2 = new Sound(sndDummyMC);
Snd2.attachSound("tank_skott");
vol = 100;
}
atkNumber = 0;
atkTimer = getTimer() + 3000;
giveScore = 5000;
damage = 17;
exploSize = 2;
explodes = true;
energy = 25;
scaleExplo = 250;
}
switch (_root.levelNr) {
case 1 :
damage = damage + 2;
break;
case 2 :
damage = damage + 3;
}
if (_root.soundOn) {
switch (type) {
case _SOFF1 :
case _SOFF1_L :
case _SOFF2 :
case _SOFF2_L :
case _SOFF3 :
case _SROOFOFF :
case _SROOFOFF_L :
case _SOFF3_L :
case _SOFF4 :
case _SOFF4_L :
Snd = new Sound(sndDummyMC);
var _local3 = ["officer_dead01", "officer_dead02", "officer_dead03", "officer_dead04", "officer_dead05", "officer_dead06"];
var _local5 = random(_local3.length);
Snd.attachSound(_local3[_local5]);
Snd.setVolume(vol);
Snd2 = new Sound(sndDummyMC);
_local3 = ["snd_officer_shot"];
_local5 = random(_local3.length);
Snd2.attachSound(_local3[_local5]);
Snd2.setVolume(vol);
break;
case _SRUN1 :
case _SRUN2 :
case _SRUN3 :
case _SRUN1_L :
case _SRUN2_L :
case _SRUN3_L :
case _SMAN1 :
case _SMAN2 :
case _SMAN3 :
case _SHID1 :
case _SROOF :
case _SHID2 :
case _SWIN :
Snd = new Sound(sndDummyMC);
_local3 = ["soldier_dead01", "soldier_dead02", "soldier_dead03", "soldier_dead04", "soldier_dead05", "soldier_dead06", "soldier_dead07", "soldier_dead08"];
_local5 = random(_local3.length);
Snd.attachSound(_local3[_local5]);
Snd.setVolume(vol);
Snd2 = new Sound(sndDummyMC);
_local3 = ["snd_soldier_shot1", "snd_soldier_shot2"];
_local5 = random(_local3.length);
Snd2.attachSound(_local3[_local5]);
Snd2.setVolume(vol);
break;
case _SRUN4 :
case _SRUN4_L :
case _SWALL :
case _SMAN3 :
Snd = new Sound(sndDummyMC);
_local3 = ["soldier_dead01", "soldier_dead02", "soldier_dead03", "soldier_dead04", "soldier_dead05", "soldier_dead06", "soldier_dead07", "soldier_dead08"];
_local5 = random(_local3.length);
Snd.attachSound(_local3[_local5]);
Snd.setVolume(vol);
Snd2 = new Sound(sndDummyMC);
_local3 = ["snd_soldier_distant"];
_local5 = random(_local3.length);
Snd2.attachSound(_local3[_local5]);
Snd2.setVolume(vol);
}
}
fxLayer = layer + 1;
depth = _root.layerList[layer] + in_depth;
fxDepth = _root.layerList[fxLayer] + in_depth;
offX = (-w) / 2;
offY = -h;
return(this);
}
function updateMe() {
if (dead) {
return(0);
}
switch (type) {
case _SOFF1 :
case _SOFF1_L :
case _SOFF2 :
case _SOFF2_L :
case _SOFF3 :
case _SOFF3_L :
case _SROOFOFF :
case _SROOFOFF_L :
case _SOFF4 :
case _SOFF4_L :
switch (aMode) {
case 0 :
attack();
break;
case 1 :
}
break;
case _SRUN1 :
case _SRUN2 :
case _SRUN3 :
case _SRUN4 :
if (!(aMode === 0)) {
} else {
x = x + vX;
attack();
if (x >= ((xOrg + _root.screenW) + w)) {
escapeMe();
}
}
break;
case _SRUN1_L :
case _SRUN2_L :
case _SRUN3_L :
case _SRUN4_L :
if (!(aMode === 0)) {
} else {
x = x + vX;
attack();
if (x <= (xOrg - (_root.screenW + w))) {
escapeMe();
}
}
break;
case _SMAN1 :
case _SMAN2 :
case _SMAN3 :
case _SHID1 :
case _SROOF :
case _SHID2 :
case _SWALL :
switch (aMode) {
case 0 :
attack();
break;
case 1 :
}
break;
case _SWIN :
switch (aMode) {
case 0 :
attack();
break;
case 1 :
}
break;
case _STAX :
switch (aMode) {
case 0 :
x = x + vX;
if (x >= ((xOrg + (_root.screenW / 2)) + 100)) {
aMode++;
}
break;
case 1 :
attack();
}
break;
case _STAX_L :
switch (aMode) {
case 0 :
x = x + vX;
if (x <= ((xOrg - (_root.screenW / 2)) - 100)) {
aMode++;
}
break;
case 1 :
attack();
}
break;
case _STANK :
if (!(aMode === 0)) {
} else {
x = x + vX;
attack();
if (x <= (xOrg - (_root.screenW + w))) {
escapeMe();
Snd3.stop();
}
}
break;
case _STANK_L :
if (!(aMode === 0)) {
} else {
x = x + vX;
attack();
if (x < (xOrg + (_root.screenW + w))) {
break;
}
escapeMe();
Snd3.stop();
}
}
mc._x = x;
mc._y = y;
return(1);
}
function hitMe(htype, hsize) {
if (!dead) {
if ((type == _STANK) || (type == _STANK_L)) {
if (htype == 1) {
if (hsize == 3) {
energy = energy - 25;
}
} else {
energy--;
}
if (energy > 0) {
return(undefined);
}
Snd3.stop();
}
if (_root.soundOn) {
Snd.start(0, 1);
}
dead = true;
doDead = false;
state = "fDead";
mc.gotoAndPlay(state);
switch (type) {
case _STANK_L :
case _STANK :
if (hsize != 3) {
var _local3 = _root.scr.attachMovie("explosion01MC", "explo" + fxDepth, fxDepth, {_x:x, _y:y - (h / 2)});
_local3._xscale = scaleExplo;
_local3._yscale = scaleExplo;
}
break;
case _STAX_L :
case _STAX :
var _local3 = _root.scr.attachMovie("explosion01MC", "explo" + fxDepth, fxDepth, {_x:x, _y:y - (h / 2)});
_root.explosion(this, x, y);
_local3._xscale = scaleExplo;
_local3._yscale = scaleExplo;
break;
default :
_local3 = _root.scr.attachMovie("bloodsplatMC", "blood" + fxDepth, fxDepth, {_x:_root.ply.screenX, _y:_root.ply.screenY});
_local3._xscale = scaleBlood;
_local3._yscale = scaleBlood;
}
_root.soldierNr--;
_root.soldierTotal--;
_root.ply.score = _root.ply.score + giveScore;
}
}
function killSelf() {
if (!dead) {
if (_root.soundOn) {
Snd.start(0, 1);
}
dead = true;
doDead = false;
state = "fDead";
mc.gotoAndPlay(state);
var _local3 = _root.scr.attachMovie("bloodsplatMC", "blood" + fxDepth, fxDepth, {_x:_root.ply.screenX, _y:_root.ply.screenY});
_local3._xscale = scaleBlood;
_local3._yscale = scaleBlood;
switch (type) {
case _STAX_L :
case _STAX :
_local3 = _root.scr.attachMovie("explosion01MC", "explo" + fxDepth, fxDepth, {_x:x, _y:y});
_local3._xscale = scaleExplo;
_local3._yscale = scaleExplo;
_root.explosion(this, x, y);
}
_root.soldierNr--;
_root.soldierTotal--;
}
}
function escapeMe() {
dead = true;
doDead = true;
_root.soldierNr--;
}
function doEscape() {
state = "fEscape";
mc.gotoAndPlay(state);
}
function attack() {
if (doAttack) {
return(undefined);
}
switch (type) {
case _SOFF1 :
case _SOFF1_L :
case _SOFF2 :
case _SOFF2_L :
case _SOFF3 :
case _SOFF3_L :
case _SROOFOFF :
case _SROOFOFF_L :
case _SOFF4 :
case _SOFF4_L :
case _SMAN1 :
case _SMAN2 :
case _SMAN3 :
case _SHID1 :
case _SROOF :
case _SHID2 :
case _SWALL :
if (atkTimer > getTimer()) {
return(undefined);
}
atkTimer = getTimer() + 1000;
atkNumber--;
if (atkNumber < 0) {
doEscape();
aMode++;
return(undefined);
}
if (_root.soundOn) {
Snd2.start(0, 1);
}
mc.gotoAndPlay("fAttack");
_root.ply.hurtMe(this);
break;
case _SWIN :
if (atkTimer > getTimer()) {
return(undefined);
}
if (building.windowList[windowNr][2] == 1) {
building.windowObjs[windowNr].hitMe();
if (random(2) == 1) {
_root.ply.hurtMe(this);
}
} else {
_root.ply.hurtMe(this);
}
atkTimer = getTimer() + 1000;
atkNumber--;
if (atkNumber < 0) {
doEscape();
aMode++;
return(undefined);
}
if (_root.soundOn) {
Snd2.start(0, 1);
}
mc.gotoAndPlay("fAttack");
break;
case _SRUN1 :
case _SRUN2 :
case _SRUN3 :
case _SRUN4 :
case _SRUN1_L :
case _SRUN2_L :
case _SRUN3_L :
case _SRUN4_L :
if (atkTimer < getTimer()) {
atkTimer = (getTimer() + 500) + random(1000);
mc.gotoAndPlay("fAttack");
if (_root.soundOn) {
Snd2.start(0, 1);
}
_root.ply.hurtMe(this);
}
break;
case _STAX :
case _STAX_L :
if (atkTimer < getTimer()) {
switch (atkNumber) {
case 0 :
mc.gotoAndPlay("fAttack");
atkTimer = getTimer() + 2500;
atkNumber = 1;
break;
case 1 :
killSelf();
_root.ply.hurtMe(this);
aMode++;
}
}
break;
case _STANK :
case _STANK_L :
if (atkTimer >= getTimer()) {
break;
}
atkTimer = getTimer() + 3000;
mc.gotoAndPlay("fAttack");
if (_root.soundOn) {
Snd2.start(0, 1);
}
_root.ply.hurtMe(this);
}
}
static var _SOFF1 = 0;
static var _SOFF2 = 1;
static var _SOFF3 = 2;
static var _SOFF4 = 3;
static var _SRUN1 = 4;
static var _SRUN2 = 5;
static var _SRUN3 = 6;
static var _SRUN4 = 7;
static var _SMAN1 = 8;
static var _SMAN2 = 9;
static var _SMAN3 = 10;
static var _SWIN = 11;
static var _SHID1 = 12;
static var _SHID2 = 13;
static var _SWALL = 14;
static var _SROOF = 15;
static var _SROOFOFF = 16;
static var _SOFF1_L = 100;
static var _SOFF2_L = 101;
static var _SOFF3_L = 102;
static var _SOFF4_L = 103;
static var _SRUN1_L = 104;
static var _SRUN2_L = 105;
static var _SRUN3_L = 106;
static var _SRUN4_L = 107;
static var _SROOFOFF_L = 108;
static var _STAX = 200;
static var _STANK = 201;
static var _STAX_L = 300;
static var _STANK_L = 301;
}
Symbol 66 MovieClip [Aim] Frame 1
#initclip 9
Object.registerClass("Aim", Player);
#endinitclip
stop();
Symbol 66 MovieClip [Aim] Frame 4
this.gotoAndPlay(1);
Symbol 69 MovieClip [pickuphealth03MC] Frame 10
gotoAndPlay (1);
Symbol 71 MovieClip [pickuphealth02MC] Frame 10
gotoAndPlay (1);
Symbol 73 MovieClip [pickuphealth01MC] Frame 10
gotoAndPlay (1);
Symbol 75 MovieClip [pickupgrenades03MC] Frame 9
gotoAndPlay (1);
Symbol 77 MovieClip [pickupgrenades02MC] Frame 9
gotoAndPlay (1);
Symbol 79 MovieClip [pickupgrenades01MC] Frame 9
gotoAndPlay (1);
Symbol 81 MovieClip [pickupbullets03MC] Frame 9
gotoAndPlay (1);
Symbol 83 MovieClip [pickupbullets02MC] Frame 9
gotoAndPlay (1);
Symbol 85 MovieClip [pickupbullets01MC] Frame 9
gotoAndPlay (1);
Symbol 160 MovieClip [windowsmashMC] Frame 1
stop();
Symbol 160 MovieClip [windowsmashMC] Frame 3
this.parent.doDead = false;
play();
Symbol 160 MovieClip [windowsmashMC] Frame 13
this.parent.doDead = true;
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 2
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 4
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 6
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 8
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 10
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 12
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 14
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 16
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 18
stop();
Symbol 195 MovieClip [textnumbersMC] Frame 20
stop();
Symbol 201 MovieClip [textgetreadyMC] Frame 9
gotoAndPlay (1);
Symbol 218 MovieClip [numbers01MC] Frame 2
stop();
Symbol 218 MovieClip [numbers01MC] Frame 4
stop();
Symbol 218 MovieClip [numbers01MC] Frame 6
stop();
Symbol 218 MovieClip [numbers01MC] Frame 8
stop();
Symbol 218 MovieClip [numbers01MC] Frame 10
stop();
Symbol 218 MovieClip [numbers01MC] Frame 12
stop();
Symbol 218 MovieClip [numbers01MC] Frame 14
stop();
Symbol 218 MovieClip [numbers01MC] Frame 16
stop();
Symbol 218 MovieClip [numbers01MC] Frame 18
stop();
Symbol 218 MovieClip [numbers01MC] Frame 20
stop();
Symbol 227 MovieClip [UIfaceMC] Frame 2
stop();
Symbol 227 MovieClip [UIfaceMC] Frame 4
stop();
Symbol 227 MovieClip [UIfaceMC] Frame 6
stop();
Symbol 240 MovieClip [window01MC] Frame 9
gotoAndPlay (1);
Symbol 251 MovieClip [tax01MC] Frame 1
play();
Symbol 251 MovieClip [tax01MC] Frame 5
if (!this.parent.dead) {
this.gotoAndPlay("fStart");
}
Symbol 251 MovieClip [tax01MC] Frame 6
play();
Symbol 251 MovieClip [tax01MC] Frame 10
if (!this.parent.dead) {
this.gotoAndPlay("fAttack");
}
Symbol 251 MovieClip [tax01MC] Frame 11
this.parent.doDead = false;
play();
Symbol 251 MovieClip [tax01MC] Frame 56
this.parent.doDead = true;
Symbol 272 MovieClip [tankMC] Frame 1
play();
Symbol 272 MovieClip [tankMC] Frame 4
if (!this.parent.dead) {
gotoAndPlay ("fStart");
}
Symbol 272 MovieClip [tankMC] Frame 5
this.parent.doAttack = true;
play();
Symbol 272 MovieClip [tankMC] Frame 29
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStart");
}
Symbol 272 MovieClip [tankMC] Frame 30
this.parent.doDead = false;
play();
Symbol 272 MovieClip [tankMC] Frame 38
this.parent.doDead = true;
stop();
Symbol 290 MovieClip [soldierwallMC] Frame 1
play();
Symbol 290 MovieClip [soldierwallMC] Frame 9
stop();
Symbol 290 MovieClip [soldierwallMC] Frame 10
this.parent.doAttack = true;
play();
Symbol 290 MovieClip [soldierwallMC] Frame 14
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 290 MovieClip [soldierwallMC] Frame 15
this.parent.doDead = false;
play();
Symbol 290 MovieClip [soldierwallMC] Frame 19
this.parent.doDead = true;
stop();
Symbol 290 MovieClip [soldierwallMC] Frame 20
play();
Symbol 290 MovieClip [soldierwallMC] Frame 27
this.parent.escapeMe();
stop();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 1
play();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 9
stop();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 10
this.parent.doAttack = true;
play();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 14
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 300 MovieClip [soldiercrouch02MC] Frame 15
this.parent.doDead = false;
play();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 54
this.parent.doDead = true;
stop();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 55
play();
Symbol 300 MovieClip [soldiercrouch02MC] Frame 62
this.parent.escapeMe();
stop();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 1
play();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 9
stop();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 10
this.parent.doAttack = true;
play();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 14
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 309 MovieClip [soldiercrouch01MC] Frame 15
this.parent.doDead = false;
play();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 54
this.parent.doDead = true;
stop();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 55
play();
Symbol 309 MovieClip [soldiercrouch01MC] Frame 62
this.parent.escapeMe();
stop();
Symbol 323 MovieClip [sObj_4_4] Frame 1
play();
Symbol 323 MovieClip [sObj_4_4] Frame 9
if (!this.parent.dead) {
gotoAndPlay ("fStart");
}
Symbol 323 MovieClip [sObj_4_4] Frame 10
this.parent.doAttack = true;
play();
Symbol 323 MovieClip [sObj_4_4] Frame 18
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStart");
}
Symbol 323 MovieClip [sObj_4_4] Frame 19
this.parent.doDead = false;
play();
Symbol 323 MovieClip [sObj_4_4] Frame 58
this.parent.doDead = true;
stop();
Symbol 335 MovieClip [sObj_4_3] Frame 1
play();
Symbol 335 MovieClip [sObj_4_3] Frame 9
if (!this.parent.dead) {
gotoAndPlay ("fStart");
}
Symbol 335 MovieClip [sObj_4_3] Frame 10
this.parent.doAttack = true;
play();
Symbol 335 MovieClip [sObj_4_3] Frame 18
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStart");
}
Symbol 335 MovieClip [sObj_4_3] Frame 19
this.parent.doDead = false;
play();
Symbol 335 MovieClip [sObj_4_3] Frame 58
this.parent.doDead = true;
stop();
Symbol 347 MovieClip [sObj_4_2] Frame 1
play();
Symbol 347 MovieClip [sObj_4_2] Frame 9
if (!this.parent.dead) {
gotoAndPlay ("fStart");
}
Symbol 347 MovieClip [sObj_4_2] Frame 10
this.parent.doAttack = true;
play();
Symbol 347 MovieClip [sObj_4_2] Frame 18
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStart");
}
Symbol 347 MovieClip [sObj_4_2] Frame 19
this.parent.doDead = false;
play();
Symbol 347 MovieClip [sObj_4_2] Frame 58
this.parent.doDead = true;
stop();
Symbol 356 MovieClip [sObj_4_1] Frame 1
play();
Symbol 356 MovieClip [sObj_4_1] Frame 9
if (!this.parent.dead) {
gotoAndPlay ("fStart");
}
Symbol 356 MovieClip [sObj_4_1] Frame 10
this.parent.doAttack = true;
play();
Symbol 356 MovieClip [sObj_4_1] Frame 18
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStart");
}
Symbol 356 MovieClip [sObj_4_1] Frame 19
this.parent.doDead = false;
play();
Symbol 356 MovieClip [sObj_4_1] Frame 58
this.parent.doDead = true;
stop();
Symbol 364 MovieClip [sObj_3] Frame 1
play();
Symbol 364 MovieClip [sObj_3] Frame 9
stop();
Symbol 364 MovieClip [sObj_3] Frame 10
this.parent.doAttack = true;
play();
Symbol 364 MovieClip [sObj_3] Frame 13
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 364 MovieClip [sObj_3] Frame 14
this.parent.doDead = false;
play();
Symbol 364 MovieClip [sObj_3] Frame 18
this.parent.doDead = true;
stop();
Symbol 364 MovieClip [sObj_3] Frame 19
play();
Symbol 364 MovieClip [sObj_3] Frame 28
this.parent.escapeMe();
stop();
Symbol 371 MovieClip [ricochetMC] Frame 1
play();
Symbol 371 MovieClip [ricochetMC] Frame 5
removeMovieClip(this);
Symbol 385 MovieClip [officer04MC] Frame 1
play();
Symbol 385 MovieClip [officer04MC] Frame 9
stop();
Symbol 385 MovieClip [officer04MC] Frame 20
this.parent.doAttack = true;
play();
Symbol 385 MovieClip [officer04MC] Frame 24
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 385 MovieClip [officer04MC] Frame 25
this.parent.doDead = false;
play();
Symbol 385 MovieClip [officer04MC] Frame 78
this.parent.doDead = true;
stop();
Symbol 385 MovieClip [officer04MC] Frame 79
play();
Symbol 385 MovieClip [officer04MC] Frame 87
this.parent.escapeMe();
stop();
Symbol 396 MovieClip [officer03MC] Frame 1
play();
Symbol 396 MovieClip [officer03MC] Frame 9
stop();
Symbol 396 MovieClip [officer03MC] Frame 20
this.parent.doAttack = true;
play();
Symbol 396 MovieClip [officer03MC] Frame 24
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 396 MovieClip [officer03MC] Frame 25
this.parent.doDead = false;
play();
Symbol 396 MovieClip [officer03MC] Frame 78
this.parent.doDead = true;
stop();
Symbol 396 MovieClip [officer03MC] Frame 79
play();
Symbol 396 MovieClip [officer03MC] Frame 88
this.parent.escapeMe();
stop();
Symbol 405 MovieClip [officer02MC] Frame 1
play();
Symbol 405 MovieClip [officer02MC] Frame 9
stop();
Symbol 405 MovieClip [officer02MC] Frame 20
this.parent.doAttack = true;
play();
Symbol 405 MovieClip [officer02MC] Frame 24
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 405 MovieClip [officer02MC] Frame 25
this.parent.doDead = false;
play();
Symbol 405 MovieClip [officer02MC] Frame 78
this.parent.doDead = true;
stop();
Symbol 405 MovieClip [officer02MC] Frame 79
play();
Symbol 405 MovieClip [officer02MC] Frame 88
this.parent.escapeMe();
stop();
Symbol 409 MovieClip [officer01MC] Frame 1
play();
Symbol 409 MovieClip [officer01MC] Frame 9
stop();
Symbol 409 MovieClip [officer01MC] Frame 20
this.parent.doAttack = true;
play();
Symbol 409 MovieClip [officer01MC] Frame 24
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 409 MovieClip [officer01MC] Frame 25
this.parent.doDead = false;
play();
Symbol 409 MovieClip [officer01MC] Frame 78
this.parent.doDead = true;
Symbol 409 MovieClip [officer01MC] Frame 79
play();
Symbol 409 MovieClip [officer01MC] Frame 88
this.parent.escapeMe();
stop();
Symbol 436 MovieClip [manhole03MC] Frame 1
play();
Symbol 436 MovieClip [manhole03MC] Frame 12
stop();
Symbol 436 MovieClip [manhole03MC] Frame 13
this.parent.doAttack = true;
play();
Symbol 436 MovieClip [manhole03MC] Frame 17
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 436 MovieClip [manhole03MC] Frame 18
this.parent.doDead = false;
play();
Symbol 436 MovieClip [manhole03MC] Frame 62
this.parent.doDead = true;
stop();
Symbol 436 MovieClip [manhole03MC] Frame 63
play();
Symbol 436 MovieClip [manhole03MC] Frame 74
this.parent.escapeMe();
stop();
Symbol 442 MovieClip [manhole02MC] Frame 1
play();
Symbol 442 MovieClip [manhole02MC] Frame 12
stop();
Symbol 442 MovieClip [manhole02MC] Frame 13
this.parent.doAttack = true;
play();
Symbol 442 MovieClip [manhole02MC] Frame 17
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 442 MovieClip [manhole02MC] Frame 18
this.parent.doDead = false;
play();
Symbol 442 MovieClip [manhole02MC] Frame 62
this.parent.doDead = true;
stop();
Symbol 442 MovieClip [manhole02MC] Frame 63
play();
Symbol 442 MovieClip [manhole02MC] Frame 74
this.parent.escapeMe();
stop();
Symbol 448 MovieClip [manhole01MC] Frame 1
play();
Symbol 448 MovieClip [manhole01MC] Frame 12
stop();
Symbol 448 MovieClip [manhole01MC] Frame 13
this.parent.doAttack = true;
play();
Symbol 448 MovieClip [manhole01MC] Frame 17
this.parent.doAttack = false;
if (!this.parent.dead) {
this.gotoAndPlay("fStill");
}
Symbol 448 MovieClip [manhole01MC] Frame 18
this.parent.doDead = false;
play();
Symbol 448 MovieClip [manhole01MC] Frame 62
this.parent.doDead = true;
stop();
Symbol 448 MovieClip [manhole01MC] Frame 63
play();
Symbol 448 MovieClip [manhole01MC] Frame 74
this.parent.escapeMe();
stop();
Symbol 458 MovieClip [explosion01MC] Frame 1
play();
Symbol 458 MovieClip [explosion01MC] Frame 19
stop();
_root.scr.removeMovieClip(this);
Symbol 462 MovieClip [bloodsplatMC] Frame 1
play();
Symbol 462 MovieClip [bloodsplatMC] Frame 7
removeMovieClip(this);
stop();
Symbol 468 MovieClip [barrels02MC] Frame 1
stop();
Symbol 468 MovieClip [barrels02MC] Frame 3
play();
Symbol 468 MovieClip [barrels02MC] Frame 10
this.parent.state = "fStill";
stop();
Symbol 469 MovieClip [barrels01MC] Frame 1
stop();
Symbol 469 MovieClip [barrels01MC] Frame 3
play();
Symbol 469 MovieClip [barrels01MC] Frame 10
this.parent.state = "fStill";
stop();
Symbol 482 MovieClip [textstartgameMC] Frame 1
stop();
Symbol 485 MovieClip Frame 1
stop();
Symbol 488 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 1
stop();
Symbol 493 Button
on (press) {
gotoAndPlay ("rMenu");
}