Frame 1
_global.gameLoaded = false;
this.onEnterFrame = function () {
textPercent.text = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
};
Frame 2
if (_root.getBytesLoaded() < (_root.getBytesTotal() - 20000)) {
gotoAndPlay (1);
}
Instance of Symbol 81 MovieClip in Frame 74
onClipEvent (load) {
state = 1;
}
Frame 106
_root.mcTank0.moving = true;
_root.mcTank0.gotoAndPlay("move");
Frame 253
function changeMenu(old, choice) {
if (old < choice) {
var label = (choice + "down");
_root.mcMenu.mcMainMenu.gotoAndPlay(label);
} else {
var label = (choice + "up");
_root.mcMenu.mcMainMenu.gotoAndPlay(label);
}
}
stop();
_global.gameover = true;
_global.hat = 0;
_global.soundGlobal = new Sound();
_global.soundGlobal.stop();
if (!_global.gameLoaded) {
_quality = "MEDIUM";
_global.gameover = true;
_global.paused = false;
_global.hiscore = 0;
_global.player2 = false;
_global.musicOn = true;
_global.menuChoice = 1;
_global.menuItems = 3;
_global.menuLevel = 1;
_global.level = 1;
_global.newGame = true;
_global.quota1 = 80;
_global.quota2 = 100;
_global.levelDone = false;
_global.frozen = false;
_global.delay = 0;
_global.level1Ratio = 0;
_global.level2Ratio = 0;
_global.hatArray = new Array("none", "british", "baby", "devil", "german", "sam", "cap");
_global.hat = 0;
_global.hatTotal = 12;
_global.hatPimp = false;
_global.hatCop = false;
_global.hatRoman = false;
_global.hatFlower = false;
_global.hatKing = false;
_global.hatArmy = false;
_global.keyPause = 13;
_global.keyQuality = 81;
_global.keyLeft = 72;
_global.keyRight = 75;
_global.keyUp1 = 65;
_global.keyDown1 = 68;
_global.keyBack = 74;
_global.keyJump = 85;
_global.keyFire = 32;
_global.keyFire2 = 83;
_global.keyP2 = 50;
_global.keyLeftP2 = 37;
_global.keyRightP2 = 39;
_global.keyAimLeftP2 = 100;
_global.keyAimRightP2 = 102;
_global.keyFireP2 = 96;
_global.downPressed = false;
_global.upPressed = false;
_global.firePressed = false;
_global.fire2Pressed = false;
_global.leftPressed = false;
_global.rightPressed = false;
_global.gameLoaded = true;
}
this.onEnterFrame = function () {
if (_global.menuLevel == 1) {
if (Key.isDown(_global.keyBack) || (Key.isDown(40))) {
if (!_global.downPressed) {
_global.downPressed = true;
if (_global.menuChoice < _global.menuItems) {
var oldChoice = _global.menuChoice;
_global.menuChoice++;
changeMenu(oldChoice, _global.menuChoice);
} else {
var oldChoice = _global.menuChoice;
_global.menuChoice = 1;
changeMenu(oldChoice, _global.menuChoice);
}
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("car crush 01");
_global.soundGlobal.start();
}
} else {
_global.downPressed = false;
}
if (Key.isDown(_global.keyJump) || (Key.isDown(38))) {
if (!_global.upPressed) {
_global.upPressed = true;
if (_global.menuChoice > 1) {
var oldChoice = _global.menuChoice;
_global.menuChoice--;
changeMenu(oldChoice, _global.menuChoice);
} else {
var oldChoice = _global.menuChoice;
_global.menuChoice = _global.menuItems;
changeMenu(oldChoice, _global.menuChoice);
}
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("car crush 01");
_global.soundGlobal.start();
}
} else {
_global.upPressed = false;
}
if (Key.isDown(_global.keyFire) || (Key.isDown(13))) {
if (!_global.firePressed) {
_global.firePressed = true;
if (_global.menuChoice == 1) {
_global.player2 = false;
_global.menuLevel = 2;
_root.mcMenu.gotoAndPlay("intro");
} else if (_global.menuChoice == 2) {
_global.player2 = true;
_global.menuLevel = 2;
_root.mcMenu.gotoAndPlay("intro");
} else {
_global.menuChoice = 1;
_global.menuLevel = 0;
_global.soundGlobal.stop();
_global.soundGlobal.attachSound("music 01");
_global.soundGlobal.setVolume(100);
_global.soundGlobal.start(0, 10);
gotoAndPlay (383);
}
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("cannon rotate");
_global.soundGlobal.start();
}
} else {
_global.firePressed = false;
}
} else if (_global.menuLevel == 2) {
if (Key.isDown(_global.keyFire) || (Key.isDown(13))) {
if (!_global.firePressed) {
_global.firePressed = true;
_global.menuLevel = 3;
_root.mcMenu.mcHand.gotoAndPlay("press");
_root.mcMenu.gotoAndPlay("hats");
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("cannon rotate");
_global.soundGlobal.start();
}
} else {
_global.firePressed = false;
}
} else if (_global.menuLevel == 3) {
if (Key.isDown(_global.keyLeft) || (Key.isDown(37))) {
if (!_global.leftPressed) {
_global.leftPressed = true;
if (_global.hat > 0) {
_global.hat--;
} else {
_global.hat = _global.hatArray.length - 1;
}
_root.mcMenu.mcLeft.gotoAndPlay("press");
_root.mcMenu.mcTank.mcBody.mcHat.gotoAndPlay(_global.hatArray[_global.hat]);
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("car crush 01");
_global.soundGlobal.start();
}
} else {
_global.leftPressed = false;
}
if (Key.isDown(_global.keyRight) || (Key.isDown(39))) {
if (!_global.rightPressed) {
_global.rightPressed = true;
if (_global.hat < (_global.hatArray.length - 1)) {
_global.hat++;
} else {
_global.hat = 0;
}
_root.mcMenu.mcRight.gotoAndPlay("press");
_root.mcMenu.mcTank.mcBody.mcHat.gotoAndPlay(_global.hatArray[_global.hat]);
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("car crush 01");
_global.soundGlobal.start();
}
} else {
_global.rightPressed = false;
}
if (Key.isDown(_global.keyFire) || (Key.isDown(13))) {
if (!_global.firePressed) {
_global.firePressed = true;
_global.gameover = false;
}
} else {
_global.firePressed = false;
}
_root.mcMenu.textHats.text = _global.hatArray.length - 1;
}
if (Key.isDown(_global.keyFire2)) {
if (!_global.fire2Pressed) {
_global.fire2Pressed = true;
if (_global.menuLevel > 1) {
_global.menuLevel--;
_global.soundGlobal.setVolume(100);
_global.soundGlobal.attachSound("cop fire");
_global.soundGlobal.start();
}
if (_global.menuLevel == 1) {
_global.menuChoice = 1;
_root.mcMenu.gotoAndPlay("main");
} else if (_global.menuLevel == 2) {
_root.mcMenu.gotoAndPlay("intro2");
}
}
} else {
_global.fire2Pressed = false;
}
if (!_global.gameover) {
_global.newGame = true;
gotoAndPlay (254);
}
_root.textHiscore.text = _global.hiscore;
};
Frame 254
stop();
pausePressed = false;
if (Key.isDown(_global.keyPause)) {
pausePressed = true;
}
p2Pressed = false;
qPressed = false;
_global.soundMusic = new Sound(_root.mcMain);
_global.soundBall = new Sound(_root.mcMain.mcBall);
_global.soundMissile = new Sound(_root.mcMain.mcMissile);
_global.soundTank = new Sound(_root.mcMain.mcTank);
_global.soundFX = new Sound(_root.mcMain.mcHitOne);
_global.soundMan = new Sound(_root.mcMain.mcMan);
_global.soundHeli = new Sound(_root.mcMain.mcHeli);
_global.soundMusic.attachSound("music 01");
_global.soundMusic.setVolume(100);
_global.soundFX.setVolume(60);
_global.soundFX_sounds = 0;
_global.soundCop.setVolume(60);
_global.soundMan.setVolume(60);
_global.soundFXDone = function () {
_global.soundFX_sounds--;
_global.soundFX.setVolume(60);
if (_global.soundFX_sounds < 0) {
_global.soundFX_sounds = 0;
}
};
_global.soundHeliIdle = function () {
_global.soundHeli.attachSound("heli");
_global.soundHeli.start(0, 1000);
};
_global.keyDebugHit = 9;
_global.keyDebugHat = 8;
debugHitPressed = false;
debugHatPressed = false;
_global.ground = 400;
_global.gravity = 2;
_global.score = 0;
_global.scoreHR = 35;
_global.scoreHB = -25;
_global.scoreCR = 20;
_global.scoreCB = -10;
_global.scoreCop = 10;
_global.scoreTR = 35;
_global.scoreTB = 20;
_global.scoreHeliR = 35;
_global.scoreHeliB = 20;
_global.scoreMan = 5;
_global.scoreBalloon = 100;
_global.statHR = 0;
_global.statHB = 0;
_global.statCR = 0;
_global.statCB = 0;
_global.statCop = 0;
_global.statHeliR = 0;
_global.statheliB = 0;
_global.statTR = 0;
_global.statTB = 0;
_global.statMan = 0;
_global.statTree = 0;
_global.statBalloon = 0;
_global.statTHR = 0;
_global.statTHB = 0;
_global.statTCR = 0;
_global.statTCB = 0;
_global.statTCop = 0;
_global.statTHeliR = 0;
_global.statTheliB = 0;
_global.statTTR = 0;
_global.statTTB = 0;
_global.statTotalRed = 0;
_global.statTotalBlue = 0;
_global.delayCop = 10;
_global.delayHeli = 25;
_global.delayTank = 50;
_global.delayBalloon = 10;
_global.debugHit = false;
pan = 0;
camX = 0;
camY = 0;
lastX = _root.mcMain._x;
lastY = _root.mcMain._y;
_global.mainMenu = function () {
_global.frozen = false;
_global.menuChoice = 1;
_global.menuLevel = 1;
_global.menuChoice = 1;
_global.player2 = false;
_root.mcGameover.gotoAndPlay("idle");
_global.updateHiscore();
gotoAndPlay (241);
};
_global.updateHiscore = function () {
if (_global.hiscore < _global.score) {
_global.hiscore = _global.score;
}
};
this.onEnterFrame = function () {
if (_global.newGame) {
_global.newGame = false;
_global.resetGame(1, true);
}
if (_global.gameover) {
_global.gameover = false;
_global.soundGlobal.stop();
_global.updateHiscore();
_global.mainMenu();
}
if (Key.isDown(_global.keyPause) && (!_global.levelDone)) {
if ((!pausePressed) && (!_global.gameover)) {
pausePressed = true;
_global.paused = !_global.paused;
_global.frozen = _global.paused;
if (_global.paused) {
_global.pauseMenuChoice = 1;
_root.mcPaused.mcHand.gotoAndPlay("selected");
_root.mcPaused.mcArrow.gotoAndPlay("idle");
_root.mcPaused.gotoAndPlay("pause");
} else {
_root.mcPaused.gotoAndPlay("unpause");
}
}
} else {
pausePressed = false;
}
if (_global.paused) {
if (Key.isDown(_global.keyBack)) {
if (!_global.downPressed) {
_global.downPressed = true;
if (_global.pauseMenuChoice == 1) {
_global.pauseMenuChoice = 2;
_root.mcPaused.mcHand.gotoAndPlay("idle");
_root.mcPaused.mcArrow.gotoAndPlay("selected");
} else {
_global.pauseMenuChoice = 1;
_root.mcPaused.mcHand.gotoAndPlay("selected");
_root.mcPaused.mcArrow.gotoAndPlay("idle");
}
}
} else {
_global.downPressed = false;
}
if (Key.isDown(_global.keyJump)) {
if (!_global.upPressed) {
_global.upPressed = true;
if (_global.pauseMenuChoice == 1) {
_global.pauseMenuChoice = 2;
_root.mcPaused.mcHand.gotoAndPlay("idle");
_root.mcPaused.mcArrow.gotoAndPlay("selected");
} else {
_global.pauseMenuChoice = 1;
_root.mcPaused.mcHand.gotoAndPlay("selected");
_root.mcPaused.mcArrow.gotoAndPlay("idle");
}
}
} else {
_global.upPressed = false;
}
if (Key.isDown(_global.keyFire)) {
if (!_global.firePressed) {
_global.firePressed = true;
if (_global.pauseMenuChoice == 1) {
_global.paused = !_global.paused;
_global.frozen = _global.paused;
_root.mcPaused.gotoAndPlay("unpause");
} else {
_root.mcPaused.gotoAndPlay("unpause");
_global.gameover = true;
}
}
} else {
_global.firePressed = false;
}
}
if (Key.isDown(_global.keyP2)) {
if (!p2Pressed) {
p2Pressed = true;
if (Key.isDown(16)) {
_global.player2 = !_global.player2;
}
}
} else {
p2Pressed = false;
}
if (Key.isDown(_global.keyQuality)) {
if (!qPressed) {
qPressed = true;
if (_quality == "LOW") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "HIGH";
} else {
_quality = "LOW";
}
}
} else {
qPressed = false;
}
if (Key.isDown(_global.keyDebugHit)) {
if (!debugHitPressed) {
debugHitPressed = true;
_global.debugHit = !_global.debugHit;
}
} else {
debugHitPressed = false;
}
if (Key.isDown(_global.keyDebugHat)) {
if (!debugHatPressed) {
debugHatPressed = true;
if (Key.isDown(16)) {
_root.mcMain.mcTank.mcBody.mcHat.gotoAndPlay(_root.mcMain.mcTank.mcBody.mcHat._currentframe + 10);
}
}
} else {
debugHatPressed = false;
}
if (_root.mcMain.newHouseName != "") {
temp = Math.random();
if (temp > 0.66) {
if (_root.mcMain.newHouseRed) {
_root.mcMain.mcHouseBigTwo.duplicateMovieClip(_root.mcMain.newHouseName, _root.mcMain.newHouseDepth);
} else {
_root.mcMain.mcHouseBigOne.duplicateMovieClip(_root.mcMain.newHouseName, _root.mcMain.newHouseDepth);
}
} else if (temp > 0.33) {
if (_root.mcMain.newHouseRed) {
_root.mcMain.mcHouseSmallTwo.duplicateMovieClip(_root.mcMain.newHouseName, _root.mcMain.newHouseDepth);
} else {
_root.mcMain.mcHouseSmallOne.duplicateMovieClip(_root.mcMain.newHouseName, _root.mcMain.newHouseDepth);
}
} else if (_root.mcMain.newHouseRed) {
_root.mcMain.mcShackTwo.duplicateMovieClip(_root.mcMain.newHouseName, _root.mcMain.newHouseDepth);
} else {
_root.mcMain.mcShackOne.duplicateMovieClip(_root.mcMain.newHouseName, _root.mcMain.newHouseDepth);
}
if (Math.random() < 0.5) {
_root.mcMain[_root.mcMain.newHouseName]._xscale = 100;
} else {
_root.mcMain[_root.mcMain.newHouseName]._xscale = -100;
}
_root.mcMain[_root.mcMain.newHouseName]._x = _root.mcMain.newHouseX - 850;
_root.mcMain[_root.mcMain.newHouseName]._y = _root.mcMain.newHouseY;
_root.mcMain.newHouseName = "";
_root.mcMain.newHouseDepth = 0;
_root.mcMain.newHouseX = 0;
_root.mcMain.newHouseY = 0;
}
if ((!_global.paused) && (!_global.gameover)) {
_root.mcMain._x = lastX;
_root.mcMain._y = lastY;
if ((!_global.levelDone) && (_global.statHR >= _global["quota" + _global.level])) {
_global.levelDone = true;
_global.frozen = true;
_global.delay = 90;
_root.mcMain.move = 0;
_root.mcMain.mcTank.gotoAndPlay("idle");
_global.statTotalRed = ((_global.statHR + _global.statCR) + _global.statHeliR) + _global.statTR;
_root[("mcLevel" + _global.level) + "Passed"].textRed.text = "0";
_root[("mcLevel" + _global.level) + "Passed"].red = 0;
_root[("mcLevel" + _global.level) + "Passed"].redH = 0;
_root[("mcLevel" + _global.level) + "Passed"].redC = 0;
_root[("mcLevel" + _global.level) + "Passed"].redT = 0;
_root[("mcLevel" + _global.level) + "Passed"].redHeli = 0;
_global.statTotalBlue = ((_global.statHB + _global.statCB) + _global.statHeliB) + _global.statTB;
_root[("mcLevel" + _global.level) + "Passed"].textBlue.text = "0";
_root[("mcLevel" + _global.level) + "Passed"].blue = 0;
_root[("mcLevel" + _global.level) + "Passed"].blueH = 0;
_root[("mcLevel" + _global.level) + "Passed"].blueC = 0;
_root[("mcLevel" + _global.level) + "Passed"].blueT = 0;
_root[("mcLevel" + _global.level) + "Passed"].blueHeli = 0;
_root[("mcLevel" + _global.level) + "Passed"].gradeUpdate = true;
_root[("mcLevel" + _global.level) + "Passed"].textScore = _global.score;
_root[("mcLevel" + _global.level) + "Passed"].tally = _global.score;
_root[("mcLevel" + _global.level) + "Passed"].bonus = 0;
if (_global.level == 1) {
_root.mcLevel1Passed._visible = true;
_global.level1Ratio = _global.statTotalRed / _global.statTotalBlue;
} else {
_root.mcLevel2Passed._visible = true;
_global.level2Ratio = _global.statTotalRed / _global.statTotalBlue;
if (_global.level1Ratio < 0.8) {
_root.mcLevel2Passed.mcGrade1.gotoAndPlay("F");
} else if (_global.level1Ratio < 1.1) {
_root.mcLevel2Passed.mcGrade1.gotoAndPlay("D");
} else if (_global.level1Ratio < 1.4) {
_root.mcLevel2Passed.mcGrade1.gotoAndPlay("C");
} else if (_global.level1Ratio < 1.8) {
_root.mcLevel2Passed.mcGrade1.gotoAndPlay("B");
} else if (_global.level1Ratio < 2.8) {
_root.mcLevel2Passed.mcGrade1.gotoAndPlay("A");
} else if (_global.level1Ratio >= 2.8) {
_root.mcLevel2Passed.mcGrade1.gotoAndPlay("Aplus");
}
}
_global.statTHR = _global.statTHR + _global.statHR;
_global.statTHB = _global.statTHB + _global.statHB;
_global.statTCR = _global.statTCR + _global.statCR;
_global.statTCB = _global.statTCB + _global.statCB;
_global.statTCop = _global.statTCop + _global.statCop;
_global.statTHeliR = _global.statTHeliR + _global.statHeliR;
_global.statTheliB = _global.statTheliB + _global.statheliB;
_global.statTTR = _global.statTTR + _global.statTR;
_global.statTTB = _global.statTTB + _global.statTB;
} else if (_global.levelDone) {
if (_global.delay <= 0) {
if (Key.isDown(_global.keyFire)) {
_global.levelDone = false;
_global.frozen = false;
_global.level++;
if (_global.level == 2) {
_global.resetGame(_global.level, false);
} else {
_global.soundGlobal.stop();
_global.soundGlobal.attachSound("win music");
_global.soundGlobal.setVolume(100);
_global.soundGlobal.start(0, 10);
gotoAndPlay (255);
}
}
} else {
_global.delay--;
}
}
if (!_global.levelDone) {
if (_root.mcMain.mcTank._xscale == 100) {
if (_root.mcMain._x < 490) {
pan = 12;
} else if (_root.mcMain._x < 498) {
pan = 8;
} else if (pan != 0) {
pan = pan * 0.76;
if (pan < 0.5) {
pan = 0;
}
}
_root.mcMain._x = _root.mcMain._x + pan;
_root.mcCloud1._x = _root.mcCloud1._x + (pan / 8);
_root.mcCloud2._x = _root.mcCloud2._x + (pan / 8);
_root.mcSun._x = _root.mcSun._x + (pan / 12);
_root.mcMountains1._x = _root.mcMountains1._x + (pan / 6);
_root.mcMountains2._x = _root.mcMountains2._x + (pan / 6);
_root.mcMountains3._x = _root.mcMountains3._x + (pan / 6);
} else {
if (_root.mcMain._x > 290) {
pan = -12;
} else if (_root.mcMain._x > 282) {
pan = -8;
} else if (pan != 0) {
pan = pan * 0.76;
if (pan > -0.5) {
pan = 0;
}
}
_root.mcMain._x = _root.mcMain._x + pan;
_root.mcCloud1._x = _root.mcCloud1._x + (pan / 8);
_root.mcCloud2._x = _root.mcCloud2._x + (pan / 8);
_root.mcSun._x = _root.mcSun._x + (pan / 12);
_root.mcMountains1._x = _root.mcMountains1._x + (pan / 6);
_root.mcMountains2._x = _root.mcMountains2._x + (pan / 6);
_root.mcMountains3._x = _root.mcMountains3._x + (pan / 6);
}
lastX = _root.mcMain._x;
lastY = _root.mcMain._y;
}
if (camX != 0) {
_root.mcMain._x = _root.mcMain._x + camX;
_root.mcMain._y = _root.mcMain._y + camY;
camX = camX * -0.8;
if (Math.random() > 0.5) {
camY = camY * -0.7;
} else {
camY = camY * 0.7;
}
if (Math.abs(camX) < 0.6) {
camX = 0;
}
if (Math.abs(camY) < 0.6) {
camY = 0;
}
}
}
_root.mcHud2.textHouseRed.text = _global.statHR;
_root.mcHud2.textHouseBlue.text = _global.statHB;
_root.mcHud2.textCarRed.text = _global.statCR;
_root.mcHud2.textCarBlue.text = _global.statCB;
if (_global.score <= 0) {
_global.score = 0;
}
_root.textScore.text = _global.score;
if (!_global.hatPimp) {
if (_global.statMan >= 80) {
_global.hatPimp = true;
_global.hatArray.push("pimp");
}
}
if (!_global.hatCop) {
if (_global.statCop >= 20) {
_global.hatCop = true;
_global.hatArray.push("cop");
}
}
if (!_global.hatRoman) {
if (_global.statHB >= 60) {
_global.hatRoman = true;
_global.hatArray.push("roman");
}
}
if (!_global.hatFlower) {
if (_global.statTree >= 80) {
_global.hatFlower = true;
_global.hatArray.push("flower");
}
}
if (!_global.hatKing) {
if (_global.statBalloon > 0) {
_global.hatKing = true;
_global.hatArray.push("king");
}
}
if (!_global.hatArmy) {
if (((_global.statHeliB + _global.statHeliR) >= 20) && ((_global.statTB + _global.statTR) >= 20)) {
_global.hatArmy = true;
_global.hatArray.push("army");
}
}
_root.textDebug.text = "";
_root.textDebug2.text = "";
_root.textDebug3.text = "";
};
Instance of Symbol 360 MovieClip "mcSun" in Frame 254
onClipEvent (load) {
lastX = this._x;
lastY = this._y;
}
onClipEvent (enterFrame) {
this._x = lastX;
this._y = lastY;
if (_root.camX != 0) {
this._x = this._x + _root.camX;
this._y = this._y + _root.camY;
}
}
Instance of Symbol 363 MovieClip "mcCloud2" in Frame 254
onClipEvent (load) {
lastX = this._x;
lastY = this._y;
}
onClipEvent (enterFrame) {
this._x = lastX;
this._y = lastY;
this._x = this._x + 0.1;
if (this._x > 970) {
this._x = -170;
}
if (_root.camX != 0) {
this._x = this._x + _root.camX;
this._y = this._y + _root.camY;
} else {
lastX = this._x;
lastY = this._y;
}
}
Instance of Symbol 366 MovieClip "mcCloud1" in Frame 254
onClipEvent (load) {
lastX = this._x;
lastY = this._y;
}
onClipEvent (enterFrame) {
this._x = lastX;
this._y = lastY;
this._x = this._x + 0.12;
if (this._x > 920) {
this._x = -120;
}
if (_root.camX != 0) {
this._x = this._x + _root.camX;
this._y = this._y + _root.camY;
} else {
lastX = this._x;
lastY = this._y;
}
}
Instance of Symbol 369 MovieClip "mcMountains1" in Frame 254
onClipEvent (load) {
lastX = this._x;
lastY = this._y;
}
onClipEvent (enterFrame) {
this._x = lastX;
this._y = lastY;
if (!_global.frozen) {
this._x = this._x - ((_root.mcMain.move * _root.mcMain.speed) / 12);
}
if (this._x <= -805.5) {
this._x = this._x + 2429;
} else if (this._x >= 1620) {
this._x = this._x + -2429;
}
if (_root.camX != 0) {
this._x = this._x + _root.camX;
this._y = this._y + _root.camY;
} else {
lastX = this._x;
lastY = this._y;
}
}
Instance of Symbol 369 MovieClip "mcMountains2" in Frame 254
onClipEvent (load) {
lastX = this._x;
lastY = this._y;
}
onClipEvent (enterFrame) {
this._x = lastX;
this._y = lastY;
if (!_global.frozen) {
this._x = this._x - ((_root.mcMain.move * _root.mcMain.speed) / 12);
}
if (this._x <= -805.5) {
this._x = this._x + 2429;
} else if (this._x >= 1620) {
this._x = this._x + -2429;
}
if (_root.camX != 0) {
this._x = this._x + _root.camX;
this._y = this._y + _root.camY;
} else {
lastX = this._x;
lastY = this._y;
}
}
Instance of Symbol 369 MovieClip "mcMountains3" in Frame 254
onClipEvent (load) {
lastX = this._x;
lastY = this._y;
}
onClipEvent (enterFrame) {
this._x = lastX;
this._y = lastY;
if (!_global.frozen) {
this._x = this._x - ((_root.mcMain.move * _root.mcMain.speed) / 12);
}
if (this._x <= -805.5) {
this._x = this._x + 2429;
} else if (this._x >= 1620) {
this._x = this._x + -2429;
}
if (_root.camX != 0) {
this._x = this._x + _root.camX;
this._y = this._y + _root.camY;
} else {
lastX = this._x;
lastY = this._y;
}
}
Instance of Symbol 475 MovieClip in Frame 254
onClipEvent (enterFrame) {
if (_global.level == 2) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 512 MovieClip "mcPaused" in Frame 254
onClipEvent (load) {
this.gotoAndPlay("unpaused");
}
Instance of Symbol 565 MovieClip "mcLevel1Passed" in Frame 254
onClipEvent (load) {
red = 0;
blue = 0;
redH = 0;
redT = 0;
redC = 0;
redHeli = 0;
blueH = 0;
blueT = 0;
blueC = 0;
blueHeli = 0;
gradeUpdate = false;
bonus = 0;
tally = 0;
}
onClipEvent (enterFrame) {
if (blue < _global.statTotalBlue) {
blue++;
this.textBlue.text = blue;
}
if (red < _global.statTotalRed) {
red++;
this.textRed.text = red;
}
if (blueH < _global.statHB) {
blueH++;
this.textBH.text = blueH;
} else if (blueC < _global.statCB) {
blueC++;
this.textBC.text = blueC;
} else if (blueHeli < _global.statHeliB) {
blueHeli++;
this.textBHeli.text = blueHeli;
} else if (blueT < _global.statTB) {
blueT++;
this.textBT.text = blueT;
}
if (redH < _global.statHR) {
redH++;
this.textRH.text = redH;
} else if (redC < _global.statCR) {
redC++;
this.textRC.text = redC;
} else if (redHeli < _global.statHeliR) {
redHeli++;
this.textRHeli.text = redHeli;
} else if (redT < _global.statTR) {
redT++;
this.textRT.text = redT;
} else if (gradeUpdate) {
gradeUpdate = false;
if (_global[("level" + _global.level) + "Ratio"] < 0.8) {
this.mcGrade.gotoAndPlay("F");
this.mcBonus.gotoAndPlay("F");
bonus = 0;
} else if (_global[("level" + _global.level) + "Ratio"] < 1.1) {
this.mcGrade.gotoAndPlay("D");
this.mcBonus.gotoAndPlay("D");
bonus = 100;
} else if (_global[("level" + _global.level) + "Ratio"] < 1.4) {
this.mcGrade.gotoAndPlay("C");
this.mcBonus.gotoAndPlay("C");
bonus = 500;
} else if (_global[("level" + _global.level) + "Ratio"] < 1.8) {
this.mcGrade.gotoAndPlay("B");
this.mcBonus.gotoAndPlay("B");
bonus = 1000;
} else if (_global[("level" + _global.level) + "Ratio"] < 2.8) {
this.mcGrade.gotoAndPlay("A");
this.mcBonus.gotoAndPlay("A");
bonus = 2000;
} else if (_global[("level" + _global.level) + "Ratio"] >= 2.8) {
this.mcGrade.gotoAndPlay("Aplus");
this.mcBonus.gotoAndPlay("Aplus");
bonus = 3000;
}
_global.score = _global.score + bonus;
}
if (tally < _global.score) {
tally = tally + 23;
} else {
tally = _global.score;
}
this.textScore1.text = tally;
}
Instance of Symbol 580 MovieClip "mcLevel2Passed" in Frame 254
onClipEvent (load) {
red = 0;
blue = 0;
redH = 0;
redT = 0;
redC = 0;
redHeli = 0;
blueH = 0;
blueT = 0;
blueC = 0;
blueHeli = 0;
gradeUpdate = false;
bonus = 0;
tally = 0;
}
onClipEvent (enterFrame) {
if (blue < _global.statTotalBlue) {
blue++;
this.textBlue.text = blue;
}
if (red < _global.statTotalRed) {
red++;
this.textRed.text = red;
}
if (blueH < _global.statHB) {
blueH++;
this.textBH.text = blueH;
} else if (blueC < _global.statCB) {
blueC++;
this.textBC.text = blueC;
} else if (blueHeli < _global.statHeliB) {
blueHeli++;
this.textBHeli.text = blueHeli;
} else if (blueT < _global.statTB) {
blueT++;
this.textBT.text = blueT;
}
if (redH < _global.statHR) {
redH++;
this.textRH.text = redH;
} else if (redC < _global.statCR) {
redC++;
this.textRC.text = redC;
} else if (redHeli < _global.statHeliR) {
redHeli++;
this.textRHeli.text = redHeli;
} else if (redT < _global.statTR) {
redT++;
this.textRT.text = redT;
} else if (gradeUpdate) {
gradeUpdate = false;
if (_global[("level" + _global.level) + "Ratio"] < 0.8) {
this.mcGrade.gotoAndPlay("F");
this.mcBonus.gotoAndPlay("F");
bonus = 0;
} else if (_global[("level" + _global.level) + "Ratio"] < 1.1) {
this.mcGrade.gotoAndPlay("D");
this.mcBonus.gotoAndPlay("D");
bonus = 100;
} else if (_global[("level" + _global.level) + "Ratio"] < 1.4) {
this.mcGrade.gotoAndPlay("C");
this.mcBonus.gotoAndPlay("C");
bonus = 500;
} else if (_global[("level" + _global.level) + "Ratio"] < 1.8) {
this.mcGrade.gotoAndPlay("B");
this.mcBonus.gotoAndPlay("B");
bonus = 1000;
} else if (_global[("level" + _global.level) + "Ratio"] < 2.8) {
this.mcGrade.gotoAndPlay("A");
this.mcBonus.gotoAndPlay("A");
bonus = 2000;
} else if (_global[("level" + _global.level) + "Ratio"] >= 2.8) {
this.mcGrade.gotoAndPlay("Aplus");
this.mcBonus.gotoAndPlay("Aplus");
bonus = 3000;
}
_global.score = _global.score + bonus;
if (_global.level2Ratio > _global.level1Ratio) {
this.mcBonus2.gotoAndPlay("win");
bonus = bonus + 1000;
} else {
this.mcBonus2.gotoAndPlay("lose");
}
}
if (tally < _global.score) {
tally = tally + 23;
} else {
tally = _global.score;
}
this.textScore1.text = tally;
}
Frame 354
stop();
this.onEnterFrame = function () {
if (Key.isDown(_global.keyFire)) {
if (!_global.firePressed) {
_global.firePressed = true;
_global.soundGlobal.stop();
_global.soundGlobal.attachSound("music 01");
_global.soundGlobal.setVolume(100);
_global.soundGlobal.start(0, 10);
play();
}
} else {
_global.firePressed = false;
}
};
Frame 391
_root.mcTank.gotoAndPlay("move");
Frame 466
_root.mcTank.gotoAndPlay("move");
Frame 541
_root.mcTank.gotoAndPlay("move");
Frame 616
_root.mcTank.gotoAndPlay("move");
Frame 691
_root.mcTank.gotoAndPlay("move");
Frame 766
_root.mcTank.gotoAndPlay("move");
Frame 841
_root.mcTank.gotoAndPlay("move");
Frame 916
_root.mcTank.gotoAndPlay("move");
Instance of Symbol 158 MovieClip in Frame 991
onClipEvent (enterFrame) {
_global.soundGlobal.setVolume(_global.soundGlobal.getVolume() - 1);
}
Frame 1076
_global.menuLevel = 1;
_global.mainMenu();
gotoAndPlay (241);
Symbol 80 MovieClip Frame 37
stop();
Symbol 81 MovieClip Frame 5
if (this.state == 1) {
gotoAndPlay (1);
}
Instance of Symbol 80 MovieClip "mcManFall" in Symbol 81 MovieClip Frame 10
onClipEvent (load) {
yVel = Math.random() * -16;
}
onClipEvent (enterFrame) {
if (_name != "mcManFall") {
this._x = this._x - (_parent.move * _parent.speed);
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 3);
this._y = this._y + yVel;
if (this._y > (_global.ground - 246)) {
this.removeMovieClip();
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
this.removeMovieClip();
}
temp++;
}
}
}
Symbol 81 MovieClip Frame 19
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 9
stop();
Symbol 101 MovieClip Frame 19
stop();
Symbol 101 MovieClip Frame 29
stop();
Symbol 101 MovieClip Frame 39
stop();
Symbol 101 MovieClip Frame 49
stop();
Symbol 101 MovieClip Frame 59
stop();
Symbol 101 MovieClip Frame 69
stop();
Symbol 101 MovieClip Frame 79
stop();
Symbol 101 MovieClip Frame 89
stop();
Symbol 101 MovieClip Frame 99
stop();
Symbol 101 MovieClip Frame 109
stop();
Symbol 101 MovieClip Frame 119
stop();
Symbol 101 MovieClip Frame 129
stop();
Symbol 101 MovieClip Frame 139
stop();
Symbol 105 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 9
gotoAndPlay (1);
Symbol 118 MovieClip Frame 9
stop();
Symbol 118 MovieClip Frame 19
stop();
Symbol 118 MovieClip Frame 29
stop();
Symbol 118 MovieClip Frame 30
stop();
Symbol 118 MovieClip Frame 39
stop();
Symbol 118 MovieClip Frame 49
stop();
Symbol 118 MovieClip Frame 59
stop();
Symbol 118 MovieClip Frame 69
stop();
Symbol 118 MovieClip Frame 79
stop();
Symbol 135 MovieClip Frame 13
stop();
Symbol 150 MovieClip Frame 33
stop();
Symbol 151 MovieClip Frame 39
stop();
Symbol 152 MovieClip Frame 9
if ((!this.jumping) && (!this.moving)) {
gotoAndPlay (1);
}
Symbol 152 MovieClip Frame 26
if (this.moving) {
gotoAndPlay (10);
}
Symbol 152 MovieClip Frame 46
if (this.moving) {
gotoAndPlay (30);
}
Symbol 152 MovieClip Frame 63
_global.soundTank.attachSound("tank land");
_global.soundTank.start();
Symbol 152 MovieClip Frame 69
this.jumping = false;
Symbol 152 MovieClip Frame 72
_global.soundTank.setVolume(60);
_global.soundTank.attachSound("tank idle");
_global.soundTank.start(0, 1000);
if (this.moving) {
gotoAndPlay (10);
} else if (this.jumping) {
gotoAndPlay (50);
} else {
gotoAndPlay (1);
}
Symbol 152 MovieClip Frame 80
_global.soundTank.stop();
_global.soundTank.attachSound("missile explode");
_global.soundTank.start();
Symbol 152 MovieClip Frame 84
_global.soundTank.attachSound("missile explode");
_global.soundTank.start();
Symbol 152 MovieClip Frame 88
_global.soundTank.attachSound("missile explode");
_global.soundTank.start();
Symbol 152 MovieClip Frame 91
_global.soundTank.attachSound("missile explode");
_global.soundTank.start();
Symbol 152 MovieClip Frame 112
stop();
Instance of Symbol 160 MovieClip in Symbol 161 MovieClip Frame 1
onClipEvent (load) {
xVel = (Math.random() * 15) + 5;
yVel = (Math.random() * 13) + 14;
}
onClipEvent (enterFrame) {
if (this._y < 1000) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -1100;
this._x = (Math.random() * -750) + 300;
xVel = (Math.random() * 15) + 5;
yVel = (Math.random() * 13) + 14;
}
}
Instance of Symbol 160 MovieClip in Symbol 161 MovieClip Frame 1
onClipEvent (load) {
xVel = (Math.random() * 15) + 5;
yVel = (Math.random() * 13) + 14;
}
onClipEvent (enterFrame) {
if (this._y < 1000) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -1100;
this._x = (Math.random() * -750) + 300;
xVel = (Math.random() * 15) + 5;
yVel = (Math.random() * 13) + 14;
}
}
Symbol 175 MovieClip Frame 9
stop();
Symbol 175 MovieClip Frame 19
stop();
Symbol 175 MovieClip Frame 29
stop();
Symbol 175 MovieClip Frame 39
stop();
Symbol 175 MovieClip Frame 49
stop();
Symbol 175 MovieClip Frame 59
stop();
Symbol 176 MovieClip Frame 9
stop();
Symbol 185 MovieClip Frame 8
stop();
Symbol 191 MovieClip Frame 9
stop();
Symbol 191 MovieClip Frame 19
stop();
Symbol 191 MovieClip Frame 29
stop();
Symbol 191 MovieClip Frame 39
stop();
Symbol 194 MovieClip Frame 13
stop();
Symbol 199 MovieClip Frame 9
stop();
Symbol 199 MovieClip Frame 18
stop();
Symbol 199 MovieClip Frame 28
stop();
Symbol 199 MovieClip Frame 39
stop();
Symbol 205 MovieClip Frame 9
stop();
Symbol 205 MovieClip Frame 19
stop();
Symbol 205 MovieClip Frame 29
stop();
Symbol 220 MovieClip Frame 26
stop();
Symbol 221 MovieClip Frame 9
if (this.active) {
gotoAndPlay (1);
}
Symbol 221 MovieClip Frame 19
stop();
Symbol 236 MovieClip Frame 9
stop();
Symbol 236 MovieClip Frame 19
stop();
Symbol 236 MovieClip Frame 29
stop();
Symbol 236 MovieClip Frame 39
stop();
Symbol 243 MovieClip Frame 9
stop();
Symbol 243 MovieClip Frame 18
stop();
Symbol 243 MovieClip Frame 28
stop();
Symbol 243 MovieClip Frame 39
stop();
Symbol 248 MovieClip Frame 9
stop();
Symbol 248 MovieClip Frame 19
stop();
Symbol 248 MovieClip Frame 29
stop();
Symbol 263 MovieClip Frame 9
stop();
Symbol 264 MovieClip Frame 3
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 264 MovieClip Frame 24
if (this.state == 5) {
gotoAndPlay (70);
} else {
this.state = 1;
gotoAndPlay (1);
}
Symbol 264 MovieClip Frame 64
if (this.state == 2) {
this.state = 1;
gotoAndPlay (1);
}
Symbol 264 MovieClip Frame 81
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("heli explode");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.setPan((this._x - 200) / 4);
_global.soundFX.start();
}
Symbol 264 MovieClip Frame 89
this.state = 6;
stop();
Symbol 282 MovieClip Frame 4
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 282 MovieClip Frame 18
this.state = 1;
gotoAndPlay (1);
Symbol 282 MovieClip Frame 26
if (this.state == 2) {
gotoAndPlay (30);
} else {
this.state = 1;
gotoAndPlay (1);
}
Symbol 282 MovieClip Frame 39
stop();
this.state = 0;
Symbol 294 MovieClip Frame 5
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 294 MovieClip Frame 19
stop();
Symbol 294 MovieClip Frame 29
this.state = 6;
stop();
Symbol 307 MovieClip Frame 4
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 307 MovieClip Frame 18
this.state = 1;
gotoAndPlay (1);
Symbol 307 MovieClip Frame 26
if (this.state == 2) {
gotoAndPlay (30);
} else {
this.state = 1;
gotoAndPlay (1);
}
Symbol 307 MovieClip Frame 39
stop();
this.state = 0;
Symbol 322 MovieClip Frame 3
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 322 MovieClip Frame 19
stop();
Symbol 322 MovieClip Frame 29
this.state = 6;
stop();
Symbol 322 MovieClip Frame 49
stop();
Symbol 328 MovieClip Frame 3
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 328 MovieClip Frame 24
if (this.state == 5) {
gotoAndPlay (70);
} else {
this.state = 1;
gotoAndPlay (1);
}
Symbol 328 MovieClip Frame 64
if (this.state == 2) {
this.state = 1;
gotoAndPlay (1);
}
Symbol 328 MovieClip Frame 81
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("heli explode");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.setPan((this._x - 200) / 4);
_global.soundFX.start();
}
Symbol 328 MovieClip Frame 89
this.state = 6;
stop();
Symbol 329 MovieClip Frame 37
mcTank.mcBody.mcCannon.gotoAndPlay("fire");
Symbol 329 MovieClip Frame 43
mcHouse.gotoAndPlay("one");
mcHouse2.gotoAndPlay("one");
mcHouse3.gotoAndPlay("two");
Symbol 329 MovieClip Frame 148
mcTank.mcBody.mcCannon.gotoAndPlay("fire");
Symbol 329 MovieClip Frame 154
mcHouse.gotoAndPlay("one");
mcHouse2.gotoAndPlay("one");
mcHouse3.gotoAndPlay("two");
Instance of Symbol 328 MovieClip "mcTankR" in Symbol 329 MovieClip Frame 233
onClipEvent (load) {
state = 1;
}
Instance of Symbol 264 MovieClip "mcTankB" in Symbol 329 MovieClip Frame 233
onClipEvent (load) {
state = 1;
}
Instance of Symbol 307 MovieClip "mcHeli" in Symbol 329 MovieClip Frame 233
onClipEvent (load) {
state = 1;
}
Instance of Symbol 282 MovieClip "mcHeliR" in Symbol 329 MovieClip Frame 233
onClipEvent (load) {
state = 1;
}
Instance of Symbol 294 MovieClip in Symbol 329 MovieClip Frame 233
onClipEvent (load) {
state = 1;
}
Instance of Symbol 322 MovieClip "mcCopCar" in Symbol 329 MovieClip Frame 233
onClipEvent (load) {
state = 1;
}
Symbol 329 MovieClip Frame 254
mcTank.mcBody.mcCannon._rotation = mcTank.mcBody.mcCannon._rotation + 5;
Symbol 329 MovieClip Frame 255
mcTank.mcBody.mcCannon._rotation = mcTank.mcBody.mcCannon._rotation + 5;
Symbol 329 MovieClip Frame 256
mcTank.mcBody.mcCannon._rotation = mcTank.mcBody.mcCannon._rotation + 5;
Symbol 329 MovieClip Frame 257
mcTank.mcBody.mcCannon._rotation = mcTank.mcBody.mcCannon._rotation + 5;
Symbol 329 MovieClip Frame 258
mcTank.mcBody.mcCannon._rotation = mcTank.mcBody.mcCannon._rotation + 5;
Symbol 329 MovieClip Frame 259
mcTank.mcBody.mcCannon._rotation = mcTank.mcBody.mcCannon._rotation + 5;
Symbol 329 MovieClip Frame 267
mcTank.mcBody.mcCannon.gotoAndPlay("fire");
Instance of Symbol 221 MovieClip in Symbol 329 MovieClip Frame 267
onClipEvent (load) {
active = true;
}
Symbol 329 MovieClip Frame 273
mcHouse.gotoAndPlay("one");
Symbol 329 MovieClip Frame 275
mcHeliR.gotoAndPlay("boom");
Symbol 329 MovieClip Frame 278
mcHeli.gotoAndPlay("boom");
Symbol 329 MovieClip Frame 280
mcBall.gotoAndPlay("boom");
mcTankR.gotoAndPlay("boom");
mcCopCar.gotoAndPlay("hit");
Symbol 329 MovieClip Frame 282
mcTankB.gotoAndPlay("boom");
Symbol 329 MovieClip Frame 378
_global.menuLevel = 3;
_root.mcMenu.gotoAndPlay("hats");
Symbol 332 MovieClip Frame 9
stop();
Symbol 332 MovieClip Frame 12
gotoAndPlay (1);
Symbol 335 MovieClip Frame 9
stop();
Symbol 335 MovieClip Frame 12
gotoAndPlay (1);
Symbol 346 MovieClip Frame 9
gotoAndPlay (1);
Symbol 346 MovieClip Frame 16
gotoAndPlay (20);
Symbol 346 MovieClip Frame 29
gotoAndPlay (20);
Symbol 346 MovieClip Frame 39
stop();
Symbol 372 MovieClip Frame 9
stop();
Symbol 372 MovieClip Frame 19
stop();
Instance of Symbol 376 MovieClip "mcHit2" in Symbol 377 MovieClip Frame 1
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 377 MovieClip Frame 9
if (this.active) {
gotoAndPlay (1);
}
Instance of Symbol 376 MovieClip "mcHit" in Symbol 377 MovieClip Frame 11
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 377 MovieClip Frame 19
stop();
Symbol 383 MovieClip Frame 10
this.state = 0;
stop();
Symbol 391 MovieClip Frame 9
stop();
Symbol 391 MovieClip Frame 19
stop();
Symbol 391 MovieClip Frame 29
stop();
Symbol 391 MovieClip Frame 39
stop();
Symbol 406 MovieClip Frame 29
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 406 MovieClip Frame 39
stop();
Symbol 418 MovieClip Frame 5
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 418 MovieClip Frame 19
stop();
Symbol 418 MovieClip Frame 29
this.state = 6;
stop();
Instance of Symbol 376 MovieClip "mcHit2" in Symbol 421 MovieClip Frame 1
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 421 MovieClip Frame 9
stop();
Instance of Symbol 376 MovieClip "mcHit" in Symbol 421 MovieClip Frame 13
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 421 MovieClip Frame 36
this.state = 0;
stop();
Symbol 425 MovieClip Frame 9
if (this.state == 1) {
gotoAndPlay (1);
}
Symbol 425 MovieClip Frame 12
if (this.state == 1) {
gotoAndPlay (1);
}
Instance of Symbol 80 MovieClip "mcManFall" in Symbol 425 MovieClip Frame 20
onClipEvent (load) {
yVel = Math.random() * -16;
}
onClipEvent (enterFrame) {
if (_name != "mcManFall") {
this._x = this._x - (_parent.move * _parent.speed);
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 3);
this._y = this._y + yVel;
if (this._y > (_global.ground - 246)) {
this.removeMovieClip();
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
this.removeMovieClip();
}
temp++;
}
}
}
Symbol 425 MovieClip Frame 29
stop();
Symbol 441 MovieClip Frame 9
gotoAndPlay (1);
Instance of Symbol 433 MovieClip "mcHit" in Symbol 441 MovieClip Frame 10
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 60;
} else {
this._alpha = 0;
}
}
onClipEvent (enterFrame) {
if (_global.debugHit) {
this._alpha = 60;
} else {
this._alpha = 0;
}
}
Symbol 441 MovieClip Frame 19
gotoAndPlay (10);
Symbol 441 MovieClip Frame 32
gotoAndPlay (1);
Instance of Symbol 376 MovieClip "mcHit" in Symbol 447 MovieClip Frame 1
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 80;
} else {
this._alpha = 0;
}
}
onClipEvent (enterFrame) {
if (_global.debugHit) {
this._alpha = 80;
} else {
this._alpha = 0;
}
}
Symbol 447 MovieClip Frame 7
if (!_root.mcMain.mcBuddy.shooting) {
this._visible = false;
}
Symbol 448 MovieClip Frame 1
stop();
Instance of Symbol 447 MovieClip "mcFX" in Symbol 448 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.mcMain.mcBuddy.shooting) {
this._visible = true;
}
}
Instance of Symbol 376 MovieClip "mcHit" in Symbol 469 MovieClip Frame 23
onClipEvent (load) {
if (_global.debugHit) {
this._alpha = 100;
} else {
this._alpha = 0;
}
}
Symbol 469 MovieClip Frame 33
stop();
this.state = 0;
Symbol 469 MovieClip Frame 49
stop();
this.state = 0;
Symbol 470 MovieClip Frame 1
move = 0;
speed = 8;
dBall0 = 600;
dLand0 = 50;
dHouseBack0 = 100;
dHouseFront0 = 700;
dTank0 = 300;
dBuddy0 = 400;
dCar0 = 200;
dTankSmall0 = 220;
dBalloon0 = 40;
dHeli0 = 250;
dDebris0 = 140;
dEnemy0 = 500;
dTankFX0 = 310;
dBall = dBall0;
dLand = dLand0;
dHouseBack = dHouseback0;
dHouseFront = dHouseFront0;
dDebris = dDebris0;
dEnemy = dEnemy0;
dTankFX = dTankFX0;
dBuddy = dBuddy0;
missiles = 0;
debrisMAX = 12;
enemyMAX = 16;
tankFXMAX = 8;
newHouseName = "";
newHouseDepth = 0;
newHouseX = 0;
newHouseY = 0;
newHouseRed = true;
treeNum = 0;
makeNewHouseBack = function (red) {
if (red) {
_root.mcMain.mcHouseSmallTwo.duplicateMovieClip("houseRed" + dHouseBack, dHouseBack);
_root.mcMain["houseRed" + dHouseBack]._x = base + (Math.random() * 140);
if (Math.random() < 0.5) {
_root.mcMain["houseRed" + dHouseBack]._xscale = 100;
} else {
_root.mcMain["houseRed" + dHouseBack]._xscale = -100;
}
_root.mcMain["houseRed" + dHouseBack]._y = 118.3 + (Math.random() * 9);
} else {
_root.mcMain.mcHouseSmallOne.duplicateMovieClip("houseBlue" + dHouseBack, dHouseBack);
_root.mcMain["houseBlue" + dHouseBack]._x = base + (Math.random() * 140);
if (Math.random() < 0.5) {
_root.mcMain["houseBlue" + dHouseBack]._xscale = 100;
} else {
_root.mcMain["houseBlue" + dHouseBack]._xscale = -100;
}
_root.mcMain["houseBlue" + dHouseBack]._y = 118.3 + (Math.random() * 9);
}
};
makeNewHouseFront = function (red) {
if (red) {
_root.mcMain.mcHouseSmallTwo.duplicateMovieClip("houseRed" + dHouseFront, dHouseFront);
_root.mcMain["houseRed" + dHouseFront]._x = base + (Math.random() * 140);
if (Math.random() < 0.5) {
_root.mcMain["houseRed" + dHouseFront]._xscale = 100;
} else {
_root.mcMain["houseRed" + dHouseFront]._xscale = -100;
}
_root.mcMain["houseRed" + dHouseFront]._y = 170.3 + (Math.random() * 9);
} else {
_root.mcMain.mcHouseSmallOne.duplicateMovieClip("houseBlue" + dHouseFront, dHouseFront);
_root.mcMain["houseBlue" + dHouseFront]._x = base + (Math.random() * 140);
if (Math.random() < 0.5) {
_root.mcMain["houseBlue" + dHouseFront]._xscale = 100;
} else {
_root.mcMain["houseBlue" + dHouseFront]._xscale = -100;
}
_root.mcMain["houseBlue" + dHouseFront]._y = 170.3 + (Math.random() * 9);
}
};
makeNewTreeBack = function () {
_root.mcMain.mcTree.duplicateMovieClip("tree" + dHouseBack, dHouseBack);
_root.mcMain["tree" + dHouseBack]._x = base + (Math.random() * 80);
_root.mcMain["tree" + dHouseBack]._y = 120 + (Math.random() * 12);
};
makeNewTreeFront = function () {
_root.mcMain.mcTree.duplicateMovieClip("tree" + ((dHouseFront0 + 13) - treeNum), (dHouseFront0 + 13) - treeNum);
_root.mcMain["tree" + ((dHouseFront0 + 13) - treeNum)]._x = base + (Math.random() * 80);
_root.mcMain["tree" + ((dHouseFront0 + 13) - treeNum)]._y = 210 + ((Math.random() * treeNum) * -6);
};
_global.resetGame = function (level, reset) {
_global.soundGlobal.stop();
_global.soundMusic.start(0, 1000);
_global.soundHeli.setVolume(0);
_global.gameover = false;
_global.paused = false;
_global.level = level;
_global.levelDone = false;
_root.mcLevel1Passed._visible = false;
_root.mcLevel2Passed._visible = false;
_root.mcLevel1Passed.mcGrade.gotoAndPlay("idle");
_root.mcLevel2Passed.mcGrade.gotoAndPlay("idle");
if (level == 1) {
_root.mcLevel.gotoAndPlay("one");
} else {
_root.mcLevel.gotoAndPlay("two");
}
_global.statHR = 0;
_global.statHB = 0;
_global.statCR = 0;
_global.statCB = 0;
_global.statCop = 0;
_global.statHeliR = 0;
_global.statheliB = 0;
_global.statTR = 0;
_global.statTB = 0;
_global.statMan = 0;
_global.statTree = 0;
_global.statBalloon = 0;
if (reset) {
_global.score = 0;
_global.statTHR = 0;
_global.statTHB = 0;
_global.statTCR = 0;
_global.statTCB = 0;
_global.statTCop = 0;
_global.statTHeliR = 0;
_global.statTheliB = 0;
_global.statTTR = 0;
_global.statTTB = 0;
}
_root.mcReplay._visible = false;
_root.mcQuit._visible = false;
_root.mcHUD.mcHealth.gotoAndPlay("full");
_root.mcMain.mcTankShadow._visible = true;
_root.mcMain.mcTank.swapDepths(dTank0);
_root.mcMain.mcTankShadow.swapDepths(dTank0 - 1);
_root.mcMain.mcBuddy.swapDepths(dBuddy0);
with (_root.mcMain.mcTank) {
gotoAndPlay("idle");
mcBody.gotoAndPlay("grump0");
health = 900;
healthLast = 900;
yVel = 0;
state = 1;
delay = 0;
fireCount = 10;
fire2Count = 10;
moving = false;
jumping = false;
updateHealth = true;
shot = 0;
mcBody.mcHat.gotoAndPlay(_global.hatArray[_global.hat]);
}
_global.soundTank.stop();
_global.soundTank.setVolume(60);
_global.soundTank.attachSound("tank idle");
_global.soundTank.start(0, 1000);
i = dDebris0;
while (i < (dDebris0 + debrisMAX)) {
_root.mcMain["debris" + i].removeMovieClip();
i++;
}
i = dEnemy0;
while (i < (dEnemy0 + enemyMAX)) {
_root.mcMain["enemy" + i].removeMovieClip();
i++;
}
i = 1;
while (i <= 3) {
_root.mcMain["mcCarBlue" + i].respawn();
_root.mcMain["mcCarRed" + i].respawn();
i++;
}
_root.mcMain.mcCopCar.respawn();
_root.mcMain.mcHeli.respawn();
_root.mcMain.mcHeliRed.respawn();
_root.mcMain.mcHeli2.respawn();
_root.mcMain.mcHeliRed2.respawn();
_root.mcMain.mcHeli3.respawn();
_root.mcMain.mcHeliRed3.respawn();
_root.mcMain.mcTankSmall.respawn();
_root.mcMain.mcTankSmallRed.respawn();
_root.mcMain.mcBalloon.respawn();
i = dBall0;
while (i < (dBall0 + 3)) {
_root.mcMain["ball" + i].removeMovieClip();
i++;
}
i = dBall0 + 10;
while (i < (dBall0 + 13)) {
_root.mcMain["missile" + i].removeMovieClip();
i++;
}
_root.pan = 0;
_root.camX = 0;
_root.camY = 0;
base = -800;
dLand = dLand0;
while (dLand < (dland0 + 5)) {
_root.mcMain.mcLand1.duplicateMovieClip("land" + dLand, dLand);
_root.mcMain["land" + dLand]._x = base;
if (_global.level == 1) {
_root.mcMain["land" + dLand].gotoAndPlay("grass");
} else {
_root.mcMain["land" + dLand].gotoAndPlay("snow");
}
base = base + 355.9;
dLand++;
}
num = 274;
base = -800;
dHouseBack = dHouseBack0;
while (dHouseBack < (dHouseBack0 + 9)) {
if (Math.random() < 0.5) {
makeNewHouseBack(true);
base = base + num;
dHouseBack++;
makeNewHouseBack(false);
base = base + num;
dHouseBack++;
makeNewTreeBack();
base = base + (num / 4);
} else {
makeNewHouseBack(false);
base = base + num;
dHouseBack++;
makeNewHouseBack(true);
base = base + num;
dHouseBack++;
makeNewTreeBack();
base = base + (num / 4);
}
dHouseBack++;
}
base = -800;
treeNum = 0;
dHouseFront = dHouseFront0;
while (dHouseFront < (dHouseFront0 + 9)) {
if (Math.random() < 0.5) {
makeNewHouseFront(true);
base = base + num;
dHouseFront++;
makeNewHouseFront(false);
base = base + num;
treeNum++;
makeNewTreeFront();
base = base + (num / 4);
} else {
makeNewHouseFront(false);
base = base + num;
dHouseFront++;
makeNewHouseFront(true);
base = base + num;
treeNum++;
makeNewTreeFront();
base = base + (num / 4);
}
dHouseFront++;
}
};
Instance of Symbol 372 MovieClip "mcLand1" in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_name != "mcLand1") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -840) {
this._x = this._x + 1778;
} else if (this._x > 950) {
this._x = this._x + -1778;
}
}
}
Instance of Symbol 236 MovieClip "mcHouseSmallOne" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 10) {
state = state + 2;
} else {
state = state + 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 110) {
state = state + 1;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 60) {
state = state + 2;
} else {
state = 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
this.gotoAndPlay("two");
return;
case 3 :
_global.statHB++;
_global.score = _global.score + _global.scoreHB;
if (Math.random() > 0.6) {
temp = this.getDepth() - 10;
_parent.mcMan.duplicateMovieClip("man" + temp, temp);
if (this._x > _parent.mcTank._x) {
_parent["man" + temp]._xscale = -100;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y + 20;
var num = Math.ceil(Math.random() * 7);
switch (num) {
case 1 :
_global.soundMan.attachSound("man scream 01");
break;
case 2 :
_global.soundMan.attachSound("man scream 02");
break;
case 3 :
_global.soundMan.attachSound("man scream 03");
break;
case 4 :
_global.soundMan.attachSound("man scream 04");
break;
case 5 :
_global.soundMan.attachSound("man scream 05");
break;
case 6 :
_global.soundMan.attachSound("man scream 06");
break;
case 7 :
_global.soundMan.attachSound("man scream 07");
break;
default :
_global.soundMan.attachSound("man scream 01");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
this.gotoAndPlay("three");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcHouseSmallOne") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = 1750 - (Math.random() * 30);
_parent.newHouseY = this._y;
_parent.newHouseRed = false;
this.removeMovieClip();
} else if (this._x > 920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = Math.random() * 30;
_parent.newHouseY = this._y;
_parent.newHouseRed = false;
this.removeMovieClip();
}
if (((state == 0) || (state == 1)) || (state == 2)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 152 MovieClip "mcTank" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
speedRot = 2.5;
health = 900;
yVel = 0;
state = 1;
delay = 0;
fireCount = 0;
fire2Count = 0;
moving = false;
jumping = false;
updateHealth = false;
shot = 0;
_global.resetGame(1, true);
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
_parent.move = 0;
healthLast = health;
if (state == 1) {
if (Key.isDown(_global.keyRight)) {
if ((!moving) && (!jumping)) {
this.gotoAndPlay("move");
moving = true;
_global.soundTank.stop();
_global.soundTank.setVolume(100);
_global.soundTank.attachSound("tank move");
_global.soundTank.start(0, 1000);
}
this._xscale = -100;
_parent.move = 1;
} else if (Key.isDown(_global.keyLeft)) {
if ((!moving) && (!jumping)) {
_root.pan = 0;
this.gotoAndPlay("move");
moving = true;
_global.soundTank.stop();
_global.soundTank.setVolume(100);
_global.soundTank.attachSound("tank move");
_global.soundTank.start(0, 1000);
}
this._xscale = 100;
_parent.move = -1;
} else if (Key.isDown(_global.keyBack)) {
if ((!moving) && (!jumping)) {
_root.pan = 0;
this.gotoAndPlay("moveBack");
moving = true;
_global.soundTank.stop();
_global.soundTank.setVolume(100);
_global.soundTank.attachSound("tank move");
_global.soundTank.start(0, 1000);
}
if (this._xscale == 100) {
_parent.move = 1;
} else {
_parent.move = -1;
}
} else if (moving) {
moving = false;
if (!jumping) {
this.gotoAndPlay("idle");
_global.soundTank.stop();
_global.soundTank.setVolume(60);
_global.soundTank.attachSound("tank idle");
_global.soundTank.start(0, 1000);
}
}
if (Key.isDown(_global.keyJump)) {
if (!jumping) {
jumping = true;
moving = false;
this.gotoAndPlay("jump");
_global.soundTank.stop();
_global.soundTank.setVolume(100);
_global.soundTank.attachSound("tank jump");
_global.soundTank.start();
}
}
if (Key.isDown(_global.keyUp1)) {
if (!_global.upPressed) {
_global.upPressed = true;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("cannon rotate");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
if (this.mcBody.mcCannon._rotation < 40) {
this.mcBody.mcCannon._rotation = this.mcBody.mcCannon._rotation + speedRot;
} else {
this.mcBody.mcCannon._rotation = 40;
}
} else if (_global.upPressed) {
_global.upPressed = false;
_global.soundFX.stop("cannon rotate");
_global.soundFXDone();
}
if (Key.isDown(_global.keyDown1)) {
if (!_global.downPressed) {
_global.downPressed = true;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("cannon rotate");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
if (this.mcBody.mcCannon._rotation > -30) {
this.mcBody.mcCannon._rotation = this.mcBody.mcCannon._rotation - speedRot;
} else {
this.mcBody.mcCannon._rotation = -30;
}
} else if (_global.downPressed) {
_global.downPressed = false;
_global.soundFX.stop("cannon rotate");
_global.soundFXDone();
}
if (shot > 0) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("shot 01");
}
if (temp > 0.33) {
_global.soundFX.attachSound("shot 02");
} else {
_global.soundFX.attachSound("shot 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
if (shot > 8) {
shot = 8;
}
while (shot > 0) {
shot--;
health--;
_parent.dTankFX++;
if (_parent.dTankFX > (_parent.dTankFX0 + _parent.tankFXMAX)) {
_parent.dTankFX = _parent.dTankFX0;
}
_parent.mcHitOne.duplicateMovieClip("fx" + _parent.dTankFX, _parent.dTankFX);
_parent["fx" + _parent.dTankFX]._x = (this._x - 76) + (Math.random() * 140);
_parent["fx" + _parent.dTankFX]._y = (this._y - 80) + (Math.random() * 150);
_parent["fx" + _parent.dTankFX]._xscale = 50;
_parent["fx" + _parent.dTankFX]._yscale = 50;
}
updateHealth = true;
}
if (Key.isDown(_global.keyFire) && (fireCount <= 0)) {
this.mcBody.mcCannon.gotoAndPlay("fire");
fireCount = 15;
_parent.dBall++;
if (_parent.dBall > (_parent.dBall0 + 2)) {
_parent.dBall = _parent.dBall0;
}
_parent.mcBall.duplicateMovieClip("ball" + _parent.dBall, _parent.dBall);
if (this._xscale == 100) {
_parent["ball" + _parent.dBall]._xscale = 100;
_parent["ball" + _parent.dBall]._x = (this._x - 60) + (this.mcBody.mcCannon._rotation / 5);
_parent["ball" + _parent.dBall].xVel = -30 + (this.mcBody.mcCannon._rotation / 3);
} else {
_parent["ball" + _parent.dBall]._xscale = -100;
_parent["ball" + _parent.dBall]._x = (this._x + 60) - (this.mcBody.mcCannon._rotation / 5);
_parent["ball" + _parent.dBall].xVel = 30 - (this.mcBody.mcCannon._rotation / 3);
}
_parent["ball" + _parent.dBall]._y = (this.mcBody._y + 120) - (this.mcBody.mcCannon._rotation * 1.24);
_parent["ball" + _parent.dBall].yVel = this.mcBody.mcCannon._rotation / -2;
_global.soundBall.attachSound("cannon fire");
_global.soundBall.start();
}
if (Key.isDown(_global.keyFire2)) {
if ((!fire2Pressed) && (fire2Count <= 0)) {
fire2Count = 21;
fire2Pressed = true;
temp = (_parent.dBall0 + 10) + _parent.missiles;
_parent.mcMissile.duplicateMovieClip("missile" + temp, temp);
if (this._xscale == 100) {
_parent["missile" + temp]._x = this._x + 28;
} else {
_parent["missile" + temp]._x = this._x - 28;
}
if (temp2 > 0.5) {
_parent["missile" + temp]._xscale = -100;
}
_parent["missile" + temp]._y = -2000;
_parent["missile" + temp].state = 1;
_parent.missiles++;
_global.soundMissile.attachSound("missile fire");
_global.soundMissile.setPan((this._x - 200) / 4);
_global.soundMissile.start();
temp = (_parent.dBall0 + 20) + _parent.missiles;
_parent.mcMissileFX.duplicateMovieClip("missileFX" + temp, temp);
if (this._xscale == 100) {
_parent["missileFX" + temp]._x = this._x + 30;
} else {
_parent["missileFX" + temp]._x = this._x - 30;
}
_parent["missileFX" + temp]._xscale = this._xscale;
_parent["missileFX" + temp]._y = this._y - 80;
}
} else {
fire2Pressed = false;
}
if (updateHealth) {
if ((healthLast > 800) && (health <= 800)) {
_root.mcHUD.mcHealth.gotoAndPlay("eight");
} else if ((healthLast > 700) && (health <= 700)) {
_root.mcHUD.mcHealth.gotoAndPlay("seven");
} else if ((healthLast > 600) && (health <= 600)) {
_root.mcHUD.mcHealth.gotoAndPlay("six");
this.mcBody.gotoAndPlay("grump1");
} else if ((healthLast > 500) && (health <= 500)) {
_root.mcHUD.mcHealth.gotoAndPlay("five");
} else if ((healthLast > 400) && (health <= 400)) {
_root.mcHUD.mcHealth.gotoAndPlay("four");
} else if ((healthLast > 300) && (health <= 300)) {
_root.mcHUD.mcHealth.gotoAndPlay("three");
} else if ((healthLast > 200) && (health <= 200)) {
_root.mcHUD.mcHealth.gotoAndPlay("two");
this.mcBody.gotoAndPlay("grump2");
} else if ((healthLast > 100) && (health <= 100)) {
_root.mcHUD.mcHealth.gotoAndPlay("one");
}
updateHealth = false;
if (health <= 0) {
_root.mcHUD.mcHealth.gotoAndPlay("zero");
state = 2;
delay = 160;
_parent.mcTankShadow._visible = false;
_global.player2 = false;
_root.camX = 55;
_root.camY = 50;
_root.mcGameover.gotoAndPlay("gameover");
_root.mcMain.mcTank.gotoAndPlay("death");
}
}
if (fireCount > 0) {
fireCount--;
}
if (fire2Count > 0) {
fire2Count--;
}
if (_parent.missiles > 2) {
_parent.missiles = 0;
}
} else if (state == 2) {
delay--;
if (delay < 0) {
delay = 0;
state = 0;
_global.gameover = true;
}
}
}
}
Instance of Symbol 374 MovieClip "mcTankShadow" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
this._x = _parent.mcTank._x;
}
Instance of Symbol 377 MovieClip "mcBall" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
active = true;
}
onClipEvent (enterFrame) {
if (this._name != "mcBall") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if (this._y < (_global.ground - 246)) {
yVel = yVel + _global.gravity;
this._x = this._x + xVel;
this._y = this._y + yVel;
} else if (active) {
_root.camX = 2;
_root.camY = 3;
active = false;
this.gotoAndPlay("boom");
var temp = Math.random();
if (temp > 0.5) {
_global.soundBall.attachSound("cannon explode 01");
} else {
_global.soundBall.attachSound("cannon explode 02");
}
_global.soundBall.setPan((this._x - 200) / 4);
_global.soundBall.start();
}
}
}
}
Instance of Symbol 383 MovieClip "mcMissileFX" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
state = 1;
}
onClipEvent (enterFrame) {
if (_name != "mcMissileFX") {
this._x = this._x - (_parent.move * _parent.speed);
if ((state = 0)) {
this.removeMovieClip();
}
}
}
Instance of Symbol 385 MovieClip "mcDebris" in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_name != "mcDebris") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
}
}
Instance of Symbol 191 MovieClip "mcHouseSmallTwo" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 10) {
state = state + 2;
} else {
state = state + 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 110) {
state = state + 1;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 60) {
state = state + 2;
} else {
state = 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
this.gotoAndPlay("two");
return;
case 3 :
_global.statHR++;
_global.score = _global.score + _global.scoreHR;
if (Math.random() > 0.6) {
temp = this.getDepth() - 10;
_parent.mcMan.duplicateMovieClip("man" + temp, temp);
if (this._x > _parent.mcTank._x) {
_parent["man" + temp]._xscale = -100;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y + 20;
var num = Math.ceil(Math.random() * 7);
switch (num) {
case 1 :
_global.soundMan.attachSound("man scream 01");
break;
case 2 :
_global.soundMan.attachSound("man scream 02");
break;
case 3 :
_global.soundMan.attachSound("man scream 03");
break;
case 4 :
_global.soundMan.attachSound("man scream 04");
break;
case 5 :
_global.soundMan.attachSound("man scream 05");
break;
case 6 :
_global.soundMan.attachSound("man scream 06");
break;
case 7 :
_global.soundMan.attachSound("man scream 07");
break;
default :
_global.soundMan.attachSound("man scream 01");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
this.gotoAndPlay("three");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcHouseSmallTwo") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = 1750 - (Math.random() * 30);
_parent.newHouseY = this._y;
_parent.newHouseRed = true;
this.removeMovieClip();
} else if (this._x > 920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = Math.random() * 30;
_parent.newHouseY = this._y;
_parent.newHouseRed = true;
this.removeMovieClip();
}
if (((state == 0) || (state == 1)) || (state == 2)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 243 MovieClip "mcHouseBigOne" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 10) {
state = state + 2;
} else {
state = state + 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 110) {
state = state + 1;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 60) {
state = state + 2;
} else {
state = 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
this.gotoAndPlay("two");
return;
case 3 :
_global.statHB++;
_global.score = _global.score + _global.scoreHB;
if (Math.random() > 0.3) {
temp = this.getDepth() - 10;
_parent.mcMan.duplicateMovieClip("man" + temp, temp);
if (this._x > _parent.mcTank._x) {
_parent["man" + temp]._xscale = -100;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y + 20;
var num = Math.ceil(Math.random() * 7);
switch (num) {
case 1 :
_global.soundMan.attachSound("man scream 01");
break;
case 2 :
_global.soundMan.attachSound("man scream 02");
break;
case 3 :
_global.soundMan.attachSound("man scream 03");
break;
case 4 :
_global.soundMan.attachSound("man scream 04");
break;
case 5 :
_global.soundMan.attachSound("man scream 05");
break;
case 6 :
_global.soundMan.attachSound("man scream 06");
break;
case 7 :
_global.soundMan.attachSound("man scream 07");
break;
default :
_global.soundMan.attachSound("man scream 01");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
if (Math.random() > 0.2) {
temp = this.getDepth() - 11;
_parent.mcManFall.duplicateMovieClip("man" + temp, temp);
if (this._x < _parent.mctank._x) {
_parent["man" + temp].xVel = Math.random() * (-8);
} else {
_parent["man" + temp].xVel = Math.random() * 8;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y - 100;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
this.gotoAndPlay("three");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcHouseBigOne") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = 1750 - (Math.random() * 30);
_parent.newHouseY = this._y;
_parent.newHouseRed = false;
this.removeMovieClip();
} else if (this._x > 920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = Math.random() * 30;
_parent.newHouseY = this._y;
_parent.newHouseRed = false;
this.removeMovieClip();
}
if (((state == 0) || (state == 1)) || (state == 2)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 199 MovieClip "mcHouseBigTwo" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 10) {
state = state + 2;
} else {
state = state + 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 110) {
state = state + 1;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 60) {
state = state + 2;
} else {
state = 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
this.gotoAndPlay("two");
return;
case 3 :
_global.statHR++;
_global.score = _global.score + _global.scoreHR;
if (Math.random() > 0.3) {
temp = this.getDepth() - 10;
_parent.mcMan.duplicateMovieClip("man" + temp, temp);
if (this._x > _parent.mcTank._x) {
_parent["man" + temp]._xscale = -100;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y + 20;
var num = Math.ceil(Math.random() * 7);
switch (num) {
case 1 :
_global.soundMan.attachSound("man scream 01");
break;
case 2 :
_global.soundMan.attachSound("man scream 02");
break;
case 3 :
_global.soundMan.attachSound("man scream 03");
break;
case 4 :
_global.soundMan.attachSound("man scream 04");
break;
case 5 :
_global.soundMan.attachSound("man scream 05");
break;
case 6 :
_global.soundMan.attachSound("man scream 06");
break;
case 7 :
_global.soundMan.attachSound("man scream 07");
break;
default :
_global.soundMan.attachSound("man scream 01");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
if (Math.random() > 0.2) {
temp = this.getDepth() - 11;
_parent.mcManFall.duplicateMovieClip("man" + temp, temp);
if (this._x < _parent.mctank._x) {
_parent["man" + temp].xVel = Math.random() * (-8);
} else {
_parent["man" + temp].xVel = Math.random() * 8;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y - 100;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
this.gotoAndPlay("three");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcHouseBigTwo") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = 1750 - (Math.random() * 30);
_parent.newHouseY = this._y;
_parent.newHouseRed = true;
this.removeMovieClip();
} else if (this._x > 920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = Math.random() * 30;
_parent.newHouseY = this._y;
_parent.newHouseRed = true;
this.removeMovieClip();
}
if (((state == 0) || (state == 1)) || (state == 2)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 391 MovieClip "mcTree" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 10) {
state = state + 2;
} else {
state = state + 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 110) {
state = state + 1;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 60) {
state = state + 2;
} else {
state = 3;
}
if (state > 3) {
state = 3;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
this.gotoAndPlay("two");
return;
case 3 :
_global.statTree++;
this.gotoAndPlay("three");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcTree") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
this._x = 890 + (Math.random() * 29);
state = 0;
this.gotoAndPlay("zero");
} else if (this._x > 920) {
this._x = -890 + (Math.random() * -29);
state = 0;
this.gotoAndPlay("zero");
}
if (((state == 0) || (state == 1)) || (state == 2)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 81 MovieClip "mcMan" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
_global.score = _global.score + _global.scoreMan;
this.gotoAndPlay("hit");
if (this._x < _parent["missile" + temp]._x) {
this.xVel = Math.random() * -8;
} else {
this.xVel = Math.random() * 8;
}
this.yVel = -10 + (Math.random() * -12);
this._y = this._y + -10;
state = 2;
count = _parent.dBall0 + 13;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
count++;
}
}
xVel = 4 + (Math.random() * 2);
yVel = 0;
state = 1;
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
if (_name != "mcMan") {
this._x = this._x - (_parent.move * _parent.speed);
if (state == 1) {
if (this._xscale == 100) {
this._x = this._x + (-xVel);
} else {
this._x = this._x + xVel;
}
if ((this._x < -900) || (this._x > 900)) {
this.removeMovieClip();
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
_global.score = _global.score + _global.scoreMan;
_global.statMan++;
this.gotoAndPlay("hit");
if (this._x < _parent["ball" + temp]._x) {
this.xVel = Math.random() * -8;
} else {
this.xVel = Math.random() * 8;
}
this.yVel = -10 + (Math.random() * -12);
this._y = this._y + -10;
state = 2;
temp = _parent.dBall0 + 3;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
temp++;
}
if (state != 2) {
hitTestMissile();
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 3);
this._y = this._y + yVel;
if (this._y > (_global.ground - 190)) {
this.removeMovieClip();
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
this.removeMovieClip();
}
temp++;
}
}
}
}
}
Instance of Symbol 307 MovieClip "mcHeli" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 0;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = 0;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
stopDist = 170 + (Math.random() * 60);
life = 10;
this.gotoAndPlay("idle");
state = 1;
_global.soundHeliIdle();
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(0);
_global.soundHeli.start(0, 1000);
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
}
count = _parent.dBall0 + 3;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
this._y = this._y + 4;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
}
count = _parent.dBall0 + 13;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + -4;
} else {
this._x = this._x + 4;
}
this._y = this._y + 7;
life--;
if (life <= 0) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
} else {
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dHeli0);
xVelMAX = 5;
rotMAX = 18;
fireCount = 0;
stopDist = 200;
life = 10;
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && (_global.delayHeli <= (_global.statHB + _global.statCB))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
if (state == 1) {
if (this._x < (_parent.mcTank._x - stopDist)) {
xVel = xVel + 0.5;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else if (this._x > (_parent.mcTank._x + stopDist)) {
xVel = xVel + -0.5;
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (xVel != 0) {
xVel = xVel * 0.9;
if (Math.abs(xVel) < 0.15) {
xVel = 0;
}
}
this._x = this._x + xVel;
if ((this._xscale == -100) && ((this._x - _parent.mcTank._x) < -40)) {
state = 3;
this._xscale = 100;
this.gotoAndPlay("turn");
} else if ((this._xscale == 100) && ((this._x - _parent.mcTank._x) > 40)) {
state = 3;
this._xscale = -100;
this.gotoAndPlay("turn");
}
this._rotation = (xVel / xVelMAX) * rotMAX;
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 230)) && (Math.random() > 0.9)) {
fireCount = 6;
this.mcFire._visible = true;
_parent.mcTank.shot = _parent.mcTank.shot + 2;
_global.soundHeli.stop();
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.attachSound("heli fire");
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
_global.soundHeli.onSoundComplete = _global.soundHeliIdle;
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
this.mcFire._visible = false;
}
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
} else if (state == 3) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
} else if (state == 0) {
respawn();
}
}
}
Instance of Symbol 282 MovieClip "mcHeliRed" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 0;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = 0;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
stopDist = 170 + (Math.random() * 60);
life = 10;
this.gotoAndPlay("idle");
state = 1;
_global.soundHeliIdle();
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(0);
_global.soundHeli.start(0, 1000);
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
}
count = _parent.dBall0 + 3;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
this._y = this._y + 4;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
}
count = _parent.dBall0 + 13;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + -4;
} else {
this._x = this._x + 4;
}
this._y = this._y + 7;
life--;
if (life <= 0) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
} else {
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dHeli0 + 1);
xVelMAX = 5;
rotMAX = 18;
fireCount = 0;
stopDist = 200;
life = 10;
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && (_global.delayHeli <= (_global.statHR + _global.statCR))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
if (state == 1) {
if (this._x < (_parent.mcTank._x - stopDist)) {
xVel = xVel + 0.5;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else if (this._x > (_parent.mcTank._x + stopDist)) {
xVel = xVel + -0.5;
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (xVel != 0) {
xVel = xVel * 0.9;
if (Math.abs(xVel) < 0.15) {
xVel = 0;
}
}
this._x = this._x + xVel;
if ((this._xscale == -100) && ((this._x - _parent.mcTank._x) < -40)) {
state = 3;
this._xscale = 100;
this.gotoAndPlay("turn");
} else if ((this._xscale == 100) && ((this._x - _parent.mcTank._x) > 40)) {
state = 3;
this._xscale = -100;
this.gotoAndPlay("turn");
}
this._rotation = (xVel / xVelMAX) * rotMAX;
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 230)) && (Math.random() > 0.9)) {
fireCount = 6;
this.mcFire._visible = true;
_parent.mcTank.shot = _parent.mcTank.shot + 2;
_global.soundHeli.stop();
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
_global.soundHeli.attachSound("heli fire");
_global.soundHeli.onSoundComplete = _global.soundHeliIdle;
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
this.mcFire._visible = false;
}
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
} else if (state == 3) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
} else if (state == 0) {
respawn();
}
}
}
Instance of Symbol 406 MovieClip "mcBalloon" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 1;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = -1;
this._xscale = 100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
yVel = 0.2;
if (xVel > 0) {
_xscale = 100;
} else {
_xscale = -100;
}
this.gotoAndPlay("hit");
_global.statBalloon++;
_global.score = _global.score + _global.scoreBalloon;
count = _parent.dBall0 + 3;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("heli explode");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
yVel = 0.2;
if (xVel > 0) {
_xscale = 100;
} else {
_xscale = -100;
}
this.gotoAndPlay("hit");
_global.statBalloon++;
_global.score = _global.score + _global.scoreBalloon;
count = _parent.dBall0 + 13;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("heli explode");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
count++;
}
}
function hitTestP2() {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
state = 2;
yVel = 0.2;
if (xVel > 0) {
_xscale = 100;
} else {
_xscale = -100;
}
this.gotoAndPlay("hit");
_global.statBalloon++;
_global.score = _global.score + _global.scoreBalloon;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("heli explode");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
this.swapDepths(_parent.dBalloon0);
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && (_global.delayBalloon <= (_global.statHB + _global.statHR))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
if (Math.random() > 0.994) {
respawn();
}
}
if (state == 1) {
this._x = this._x + xVel;
this._y = this._y + yVel;
hitTestBall();
if (state != 2) {
hitTestMissile();
}
if (_global.player2 && (state != 2)) {
hitTestP2();
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + 0.35;
this._y = this._y + yVel;
if (this._y > (_global.ground - 130)) {
state = 0;
}
} else if (state == 0) {
if (Math.random() > 0.994) {
respawn();
}
}
}
}
Instance of Symbol 408 MovieClip "mcDebris2" in Symbol 470 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_name != "mcDebris2") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
}
}
Instance of Symbol 80 MovieClip "mcManFall" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
yVel = Math.random() * -16;
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
if (_name != "mcManFall") {
this._x = this._x - (_parent.move * _parent.speed);
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 3);
this._y = this._y + yVel;
if (this._y > (_global.ground - 246)) {
this.removeMovieClip();
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
_global.statMan++;
this.removeMovieClip();
}
temp++;
}
}
}
}
Instance of Symbol 418 MovieClip "mcCarBlue1" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dCar0);
respawn();
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if (hitTest(_parent.mcTank)) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
}
}
}
Instance of Symbol 418 MovieClip "mcCarBlue2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -863 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 863 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dCar0 + 1);
respawn();
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if (hitTest(_parent.mcTank)) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
}
}
}
Instance of Symbol 418 MovieClip "mcCarBlue3" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -899 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 899 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dCar0 + 2);
respawn();
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
this.gotoAndPlay("hit");
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCB++;
_global.score = _global.score + _global.scoreCB;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if (hitTest(_parent.mcTank)) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
}
}
}
Instance of Symbol 294 MovieClip "mcCarRed1" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dCar0 + 3);
respawn();
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if (hitTest(_parent.mcTank)) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
}
}
}
Instance of Symbol 294 MovieClip "mcCarRed2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -863 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 863 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dCar0 + 4);
respawn();
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if (hitTest(_parent.mcTank)) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
}
}
}
Instance of Symbol 294 MovieClip "mcCarRed3" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -899 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 899 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dCar0 + 5);
respawn();
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
this.gotoAndPlay("hit");
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCR++;
_global.score = _global.score + _global.scoreCR;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
if (this._x < _parent["ball" + temp]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
temp = _parent.dBall0 + 3;
}
temp++;
}
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if (hitTest(_parent.mcTank)) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
}
}
}
Instance of Symbol 248 MovieClip "mcShackOne" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else {
state = 2;
}
if (state > 2) {
state = 2;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 100) {
state = state + 1;
} else {
state = 2;
}
if (state > 2) {
state = 2;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
_global.statHB++;
_global.score = _global.score + _global.scoreHB;
if (Math.random() > 0.6) {
temp = this.getDepth() - 10;
_parent.mcMan.duplicateMovieClip("man" + temp, temp);
if (this._x > _parent.mcTank._x) {
_parent["man" + temp]._xscale = -100;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y + 20;
var num = Math.ceil(Math.random() * 7);
switch (num) {
case 1 :
_global.soundMan.attachSound("man scream 01");
break;
case 2 :
_global.soundMan.attachSound("man scream 02");
break;
case 3 :
_global.soundMan.attachSound("man scream 03");
break;
case 4 :
_global.soundMan.attachSound("man scream 04");
break;
case 5 :
_global.soundMan.attachSound("man scream 05");
break;
case 6 :
_global.soundMan.attachSound("man scream 06");
break;
case 7 :
_global.soundMan.attachSound("man scream 07");
break;
default :
_global.soundMan.attachSound("man scream 01");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
this.gotoAndPlay("two");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcShackOne") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = 1750 - (Math.random() * 30);
_parent.newHouseY = this._y;
_parent.newHouseRed = false;
this.removeMovieClip();
} else if (this._x > 920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = Math.random() * 30;
_parent.newHouseY = this._y;
_parent.newHouseRed = false;
this.removeMovieClip();
}
if ((state == 0) || (state == 1)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 205 MovieClip "mcShackTwo" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 30) {
state++;
} else {
state = 2;
}
if (state > 2) {
state = 2;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 100) {
state = state + 1;
} else {
state = 2;
}
if (state > 2) {
state = 2;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function updateVisual() {
switch (state) {
case 1 :
this.gotoAndPlay("one");
return;
case 2 :
_global.statHR++;
_global.score = _global.score + _global.scoreHR;
if (Math.random() > 0.6) {
temp = this.getDepth() - 10;
_parent.mcMan.duplicateMovieClip("man" + temp, temp);
if (this._x > _parent.mcTank._x) {
_parent["man" + temp]._xscale = -100;
}
_parent["man" + temp]._x = this._x;
_parent["man" + temp]._y = this._y + 20;
var num = Math.ceil(Math.random() * 7);
switch (num) {
case 1 :
_global.soundMan.attachSound("man scream 01");
break;
case 2 :
_global.soundMan.attachSound("man scream 02");
break;
case 3 :
_global.soundMan.attachSound("man scream 03");
break;
case 4 :
_global.soundMan.attachSound("man scream 04");
break;
case 5 :
_global.soundMan.attachSound("man scream 05");
break;
case 6 :
_global.soundMan.attachSound("man scream 06");
break;
case 7 :
_global.soundMan.attachSound("man scream 07");
break;
default :
_global.soundMan.attachSound("man scream 01");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
this.gotoAndPlay("two");
}
}
state = 0;
}
onClipEvent (enterFrame) {
if (_name != "mcShackTwo") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
}
if (this._x < -920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = 1750 - (Math.random() * 30);
_parent.newHouseY = this._y;
_parent.newHouseRed = true;
this.removeMovieClip();
} else if (this._x > 920) {
_parent.newHouseName = _name;
_parent.newHouseDepth = this.getDepth();
_parent.newHouseX = Math.random() * 30;
_parent.newHouseY = this._y;
_parent.newHouseRed = true;
this.removeMovieClip();
}
if ((state == 0) || (state == 1)) {
temp = state;
hitTestBall();
hitTestMissile();
if (state != temp) {
updateVisual();
}
}
}
}
Instance of Symbol 421 MovieClip "mcMissile" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
xVel = 14;
}
onClipEvent (enterFrame) {
if (_name != "mcMissile") {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if (state == 1) {
if (Key.isDown(_global.keyFire2)) {
if (_parent.mcTank._xscale == 100) {
this._x = this._x + (-xVel);
} else {
this._x = this._x + xVel;
}
}
this._y = this._y + 60;
if (this._y > (_global.ground - 250)) {
state = 2;
this._y = _global.ground - 262;
this.gotoAndPlay("hit");
_root.camX = 20;
_root.camY = 24;
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris2.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = (this._y + 30) + (Math.random() * 16);
_global.soundMissile.attachSound("missile explode");
_global.soundMissile.setPan((this._x - 200) / 4);
_global.soundMissile.start();
}
} else if (state == 0) {
this.removeMovieClip();
}
}
}
}
Instance of Symbol 425 MovieClip "mcCop" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function hitTestMissile() {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
_global.score = _global.score + _global.scoreMan;
_global.statMan++;
this.gotoAndPlay("hit");
if (this._x < _parent["missile" + temp]._x) {
this.xVel = Math.random() * -8;
} else {
this.xVel = Math.random() * 8;
}
this.yVel = -10 + (Math.random() * -12);
this._y = this._y + -10;
state = 2;
count = _parent.dBall0 + 13;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
_global.score = _global.score + _global.scoreMan;
_global.statMan++;
this.gotoAndPlay("hit");
if (this._x < _parent.mcBuddy._x) {
this.xVel = Math.random() * -5;
} else {
this.xVel = Math.random() * 5;
}
this.yVel = -6 + (Math.random() * -7);
this._y = this._y + -8;
state = 2;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
}
xVel = 4 + (Math.random() * 2);
yVel = 0;
state = 1;
fireCount = 0;
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
if (_name != "mcCop") {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
this.removeMovieClip();
}
if (state == 1) {
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 400)) && (Math.random() > 0.7)) {
fireCount = 10;
this.gotoAndPlay("fire");
_parent.mcTank.shot++;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("cop fire");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
}
if (this._x < _parent.mcTank._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
temp = _parent.dBall0;
while (temp < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + temp].mcHit)) {
_global.score = _global.score + _global.scoreMan;
_global.statMan++;
this.gotoAndPlay("hit");
if (this._x < _parent["ball" + temp]._x) {
this.xVel = Math.random() * -8;
} else {
this.xVel = Math.random() * 8;
}
this.yVel = -10 + (Math.random() * -12);
this._y = this._y + -10;
state = 2;
temp = _parent.dBall0 + 3;
var num = Math.random();
if (num > 0.5) {
_global.soundMan.attachSound("man death 01");
} else {
_global.soundMan.attachSound("man death 02");
}
_global.soundMan.setPan((this._x - 200) / 4);
_global.soundMan.start();
}
temp++;
}
if (state != 2) {
hitTestMissile();
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 3);
this._y = this._y + yVel;
if (this._y > (_global.ground - 190)) {
this.removeMovieClip();
}
}
}
}
}
Instance of Symbol 322 MovieClip "mcCopCar" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 5;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -5;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = 168;
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (this._x < _parent["ball" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -6 + (Math.random() * -14);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCop++;
_global.score = _global.score + _global.scoreCop;
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (this._x < _parent["missile" + count]._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -10 + (Math.random() * -20);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCop++;
_global.score = _global.score + _global.scoreCop;
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
if (this._x < _parent.mcBuddy._x) {
this.xVel = -5 + (Math.random() * -10);
} else {
this.xVel = 5 + (Math.random() * 10);
}
this.yVel = -4 + (Math.random() * -10);
this._y = _global.ground - 248;
if (Math.random() > 0.5) {
this.rotVel = Math.random() * -30;
} else {
this.rotVel = Math.random() * 30;
}
state = 2;
if (!dead) {
this.gotoAndPlay("hit");
_global.statCop++;
_global.score = _global.score + _global.scoreCop;
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
function spawnCop(front) {
_parent.dEnemy++;
if (_parent.dEnemy > (_parent.dEnemy0 + _parent.enemyMAX)) {
_parent.dEnemy = _parent.dEnemy0;
}
_parent.mcCop.duplicateMovieClip("enemy" + _parent.dEnemy, _parent.dEnemy);
if (this._xscale == 100) {
if (front) {
_parent["enemy" + _parent.dEnemy]._x = (this._x + (Math.random() * 12)) + 10;
} else {
_parent["enemy" + _parent.dEnemy]._x = this._x + (Math.random() * 12);
}
_parent["enemy" + _parent.dEnemy]._xscale = 100;
} else {
if (front) {
_parent["enemy" + _parent.dEnemy]._x = (this._x + (Math.random() * -12)) - 10;
} else {
_parent["enemy" + _parent.dEnemy]._x = this._x + (Math.random() * -12);
}
_parent["enemy" + _parent.dEnemy]._xscale = -100;
}
_parent["enemy" + _parent.dEnemy]._y = (this._y + 9) + (Math.random() * 16);
}
this.swapDepths(_parent.dCar0 + 6);
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && (_global.delayCop <= (_global.statHB + _global.statHR))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
this._x = this._x + xVel;
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statCop++;
_global.score = _global.score + _global.scoreCop;
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
} else if (state != 2) {
if (this._xscale == 100) {
if ((_parent.mcTank._x - this._x) < 250) {
this.gotoAndPlay("standoff");
state = 7;
stopCount = 1;
}
} else if ((this._x - _parent.mcTank._x) < 250) {
this.gotoAndPlay("standoff");
state = 7;
stopCount = 1;
}
}
} else if (state == 2) {
this._x = this._x + xVel;
yVel = yVel + (_global.gravity / 2);
this._y = this._y + yVel;
this._rotation = this._rotation + rotVel;
if (this._y > (_global.ground - 225)) {
this._y = _global.ground - 225;
state = 3;
}
} else if (state == 3) {
if (yVel < 3) {
yVel = 0;
state = 4;
if ((this._rotation <= 90) && (this._rotation > 0)) {
rotVel = 20;
} else if ((this._rotation <= 0) && (this._rotation > -90)) {
rotVel = -20;
} else if ((this._rotation > 90) && (this._rotation <= 180)) {
rotVel = -20;
} else if ((this._rotation <= -90) && (this._rotation > -180)) {
rotVel = 20;
}
this._rotation = this._rotation + rotVel;
} else {
if (xVel > 0) {
this._rotation = Math.abs(this._rotation);
} else {
this._rotation = -Math.abs(this._rotation);
}
yVel = (-yVel) / 2;
state = 2;
}
} else if (state == 4) {
temp = Math.abs(this._rotation);
if ((temp != 0) && (temp != 180)) {
if (temp < 46) {
this._rotation = 0;
} else if (temp > 134) {
this._rotation = 180;
} else {
this._rotation = this._rotation + rotVel;
}
}
hitTestBall(true);
if (state != 2) {
hitTestMissile(true);
}
if (_global.player2 && (state != 2)) {
hitTestP2(true);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
} else if (state == 6) {
respawn();
} else if (state == 7) {
stopCount = stopCount * 0.5;
this._x = this._x + xVel;
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
if ((state != 2) && (stopCount < 0.1)) {
stopCount = 0;
state = 8;
spawnCop(true);
spawnCop(false);
}
} else if (state == 8) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
if ((state != 2) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
temp = Math.random();
if (temp > 0.66) {
_global.soundFX.attachSound("car crush 01");
} else if (temp > 0.33) {
_global.soundFX.attachSound("car crush 02");
} else {
_global.soundFX.attachSound("car crush 03");
}
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
makeDebris();
respawn();
}
}
}
}
}
Instance of Symbol 449 MovieClip "mcBuddy" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
firePressed = false;
shooting = false;
xBase = this._x;
xOffset = 0;
xBound = 140;
xVel = 0;
xVelMAX = 16;
xAccel = 3;
}
onClipEvent (enterFrame) {
if (_global.player2) {
this._visible = true;
if (!_global.frozen) {
if (Key.isDown(_global.keyAimLeftP2)) {
if (this.mcBody._currentframe > 1) {
this.mcBody.gotoAndStop(this.mcBody._currentframe - 1);
}
} else if (Key.isDown(_global.keyAimRightP2)) {
if (this.mcBody._currentframe < 29) {
this.mcBody.gotoAndStop(this.mcBody._currentframe + 1);
}
}
if (Key.isDown(_global.keyLeftP2) && (xOffset > (-xBound))) {
xVel = xVel + (-xAccel);
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (Key.isDown(_global.keyRightP2) && (xOffset < xBound)) {
xVel = xVel + xAccel;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else {
if (xVel < 0) {
xVel = xVel + xAccel;
} else if (xVel > 0) {
xVel = xVel + (-xAccel);
}
if (Math.abs(xVel) < (xAccel + 1)) {
xVel = 0;
}
}
xOffset = xOffset + xVel;
this._x = xBase + xOffset;
if (Key.isDown(_global.keyFireP2)) {
if (!firePressed) {
firePressed = true;
shooting = true;
this.mcBody.mcGun.gotoAndPlay("fire");
_global.soundFX.stop();
_global.soundFX_sounds = 1;
_global.soundFX.attachSound("minigun loop");
_global.soundFX.setVolume(100);
_global.soundFX.start(0, 100);
}
} else {
firePressed = false;
if (shooting) {
shooting = false;
this.mcBody.mcGun.gotoAndPlay("fireStop");
_global.soundFX.stop("minigun loop");
_global.soundFXDone();
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("minigun end");
_global.soundFX.setVolume(60);
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.start();
}
}
}
}
} else {
this._visible = false;
}
}
Instance of Symbol 264 MovieClip "mcTankSmall" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 3;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = 178;
} else {
xVel = -3;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = 167;
}
life = 30;
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 40) {
life = life + -8;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 15) {
life = life + -12;
} else {
life = life + -24;
}
if (life <= 0) {
state = 5;
this._rotation = 0;
xVel = 0;
this.gotoAndPlay("hit");
_global.statTB++;
_global.score = _global.score + _global.scoreTB;
} else {
state = 7;
this._x = this._x + ((-xVel) * 10);
this.gotoAndPlay("hit");
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 140) {
life = life + -12;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 80) {
life = life + -24;
} else {
life = life + -30;
}
if (life <= 0) {
state = 5;
this._rotation = 0;
xVel = 0;
this.gotoAndPlay("hit");
_global.statTB++;
_global.score = _global.score + _global.scoreTB;
} else {
state = 7;
this._x = this._x + ((-xVel) * 10);
this.gotoAndPlay("hit");
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
life = life + -4;
if (life <= 0) {
state = 5;
this._rotation = 0;
xVel = 0;
this.gotoAndPlay("hit");
_global.statTB++;
_global.score = _global.score + _global.scoreTB;
} else {
state = 7;
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + ((-Math.abs(xVel)) * 4);
} else {
this._x = this._x + (Math.abs(xVel) * 4);
}
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dTankSmall0);
stopDist = 300;
life = 30;
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && (_global.delayTank <= (_global.statHB + _global.statCB))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
if (Math.abs(_parent.mcTank._x - this._x) < stopDist) {
if (Math.random() > 0.9) {
state = 2;
this.gotoAndPlay("fire");
if (this._xscale == 100) {
_parent.mcTankBullet1._x = this._x + 25;
} else {
_parent.mcTankBullet1._x = this._x - 25;
}
_parent.mcTankBullet1._xscale = this._xscale;
_parent.mcTankBullet1._y = this._y - 3;
_parent.mcTankBullet1.state = 1;
_parent.mcTankBullet1.gotoAndPlay("start");
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("cannon fire");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.setPan((this._x - 200) / 4);
_global.soundFX.start();
}
}
} else {
this._x = this._x + xVel;
}
hitTestBall();
if (state != 5) {
hitTestMissile(false);
}
if (_global.player2 && (state != 5)) {
hitTestP2(false);
}
if ((state != 5) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statTB++;
_global.score = _global.score + _global.scoreTB;
}
}
} else if (state == 2) {
hitTestBall();
if (state != 5) {
hitTestMissile(false);
}
if (_global.player2 && (state != 5)) {
hitTestP2(false);
}
if ((state != 5) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statTB++;
_global.score = _global.score + _global.scoreTB;
}
}
} else if (state == 6) {
respawn();
} else if (state == 7) {
hitTestBall();
if (state != 5) {
hitTestMissile(false);
}
if (_global.player2 && (state != 5)) {
hitTestP2(false);
}
}
}
}
Instance of Symbol 328 MovieClip "mcTankSmallRed" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 3;
this._xscale = 100;
this._x = -875 + (Math.random() * -24);
this._y = 179;
} else {
xVel = -3;
this._xscale = -100;
this._x = 875 + (Math.random() * 24);
this._y = 168;
}
life = 30;
this._rotation = 0;
yVel = 0;
rotVel = 0;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall() {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit)) {
if (Math.abs(this._x - _parent["ball" + count]._x) > 40) {
life = life + -8;
} else if (Math.abs(this._x - _parent["ball" + count]._x) > 15) {
life = life + -12;
} else {
life = life + -24;
}
if (life <= 0) {
state = 5;
this._rotation = 0;
xVel = 0;
this.gotoAndPlay("hit");
_global.statTR++;
_global.score = _global.score + _global.scoreTR;
} else {
state = 7;
this._x = this._x + ((-xVel) * 10);
this.gotoAndPlay("hit");
}
count = _parent.dBall0 + 3;
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit)) {
if (Math.abs(this._x - _parent["missile" + count]._x) > 140) {
life = life + -12;
} else if (Math.abs(this._x - _parent["missile" + count]._x) > 80) {
life = life + -24;
} else {
life = life + -30;
}
if (life <= 0) {
state = 5;
this._rotation = 0;
xVel = 0;
this.gotoAndPlay("hit");
_global.statTR++;
_global.score = _global.score + _global.scoreTR;
} else {
state = 7;
this._x = this._x + ((-xVel) * 10);
this.gotoAndPlay("hit");
}
count = _parent.dBall0 + 13;
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcBuddy.shooting && (hitTest(_parent.mcBuddy.mcBody.mcFX.mcHit))) {
life = life + -4;
if (life <= 0) {
state = 5;
this._rotation = 0;
xVel = 0;
this.gotoAndPlay("hit");
_global.statTR++;
_global.score = _global.score + _global.scoreTR;
} else {
state = 7;
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + ((-Math.abs(xVel)) * 4);
} else {
this._x = this._x + (Math.abs(xVel) * 4);
}
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dTankSmall0 + 1);
stopDist = 250;
life = 30;
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && (_global.delayTank <= (_global.statHR + _global.statCR))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
if (Math.abs(_parent.mcTank._x - this._x) < stopDist) {
if (Math.random() > 0.9) {
state = 2;
this.gotoAndPlay("fire");
if (this._xscale == 100) {
_parent.mcTankBullet2._x = this._x + 25;
} else {
_parent.mcTankBullet2._x = this._x - 25;
}
_parent.mcTankBullet2._xscale = this._xscale;
_parent.mcTankBullet2._y = this._y - 3;
_parent.mcTankBullet2.state = 1;
_parent.mcTankBullet2.gotoAndPlay("start");
if (_global.soundFX_sounds < 2) {
_global.soundFX_sounds++;
_global.soundFX.attachSound("cannon fire");
_global.soundFX.onSoundComplete = _global.soundFXDone;
_global.soundFX.setPan((this._x - 200) / 4);
_global.soundFX.start();
}
}
} else {
this._x = this._x + xVel;
}
hitTestBall();
if (state != 5) {
hitTestMissile(false);
}
if (_global.player2 && (state != 5)) {
hitTestP2(false);
}
if ((state != 5) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statTR++;
_global.score = _global.score + _global.scoreTR;
}
}
} else if (state == 2) {
hitTestBall();
if (state != 5) {
hitTestMissile(false);
}
if (_global.player2 && (state != 5)) {
hitTestP2(false);
}
if ((state != 5) && (hitTest(_parent.mcTank))) {
if (Math.abs(this._x - _parent.mcTank._x) < 44) {
this.gotoAndPlay("boom");
makeDebris();
state = 5;
_global.statTR++;
_global.score = _global.score + _global.scoreTR;
}
}
} else if (state == 6) {
respawn();
} else if (state == 7) {
hitTestBall();
if (state != 5) {
hitTestMissile(false);
}
if (_global.player2 && (state != 5)) {
hitTestP2(false);
}
}
}
}
Instance of Symbol 469 MovieClip "mcTankBullet1" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_parent.dTankSmall0 + 10);
state = 0;
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if (state == 1) {
if (this.mcHit.hitTest(_parent.mcTank)) {
_parent.mcTank.health = _parent.mcTank.health - 8;
this.gotoAndPlay("hit");
}
}
}
}
Instance of Symbol 469 MovieClip "mcTankBullet2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(_parent.dTankSmall0 + 11);
state = 0;
}
onClipEvent (enterFrame) {
if (!_global.frozen) {
this._x = this._x - (_parent.move * _parent.speed);
if (state == 1) {
if (this.mcHit.hitTest(_parent.mcTank)) {
_parent.mcTank.health = _parent.mcTank.health - 8;
this.gotoAndPlay("hit");
}
}
}
}
Instance of Symbol 282 MovieClip "mcHeliRed2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 0;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = 0;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
stopDist = 170 + (Math.random() * 60);
life = 10;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
}
count = _parent.dBall0 + 3;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
this._y = this._y + 4;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
}
count = _parent.dBall0 + 13;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + -4;
} else {
this._x = this._x + 4;
}
this._y = this._y + 7;
life--;
if (life <= 0) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
} else {
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dHeli0 + 3);
xVelMAX = 5;
rotMAX = 18;
fireCount = 0;
stopDist = 200;
life = 10;
respawn();
}
onClipEvent (enterFrame) {
if ((_global.player2 && (!_global.frozen)) && ((_global.delayHeli + 20) <= (_global.statHR + _global.statCR))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
if (this._x < (_parent.mcTank._x - stopDist)) {
xVel = xVel + 0.5;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else if (this._x > (_parent.mcTank._x + stopDist)) {
xVel = xVel + -0.5;
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (xVel != 0) {
xVel = xVel * 0.9;
if (Math.abs(xVel) < 0.15) {
xVel = 0;
}
}
this._x = this._x + xVel;
if ((this._xscale == -100) && ((this._x - _parent.mcTank._x) < -40)) {
state = 3;
this._xscale = 100;
this.gotoAndPlay("turn");
} else if ((this._xscale == 100) && ((this._x - _parent.mcTank._x) > 40)) {
state = 3;
this._xscale = -100;
this.gotoAndPlay("turn");
}
this._rotation = (xVel / xVelMAX) * rotMAX;
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 230)) && (Math.random() > 0.9)) {
fireCount = 6;
this.mcFire._visible = true;
_parent.mcTank.shot = _parent.mcTank.shot + 2;
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.stop();
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
_global.soundHeli.attachSound("heli fire");
_global.soundHeli.onSoundComplete = _global.soundHeliIdle;
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
this.mcFire._visible = false;
}
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
} else if (state == 3) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
} else if (state == 0) {
respawn();
}
}
}
Instance of Symbol 307 MovieClip "mcHeli2" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 0;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = 0;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
stopDist = 170 + (Math.random() * 60);
life = 10;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
}
count = _parent.dBall0 + 3;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
this._y = this._y + 4;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
}
count = _parent.dBall0 + 13;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + -4;
} else {
this._x = this._x + 4;
}
this._y = this._y + 7;
life--;
if (life <= 0) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
} else {
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dHeli0 + 2);
xVelMAX = 5;
rotMAX = 18;
fireCount = 0;
stopDist = 200;
life = 10;
respawn();
}
onClipEvent (enterFrame) {
if ((_global.player2 && (!_global.frozen)) && ((_global.delayHeli + 20) <= (_global.statHB + _global.statCB))) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
if (this._x < (_parent.mcTank._x - stopDist)) {
xVel = xVel + 0.5;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else if (this._x > (_parent.mcTank._x + stopDist)) {
xVel = xVel + -0.5;
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (xVel != 0) {
xVel = xVel * 0.9;
if (Math.abs(xVel) < 0.15) {
xVel = 0;
}
}
this._x = this._x + xVel;
if ((this._xscale == -100) && ((this._x - _parent.mcTank._x) < -40)) {
state = 3;
this._xscale = 100;
this.gotoAndPlay("turn");
} else if ((this._xscale == 100) && ((this._x - _parent.mcTank._x) > 40)) {
state = 3;
this._xscale = -100;
this.gotoAndPlay("turn");
}
this._rotation = (xVel / xVelMAX) * rotMAX;
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 230)) && (Math.random() > 0.9)) {
fireCount = 6;
this.mcFire._visible = true;
_parent.mcTank.shot = _parent.mcTank.shot + 2;
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.stop();
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
_global.soundHeli.attachSound("heli fire");
_global.soundHeli.onSoundComplete = _global.soundHeliIdle;
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
this.mcFire._visible = false;
}
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
} else if (state == 3) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
} else if (state == 0) {
respawn();
}
}
}
Instance of Symbol 282 MovieClip "mcHeliRed3" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 0;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = 0;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
stopDist = 170 + (Math.random() * 60);
life = 10;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
}
count = _parent.dBall0 + 3;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
this._y = this._y + 4;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
}
count = _parent.dBall0 + 13;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + -4;
} else {
this._x = this._x + 4;
}
this._y = this._y + 7;
life--;
if (life <= 0) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliR++;
_global.score = _global.score + _global.scoreHeliR;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
} else {
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dHeli0 + 5);
xVelMAX = 5;
rotMAX = 18;
fireCount = 0;
stopDist = 200;
life = 10;
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && ((_global["quota" + _global.level] - 15) <= _global.statHR)) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
if (this._x < (_parent.mcTank._x - stopDist)) {
xVel = xVel + 0.5;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else if (this._x > (_parent.mcTank._x + stopDist)) {
xVel = xVel + -0.5;
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (xVel != 0) {
xVel = xVel * 0.9;
if (Math.abs(xVel) < 0.15) {
xVel = 0;
}
}
this._x = this._x + xVel;
if ((this._xscale == -100) && ((this._x - _parent.mcTank._x) < -40)) {
state = 3;
this._xscale = 100;
this.gotoAndPlay("turn");
} else if ((this._xscale == 100) && ((this._x - _parent.mcTank._x) > 40)) {
state = 3;
this._xscale = -100;
this.gotoAndPlay("turn");
}
this._rotation = (xVel / xVelMAX) * rotMAX;
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 230)) && (Math.random() > 0.9)) {
fireCount = 6;
this.mcFire._visible = true;
_parent.mcTank.shot = _parent.mcTank.shot + 2;
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.stop();
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
_global.soundHeli.attachSound("heli fire");
_global.soundHeli.onSoundComplete = _global.soundHeliIdle;
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
this.mcFire._visible = false;
}
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
} else if (state == 3) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
} else if (state == 0) {
respawn();
}
}
}
Instance of Symbol 307 MovieClip "mcHeli3" in Symbol 470 MovieClip Frame 1
onClipEvent (load) {
function respawn() {
if (Math.random() > 0.5) {
xVel = 0;
this._xscale = 100;
this._x = -827 + (Math.random() * -24);
this._y = -130 + (Math.random() * 110);
} else {
xVel = 0;
this._xscale = -100;
this._x = 827 + (Math.random() * 24);
this._y = -130 + (Math.random() * 110);
}
this._rotation = 0;
yVel = 0;
rotVel = 0;
stopDist = 170 + (Math.random() * 60);
life = 10;
this.gotoAndPlay("idle");
state = 1;
}
function hitTestBall(dead) {
var count;
count = _parent.dBall0;
while (count < (_parent.dBall0 + 3)) {
if (hitTest(_parent["ball" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
}
count = _parent.dBall0 + 3;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestMissile(dead) {
var count;
count = _parent.dBall0 + 10;
while (count < (_parent.dBall0 + 13)) {
if (hitTest(_parent["missile" + count].mcHit2)) {
state = 2;
this._rotation = 0;
xVel = 0;
this._y = this._y + 4;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
}
count = _parent.dBall0 + 13;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
count++;
}
}
function hitTestP2(dead) {
if (_parent.mcTank._xscale == 100) {
x = this._x + 526;
y = this._y + 285;
} else {
x = this._x + 250;
y = this._y + 285;
}
if (_parent.mcBuddy.shooting && (_parent.mcBuddy.mcBody.mcGun.mcHit.hitTest(x, y, true))) {
if (this._x < _parent.mcBuddy._x) {
this._x = this._x + -4;
} else {
this._x = this._x + 4;
}
this._y = this._y + 7;
life--;
if (life <= 0) {
state = 2;
this._rotation = 0;
xVel = 0;
if (!dead) {
this.gotoAndPlay("boom");
_global.statHeliB++;
_global.score = _global.score + _global.scoreHeliB;
_global.soundHeli.stop();
_global.soundHeli.attachSound("heli explode");
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
} else {
this.gotoAndPlay("hit");
}
}
}
function makeDebris() {
_parent.dDebris++;
if (_parent.dDebris > (_parent.dDebris0 + _parent.debrisMAX)) {
_parent.dDebris = _parent.dDebris0;
}
_parent.mcDebris.duplicateMovieClip("debris" + _parent.dDebris, _parent.dDebris);
_parent["debris" + _parent.dDebris]._x = this._x;
_parent["debris" + _parent.dDebris]._y = this._y + 5;
}
this.swapDepths(_parent.dHeli0 + 4);
xVelMAX = 5;
rotMAX = 18;
fireCount = 0;
stopDist = 200;
life = 10;
respawn();
}
onClipEvent (enterFrame) {
if ((!_global.frozen) && ((_global["quota" + _global.level] - 15) <= _global.statHB)) {
this._x = this._x - (_parent.move * _parent.speed);
if ((this._x < -900) || (this._x > 900)) {
respawn();
}
if (state == 1) {
if (this._x < (_parent.mcTank._x - stopDist)) {
xVel = xVel + 0.5;
if (xVel > xVelMAX) {
xVel = xVelMAX;
}
} else if (this._x > (_parent.mcTank._x + stopDist)) {
xVel = xVel + -0.5;
if (xVel < (-xVelMAX)) {
xVel = -xVelMAX;
}
} else if (xVel != 0) {
xVel = xVel * 0.9;
if (Math.abs(xVel) < 0.15) {
xVel = 0;
}
}
this._x = this._x + xVel;
if ((this._xscale == -100) && ((this._x - _parent.mcTank._x) < -40)) {
state = 3;
this._xscale = 100;
this.gotoAndPlay("turn");
} else if ((this._xscale == 100) && ((this._x - _parent.mcTank._x) > 40)) {
state = 3;
this._xscale = -100;
this.gotoAndPlay("turn");
}
this._rotation = (xVel / xVelMAX) * rotMAX;
if (((fireCount == 0) && (Math.abs(this._x - _parent.mcTank._x) < 230)) && (Math.random() > 0.9)) {
fireCount = 6;
this.mcFire._visible = true;
_parent.mcTank.shot = _parent.mcTank.shot + 2;
var pan = (this._x / 4);
if (pan > 100) {
pan = 100;
} else if (pan < -100) {
pan = -100;
}
_global.soundHeli.stop();
_global.soundHeli.setPan(pan);
_global.soundHeli.setVolume(Math.abs(100 - Math.abs(pan * 1.5)));
_global.soundHeli.attachSound("heli fire");
_global.soundHeli.onSoundComplete = _global.soundHeliIdle;
_global.soundHeli.setVolume(100);
_global.soundHeli.start();
}
fireCount--;
if (fireCount < 0) {
fireCount = 0;
this.mcFire._visible = false;
}
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
if (_global.player2 && (state != 2)) {
hitTestP2(false);
}
} else if (state == 2) {
this._x = this._x + xVel;
} else if (state == 3) {
hitTestBall(false);
if (state != 2) {
hitTestMissile(false);
}
} else if (state == 0) {
respawn();
}
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Instance of Symbol 474 MovieClip in Symbol 475 MovieClip Frame 1
onClipEvent (load) {
var temp = ((Math.random() * 40) + 60);
this._xscale = temp;
this._yscale = temp;
xVel = (Math.random() * 5) + 2;
yVel = (Math.random() * 3) + 7;
}
onClipEvent (enterFrame) {
if (this._y < 300) {
this._y = this._y + yVel;
this._x = this._x + xVel;
} else {
this._y = -300;
this._x = (Math.random() * -950) + 400;
}
}
Symbol 486 MovieClip Frame 5
stop();
Symbol 487 MovieClip Frame 9
stop();
Symbol 487 MovieClip Frame 19
stop();
Symbol 487 MovieClip Frame 29
stop();
Symbol 487 MovieClip Frame 39
stop();
Symbol 487 MovieClip Frame 49
stop();
Symbol 487 MovieClip Frame 59
stop();
Symbol 487 MovieClip Frame 69
stop();
Symbol 487 MovieClip Frame 79
stop();
Symbol 487 MovieClip Frame 89
stop();
Symbol 487 MovieClip Frame 98
stop();
Symbol 503 MovieClip Frame 9
gotoAndPlay (1);
Symbol 503 MovieClip Frame 19
stop();
Symbol 504 MovieClip Frame 9
gotoAndPlay (1);
Symbol 504 MovieClip Frame 19
stop();
Symbol 511 Button
on (release) {
if (_global.musicOn) {
_global.musicOn = false;
_global.soundMusic.stop();
} else {
_global.musicOn = true;
_global.soundMusic.attachSound("music 01");
_global.soundMusic.start(0, 1000);
}
}
Symbol 512 MovieClip Frame 11
stop();
Symbol 512 MovieClip Frame 29
stop();
Symbol 517 MovieClip Frame 49
stop();
Symbol 517 MovieClip Frame 98
stop();
Symbol 520 MovieClip Frame 9
stop();
Symbol 520 MovieClip Frame 28
stop();
Symbol 537 MovieClip Frame 9
stop();
Symbol 537 MovieClip Frame 19
stop();
Symbol 537 MovieClip Frame 29
stop();
Symbol 537 MovieClip Frame 39
stop();
Symbol 537 MovieClip Frame 49
stop();
Symbol 537 MovieClip Frame 59
stop();
Symbol 537 MovieClip Frame 69
stop();
Symbol 564 MovieClip Frame 9
stop();
Symbol 564 MovieClip Frame 29
gotoAndPlay (1);
Symbol 564 MovieClip Frame 49
gotoAndPlay (1);
Symbol 564 MovieClip Frame 69
gotoAndPlay (1);
Symbol 564 MovieClip Frame 89
gotoAndPlay (1);
Symbol 564 MovieClip Frame 109
gotoAndPlay (1);
Symbol 564 MovieClip Frame 129
gotoAndPlay (1);
Symbol 579 MovieClip Frame 9
stop();
Symbol 579 MovieClip Frame 49
gotoAndPlay (1);
Symbol 579 MovieClip Frame 89
gotoAndPlay (1);
Symbol 591 MovieClip Frame 13
stop();