Frame 4
if (tGame == undefined) {
var tGame = new Game(this.stage_mc);
}
this.pingHome = function () {
var _local1 = new LoadVars();
_local1.load("http://stats.playerthree.net/counter.php?id=overkillapache&r=" + new Date().getTime());
};
_root.tHighScore = 0;
this.serverCheck = function () {
this.pServer = "miniclip";
trace("checking server");
var _local3 = _root._url;
if (_local3.substring(0, 4) == "http") {
var _local4 = _local3.split("/")[2];
trace(_local4);
var _local5 = _local4.split(".");
if (_local5[_local5.length - 2] != this.pServer) {
trace("ERROR! This game belongs on " + this.pServer);
this.gotoAndStop("stolen");
}
} else {
trace("running locally");
this.gotoAndPlay("local");
}
};
this.serverCheck();
Frame 8
stop();
Frame 36
stop();
Frame 82
stop();
Frame 111
stop();
Instance of Symbol 638 MovieClip "viewHighscores" in Frame 111
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.tHighScore";
gamename = "overkill";
saveScore = false;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 123
tGame.pSoundObj.startGame();
this.onEnterFrame = function () {
tGame.update();
};
Frame 155
tGame.startGame();
stop();
Frame 179
_root.tHighScore = tGame.getScore();
trace("_root.tHighScore : " + _root.tHighScore);
tGame.endGame();
Frame 185
trace("miniclip component with saveScore = true");
trace(_root.tHighScore);
Instance of Symbol 638 MovieClip "comHighscores" in Frame 185
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.tHighScore";
gamename = "overkill";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 193
stop();
Symbol 32 Button
on (release) {
getURL ("http://www.fingertime.com", "_blank");
}
Symbol 33 MovieClip Frame 1
gotoAndPlay (2);
Symbol 33 MovieClip Frame 127
this._parent.logoDone();
stop();
Symbol 49 MovieClip Frame 1
this.resizePanel = function (x, y) {
var _local2 = x / 2;
this.panelTL_mc._x = -_local2;
this.panelTR_mc._x = _local2 - 20;
this.panelBL_mc._x = -_local2;
this.panelBR_mc._x = _local2 - 20;
this.panelTM_mc._width = x - 40;
this.panelBM_mc._width = x - 40;
this.panelTM_mc._x = (-_local2) + 20;
this.panelBM_mc._x = (-_local2) + 20;
this.panelBL_mc._y = y - 45;
this.panelBM_mc._y = y - 45;
this.panelBR_mc._y = y - 45;
this.panelBg_mc._x = -_local2;
this.panelBg_mc._y = 59;
this.panelBg_mc._width = x;
this.panelBg_mc._height = y - 104;
};
stop();
Symbol 64 MovieClip Frame 1
this.init = function () {
this.pTotal = _root.getBytesTotal();
this.pUnit = 100 / this.pTotal;
this.pFrame = 0;
this.pAdCheck = true;
this.onEnterFrame = this.animate;
};
this.animate = function () {
this.pFrame = Math.floor(this.pUnit * _root.getBytesLoaded());
this.gotoAndStop(this.pFrame + 1);
this.loading_txt.text = ("LOADING... " + String(this._currentframe - 1)) + "%";
if (this.pFrame >= 100) {
if (this._parent._parent.AdForDisplay()) {
this.loading_txt.text = "START GAME.";
this.onPress = function () {
delete this.onPress;
delete this.onEnterFrame;
this._parent._parent.exitLoader();
};
} else {
this.loading_txt.text = "LOADED.";
}
this.gotoAndStop(102);
delete this.onEnterFrame;
this.onEnterFrame = this.pause;
}
if (this.pAdCheck) {
if (this._parent._parent.AdForDisplay()) {
if (this._parent._parent.AdReady()) {
this._parent.openForAd();
this.pAdCheck = false;
}
} else {
this.pAdCheck = false;
}
}
};
this.pause = function () {
this.pFrame = this.pFrame - 3;
if (this.pFrame <= 0) {
delete this.onEnterFrame;
this._parent._parent.loadDone();
}
};
stop();
Symbol 67 MovieClip Frame 1
this.init = function () {
this.pX = 260;
this.pY = 104;
};
this.resizePanel = function (tX, tY) {
this.pTargetX = Math.max(260, tX);
this.pTargetY = Math.max(104, tY);
if ((this.pTargetX != this.pX) || (this.pTargetY != this.pY)) {
this.onEnterFrame = function () {
this.pX = this.pX + ((this.pTargetX - this.pX) / 5);
this.pY = this.pY + ((this.pTargetY - this.pY) / 5);
this.pX = Math.round(this.pX);
this.pY = Math.round(this.pY);
if ((Math.abs(this.pTargetX - this.pX) < 5) && (Math.abs(this.pTargetY - this.pY) < 5)) {
this.pX = this.pTargetX;
this.pY = this.pTargetY;
delete this.onEnterFrame;
this._parent.showAdvert();
}
this.panel_mc.resizePanel(this.pX, this.pY);
this.loaderbar_mc._y = this.pY - 97;
this._y = Math.round(((Stage.height - this.pY) / 2) + 52);
};
}
};
this.openForAd = function () {
var _local2 = this._parent.getAdSize();
this.resizePanel(_local2.x + 10, _local2.y + 114);
trace((("resizing to " + _local2.x) + ", ") + _local2.y);
};
this.init();
this.gotoAndPlay(2);
Symbol 67 MovieClip Frame 14
this.loaderbar_mc.init();
stop();
Symbol 75 Button
on (release) {
getURL ("http://www.macromedia.com/go/getflashplayer", "_blank");
}
Symbol 77 Button
on (release) {
this._parent.logoPlay();
}
Symbol 78 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 84 MovieClip [ftloader] Frame 1
_root.stop();
this._x = 0;
this._y = 0;
this.bg_mc._width = Stage.width;
this.bg_mc._height = Stage.height;
Symbol 84 MovieClip [ftloader] Frame 2
if (this.pUseLoader) {
this.loadAdvert = function () {
if (this.pAdvert) {
trace("loading adv");
this.pAdUrl = _root.adv;
if (this.pAdUrl == undefined) {
this.pAdvert = false;
} else {
this.pAdReady = false;
var _local4 = this.createEmptyMovieClip("adSpace_mc", this.getNextHighestDepth());
var _local5 = _local4.createEmptyMovieClip("ad_mc", 100);
var _local3 = new MovieClipLoader();
_local3.onLoadInit = function () {
trace("advert loaded!");
positionAdvert();
};
_local3.loadClip(this.pAdUrl, _local5);
}
}
};
this.positionAdvert = function () {
var _local3 = this.adSpace_mc.ad_mc._width;
var _local2 = this.adSpace_mc.ad_mc._height;
this.pAdx = _local3;
this.pAdy = _local2;
this.adSpace_mc._x = (Stage.width - _local3) / 2;
this.adSpace_mc._y = (Stage.height - _local2) / 2;
this.adSpace_mc.ad_mc._visible = false;
var _local4 = this.adSpace_mc.attachMovie("mc.mask", "mask_mc", 1);
_local4._width = _local3;
_local4._height = _local2;
this.adSpace_mc.setMask(_local4);
this.pAdReady = true;
};
this.AdForDisplay = function () {
return(this.pAdvert);
};
this.AdReady = function () {
return(this.pAdReady);
};
this.showAdvert = function () {
trace("showingAd");
this.adSpace_mc.ad_mc._visible = true;
};
this.getAdSize = function () {
var _local2 = new Object();
_local2.x = this.pAdx;
_local2.y = this.pAdy;
return(_local2);
};
this.loadDone = function () {
if (this.pAdvert) {
} else {
this.exitLoader();
}
};
this.exitLoader = function () {
trace("exiting loader");
_root.gotoAndPlay(this.pLabel);
};
this.logoPlay = function () {
this.gotoAndPlay("logoAni");
};
this.logoDone = function () {
if (this.pSecurity) {
this.serverCheck();
} else {
this.gotoAndPlay("loader");
}
};
this.positionLogo = function () {
var _local2 = Stage.width / 15;
this.logo_mc._xscale = _local2;
this.logo_mc._yscale = _local2;
this.logo_mc._x = Stage.width / 2;
this.logo_mc._y = Stage.height / 2;
};
this.positionLoader = function () {
this.loadPanel_mc._x = Stage.width / 2;
this.loadPanel_mc._y = Stage.height / 2;
};
this.gotoStolen = function () {
this.gotoAndPlay("stolen");
getURL (this.pURL, "_self");
};
this.serverCheck = function () {
trace("checking server");
var _local4 = _root._url;
if (_local4.substring(0, 4) == "http") {
var _local5 = _local4.split("/")[2];
trace(_local5);
var _local3 = _local5.split(".");
if (_local3[_local3.length - 2] == this.pServer) {
if (_local3[_local3.length - 1] == "com") {
this.gotoAndPlay("loader");
} else {
this.gotoStolen();
}
} else {
this.gotoStolen();
}
} else {
trace("running locally");
this.gotoAndPlay("local");
}
};
this.versionCheck = function () {
trace("checking version");
var _local4 = System.capabilities.version;
var _local3 = _local4.substring(_local4.indexOf(" ") + 1).split(",");
var _local6 = parseInt(_local3[0]);
var _local5 = parseInt(_local3[2]);
var _local2 = false;
if (_local6 < this.pMajor) {
_local2 = true;
} else if (_local5 < this.pMinor) {
_local2 = true;
}
return(!_local2);
};
if (this.pVersion) {
if (this.versionCheck()) {
this.logoPlay();
} else {
this.gotoAndPlay("update");
}
} else {
this.logoPlay();
}
this.loadAdvert();
} else {
_root.gotoAndPlay(this.pLabel);
}
Symbol 84 MovieClip [ftloader] Frame 6
this.positionLogo();
stop();
Symbol 84 MovieClip [ftloader] Frame 13
this.positionLoader();
stop();
Symbol 84 MovieClip [ftloader] Frame 19
this.updatePanel_mc._x = Math.round(Stage.width / 2);
this.updatePanel_mc._y = Math.round(Stage.height / 2);
stop();
Symbol 84 MovieClip [ftloader] Frame 26
stop();
Symbol 84 MovieClip [ftloader] Frame 32
this.local_mc._x = Math.round(Stage.width / 2);
this.local_mc._y = Math.round(Stage.height / 2);
stop();
Symbol 86 MovieClip Frame 1
this._parent.hitArea = this;
this._alpha = 0;
stop();
Symbol 89 MovieClip Frame 1
this.pSound = true;
this.onRelease = function () {
if (this.pSound) {
this.pSound = false;
this._parent.tGame.pSoundObj.switchVolume();
} else {
this.pSound = true;
this._parent.tGame.pSoundObj.switchVolume();
}
this.gotoAndStop(this.pSound);
};
stop();
Symbol 93 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 94 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 94 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 60
Symbol 110 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 115 MovieClip Frame 1
this._visible = false;
Symbol 121 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 126 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 126 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 126 MovieClip Frame 12
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 100
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 139 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 115 MovieClip "mcIntro" in Symbol 139 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 139 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 138 MovieClip "mcLoadingAnimated" in Symbol 139 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 139 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 139 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
_root.gotoAndStop(2);
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 724 MovieClip [__Packages.Depth] Frame 0
class Depth
{
function Depth () {
}
static function getNewDepth(block) {
var _local1 = pStacks[block];
_local1++;
if (_local1 >= pMax) {
_local1 = pMin;
}
pStacks[block] = _local1;
return(_local1 + ((block + 1) * pMax));
}
static var pMin = 10;
static var pMax = 50000;
static var pStacks = new Array(9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
}
Symbol 725 MovieClip [__Packages.Game] Frame 0
class Game
{
var pStage, pHiScore, pShip, pWeapons, pMotherShip, pGroundUnit, pSoundObj, pScore, pRank, pLives, pLevel, pCount, pPaused, pState;
function Game (mc) {
pStage = mc;
pHiScore = 0;
pShip = new Ship(-100, -100, mc, this);
pWeapons = new Weapons(mc, this);
pMotherShip = new Mothership(mc, this);
pGroundUnit = new Ground(mc, this);
pSoundObj = new SoundObj(mc);
pGroundUnit.startGame();
}
function startGame() {
pScore = 0;
pRank = 1;
pLives = 3;
pLevel = 0;
pCount = 0;
pPaused = false;
pState = 0;
pStage._parent.titleBar_mc.lives_mc.showNum(pLives);
pShip.startGame();
pWeapons.startGame();
pMotherShip.startGame();
pStage._parent.titleBar_mc.lives_mc.showNum(pLives);
}
function update() {
switch (pState) {
case 0 :
if ((++pCount) >= 20) {
pState = 1;
pCount = 0;
pMotherShip.unpauseWaves();
pShip.reset();
}
break;
case 1 :
if (!pPaused) {
pLevel++;
}
break;
case 2 :
if ((++pCount) >= 50) {
pState = 3;
pCount = 0;
pStage.messages_mc.gotoAndPlay("stage");
pSoundObj.startGame();
}
break;
case 3 :
if ((++pCount) >= 120) {
pState = 0;
pCount = 0;
pShip.hideShip();
pStage._parent.bg_mc.nextBG();
}
break;
case 5 :
if ((++pCount) < 180) {
break;
}
pStage._parent.messages_mc.gotoAndStop(1);
pStage._parent.gotoAndPlay("gameover");
pState = 6;
}
if (!Key.isDown(17)) {
pShip.move();
pWeapons.update();
pMotherShip.update();
pGroundUnit.update();
}
}
function endGame() {
pWeapons.endGame();
pSoundObj.endGame();
pMotherShip.endGame();
delete pStage._parent.onEnterFrame;
}
function levelComplete() {
pState = 2;
}
function gameOver() {
if (pState == 1) {
pLives--;
pStage._parent.titleBar_mc.lives_mc.showNum(pLives);
if (pLives <= 0) {
pStage._parent.messages_mc.gotoAndPlay("gameover");
pSoundObj.playSound("dobetter");
pState = 5;
pCount = 0;
} else {
pMotherShip.stepBack();
pShip.reset();
}
}
}
function addScore(num) {
pScore = pScore + num;
pStage._parent.titleBar_mc.score_mc.showNum(pScore);
var _local3;
var _local2;
var _local4 = new Array(10000, 20000, 30000, 40000, 60000, 90000, 130000, 170000, 210000, 250000, 300000, 350000, 400000, 450000, 500000, 550000, 600000, 650000, 700000, 750000, 800000, 850000, 900000, 1000000);
_local2 = 0;
while (_local2 < 24) {
if (pScore <= _local4[_local2]) {
_local3 = _local2 + 1;
break;
}
_local2++;
}
if (_local3 != pRank) {
pRank = _local3;
pSoundObj.playSound("allright");
pStage._parent.titleBar_mc.badge_mc.gotoAndStop(_local3);
}
}
function getLevel() {
var _local2 = pLevel / 30;
return(_local2);
}
function getScore() {
return(pScore);
}
}
Symbol 726 MovieClip [__Packages.Mobile] Frame 0
class Mobile
{
var pX, pY;
function Mobile () {
}
function setPos(x, y) {
pX = x;
pY = y;
}
function setSpeed(xs, ys) {
pSpeedX = xs;
pSpeedY = ys;
}
function update() {
pX = pX + pSpeedX;
pY = pY + pSpeedY;
}
var pSpeedX = 0;
var pSpeedY = 0;
}
Symbol 727 MovieClip [__Packages.Craft] Frame 0
class Craft extends Mobile
{
var p_mc, pX, pY, update;
function Craft () {
super();
}
function createMc(mcParent, type) {
switch (type) {
case 0 :
var _local2 = Depth.getNewDepth(3);
p_mc = mcParent.attachMovie("mc.ship", "ship", _local2, {_x:-100, _y:-100});
p_mc.cacheAsBitmap = false;
break;
default :
var _local2 = Depth.getNewDepth(2);
p_mc = mcParent.attachMovie("mc.enemy", "enemy" + _local2, _local2, {_x:-100, _y:-100});
p_mc.gotoAndStop(type);
p_mc.cacheAsBitmap = true;
}
}
function getPos() {
var _local2 = new flash.geom.Point(pX, pY);
return(_local2);
}
function die() {
p_mc.removeMovieClip();
}
function move() {
update();
}
function draw() {
p_mc._x = pX;
p_mc._y = pY;
}
}
Symbol 728 MovieClip [__Packages.Ship] Frame 0
class Ship extends Craft
{
var pGame, pMcParent, createMc, setPos, p_mc, pSmokeCount, pHealth, pState, pMode, pTwinCount, pSafeCount, pShield, pDieCount, pSpeedX, pSpeedY, pX, pY, pFire_mc;
function Ship (x, y, mcParent, gameHost) {
super();
pGame = gameHost;
pMcParent = mcParent;
createMc(mcParent, 0);
setPos(x, y);
p_mc._visible = false;
pSmokeCount = 0;
pHealth = 100;
}
function startGame() {
switch (_global.pSpeed) {
case 1 :
pAcc = 0.5;
break;
case 2 :
pAcc = 2;
break;
case 3 :
pAcc = 5;
}
pState = 1;
pMode = 1;
pTwinCount = 0;
pSafeCount = 0;
pShield = false;
pDieCount = 0;
pHealth = 100;
p_mc._visible = false;
}
function reset() {
p_mc._visible = true;
setPos(-10, 175);
pSpeedX = 18;
pSpeedY = 0;
pState = 10;
pMode = 0;
pHealth = 100;
pTwinCount = 0;
pSafeCount = 99;
pShield = true;
pDieCount = 0;
pMcParent._parent.titleBar_mc.health_mc.gotoAndPlay(2);
var _local2 = Math.random();
if (_local2 < 0.2) {
pGame.pSoundObj.playSound("letsrock");
} else if (_local2 < 0.4) {
pGame.pSoundObj.playSound("lookout");
} else if (_local2 < 0.6) {
pGame.pSoundObj.playSound("letsgo");
} else {
pGame.pSoundObj.playSound("letsroll");
}
}
function hideShip() {
pState = 11;
p_mc._visible = false;
}
function move() {
if (Key.isDown(16)) {
trace("health = " + pHealth);
}
switch (pState) {
case 11 :
break;
case 10 :
pSpeedX = pSpeedX * 0.9;
super.move();
break;
case 9 :
pSpeedX = pSpeedX - 0.2;
pSpeedY = pSpeedY + 0.3;
super.move();
break;
default :
var _local3 = Key.isDown(40) - Key.isDown(38);
if (_local3 != 0) {
pSpeedY = pSpeedY + (_local3 * pAcc);
pSpeedY = Math.max(-pMaxSpeed, Math.min(pMaxSpeed, pSpeedY));
p_mc.gotoAndStop(2 + _local3);
} else {
pSpeedY = pSpeedY * pDec;
p_mc.gotoAndStop(2);
}
pSmokeCount--;
if (pHealth < 70) {
if (pSmokeCount < 0) {
smoke();
pSmokeCount = Math.max(0, (pHealth - 20) / 3);
}
}
var _local4 = (Key.isDown(39) - Key.isDown(37)) * pAcc;
if (_local4 != 0) {
pSpeedX = pSpeedX + _local4;
pSpeedX = Math.max(-pMaxSpeed, Math.min(pMaxSpeed, pSpeedX));
} else {
pSpeedX = pSpeedX * pDec;
}
super.move();
if (pX > 580) {
pX = 580;
} else if (pX < 20) {
pX = 20;
}
if (pY > 330) {
pY = 330;
} else if (pY < 60) {
pY = 60;
}
if (Key.isDown(32)) {
pGame.pWeapons.launchWeapon(pX, pY, true, pMode);
p_mc.machine_mc.startAni();
} else {
p_mc.machine_mc.gotoAndStop(1);
}
}
draw();
}
function smoke() {
var _local2 = Depth.getNewDepth(4);
var _local3 = pMcParent.attachMovie("mc.smoke", "smoke" + _local2, _local2, {_x:pX - 4, _y:pY + (Math.random() * 20)});
}
function hit(strength) {
if (pState != 9) {
if (!pShield) {
pHealth = Math.max(0, pHealth - strength);
pMcParent._parent.titleBar_mc.health_mc.gotoAndStop(pHealth + 1);
if (pHealth <= 0) {
pState = 9;
pMode = 0;
pDieCount = 0;
pSpeedX = 0;
pSpeedY = -3;
if (Math.random() < 0.5) {
pGame.pSoundObj.playSound("mandown");
} else {
pGame.pSoundObj.playSound("goingdown");
}
var _local3 = Depth.getNewDepth(8);
pFire_mc = pMcParent.attachMovie("mc.die", "explode_mc", _local3, {_x:pX, _y:pY});
} else if ((pHealth < 40) && (strength > 8)) {
var _local2 = Math.random();
if (_local2 < 0.2) {
pGame.pSoundObj.playSound("warning");
} else if (_local2 < 0.4) {
pGame.pSoundObj.playSound("watchout");
} else if (_local2 < 0.6) {
pGame.pSoundObj.playSound("enginet");
}
}
}
}
}
function getPos() {
if (pState == 9) {
var _local3 = flash.geom.Point.polar(4000, Math.random() * 6.283);
_local3.offset(300, 200);
return(_local3);
}
return(super.getPos());
}
function checkHit(point, size, type) {
if ((pState == 9) || (pState == 10)) {
return(false);
}
var _local2 = new flash.geom.Point(pX, pY);
if (flash.geom.Point.distance(_local2, point) < ((35 + size) / 2)) {
return(true);
}
return(false);
}
function draw() {
if (pShield) {
pSafeCount--;
if (pSafeCount <= 0) {
pShield = false;
p_mc._visible = true;
} else if (pState != 11) {
if ((pSafeCount % 3) == 0) {
p_mc._visible = !p_mc._visible;
}
}
}
switch (pState) {
case 9 :
pDieCount++;
switch (pDieCount) {
case 5 :
p_mc._visible = false;
var _local3 = Depth.getNewDepth(3);
pMcParent.attachMovie("mc.distroyV", "ex" + _local3, _local3, {_x:pX, _y:pY - 20, pCount:10});
break;
case 50 :
pGame.gameOver();
}
pFire_mc._x = pX;
pFire_mc._y = pY;
break;
case 10 :
if (pSpeedX > 1) {
break;
}
pState = 1;
pMode = 1;
pSafeCount = 45;
p_mc._visible = true;
}
p_mc.machine_mc._rotation = pSpeedX * -1.5;
p_mc._rotation = pSpeedX * 1.5;
super.draw();
}
function collectHealth() {
pHealth = pHealth + 15;
pMcParent._parent.titleBar_mc.health_mc.gotoAndStop(pHealth + 1);
}
function getHealth() {
return(pHealth);
}
var pAcc = 2;
var pDec = 0.6;
var pMaxSpeed = 10;
}
Symbol 729 MovieClip [__Packages.Weapons] Frame 0
class Weapons
{
var pMcParent, pGame, pFriends, pFoes, pPowers, pFireCount, pRocketCount, pMissileCount, pBombCount, pOKCount, pFireRate, pRocketRate, pMissileRate, pBombRate, pLastDrop, pHelpCount, pPLevels, pType, pTypes, pAmmoLevels;
function Weapons (mcParent, gameHost) {
pMcParent = mcParent;
pGame = gameHost;
pFriends = new Array();
pFoes = new Array();
pPowers = new Array();
pFireCount = 0;
pRocketCount = 0;
pMissileCount = 0;
pBombCount = 0;
pOKCount = 0;
pFireRate = 4;
pRocketRate = 6;
pMissileRate = 7;
pBombRate = 10;
pLastDrop = 0;
pHelpCount = 0;
pPLevels = new Array(2);
pPLevels[0] = 1;
pPLevels[1] = 2;
pType = 0;
pTypes = new Array(0, 0, 0, 0, 0);
pAmmoLevels = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
}
function endGame() {
if (pFriends.length > 0) {
for (var _local2 in pFriends) {
pFriends[_local2].die();
delete pFriends[_local2];
pFriends.splice(Number(_local2), 1);
}
}
if (pFoes.length > 0) {
for (var _local2 in pFoes) {
pFoes[_local2].die();
delete pFoes[_local2];
pFoes.splice(Number(_local2), 1);
}
}
if (pPowers.length > 0) {
for (var _local2 in pPowers) {
pPowers[_local2].die();
delete pPowers[_local2];
pPowers.splice(Number(_local2), 1);
}
}
}
function startGame() {
pFriends.splice(0);
pFoes.splice(0);
pPowers.splice(0);
pFireCount = 0;
pMissileCount = 0;
pBombCount = 0;
pOKCount = 0;
pType = 0;
pTypes[0] = 0;
pTypes[1] = 0;
pTypes[2] = 0;
pTypes[3] = 0;
pTypes[4] = 0;
pPLevels[0] = 1;
pPLevels[1] = 0;
pAmmoLevels[0] = 999;
pAmmoLevels[1] = 0;
pAmmoLevels[2] = 0;
pAmmoLevels[3] = 0;
pAmmoLevels[4] = 0;
pAmmoLevels[5] = 0;
pAmmoLevels[6] = 0;
pAmmoLevels[7] = 0;
pAmmoLevels[8] = 0;
pHelpCount = 150;
}
function dropPowerUps(x, y) {
var _local3 = 0;
while (_local3 < (pPLevels[0] - 1)) {
var _local2 = flash.geom.Point.polar((Math.random() * 4) + 6, (Math.random() * Math.PI) * 2);
pPowers.push(new PowerUp(x, y, _local2.x, _local2.y, pMcParent, 1));
_local3++;
}
pPLevels[0] = 1;
pPLevels[1] = 0;
}
function launchWeapon(x, y, friend, mode) {
if (friend) {
if (pTypes[4] == 1) {
overkill(x, y);
} else {
fireGuns(x, y);
dropBombs(x, y);
fireRockets(x, y);
fireMissiles(x, y);
}
} else {
switch (mode) {
case 1 :
var _local5 = (new flash.geom.Point(x, y)).subtract(pGame.pShip.getPos());
var _local7 = Math.atan2(_local5.y, _local5.x);
var _local6 = Math.min(9, 2 + (pGame.getLevel() / 40));
var _local2 = -2;
while (_local2 < 2) {
var _local8 = flash.geom.Point.polar(_local6, _local7 + (_local2 * 0.2));
pFoes.push(new Bullet(x, y, -_local8.x, -_local8.y, pMcParent, 8));
_local2++;
}
break;
case 2 :
pFoes.push(new Bullet(x, y, -6, -6, pMcParent, 6));
break;
default :
_local5 = (new flash.geom.Point(x, y)).subtract(pGame.pShip.getPos());
var _local8 = new flash.geom.Point(_local5.y, _local5.x * -1);
_local8.normalize(_local5.length / 6);
var _local9 = (Math.random() * 2) - 1;
_local5.offset(_local8.x * _local9, _local8.y * _local9);
_local5.normalize(3);
pFoes.push(new Bullet(x, y, -_local5.x, -_local5.y, pMcParent, 8));
}
}
}
function fireGuns(x, y) {
if (pFireCount <= 0) {
pFireCount = pFireRate;
if (pTypes[0] > 0) {
if ((--pAmmoLevels[pTypes[0]]) < 0) {
pAmmoLevels[pTypes[0]] = 0;
pTypes[0]--;
}
pMcParent._parent.titleBar_mc.ammo_mc.showNum(pAmmoLevels[pTypes[0]]);
}
pFriends.push(new Bullet(x + 40, y + 20, 30, 0, pMcParent, pTypes[0] + 1));
pGame.pSoundObj.playSound("guns" + String(pTypes[0] + 1));
}
}
function fireRockets(x, y) {
if (pRocketCount <= 0) {
pRocketCount = pRocketRate;
if (pTypes[1] > 0) {
if ((--pAmmoLevels[3]) < 0) {
pAmmoLevels[3] = 0;
pTypes[1] = 0;
pMcParent._parent.titleBar_mc.missile_mc.showNum(0);
} else {
pFriends.push(new Seeker(x + 25, y, -1, pMcParent));
pFriends.push(new Seeker(x + 25, y, 1, pMcParent));
pGame.pSoundObj.playSound("missiles2");
pMcParent._parent.titleBar_mc.rocket_mc.showNum(pAmmoLevels[3]);
}
}
}
}
function fireMissiles(x, y) {
if (pMissileCount <= 0) {
pMissileCount = pMissileRate;
if (pTypes[2] > 0) {
if ((--pAmmoLevels[pTypes[2] + 3]) < 0) {
pAmmoLevels[pTypes[2] + 3] = 0;
pTypes[2]--;
}
pMcParent._parent.titleBar_mc.missile_mc.showNum(pAmmoLevels[pTypes[2] + 3]);
}
switch (pTypes[2]) {
case 0 :
pMcParent._parent.titleBar_mc.missile_mc.showNum(0);
break;
case 1 :
case 2 :
case 3 :
pFriends.push(new Missile(x + 40, y + 5, 1, pMcParent, pTypes[2]));
pGame.pSoundObj.playSound("missile");
}
}
}
function dropBombs(x, y) {
if (pBombCount <= 0) {
pBombCount = pBombRate;
if (pTypes[3] > 0) {
if ((--pAmmoLevels[7]) < 0) {
pAmmoLevels[7] = 0;
pTypes[3] = 0;
pMcParent._parent.titleBar_mc.bomb_mc.showNum(0);
} else {
pFriends.push(new Bomb(x + 25, y, pMcParent));
pMcParent._parent.titleBar_mc.bomb_mc.showNum(pAmmoLevels[7]);
}
}
}
}
function overkill(x, y) {
if (pFireCount <= 0) {
pFireCount = pFireRate;
pFriends.push(new Bullet(x + 40, y + 20, 30, 0, pMcParent, 3));
pGame.pSoundObj.playSound("guns" + String(pTypes[0] + 1));
}
if (pBombCount <= 0) {
pBombCount = pBombRate;
pFriends.push(new Bomb(x + 25, y, pMcParent));
}
if (pMissileCount <= 0) {
pMissileCount = pMissileRate;
pFriends.push(new Seeker(x + 25, y, -1, pMcParent));
pFriends.push(new Seeker(x + 25, y, 1, pMcParent));
pGame.pSoundObj.playSound("missiles2");
pFriends.push(new Missile(x + 40, y + 5, 1, pMcParent, 4));
pGame.pSoundObj.playSound("missile");
}
}
function launchPowerUp() {
pHelpCount = 0;
var _local2 = new Array();
if (pLastDrop != 9) {
var _local5 = pGame.pShip.getHealth();
if (_local5 <= 70) {
var _local4 = Math.round((80 - _local5) / 10);
var _local3 = 0;
while (_local3 < _local4) {
_local2.push(9);
_local3++;
}
}
}
if (pAmmoLevels[1] == 0) {
if (pLastDrop != 1) {
_local2.push(1);
_local2.push(1);
_local2.push(1);
_local2.push(1);
}
} else if (pLastDrop != 2) {
_local2.push(2);
_local2.push(2);
_local2.push(2);
_local2.push(2);
}
if (pLastDrop != 3) {
_local2.push(3);
_local2.push(3);
_local2.push(3);
}
if (pAmmoLevels[4] == 0) {
if (pLastDrop != 4) {
_local2.push(4);
_local2.push(4);
_local2.push(4);
}
} else if (pAmmoLevels[5] == 0) {
if (pLastDrop != 5) {
_local2.push(5);
_local2.push(5);
_local2.push(5);
}
} else if (pLastDrop != 6) {
_local2.push(6);
_local2.push(6);
_local2.push(6);
}
if (pLastDrop != 7) {
_local2.push(7);
_local2.push(7);
_local2.push(7);
}
if (pLastDrop != 8) {
_local2.push(8);
_local2.push(8);
}
pLastDrop = _local2[Math.floor(Math.random() * _local2.length)];
pPowers.push(new PowerUp(600, -50, -5 + (Math.random() * 3), 3, pMcParent, pLastDrop));
}
function collectPower(type) {
var _local3 = new Array(0, 200, 150, 100, 80, 60, 30, 30, 0);
pAmmoLevels[type] = pAmmoLevels[type] + _local3[type];
switch (type) {
case 1 :
case 2 :
if (type > pTypes[0]) {
pTypes[0] = type;
pGame.pSoundObj.playSound("mgun" + type);
} else {
pGame.pSoundObj.playSound("bullets");
}
pMcParent._parent.titleBar_mc.ammo_mc.showNum(pAmmoLevels[pTypes[0]]);
break;
case 3 :
pTypes[1] = 1;
pMcParent._parent.titleBar_mc.rocket_mc.showNum(pAmmoLevels[3]);
pGame.pSoundObj.playSound("m1");
break;
case 4 :
case 5 :
case 6 :
if ((type - 2) > pTypes[1]) {
pTypes[2] = type - 3;
pGame.pSoundObj.playSound("m" + String(type - 2));
}
pMcParent._parent.titleBar_mc.missile_mc.showNum(pAmmoLevels[pTypes[2] + 3]);
break;
case 7 :
if (pTypes[3] == 0) {
pTypes[3] = 1;
pGame.pSoundObj.playSound("bombs");
}
pMcParent._parent.titleBar_mc.bomb_mc.showNum(pAmmoLevels[7]);
break;
case 8 :
pOKCount = 150;
pTypes[4] = 1;
pGame.pSoundObj.playSound("overkill");
break;
case 9 :
pGame.pShip.collectHealth();
if (Math.random() < 0.5) {
pGame.pSoundObj.playSound("health");
} else {
pGame.pSoundObj.playSound("needed");
}
}
}
function update() {
pFireCount--;
pRocketCount--;
pMissileCount--;
pBombCount--;
if ((++pHelpCount) >= 300) {
launchPowerUp();
}
if ((pOKCount--) <= 0) {
pTypes[4] = 0;
}
for (var _local7 in pFriends) {
if (!pFriends[_local7].onScreen()) {
pFriends[_local7].die();
delete pFriends[_local7];
pFriends.splice(Number(_local7), 1);
} else {
var _local3 = pFriends[_local7].getPos();
var _local4 = pFriends[_local7].getSize();
var _local5 = pFriends[_local7].getStrg();
if (pGame.pMotherShip.checkHit(_local3, _local4, _local5, pFriends[_local7])) {
var _local6 = pFriends[_local7].getStrg();
if (_local6 <= 0) {
pFriends[_local7].die();
delete pFriends[_local7];
pFriends.splice(Number(_local7), 1);
} else {
pFriends[_local7].move();
}
} else {
pFriends[_local7].move();
}
}
}
for (var _local7 in pFoes) {
var _local3 = pGame.pShip.getPos();
if (!pFoes[_local7].onScreen()) {
pFoes[_local7].die();
delete pFoes[_local7];
pFoes.splice(Number(_local7), 1);
} else if (pFoes[_local7].checkHit(_local3)) {
var _local5 = pFoes[_local7].getStrg();
pGame.pShip.hit(_local5);
pFoes[_local7].die();
delete pFoes[_local7];
pFoes.splice(Number(_local7), 1);
} else {
pFoes[_local7].move();
}
}
for (var _local7 in pPowers) {
if (!pPowers[_local7].onScreen()) {
pPowers[_local7].destroy();
delete pPowers[_local7];
pPowers.splice(Number(_local7), 1);
} else {
var _local3 = pPowers[_local7].getPos();
var _local4 = pPowers[_local7].getSize();
var _local2 = pPowers[_local7].getType();
if (pGame.pShip.checkHit(_local3, _local4, _local2)) {
pPowers[_local7].die();
delete pPowers[_local7];
pPowers.splice(Number(_local7), 1);
pGame.pSoundObj.playSound("pickup");
collectPower(_local2);
} else {
pPowers[_local7].move();
}
}
}
}
}
Symbol 730 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends Mobile
{
var pType, pLife, pStrength, pSize, p_mc, setPos, setSpeed, update, pX, pY;
function Bullet (x, y, xs, ys, mc, type) {
super();
createMc(mc, type);
pType = type;
pLife = 9999;
if (type == 8) {
pStrength = 15;
pLife = 150;
} else {
pStrength = type * 2;
}
if (type == 6) {
pStrength = 20;
}
pSize = p_mc._height;
setPos(x, y);
setSpeed(xs, ys);
}
function createMc(mcParent, type) {
var _local2 = Depth.getNewDepth(6);
p_mc = mcParent.attachMovie("mc.bullet", "b" + _local2, _local2, {_x:-100, _y:-100});
p_mc.gotoAndStop("b" + type);
p_mc.cacheAsBitmap = true;
}
function move() {
update();
draw();
pLife--;
if (pLife <= 0) {
pX = -50;
}
}
function checkHit(point) {
if (flash.geom.Point.distance(point, new flash.geom.Point(pX, pY)) < 20) {
return(true);
}
return(false);
}
function onScreen() {
if ((((pX < 0) || (pX > 600)) || (pY < 0)) || (pY > 400)) {
return(false);
}
return(true);
}
function getMcDepth() {
return(p_mc.getDepth());
}
function die() {
p_mc.removeMovieClip();
}
function draw() {
p_mc._x = pX;
p_mc._y = pY;
}
function getPos() {
var _local2 = new flash.geom.Point(pX, pY);
return(_local2);
}
function getSize() {
return(pSize);
}
function getType() {
return(pType);
}
function getStrg() {
return(pStrength);
}
function setStrength(strength) {
pStrength = pStrength - strength;
}
}
Symbol 731 MovieClip [__Packages.PowerUp] Frame 0
class PowerUp extends Bullet
{
var pType, pSize, p_mc, setPos, setSpeed, pX, pY;
function PowerUp (x, y, xs, ys, mc, type) {
super();
createMc(mc, type);
pType = type;
pSize = p_mc._height;
setPos(x, y);
setSpeed(xs, ys);
}
function createMc(mcParent, type) {
var _local2 = Depth.getNewDepth(2);
p_mc = mcParent.attachMovie("mc.powerup", "p" + _local2, _local2, {_x:-100, _y:-100});
p_mc.gotoAndStop(type);
p_mc.cacheAsBitmap = true;
}
function getType() {
return(pType);
}
function destroy() {
if (pX > 0) {
var _local3 = Depth.getNewDepth(4);
p_mc._parent.attachMovie("mc.distroyV", "ex" + _local3, _local3, {_x:pX, _y:370, pCount:3});
_local3 = Depth.getNewDepth(8);
p_mc._parent.attachMovie("mc.ground_ex1", "ex" + _local3, _local3, {_x:pX - 5, _y:370});
}
super.die();
}
function onScreen() {
if ((pX < (-pSize)) || (pY > 370)) {
return(false);
}
return(true);
}
}
Symbol 732 MovieClip [__Packages.Seeker] Frame 0
class Seeker extends Bullet
{
var pDirection, pStrength, p_mc, pSize, setPos, setSpeed, pSpeedX, pSpeedY, update, pY, pX, draw;
function Seeker (x, y, dir, mc) {
super();
pDirection = dir;
pStrength = 5;
createMc(mc);
p_mc._yscale = -100 * dir;
pSize = p_mc._height;
setPos(x - 10, y + (dir * -12));
setSpeed(6, dir * -3);
}
function createMc(mcParent) {
if (pDirection == 1) {
var _local2 = Depth.getNewDepth(2);
} else {
var _local2 = Depth.getNewDepth(6);
}
p_mc = mcParent.attachMovie("mc.seeker", "ms" + _local2, _local2, {_x:-100, _y:-100});
p_mc.gotoAndStop(1);
p_mc.cacheAsBitmap = true;
}
function move() {
if (pSpeedX < 12) {
pSpeedX = pSpeedX + 1;
}
pSpeedY = pSpeedY + (pDirection * 0.5);
update();
p_mc.gotoAndStop(Math.round(Math.abs(pSpeedY) / 2));
if (pY > 360) {
var _local2 = Depth.getNewDepth(8);
p_mc._parent.attachMovie("mc.ground_ex1", "ex" + _local2, _local2, {_x:pX, _y:370});
pX = -50;
}
draw();
p_mc._rotation = pSpeedY * 4;
}
}
Symbol 733 MovieClip [__Packages.Missile] Frame 0
class Missile extends Bullet
{
var pType, pStrength, pSize, p_mc, pState, setPos, setSpeed, pSpeedX, pSpeedY;
function Missile (x, y, ys, mc, type) {
super();
pType = type;
createMc(mc);
pStrength = [10, 15, 20][type - 1];
pSize = p_mc._height;
pState = 0;
setPos(x - 10, y + (ys * 12));
setSpeed(-6, ys * 8);
}
function createMc(mcParent) {
var _local2 = Depth.getNewDepth(6);
p_mc = mcParent.attachMovie("mc.missile", "m" + _local2, _local2, {_x:-100, _y:-100});
p_mc.gotoAndStop(pType);
p_mc.cacheAsBitmap = true;
}
function move() {
switch (pState) {
case 2 :
break;
case 0 :
pSpeedX = pSpeedX * 0.8;
pSpeedY = pSpeedY * 0.7;
if (Math.abs(pSpeedY) < 1) {
pSpeedY = 0;
pSpeedX = 1;
pState = 1;
p_mc.gotoAndPlay("fly");
}
break;
case 1 :
pSpeedX = pSpeedX * 1.4;
if (pSpeedX <= 25) {
break;
}
pSpeedX = 25;
pState = 2;
}
super.move();
}
}
Symbol 734 MovieClip [__Packages.Bomb] Frame 0
class Bomb extends Bullet
{
var pStrength, pSize, p_mc, tempSpeed, setPos, setSpeed, pMcParent, pSpeedY, pSpeedX, update, pY, pX, draw;
function Bomb (x, y, mc) {
super();
createMc(mc);
pStrength = 40;
pSize = p_mc._height;
tempSpeed = 0;
setPos(x - 5, y + 12);
setSpeed(0, 0);
}
function createMc(mcParent) {
pMcParent = mcParent;
var _local2 = Depth.getNewDepth(6);
p_mc = mcParent.attachMovie("mc.bomb", "bm" + _local2, _local2, {_x:-100, _y:-100});
p_mc.gotoAndStop("bomb1");
p_mc.cacheAsBitmap = true;
}
function move() {
pSpeedY = pSpeedY + 0.5;
tempSpeed = tempSpeed + 0.03;
pSpeedX = Math.max(-6, pSpeedX - tempSpeed);
update();
if (pY > 370) {
var _local2 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.ground_ex1", "ex" + _local2, _local2, {_x:pX, _y:370});
pX = -50;
}
draw();
}
}
Symbol 735 MovieClip [__Packages.Mothership] Frame 0
class Mothership
{
var pMcParent, pGame, pEnemies, pPathSets, pTime, pTimeStep, pPause, pPathNum, pPathOrder;
function Mothership (mcParent, gameHost) {
pMcParent = mcParent;
pGame = gameHost;
pEnemies = new Array();
pPathSets = new Array();
pPathSets.push(new Array(1, 2, 3));
pPathSets.push(new Array(7, 8));
pPathSets.push(new Array(10, 10));
pPathSets.push([14]);
pTime = 0;
pTimeStep = 0;
pPause = true;
}
function update() {
var _local3 = pGame.pShip.getPos();
for (var _local4 in pEnemies) {
if (!pEnemies[_local4].onScreen()) {
pEnemies[_local4].die();
delete pEnemies[_local4];
pEnemies.splice(Number(_local4), 1);
} else {
if (pEnemies[_local4].checkHit(_local3, 12, 100)) {
var _local2 = pEnemies[_local4].getStrength();
pGame.pShip.hit(_local2);
}
pEnemies[_local4].update();
}
}
if ((pTime++) >= pTimeStep) {
if (!pPause) {
pTime = 0;
sendEnemy();
}
}
}
function startGame() {
pPathNum = 0;
pPathOrder.splice(0);
pPathOrder = new Array(2, 2, 0, 0, 2, 2, 1, 2, 0, 2, 0, 2, 2, 0, 2, 1, 2, 0, 2, 0, 2, 2, 3, 2, 1, 0, 0, 2, 1, 2, 1, 2, 0, 2, 1, 2, 1, 1, 2, 0, 0, 0, 2, 2, 1, 0, 2, 3);
pTime = 0;
pTimeStep = 80;
pPause = true;
}
function stepBack() {
pPathNum = Math.max(0, pPathNum - 5);
}
function sendEnemy() {
var _local2 = pPathSets[pPathOrder[pPathNum]];
var _local3 = _local2[Math.floor(Math.random() * _local2.length)];
if ((++pPathNum) == pPathOrder.length) {
pPathNum = 0;
if (pTimeStep > 20) {
pTimeStep = pTimeStep - 5;
}
}
pEnemies.push(new EnemySet(_local3, pMcParent, pGame));
}
function checkHit(point, size, strength, bullet) {
for (var _local5 in pEnemies) {
if (pEnemies[_local5].onScreen()) {
if (pEnemies[_local5].checkHit(point, size, strength, bullet)) {
return(true);
}
}
}
return(false);
}
function addGroundUnit(pos) {
pEnemies.push(new Building(pos.x, pos.y, pMcParent, pGame));
}
function endGame() {
if (pEnemies.length > 0) {
for (var _local2 in pEnemies) {
pEnemies[_local2].die();
delete pEnemies[_local2];
pEnemies.splice(Number(_local2), 1);
}
}
}
function pauseWaves() {
pPause = true;
}
function unpauseWaves() {
pPause = false;
}
}
Symbol 736 MovieClip [__Packages.EnemySet] Frame 0
class EnemySet
{
var pMcParent, pGame, pPath, pTmpStrength, pGap, pGapCount, pSet, pCount, pKills, pType, pYArray;
function EnemySet (path, mc, gameHost) {
pMcParent = mc;
pGame = gameHost;
pPath = path;
pTmpStrength = 0;
pGap = 0;
pGapCount = 20;
pSet = new Array();
switch (path) {
case 1 :
case 2 :
case 3 :
pCount = 2;
pKills = 2;
pGapCount = 20;
break;
case 7 :
case 8 :
pCount = 3;
pKills = 3;
pGapCount = 40;
break;
case 10 :
pCount = 4;
pKills = 4;
pGapCount = 40;
break;
case 14 :
pType = 30;
pCount = 12;
pKills = 12;
pGapCount = 16;
pYArray = new Array(90, 130, 170, 210, 250, 290, 330);
pGame.pMotherShip.pauseWaves();
break;
default :
trace(("error: Path " + path) + " called..?");
}
}
function update() {
if (pCount > 0) {
if ((pGap++) > pGapCount) {
pGap = 0;
pCount--;
switch (pPath) {
case 1 :
case 2 :
case 3 :
var _local3 = new Plane(pMcParent, pGame, pPath);
break;
case 7 :
case 8 :
_local3 = new Chopper(pMcParent, pGame, pPath);
break;
case 10 :
_local3 = new Vehicle(pMcParent, pGame, Math.ceil(Math.random() * 6));
break;
case 14 :
_local3 = new Hover(pMcParent, pGame, pYArray[Math.floor(Math.random() * pYArray.length)]);
}
pSet.push(_local3);
}
}
for (var _local2 in pSet) {
if (!pSet[_local2].onScreen()) {
removeEnemy(Number(_local2));
} else {
pSet[_local2].update();
}
}
}
function die() {
if (pSet.length > 0) {
var _local2;
for (_local2 in pSet) {
pSet[_local2].die();
delete pSet[_local2];
pSet.splice(_local2, 1);
}
}
}
function removeEnemy(index) {
if ((pCount == 0) && (pSet.length == 1)) {
if (pKills == 0) {
var _local4 = pSet[index].getPos();
pGame.pWeapons.launchPowerUp();
} else if (Math.random() > 0.8) {
pGame.pWeapons.launchPowerUp();
}
if (Math.random() < 0.2) {
var _local2 = Math.random();
if (_local2 < 0.25) {
pGame.pSoundObj.playSound("lookgood");
} else if (_local2 < 0.5) {
pGame.pSoundObj.playSound("haha");
} else if (_local2 < 0.75) {
pGame.pSoundObj.playSound("eatlead");
} else {
pGame.pSoundObj.playSound("takethat");
}
}
if (pType == 30) {
pGame.pMotherShip.unpauseWaves();
}
}
pSet[index].die();
delete pSet[index];
pSet.splice(index, 1);
}
function getStrength() {
return(pTmpStrength);
}
function checkHit(point, size, strength, bullet) {
pTmpStrength = 0;
for (var _local5 in pSet) {
if (pSet[_local5].onScreen()) {
if (pSet[_local5].checkHit(point, size, strength, bullet)) {
pTmpStrength = pSet[_local5].getStrength();
if (!pSet[_local5].onScreen()) {
pKills--;
removeEnemy(Number(_local5));
}
return(true);
}
}
}
return(false);
}
function onScreen() {
if ((pCount == 0) && (pSet.length == 0)) {
return(false);
}
return(true);
}
}
Symbol 737 MovieClip [__Packages.Plane] Frame 0
class Plane extends Craft
{
var pMcParent, pGame, createMc, pStrength, pState, pFired, pSize, p_mc, setPos, setSpeed, pTime, pPath, pX, pY, draw, pTmpStrength;
function Plane (mcParent, gameHost, path) {
super();
pMcParent = mcParent;
pGame = gameHost;
createMc(mcParent, 2);
pStrength = 30;
pState = 0;
pFired = 2;
pSize = p_mc._width / 2;
setPos(600 + pSize, 280);
setSpeed(-10, 0);
pTime = 0;
pPath = path;
switch (pPath) {
case 1 :
p_mc._alpha = 30;
p_mc._xscale = 30;
p_mc._yscale = 30;
break;
case 2 :
p_mc._xscale = -100;
case 3 :
setPos(600 + pSize, 100 + Math.round(Math.random() * 100));
pState = 1;
}
}
function update() {
switch (pPath) {
case 1 :
super.update();
if (pState == 0) {
if (pX < -100) {
pX = -100;
pState = 1;
pY = 100 + Math.round(Math.random() * 100);
setSpeed(5, 0);
p_mc._alpha = 100;
p_mc._xscale = -100;
p_mc._yscale = 100;
}
} else if (pFired > 0) {
if (pX > 100) {
if ((pX % 8) == 0) {
shoot();
pFired--;
}
}
}
break;
case 2 :
case 3 :
getPath();
}
draw();
}
function onScreen() {
switch (pPath) {
case 1 :
if (pState != 0) {
if (pX > (600 + pSize)) {
return(false);
}
}
return(true);
case 2 :
case 3 :
if (pTime < 0) {
return(false);
}
return(true);
}
}
function checkHit(point, size, strength, bullet) {
if (pState == 0) {
return(false);
}
var _local2 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local2.x) < 33) && (Math.abs(_local2.y) < 16)) {
bullet.setStrength(pStrength);
pTmpStrength = pStrength;
pStrength = pStrength - strength;
if (pStrength <= 0) {
var _local3 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.distroyV", "ex" + _local3, _local3, {_x:pX, _y:pY - 20, pCount:4 + Math.ceil(Math.random() * 5)});
_local3 = Depth.getNewDepth(8);
if (Math.random() < 0.5) {
pMcParent.attachMovie("mc.air_ex1", "ex" + _local3, _local3, {_x:pX, _y:pY});
} else {
pMcParent.attachMovie("mc.air_ex2", "ex" + _local3, _local3, {_x:pX, _y:pY});
}
pTime = -1;
pX = 700;
pGame.addScore(80);
} else {
var _local3 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.impact", "ex" + _local3, _local3, {_x:point.x, _y:point.y});
pGame.pSoundObj.playSound("ric" + String(Math.ceil(Math.random() * 6)));
pGame.addScore(10);
}
return(true);
}
return(false);
}
function getPath() {
pTime++;
switch (pPath) {
case 2 :
pX = Tween.easeInQuad(pTime, -60, 660, 60);
if (pTime == 20) {
shoot();
}
if (pTime >= 60) {
pTime = -1;
}
break;
case 3 :
if (pTime <= 25) {
pX = Tween.easeOutQuad(pTime, 615, -200, 25);
} else if (pTime <= 27) {
shoot();
} else {
pX = Tween.easeInQuad(pTime - 27, 415, -450, 25);
if (pTime < 50) {
break;
}
pTime = -1;
}
}
}
function getStrength() {
return(Math.max(0, pTmpStrength));
}
function shoot() {
pGame.pWeapons.launchWeapon(pX, pY, false);
}
}
Symbol 738 MovieClip [__Packages.Tween] Frame 0
class Tween
{
function Tween () {
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
}
Symbol 739 MovieClip [__Packages.Chopper] Frame 0
class Chopper extends Craft
{
var pMcParent, pGame, createMc, pStrength, pSize, p_mc, pState, pTime, pPath, setPos, setSpeed, draw, pX, pY, pTmpStrength;
function Chopper (mcParent, gameHost, path) {
super();
pMcParent = mcParent;
pGame = gameHost;
createMc(mcParent, 1);
pStrength = 12;
pSize = p_mc._width / 2;
pState = 0;
pTime = 0;
pPath = path;
setPos(600 + pSize, 140 + Math.round(Math.random() * 140));
setSpeed(-5, 0);
if (pPath == 7) {
p_mc._xscale = -100;
}
}
function update() {
getPath();
draw();
}
function onScreen() {
if (pTime < 0) {
return(false);
}
return(true);
}
function checkHit(point, size, strength, bullet) {
var _local2 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local2.x) < 24) && (Math.abs(_local2.y) < 24)) {
bullet.setStrength(pStrength);
pTmpStrength = pStrength;
pStrength = pStrength - strength;
if (pStrength <= 0) {
var _local3 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.distroyV", "ex" + _local3, _local3, {_x:pX, _y:pY - 20, pCount:4 + Math.ceil(Math.random() * 5)});
_local3 = Depth.getNewDepth(8);
if (Math.random() < 0.5) {
pMcParent.attachMovie("mc.air_ex1", "ex" + _local3, _local3, {_x:pX, _y:pY});
} else {
pMcParent.attachMovie("mc.air_ex2", "ex" + _local3, _local3, {_x:pX, _y:pY});
}
pX = -100;
pTime = -1;
pGame.addScore(100);
} else {
var _local3 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.impact", "ex" + _local3, _local3, {_x:pX - 50, _y:point.y});
pGame.pSoundObj.playSound("ric" + String(Math.ceil(Math.random() * 6)));
pGame.addScore(15);
}
return(true);
}
return(false);
}
function getStrength() {
return(Math.max(0, pTmpStrength));
}
function shoot() {
pGame.pWeapons.launchWeapon(pX, pY, false);
}
function getPath() {
pTime++;
switch (pPath) {
case 7 :
if (pTime <= 20) {
pX = -10 + (pTime * 10);
pY = 330;
} else if (pTime <= 83) {
var _local3 = (pTime - 20) / 10;
var _local2 = 115;
pX = 190 + (Math.sin(_local3) * _local2);
pY = (330 - _local2) + (Math.cos(_local3) * _local2);
} else {
pX = 190 + ((pTime - 83) * 10);
if (pTime == 95) {
shoot();
}
if (pX >= 605) {
pTime = -1;
}
}
break;
case 8 :
if (pTime <= 15) {
pX = 450 - (pTime * 8);
pY = -10 + (pTime * 8);
} else if (pTime <= 100) {
var _local3 = ((pTime - 15) / 10) + 3.92699081698724;
var _local2 = 125 - ((pTime - 15) / 2);
pX = 420 + (Math.sin(_local3) * _local2);
pY = 200 + (Math.cos(_local3) * _local2);
if (pTime == 65) {
shoot();
}
} else {
pX = 408 + ((pTime - 100) * 9);
if (pTime >= 155) {
pTime = -1;
}
}
break;
default :
trace("no path for chopper " + pPath);
}
}
}
Symbol 740 MovieClip [__Packages.Vehicle] Frame 0
class Vehicle extends Craft
{
var pMcParent, pGame, pType, pStrength, pSize, p_mc, setPos, setSpeed, pX, pY, pTmpStrength, draw;
function Vehicle (mc, gameHost, type) {
super();
pMcParent = mc;
pGame = gameHost;
pType = type;
pStrength = 1;
createMc(mc);
pSize = p_mc._width;
switch (type) {
case 1 :
setPos(600 + (pSize / 2), 370);
setSpeed(-5, 0);
pStrength = 20;
break;
case 2 :
setPos(600 + (pSize / 2), 370);
if (Math.random() < 0.5) {
setSpeed(-4, 0);
} else {
setSpeed(-3, 0);
}
pStrength = 15;
break;
case 3 :
setPos(600 + (pSize / 2), 370);
setSpeed(-2, 0);
pStrength = 5;
break;
case 4 :
setPos(600 + (pSize / 2), 370);
setSpeed(-9, 0);
pStrength = 2;
break;
case 5 :
setPos(600 + (pSize / 2), 370);
setSpeed(-6, 0);
pStrength = 30;
break;
case 6 :
setPos(-50, 370);
setSpeed(5, 0);
pStrength = 40;
}
}
function createMc(mcParent) {
var _local2 = Depth.getNewDepth(6);
p_mc = mcParent.attachMovie("mc.vehicle", "r" + _local2, _local2, {_x:-50, _y:-50});
p_mc.gotoAndStop(pType);
p_mc.cacheAsBitmap = true;
}
function checkHit(point, size, strength, bullet) {
var _local2 = false;
var _local4 = point.add(new flash.geom.Point(-pX, -pY));
switch (pType) {
case 1 :
if ((Math.abs(_local4.x) < 44) && (_local4.y > -66)) {
_local2 = true;
}
break;
case 2 :
_local4 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local4.x) < 37) && (_local4.y > -45)) {
_local2 = true;
}
break;
case 3 :
_local4 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local4.x) < 25) && (_local4.y > -44)) {
_local2 = true;
}
break;
case 4 :
_local4 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local4.x) < 12) && (_local4.y > -40)) {
_local2 = true;
}
break;
case 5 :
_local4 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local4.x) < 38) && (_local4.y > -53)) {
_local2 = true;
}
break;
case 6 :
_local4 = point.add(new flash.geom.Point(-pX, -pY));
if (!((Math.abs(_local4.x) < 35) && (_local4.y > -50))) {
break;
}
_local2 = true;
}
if (_local2) {
bullet.setStrength(pStrength);
pTmpStrength = pStrength;
pStrength = pStrength - strength;
if (pStrength <= 0) {
var _local5 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.distroyV", "ex" + _local5, _local5, {_x:pX, _y:pY - 20, pCount:4 + Math.ceil(Math.random() * 5)});
_local5 = Depth.getNewDepth(8);
if (Math.random() < 0.5) {
pMcParent.attachMovie("mc.ground_ex1", "ex" + _local5, _local5, {_x:pX - 5, _y:pY});
} else {
pMcParent.attachMovie("mc.ground_ex2", "ex" + _local5, _local5, {_x:pX - 5, _y:pY});
}
pGame.addScore(100);
pX = -100;
} else {
var _local5 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.impact", "ex" + _local5, _local5, {_x:pX - (pSize / 2), _y:pY + _local4.y});
pGame.pSoundObj.playSound("ric" + String(Math.ceil(Math.random() * 6)));
pGame.addScore(20);
}
return(true);
}
return(false);
}
function update() {
if (pType == 6) {
if (pX > 100) {
if ((pX % 120) == 0) {
p_mc.vehicle_mc.gotoAndStop(2);
shoot();
}
}
}
super.update();
draw();
}
function shoot() {
pGame.pWeapons.launchWeapon(pX - 35, pY - 54, false, 2);
}
function getStrength() {
return(Math.max(0, pTmpStrength));
}
function onScreen() {
if ((pX < (-pSize)) || (pX > 700)) {
return(false);
}
return(true);
}
}
Symbol 741 MovieClip [__Packages.Hover] Frame 0
class Hover extends Craft
{
var pMcParent, pGame, createMc, pStrength, pSize, p_mc, setPos, setSpeed, draw, pX, pY, pTmpStrength;
function Hover (mcParent, gameHost, y) {
super();
pMcParent = mcParent;
pGame = gameHost;
createMc(mcParent, 3);
pStrength = 40;
pSize = p_mc._width / 2;
setPos(600 + pSize, y);
setSpeed(-(2 + Math.round(Math.random() * 3)), 0);
}
function update() {
super.update();
draw();
}
function onScreen() {
if (pX < (-pSize)) {
return(false);
}
return(true);
}
function checkHit(point, size, strength, bullet) {
var _local2 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local2.x) < 33) && (Math.abs(_local2.y) < 16)) {
bullet.setStrength(pStrength);
pTmpStrength = pStrength;
pStrength = pStrength - strength;
if (pStrength <= 0) {
var _local3 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.distroyV", "ex" + _local3, _local3, {_x:pX, _y:pY - 20, pCount:4 + Math.ceil(Math.random() * 5)});
_local3 = Depth.getNewDepth(8);
if (Math.random() < 0.5) {
pMcParent.attachMovie("mc.air_ex1", "ex" + _local3, _local3, {_x:pX, _y:pY});
} else {
pMcParent.attachMovie("mc.air_ex2", "ex" + _local3, _local3, {_x:pX, _y:pY});
}
pX = -100;
pGame.addScore(120);
} else {
var _local3 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.impact", "ex" + _local3, _local3, {_x:point.x, _y:point.y});
pGame.pSoundObj.playSound("ric" + String(Math.ceil(Math.random() * 6)));
pGame.addScore(5);
}
return(true);
}
return(false);
}
function getStrength() {
return(Math.max(0, pTmpStrength));
}
}
Symbol 742 MovieClip [__Packages.Building] Frame 0
class Building extends Craft
{
var pMcParent, pGame, pType, pSize, p_mc, pStrength, pCollide, setPos, setSpeed, pX, pY, pTmpStrength, draw;
function Building (x, y, mc, gameHost) {
super();
pMcParent = mc;
pGame = gameHost;
pType = Math.ceil(Math.random() * 4);
createMc(mc);
pSize = p_mc._width;
pStrength = 4;
switch (pType) {
case 1 :
pStrength = 30;
break;
case 2 :
pStrength = 5;
break;
case 3 :
pStrength = 20;
break;
case 4 :
pStrength = 5;
}
pCollide = true;
setPos(x, y);
setSpeed(-15, 0);
}
function createMc(mcParent) {
var _local2 = Depth.getNewDepth(1);
p_mc = mcParent.attachMovie("mc.buildings", "b" + _local2, _local2, {_x:-50, _y:-50});
p_mc.gotoAndStop(pType);
p_mc.building_mc.gotoAndStop(1);
p_mc.cacheAsBitmap = true;
}
function checkHit(point, size, strength, bullet) {
if (!pCollide) {
return(false);
}
var _local2 = false;
switch (pType) {
case 1 :
var _local3 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local3.x) < 23) && (_local3.y > -156)) {
_local2 = true;
}
break;
case 2 :
_local3 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local3.x) < 35) && (_local3.y > -45)) {
_local2 = true;
}
break;
case 3 :
_local3 = point.add(new flash.geom.Point(-pX, -pY));
if ((Math.abs(_local3.x) < 30) && (_local3.y > -48)) {
_local2 = true;
}
break;
case 4 :
_local3 = point.add(new flash.geom.Point(-pX, -pY));
if (!((Math.abs(_local3.x) < 20) && (_local3.y > -12))) {
break;
}
_local2 = true;
}
if (_local2) {
bullet.setStrength(pStrength);
pTmpStrength = pStrength;
pStrength = pStrength - strength;
if (pStrength <= 0) {
var _local4 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.explosionF", "ex" + _local4, _local4, {_x:pX - 5, _y:pY});
switch (pType) {
case 1 :
pGame.addScore(100);
pStrength = 30;
break;
case 2 :
pGame.addScore(50);
pStrength = 5;
break;
case 3 :
pGame.addScore(150);
pStrength = 20;
break;
case 4 :
pGame.addScore(220);
pStrength = 5;
}
if (pType == 2) {
var _local6 = Math.ceil(Math.random() * 5);
p_mc.building_mc.gotoAndStop(_local6);
} else {
p_mc.building_mc.gotoAndStop(2);
}
pCollide = false;
} else {
var _local4 = Depth.getNewDepth(8);
pMcParent.attachMovie("mc.impact", "ex" + _local4, _local4, {_x:pX, _y:pY});
pGame.pSoundObj.playSound("ric" + String(Math.ceil(Math.random() * 6)));
pGame.addScore(5);
}
return(true);
}
return(false);
}
function update() {
super.update();
draw();
}
function getStrength() {
return(Math.max(0, pTmpStrength));
}
function onScreen() {
if (pX < (-pSize)) {
return(false);
}
return(true);
}
}
Symbol 743 MovieClip [__Packages.Ground] Frame 0
class Ground
{
var pGame, pX, pSpeedX, pGap, pCount, pFloor, pMountains, pCloud1, pCloud2, pCloud3, pCloudS;
function Ground (mcParent, gameHost) {
pGame = gameHost;
pX = 0;
pSpeedX = 15;
pGap = 300;
pCount = 50;
pFloor = mcParent.attachMovie("mc.ground", "ground_mc", 5, {_x:0, _y:321});
pFloor.cacheAsBitmap = true;
pMountains = mcParent.attachMovie("mc.mountains", "mountains_mc", 4, {_x:0, _y:305});
pMountains.cacheAsBitmap = true;
pCloud1 = mcParent.attachMovie("mc.cloud1", "cloud1_mc", 1, {_x:100, _y:78});
pCloud1.blendMode = 5;
pCloud1.cacheAsBitmap = true;
pCloud2 = mcParent.attachMovie("mc.cloud2", "cloud2_mc", 2, {_x:250, _y:122});
pCloud2.blendMode = 5;
pCloud2.cacheAsBitmap = true;
pCloud3 = mcParent.attachMovie("mc.cloud3", "cloud3_mc", 3, {_x:400, _y:110});
pCloud3.blendMode = 5;
pCloud3.cacheAsBitmap = true;
}
function endGame() {
pFloor.removeMovieClip();
pMountains.removeMovieClip();
pCloud1.removeMovieClip();
pCloud2.removeMovieClip();
pCloud3.removeMovieClip();
}
function startGame() {
pX = 0;
pSpeedX = 15;
if (pCloudS == undefined) {
pCloudS = new Array();
pCloudS.push(Math.ceil(Math.random() * 2));
pCloudS.push(Math.ceil(Math.random() * 2));
pCloudS.push(Math.ceil(Math.random() * 2));
}
}
function update() {
pMountains._x = pMountains._x - 1;
if (pMountains._x < -600) {
pMountains._x = pMountains._x + 600;
}
pCloud1._x = pCloud1._x - pCloudS[0];
if (pCloud1._x < -170) {
pCloud1._x = 600 + Math.round(Math.random() * 100);
pCloud1._y = 70 + Math.round(Math.random() * 40);
pCloudS[0] = Math.ceil(Math.random() * 2);
}
pCloud2._x = pCloud2._x - pCloudS[1];
if (pCloud2._x < -170) {
pCloud2._x = 600 + Math.round(Math.random() * 100);
pCloud2._y = 125 + Math.round(Math.random() * 40);
pCloudS[1] = Math.ceil(Math.random() * 2);
}
pCloud3._x = pCloud3._x - pCloudS[2];
if (pCloud3._x < -170) {
pCloud3._x = 600 + Math.round(Math.random() * 100);
pCloud3._y = 115 + Math.round(Math.random() * 40);
pCloudS[2] = Math.ceil(Math.random() * 2);
}
pX = pX - pSpeedX;
if (pX < -590) {
pX = pX + 590;
}
pFloor._x = pX;
if ((pCount--) < 0) {
pCount = pGap;
if (pGap > 40) {
pGap = pGap - 20;
}
var _local2 = new flash.geom.Point(650, 365);
pGame.pMotherShip.addGroundUnit(_local2);
}
}
}
Symbol 744 MovieClip [__Packages.SoundObj] Frame 0
class SoundObj
{
var pSoundObjs, pGlobalSound, pMusic, pMenu;
function SoundObj (mc) {
pSoundObjs = new Array();
pGlobalSound = new Sound();
pMusic = new Sound(mc);
pMusic.attachSound("game_snd");
pMenu = new Sound(mc);
pMenu.attachSound("apachemenu.wav");
var _local2 = new Sound(mc);
_local2.attachSound("guns1_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("guns2_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("guns3_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("mgun1_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("mgun2_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("missile2_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("sbomb_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("missile_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("bullets_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("m1_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("m2_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("m3_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("m4_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("overkill_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("ric1_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("ric2_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("ric3_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("bombs_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("health_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("needed_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("warning_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("watchout_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("enginet_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("letsrock_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("lookout_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("letsgo_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("letsroll_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("goindown_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("mandown_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("dobetter_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("lookgood_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("hahhah_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("eatlead_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("takethat_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("allright_snd");
pSoundObjs.push(_local2);
_local2 = new Sound(mc);
_local2.attachSound("lockload_snd");
pSoundObjs.push(_local2);
menuMusic();
}
function startGame() {
pMenu.stop();
pMusic.start(0, 99999999);
}
function endGame() {
pMusic.stop();
menuMusic();
}
function menuMusic() {
pMenu.onSoundComplete = function () {
trace("loop");
this.start(13.618, 9999);
delete this.onSoundComplete;
};
pMenu.start();
}
function playSound(tName) {
switch (tName) {
case "guns1" :
pSoundObjs[0].start();
break;
case "guns2" :
pSoundObjs[1].start();
break;
case "guns3" :
pSoundObjs[2].start();
break;
case "mgun1" :
pSoundObjs[3].start();
break;
case "mgun2" :
pSoundObjs[4].start();
break;
case "missiles2" :
pSoundObjs[5].start();
break;
case "sbomb" :
pSoundObjs[6].start();
break;
case "missile" :
pSoundObjs[7].start();
break;
case "bullets" :
pSoundObjs[8].start();
break;
case "m1" :
pSoundObjs[9].start();
break;
case "m2" :
pSoundObjs[10].start();
break;
case "m3" :
pSoundObjs[11].start();
break;
case "m4" :
pSoundObjs[12].start();
break;
case "overkill" :
pSoundObjs[13].start();
break;
case "ric1" :
pSoundObjs[14].start();
break;
case "ric2" :
pSoundObjs[15].start();
break;
case "ric3" :
pSoundObjs[16].start();
break;
case "bombs" :
pSoundObjs[17].start();
break;
case "health" :
pSoundObjs[18].start();
break;
case "needed" :
pSoundObjs[19].start();
break;
case "warning" :
pSoundObjs[20].start();
break;
case "watchout" :
pSoundObjs[21].start();
break;
case "enginet" :
pSoundObjs[22].start();
break;
case "letsrock" :
pSoundObjs[23].start();
break;
case "lookout" :
pSoundObjs[24].start();
break;
case "letsgo" :
pSoundObjs[25].start();
break;
case "letsroll" :
pSoundObjs[26].start();
break;
case "goingdown" :
pSoundObjs[27].start();
break;
case "mandown" :
pSoundObjs[28].start();
break;
case "dobetter" :
pSoundObjs[29].start();
break;
case "lookgood" :
pSoundObjs[30].start();
break;
case "haha" :
pSoundObjs[31].start();
break;
case "eatlead" :
pSoundObjs[32].start();
break;
case "takethat" :
pSoundObjs[33].start();
break;
case "allright" :
pSoundObjs[34].start();
break;
case "lockload" :
pSoundObjs[35].start();
}
}
function switchVolume() {
if (pGlobalSound.getVolume() == 100) {
pGlobalSound.setVolume(0);
return(false);
}
pGlobalSound.setVolume(100);
return(true);
}
function getVolume() {
if (pGlobalSound.getVolume() == 100) {
return(true);
}
return(false);
}
}
Symbol 186 MovieClip [mc.air_ex1] Frame 13
this.removeMovieClip();
Symbol 188 MovieClip [mc.air_ex2] Frame 14
this.removeMovieClip();
Symbol 206 MovieClip [mc.ground_ex1] Frame 13
this.removeMovieClip();
Symbol 208 MovieClip [mc.ground_ex2] Frame 17
this.removeMovieClip();
Symbol 209 MovieClip [mc.air_ex0] Frame 13
this.removeMovieClip();
Symbol 231 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 5
this.gotoAndPlay("loop");
Symbol 232 MovieClip Frame 1
var pPlaying = false;
this.startAni = function () {
if (!this.pPlaying) {
this.pPlaying = true;
this.gotoAndPlay("loop");
}
};
stop();
Symbol 232 MovieClip Frame 4
this.gotoAndPlay("loop");
Symbol 306 MovieClip Frame 17
this._parent.gotoAndStop(1);
Symbol 307 MovieClip Frame 1
stop();
Symbol 341 MovieClip [mc.impact] Frame 6
this.removeMovieClip();
Symbol 358 MovieClip [mc.explosionF] Frame 9
this.removeMovieClip();
Symbol 359 MovieClip [mc.distroyV] Frame 1
this.init = function () {
var _local3;
var _local2;
_local3 = 0;
while (_local3 < this.pCount) {
_local2 = this.attachMovie("mc.debris", "debris" + _local3, _local3);
_local2.gotoAndStop(Math.ceil(Math.random() * 10));
_local2.pX = 0;
_local2.pY = 0;
_local2.pSpeedX = -9 + (Math.random() * 14);
if (this._parent._y < 370) {
var _local4 = (Math.round(Math.random()) * 2) - 1;
_local2.pSpeedY = _local4 * (6 + (Math.random() * 6));
} else {
_local2.pSpeedY = -6 + (Math.random() * -6);
}
_local2.pSpin = 0;
_local2.onEnterFrame = function () {
this.pSpeedY = this.pSpeedY + 1;
this.pX = this.pX + this.pSpeedX;
this.pY = this.pY + this.pSpeedY;
this._x = this.pX;
this._y = this.pY;
this._rotation = this._rotation + this.pSpeedX;
if ((this._y + this._parent._y) > 370) {
if (this.pSpeedY > 7) {
this.pSpeedY = this.pSpeedY * -0.4;
this.pSpeedX = this.pSpeedX - 8;
} else {
this._parent.clearDebris();
this.removeMovieClip();
}
}
};
_local3++;
}
};
this.clearDebris = function () {
if ((--this.pCount) == 0) {
this.removeMovieClip();
}
};
this.init();
stop();
Symbol 417 MovieClip Frame 2
var tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.distroyV", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 140, pCount:7});
tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.ground_ex2", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 130});
tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.air_ex0", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 90});
tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.air_ex0", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 50});
stop();
Symbol 432 MovieClip Frame 2
var tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.distroyV", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 15, pCount:3});
stop();
Symbol 437 MovieClip Frame 2
var tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.distroyV", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 15, pCount:2});
tDepth = Depth.getNewDepth(8);
this._parent.attachMovie("mc.ground_ex1", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y - 15});
stop();
Symbol 457 MovieClip Frame 2
var tDepth = Depth.getNewDepth(8);
if (Math.random() < 0.5) {
this._parent.attachMovie("mc.ground_ex1", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y});
} else {
this._parent.attachMovie("mc.ground_ex2", "ex" + tDepth, tDepth, {_x:this._x, _y:this._y});
}
stop();
Symbol 475 MovieClip [mc.smoke] Frame 1
this.onEnterFrame = function () {
this._x = this._x - 15;
};
Symbol 475 MovieClip [mc.smoke] Frame 23
this.removeMovieClip();
Symbol 515 MovieClip Frame 1
stop();
Symbol 517 MovieClip [mc.die] Frame 64
this.removeMovieClip();
Symbol 518 MovieClip Frame 1
stop();
Symbol 559 MovieClip Frame 114
this.quote_mc.gotoAndStop(Math.ceil(Math.random() * quote_mc._totalframes));
Symbol 559 MovieClip Frame 284
this._parent.play();
Symbol 573 Button
on (rollOver) {
_parent.cursor_mc.gotoAndStop("hand");
}
on (rollOut) {
_parent.cursor_mc.gotoAndStop("arrow");
}
on (releaseOutside) {
_parent.cursor_mc.gotoAndStop("arrow");
}
on (release) {
_parent.cursor_mc.gotoAndStop("arrow");
getURL ("http://www.playerthree.net", "_blank");
}
Symbol 578 MovieClip Frame 44
stop();
Symbol 585 MovieClip Frame 39
stop();
Symbol 586 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 18
stop();
Symbol 602 MovieClip Frame 1
stop();
Symbol 608 Button
on (rollOver) {
this.menuApache_mc.setDestY(235);
tGame.pSoundObj.playSound("lockload");
}
on (release) {
this.menuApache_mc.leave("toGame");
this.pingHome();
}
Symbol 612 Button
on (rollOver) {
this.menuApache_mc.setDestY(275);
tGame.pSoundObj.playSound("lockload");
}
on (release) {
this.menuApache_mc.leave("toInstruct");
}
Symbol 616 Button
on (rollOver) {
this.menuApache_mc.setDestY(315);
tGame.pSoundObj.playSound("lockload");
}
on (release) {
this.menuApache_mc.leave("toScores");
}
Symbol 617 MovieClip Frame 1
this.init = function () {
this.pX = -100;
this.pY = this._y;
this.pSpeedX = 0;
this.pSpeedY = 0;
this.pDestX = 170;
this.pDestY = this._y;
this.pBounce = false;
this._x = this.pX;
this.pDest = "";
this.pSound = new Sound(this);
this.pSound.attachSound("engine_snd");
this.pSound.setVolume(60);
this.pSound.start(0, 9999);
};
this.onEnterFrame = function () {
if (this.pBounce) {
this.pSpeedY = this.pSpeedY + ((this.pDestY - this.pY) / 5);
this.pSpeedY = this.pSpeedY * 0.7;
} else {
this.pSpeedY = (this.pDestY - this.pY) / 5;
}
this.pY = this.pY + this.pSpeedY;
this._y = this.pY;
this.pSpeedX = Math.min(20, (this.pDestX - this.pX) / 5);
this.pX = this.pX + this.pSpeedX;
this._x = this.pX;
this.chopter_mc._rotation = this.pSpeedX + this.pSpeedY;
if (this.pX > 650) {
trace("clearing");
this.pSound.stop();
delete this.onEnterFrame;
}
};
this.setDestX = function (x) {
this.pDestX = x;
this.pBounce = true;
};
this.setDestY = function (y) {
this.pDestY = y;
this.pBounce = true;
};
this.leave = function (tDest) {
this.pDest = tDest;
this._parent.gotoAndPlay(this.pDest);
this.setDestX(750);
};
this.init();
stop();
Symbol 621 Button
on (rollOver) {
tGame.pSoundObj.playSound("lockload");
}
on (release) {
this.gotoAndPlay("menu");
}
Symbol 627 MovieClip Frame 1
this._visible = false;
Symbol 636 Button
on (release) {
gameURL = ("http://www.miniclip.com/games/" + gamename) + "/en/";
trace("Going to game: " + gameURL);
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 638 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 627 MovieClip "mcHighscores" in Symbol 638 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 638 MovieClip Frame 2
if (scoreLocation == undefined) {
trace(("*** Miniclip Highscore Component: scoreLocation (" + scoreLocation) + ") is undefined.");
}
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 638 MovieClip Frame 3
stop();
Symbol 653 MovieClip Frame 1
this.showNum = function (tNum) {
this.digit_mc._y = tNum * -10;
};
stop();
Symbol 654 MovieClip Frame 1
this.showNum = function (num) {
if (num < 0) {
num = 0;
} else if (num > 9999999) {
num = 9999999 /* 0x98967F */;
}
var _local5 = "00000000" + String(num);
var _local3 = _local5.substr(-7).split("");
var _local2 = 0;
while (_local2 < 7) {
this[("num" + _local2) + "_mc"].digit_mc._y = _local3[_local2] * -10;
_local2++;
}
};
stop();
Symbol 667 MovieClip Frame 1
this.showNum = function (tNum) {
this.digit_mc._y = tNum * -10;
};
stop();
Symbol 668 MovieClip Frame 1
this.showNum = function (num) {
if (num < 0) {
num = 0;
} else if (num > 99) {
num = 99;
}
var _local5 = "00000000" + String(num);
var _local3 = _local5.substr(-2).split("");
var _local2 = 0;
while (_local2 < 2) {
this[("num" + _local2) + "_mc"].digit_mc._y = _local3[_local2] * -10;
_local2++;
}
};
this.num1_mc.digit_mc._y = -30;
stop();
Symbol 669 MovieClip Frame 1
this.showNum = function (num) {
if (num < 0) {
num = 0;
} else if (num > 999) {
num = 999;
}
var _local5 = "00000000" + String(num);
var _local3 = _local5.substr(-3).split("");
var _local2 = 0;
while (_local2 < 3) {
this[("num" + _local2) + "_mc"].digit_mc._y = _local3[_local2] * -10;
_local2++;
}
};
stop();
Symbol 718 MovieClip Frame 1
stop();
Symbol 720 MovieClip Frame 101
stop();