Frame 1
function goToThisURL() {
getURL (linkURL, "_blank");
}
perc = Math.ceil(100 * (_root.getBytesLoaded() / _root.getBytesTotal()));
loaded.text = perc + "%";
var linkURL = "http://www.crookedalley.com";
var linkText = "CrookedAlley.com";
var myMenu = new ContextMenu();
var copyright = new ContextMenuItem(linkText, goToThisURL);
myMenu.customItems.push(copyright);
myMenu.hideBuiltInItems();
_root.menu = myMenu;
Frame 2
if (perc >= 100) {
_global.reLoad = false;
gotoAndPlay ("init");
} else {
gotoAndPlay (1);
}
Frame 29
function muteAllSounds() {
sLaunch.setVolume(0);
sExplode.setVolume(0);
sDestruct.setVolume(0);
sAlarm.setVolume(0);
sPowerup.setVolume(0);
sError.setVolume(0);
sTears.setVolume(0);
sAction.setVolume(0);
}
function unMuteAllSounds() {
sLaunch.setVolume(25);
sExplode.setVolume(50);
sDestruct.setVolume(50);
sAlarm.setVolume(100);
sPowerup.setVolume(100);
sError.setVolume(100);
sTears.setVolume(100);
sAction.setVolume(100);
}
_root.difficultyAdder = 0;
_global.leaked = 0;
_global.totalScore = 0;
_global.totalHits = 0;
_global.totalShots = 0;
_global.levelHits = 0;
_global.levelShots = 0;
var playerHealth = 100;
var levelEnemies = 0;
var enemyNum = 0;
var enemyArray = new Array();
var shadowArray = new Array();
_root.heldCredits = 0;
var maxShots1 = 3;
var maxShots2 = 3;
var velocity = 250;
var velocity2 = 250;
var scale = 60;
var scale2 = 60;
var damage1 = 5;
var damage2 = 5;
var shotNumber = 0;
var shotNumber2 = 0;
_global.allIsMuted = false;
_root.score = 0;
_root.leaked = 0;
_root.enemiesDestroyed = 0;
var totalHits = 0;
var totalShots = 0;
_root.autoFireOn = false;
var levelHits = 0;
var levelShots = 0;
_root.credits = 0;
_root.levelNum = 1;
_root.level = "Level" + _root.levelNum;
var m1 = _root.createEmptyMovieClip("m1", _root.getNextHighestDepth());
var m2 = _root.createEmptyMovieClip("m2", _root.getNextHighestDepth());
var m3 = _root.createEmptyMovieClip("m3", _root.getNextHighestDepth());
var m4 = _root.createEmptyMovieClip("m4", _root.getNextHighestDepth());
var m5 = _root.createEmptyMovieClip("m5", _root.getNextHighestDepth());
var m6 = _root.createEmptyMovieClip("m6", _root.getNextHighestDepth());
var m7 = _root.createEmptyMovieClip("m7", _root.getNextHighestDepth());
var m8 = _root.createEmptyMovieClip("m8", _root.getNextHighestDepth());
var m9 = _root.createEmptyMovieClip("m9", _root.getNextHighestDepth());
sRybot = new Sound(m9);
sRybot.attachSound("Rybot");
sLaunch = new Sound(m1);
sLaunch.attachSound("launch");
sLaunch.setVolume(25);
sExplode = new Sound(m2);
sExplode.attachSound("explosion");
sExplode.setVolume(50);
sDestruct = new Sound(m3);
sDestruct.attachSound("destruction");
sDestruct.setVolume(50);
sDestruct2 = new Sound(m3);
sDestruct2.attachSound("destruction");
sDestruct2.setVolume(50);
sAlarm = new Sound(m4);
sAlarm.attachSound("Alarm");
sPowerup = new Sound(m5);
sPowerup.attachSound("powerup");
sError = new Sound(m6);
sError.attachSound("error");
sTears = new Sound(m7);
sTears.attachSound("tears");
sAction = new Sound(m8);
sAction.attachSound("action");
_root.gotoAndPlay("AF");
Frame 30
stop();
Frame 31
_root.gotoAndPlay("logo");
Instance of Symbol 287 MovieClip "inst" in Frame 32
/* no clip actions */
Instance of Symbol 289 MovieClip in Frame 32
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.crookedalley.com','newWin','width=800,height=600,left=0,top=0,toolbar=Yes,location=Yes,scrollbars=Yes,status=Yes,resizable=Yes,fullscreen=Yes'); NewWindow.focus(); void(0);");
}
Frame 201
gotoAndPlay ("ad");
Frame 202
MochiAd.showInterLevelAd({id:"a3b30c9551e1dd28", res:"650x450", no_bg:true});
Frame 203
gotoAndPlay ("main");
Frame 204
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
theHealth._visible = false;
sAction.stop();
sAction.setVolume(0);
sAction.start(0, 999);
sTears.stop();
sTears.start(0, 9999999999);
__com_mochibot__("71ffc595", this, 10301, true);
Frame 205
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 20;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("PlaneShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 12;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 585 MovieClip in Frame 205
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 206
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 20;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 12;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
theHealth._visible = true;
stop();
Mouse.hide();
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 629 MovieClip in Frame 206
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 207
function addBomber(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("airPlaneShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 35;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 20;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 12;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
theHealth._visible = true;
stop();
Mouse.hide();
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 630 MovieClip in Frame 207
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 208
function addBomber(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 35;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 20;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 12;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 631 MovieClip in Frame 208
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 209
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 7;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 20;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 35;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 20;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 12;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 633 MovieClip in Frame 209
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 210
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 6.5;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 18;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 33;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 18;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 10;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 634 MovieClip in Frame 210
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 211
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 6.5;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 18;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 33;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 18;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 10;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 635 MovieClip in Frame 211
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 212
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 6;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 16;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 28;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 14;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 8;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 636 MovieClip in Frame 212
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 213
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 6;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 16;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 28;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 14;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 8;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 637 MovieClip in Frame 213
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 214
stop();
Mouse.show();
theHealth._visible = false;
Frame 215
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 5.85;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 16;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("airPlaneShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 28;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("ChopperShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 14;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("PlaneShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 8;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
ship.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 666 MovieClip in Frame 215
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 216
function addEnterprise(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("enterprise", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 5.5;
enemiesLayer["copter" + enemyNum].theEnemy.score = 1;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addMissle(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("missle", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 1 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 5.85;
enemiesLayer["copter" + enemyNum].theEnemy.score = 35;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addDouble(xPos) {
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("double", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 16;
enemiesLayer["copter" + enemyNum].theEnemy.score = 30;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addBomber(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("airPlaneShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("airPlane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 45 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 28;
enemiesLayer["copter" + enemyNum].theEnemy.score = 25;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function addCopter(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("ChopperShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("testCopter", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 20 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 14;
enemiesLayer["copter" + enemyNum].theEnemy.score = 10;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function tweenListener(tweenNum) {
_root["listener" + tweenNum].onMotionFinished = function () {
if (enemiesLayer["copter" + tweenNum] != undefined) {
_global.leaked = _global.leaked + 1;
sAlarm.start();
playerHealth = playerHealth - 10;
if (playerHealth <= 0) {
_root.gotoAndPlay("gameOver");
}
theHealth.play();
enemiesLayer["copter" + tweenNum].removeMovieClip();
below["shadow" + tweenNum].removeMovieClip();
_root.levelEnemies = _root.levelEnemies - 1;
}
};
}
function addPlane(xPos) {
below.createEmptyMovieClip("shadow" + enemyNum, below.getNextHighestDepth());
below["shadow" + enemyNum].attachMovie("PlaneShadow", "theShadow", _root["shadow" + enemyNum].getNextHighestDepth());
below["shadow" + enemyNum]._x = xPos - 300;
below["shadow" + enemyNum]._xscale = 65;
below["shadow" + enemyNum]._yscale = 65;
enemiesLayer.createEmptyMovieClip("copter" + enemyNum, enemiesLayer.getNextHighestDepth());
enemiesLayer["copter" + enemyNum].attachMovie("Plane", "theEnemy", enemiesLayer["copter" + enemyNum].getNextHighestDepth());
enemiesLayer["copter" + enemyNum].theEnemy.health = 10 + _root.difficultyAdder;
enemiesLayer["copter" + enemyNum].theEnemy.speed = 8;
enemiesLayer["copter" + enemyNum].theEnemy.score = 15;
_root["enemyTween" + enemyNum] = new mx.transitions.Tween(enemiesLayer["copter" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 30, 510, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["shadowTween" + enemyNum] = new mx.transitions.Tween(below["shadow" + enemyNum], "_y", regular, enemiesLayer["copter" + enemyNum]._y - 300, 210, enemiesLayer["copter" + enemyNum].theEnemy.speed, true);
_root["listener" + enemyNum] = new Object();
_root["enemyTween" + enemyNum].addListener(_root["listener" + enemyNum]);
tweenListener(enemyNum);
enemiesLayer["copter" + enemyNum]._x = xPos;
enemyArray.push(enemiesLayer["copter" + enemyNum]);
shadowArray.push(_root.below["shadow" + enemyNum]);
enemyNum = enemyNum + 1;
}
function getTime(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity;
return(time);
}
function getTime2(fromClip, shotNumber) {
xDiff = _root._xmouse - fromClip.shootPoint.point.x;
yDiff = _root._ymouse - fromClip.shootPoint.point.y;
_root["distance1" + shotNumber] = (xDiff * xDiff) + (yDiff * yDiff);
_root["distance" + shotNumber] = Math.sqrt(_root["distance1" + shotNumber]);
time = _root["distance" + shotNumber] / velocity2;
return(time);
}
function shoot(fromClip) {
if (canShoot1 == true) {
sLaunch.start();
shotNumber++;
_global.levelShots = _global.levelShots + 1;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot(shotNumber, fromClip);
canShoot1 = false;
_root.shootInterval1 = setInterval(countDownShot, maxShots1 * 500, "canShoot1", "shootInterval1");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret2.theHolder.point = {x:0, y:0};
turret2.theHolder.localToGlobal(turret2.theHolder.point);
_root["muzzle" + shotNumber]._x = turret2.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret2.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret2._rotation;
turret2.gotoAndPlay(2);
}
}
function shot(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage1;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale;
shotsLayer["mc" + passedShot]._xscale = scale;
sExplode.start();
};
}
function shoot2(fromClip) {
if (canShoot2 == true) {
sLaunch.start();
_global.levelShots = _global.levelShots + 1;
shotNumber++;
shotsLayer["mc" + shotNumber] = shotsLayer.attachMovie("bullet", "bullet" + shotNumber, shotsLayer.getNextHighestDepth());
shot2(shotNumber, fromClip);
canShoot2 = false;
_root.shootInterval2 = setInterval(countDownShot, maxShots2 * 500, "canShoot2", "shootInterval2");
_root.attachMovie("muzzleFire", "muzzle" + shotNumber, _root.getNextHighestDepth());
turret.theHolder.point = {x:0, y:0};
turret.theHolder.localToGlobal(turret.theHolder.point);
_root["muzzle" + shotNumber]._x = turret.theHolder.point.x;
_root["muzzle" + shotNumber]._y = turret.theHolder.point.y;
_root["muzzle" + shotNumber]._alpha = 50;
_root["muzzle" + shotNumber]._rotation = turret._rotation;
turret.gotoAndPlay(2);
}
}
function shot2(passedShot, fromClip) {
fromClip.shootPoint.point = {x:0, y:0};
fromClip.shootPoint.localToGlobal(fromClip.shootPoint.point);
shotsLayer["mc" + passedShot]._x = fromClip.shootPoint.point.x;
shotsLayer["mc" + passedShot]._y = fromClip.shootPoint.point.y;
time = getTime2(fromClip, passedShot);
shotsLayer["mc" + passedShot]._rotation = fromClip._rotation;
shotsLayer["myXTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_y", regular, shotsLayer["mc" + passedShot]._y, _root._ymouse, time, true);
shotsLayer["myYTween" + passedShot] = new mx.transitions.Tween(shotsLayer["mc" + passedShot], "_x", regular, shotsLayer["mc" + passedShot]._x, _root._xmouse, time, true);
shotsLayer["listener" + passedShot] = new Object();
shotsLayer["myYTween" + passedShot].addListener(shotsLayer["listener" + passedShot]);
shotsLayer["listener" + passedShot].onMotionFinished = function () {
i = -1;
while (i <= (enemyArray.length + 1)) {
if (shotsLayer["mc" + passedShot].hitTest(enemyArray[i])) {
_global.levelHits = _global.levelHits + 1;
enemyArray[i].theEnemy.health = enemyArray[i].theEnemy.health - damage2;
if (enemyArray[i].theEnemy.health <= 0) {
_global.totalScore = _global.totalScore + enemyArray[i].theEnemy.score;
_root.enemiesDestroyed = _root.enemiesDestroyed + 1;
sDestruct.start();
shadowArray[i].removeMovieClip();
shadowArray.splice(i, 1);
enemyArray[i].theEnemy.gotoAndStop(2);
enemyArray.splice(i, 1);
levelEnemies = levelEnemies - 1;
}
}
i++;
}
shotsLayer["mc" + passedShot].gotoAndStop(2);
shotsLayer["mc" + passedShot]._yscale = scale2;
shotsLayer["mc" + passedShot]._xscale = scale2;
sExplode.start();
currentShots2 = currentShots2 - 1;
};
}
stop();
Mouse.hide();
theHealth._visible = true;
var canShoot1 = true;
var canShoot2 = true;
countDownShot = function (shot, theInterval) {
_root[shot] = true;
clearInterval(_root[theInterval]);
};
turret.onMouseUp = function () {
_root.mouseIsDown = false;
shoot2(this);
};
turret2.onMouseDown = function () {
_root.mouseIsDown = true;
shoot(this);
};
turret.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
turret2.onMouseMove = function () {
this._rotation = (Math.atan2(_root._ymouse - this._y, _root._xmouse - this._x) / Math.PI) * 180;
updateAfterEvent();
};
crosshair.onMouseMove = function () {
crosshair._x = _root._xmouse;
crosshair._y = _root._ymouse;
};
crosshair.onEnterFrame = function () {
if (levelEnemies == 0) {
fader.play();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
_global.levelHits = 0;
_global.levelShots = 0;
}
if (mouseIsDown == true) {
if (_root.autoFireOn == true) {
shoot(turret2);
shoot2(turret);
}
}
};
Instance of Symbol 677 MovieClip in Frame 216
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sAction.stop();
_root.sAction.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() > 0) {
_root.sTears.setVolume(_root.sTears.getVolume() - 2);
}
if (_root.sAction.getVolume() < 70) {
_root.sAction.setVolume(_root.sAction.getVolume() + 2);
}
}
}
Frame 217
_root.levelNum = _root.levelNum + 1;
_root.level = "level" + _root.levelNum;
theHealth._visible = false;
_root.credits = _root.credits + 2;
_root.heldCredits = _root.heldCredits + 2;
Instance of Symbol 685 MovieClip in Frame 217
onClipEvent (load) {
if (_global.allIsMuted == false) {
_root.sTears.stop();
_root.sTears.start(0, 99);
}
}
onClipEvent (enterFrame) {
if (_global.allIsMuted == false) {
if (_root.sTears.getVolume() < 100) {
_root.sTears.setVolume(_root.sTears.getVolume() + 2);
}
if (_root.sAction.getVolume() > 0) {
_root.sAction.setVolume(_root.sAction.getVolume() - 2);
}
}
}
Instance of Symbol 767 MovieClip in Frame 226
on (release) {
if (_root.credits >= 1) {
if (_root.playerHealth >= 100) {
_root.sError.start();
} else {
_root.credits = _root.credits - 1;
_root.playerHealth = _root.playerHealth + 10;
_root.sPowerup.start();
}
} else {
_root.sError.start();
}
}
Frame 241
stop();
Mouse.show();
Instance of Symbol 783 MovieClip in Frame 241
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.play();
}
Instance of Symbol 767 MovieClip in Frame 241
on (release) {
if (_root.credits >= 1) {
if (_root.playerHealth >= 100) {
_root.sError.start();
} else {
_root.heldCredits = _root.heldCredits - 1;
_root.credits = _root.credits - 1;
_root.playerHealth = _root.playerHealth + 10;
_root.sPowerup.start();
}
} else {
_root.sError.start();
}
}
Instance of Symbol 767 MovieClip in Frame 256
on (release) {
if (_root.credits >= 1) {
if (_root.playerHealth >= 100) {
_root.sError.start();
} else {
_root.credits = _root.credits - 1;
_root.playerHealth = _root.playerHealth + 10;
_root.sPowerup.start();
}
} else {
_root.sError.start();
}
}
Frame 266
_root.gotoAndPlay(_root.level);
Mouse.hide();
Frame 267
Mouse.show();
Frame 268
MochiAd.showClickAwayAd({clip:adSpot, id:"a3b30c9551e1dd28"});
stop();
Frame 270
stop();
theHealth._visible = false;
Mouse.show();
_global.totalHits = _global.totalHits + _global.levelHits;
_global.totalShots = _global.totalShots + _global.levelShots;
i = 0;
while (i < enemyArray.length) {
enemyArray[i].removeMovieClip();
i++;
}
accuracy = Math.ceil(100 * (_global.totalHits / _global.totalShots));
totals.text = accuracy + "%";
howLeaked.text = _global.leaked;
destroyed.text = _root.enemiesDestroyed;
theScore.text = _global.totalScore * (1 + (_root.difficultyAdder / 10));
finalscore.text = Math.ceil((accuracy / 100) * ((_global.totalScore + (10 * _root.enemiesDestroyed)) - (10 * _global.leaked)));
Frame 271
stop();
Symbol 28 MovieClip Frame 17
_parent.play();
Symbol 29 MovieClip [testCopter] Frame 1
stop();
this.onEnterFrame = function () {
healthbar._xscale = 100 * (health / (20 + _root.difficultyAdder));
};
Symbol 29 MovieClip [testCopter] Frame 2
stop();
Symbol 29 MovieClip [testCopter] Frame 3
stop();
removeMovieClip(this._parent);
Symbol 38 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndPlay(2);
};
this.onRollOut = function () {
this.gotoAndPlay(11);
};
this.onRelease = function () {
getURL ("http://www.arcadefreedom.com", "_blank");
};
Symbol 38 MovieClip Frame 10
stop();
Symbol 817 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 818 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 819 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 820 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 76 MovieClip Frame 18
stop();
Symbol 77 MovieClip [bullet2] Frame 1
stop();
Symbol 77 MovieClip [bullet2] Frame 2
stop();
Symbol 80 MovieClip [bullet] Frame 1
stop();
Symbol 80 MovieClip [bullet] Frame 2
stop();
Symbol 86 MovieClip [Plane] Frame 1
stop();
this.onEnterFrame = function () {
healthbar._xscale = 100 * (health / (10 + _root.difficultyAdder));
};
Symbol 86 MovieClip [Plane] Frame 2
stop();
Symbol 86 MovieClip [Plane] Frame 3
stop();
removeMovieClip(this._parent);
Symbol 89 MovieClip [ChopperShadow] Frame 1
stop();
Symbol 92 MovieClip [PlaneShadow] Frame 1
stop();
Symbol 98 MovieClip [airPlane] Frame 1
stop();
this.onEnterFrame = function () {
healthbar._xscale = 100 * (health / (45 + _root.difficultyAdder));
};
Symbol 98 MovieClip [airPlane] Frame 2
stop();
Symbol 98 MovieClip [airPlane] Frame 3
stop();
removeMovieClip(this._parent);
Symbol 102 MovieClip [double] Frame 1
stop();
this.onEnterFrame = function () {
healthbar._xscale = 100 * (health / (45 + _root.difficultyAdder));
};
Symbol 102 MovieClip [double] Frame 2
stop();
Symbol 102 MovieClip [double] Frame 3
stop();
removeMovieClip(this._parent);
Symbol 105 MovieClip [missle] Frame 1
stop();
this.onEnterFrame = function () {
healthbar._xscale = 100 * (health / (1 + _root.difficultyAdder));
};
Symbol 105 MovieClip [missle] Frame 2
stop();
Symbol 105 MovieClip [missle] Frame 3
stop();
removeMovieClip(this._parent);
Symbol 108 MovieClip [enterprise] Frame 1
stop();
this.onEnterFrame = function () {
healthbar._xscale = 100 * (health / 20);
};
Symbol 108 MovieClip [enterprise] Frame 2
stop();
Symbol 108 MovieClip [enterprise] Frame 3
stop();
removeMovieClip(this._parent);
Symbol 235 MovieClip [muzzleFire] Frame 65
removeMovieClip(this);
Symbol 237 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.arcadefreedom.com", "_blank");
};
Symbol 266 MovieClip Frame 1
sDrum = new Sound(this);
sDrum.attachSound("drum");
sExplosion12 = new Sound(this);
sExplosion12.attachSound("explosion12");
sDrum.start();
Symbol 266 MovieClip Frame 20
sDrum.stop();
sExplosion12.start(0.3, 0);
Symbol 266 MovieClip Frame 101
stop();
_parent.play();
Symbol 287 MovieClip Frame 2
shotgun = new Sound(this);
shotgun.attachSound("shotgun");
shotgun.setVolume(80);
logo = new Sound(this);
logo.attachSound("logo");
logo.setVolume(80);
logo2 = new Sound(this);
logo2.attachSound("logo2");
logo2.setVolume(80);
zombie = new Sound(this);
zombie.attachSound("zombie");
zombie.setVolume(80);
creak = new Sound(this);
creak.attachSound("creak");
creak.setVolume(80);
creak.start();
Symbol 287 MovieClip Frame 24
creak.stop();
Symbol 287 MovieClip Frame 25
zombie.start();
Symbol 287 MovieClip Frame 55
zombie.stop();
shotgun.start();
Symbol 287 MovieClip Frame 65
shotgun.start();
Symbol 287 MovieClip Frame 71
shotgun.start();
Symbol 287 MovieClip Frame 80
shotgun.start();
Symbol 287 MovieClip Frame 92
logo2.start();
Symbol 287 MovieClip Frame 106
logo.start();
Symbol 287 MovieClip Frame 150
stop();
Symbol 292 MovieClip Frame 70
stop();
Symbol 318 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 318 MovieClip Frame 2
stop();
Symbol 321 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 321 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 324 MovieClip Frame 2
stop();
Symbol 327 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
swan = Math.random() * 10;
if (swan <= 5) {
getURL ("http://www.crookedalley.com");
} else {
getURL ("http://www.arcadefreedom.com");
}
};
this.onRelease = function () {
swan = Math.random() * 10;
if (swan <= 5) {
getURL ("http://www.crookedalley.com");
} else {
getURL ("http://www.arcadefreedom.com");
}
};
Symbol 327 MovieClip Frame 2
stop();
Instance of Symbol 318 MovieClip in Symbol 328 MovieClip Frame 1
on (release) {
_root.fader.play();
}
Instance of Symbol 321 MovieClip in Symbol 328 MovieClip Frame 1
on (release) {
_root.titleTarget = "instruct";
_root.titleContent.play();
}
Instance of Symbol 324 MovieClip in Symbol 328 MovieClip Frame 1
on (release) {
_root.titleTarget = "settings";
_root.titleContent.play();
}
Symbol 331 MovieClip Frame 1
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndPlay("thisGame");
};
stop();
Symbol 332 MovieClip Frame 1
btn.enabled = false;
Symbol 332 MovieClip Frame 140
stop();
Symbol 341 MovieClip Frame 1
var myBevelFilter = (new flash.filters.BevelFilter(1, 45, 16777215, 0.01, 0, 1, 1, 1, 1, 1, "inner", false));
emblem.filters = [myBevelFilter];
angle = 0;
emblem.onEnterFrame = function () {
angle = angle + 0.5;
if (angle > 360) {
angle = 0;
}
var _local1 = new flash.filters.BevelFilter(4, angle, 16777215, 1, 0, 1, 4, 4, 1, 1, "inner", false);
emblem.filters = [_local1];
};
Symbol 346 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 346 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 349 MovieClip Frame 2
stop();
Instance of Symbol 346 MovieClip in Symbol 350 MovieClip Frame 1
on (release) {
_root.titleTarget = "backToMain";
_parent._parent.play();
}
Instance of Symbol 349 MovieClip in Symbol 350 MovieClip Frame 1
on (release) {
_root.titleTarget = "controls";
_parent._parent.play();
}
Instance of Symbol 346 MovieClip in Symbol 375 MovieClip Frame 1
on (release) {
_root.titleTarget = "backToMain";
_parent._parent.play();
}
Instance of Symbol 321 MovieClip in Symbol 375 MovieClip Frame 1
on (release) {
_root.titleTarget = "instruct";
_parent._parent.play();
}
Symbol 385 MovieClip Frame 1
stop();
if (_root.autoFireOn == true) {
autoSet.text = "off";
} else {
autoSet.text = "on";
}
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
trace(this);
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 385 MovieClip Frame 2
stop();
if (_root.autoFireOn == true) {
autoSet.text = "off";
_parent.autoStatus.text = "auto fire is on, hold mouse to shoot";
} else {
autoSet.text = "on";
_parent.autoStatus.text = "auto fire is off, click mouse to shoot";
}
Symbol 385 MovieClip Frame 3
stop();
gotoAndStop (2);
Symbol 392 MovieClip Frame 1
stop();
if (_global.allIsMuted == false) {
autoSet.text = "off";
} else {
autoSet.text = "on";
}
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 392 MovieClip Frame 2
stop();
if (_global.allIsMuted == false) {
autoSet.text = "off";
_parent.soundStatus.text = "sounds are currently on";
} else {
autoSet.text = "on";
_parent.soundStatus.text = "sounds are currently off";
}
Symbol 392 MovieClip Frame 3
stop();
gotoAndStop (2);
Symbol 396 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
if (_root.difficultyAdder == 0) {
_parent.hardStatus.text = "easy mode";
} else if (_root.difficultyAdder == 10) {
_parent.hardStatus.text = "medium mode";
} else {
_parent.hardStatus.text = "hard mode";
}
Symbol 396 MovieClip Frame 2
stop();
if (_root.difficultyAdder == 0) {
_parent.hardStatus.text = "easy mode";
} else if (_root.difficultyAdder == 10) {
_parent.hardStatus.text = "medium mode";
} else {
_parent.hardStatus.text = "hard mode";
}
Symbol 396 MovieClip Frame 3
stop();
gotoAndStop (2);
Symbol 399 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.crookedalley.com/passwords", "_blank");
};
Symbol 406 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
if (_parent.pass.text == "Apache") {
_root.maxShots1 = 0.1;
_root.maxShots2 = 0.1;
_root.sPowerup.start();
_parent.pass.text = "ACCEPTED";
} else if (_parent.pass.text == "Night Fire") {
_root.velocity = 1000;
_root.velocity2 = 1000;
_root.sPowerup.start();
_parent.pass.text = "ACCEPTED";
} else if (_parent.pass.text == "Terror Spy") {
_root.velocity = 650;
_root.velocity2 = 650;
_root.maxShots1 = 1;
_root.maxShots2 = 1;
_root.scale = 100;
_root.scale2 = 100;
_root.damage1 = 17;
_root.damage2 = 17;
_root.sPowerup.start();
_parent.pass.text = "ACCEPTED";
} else if (_parent.pass.text == "Make It So") {
_root.sPowerup.start();
_parent.pass.text = "ACCEPTED";
_root.gotoAndPlay("enterprise");
} else {
_root.sError.start();
_root.pass.text = "DENIED";
}
};
Symbol 411 MovieClip Frame 1
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
this.gotoAndStop(2);
}
}
urls_allowed = ["www.crookedalley.com", "www.arcadefreedom.com"];
sitelock(urls_allowed);
stop();
Symbol 411 MovieClip Frame 2
stop();
pass.enabled = false;
Symbol 412 MovieClip Frame 1
autoStatus.text = "auto fire is off, click mouse to shoot";
soundStatus.text = "sounds are currently on";
Instance of Symbol 346 MovieClip in Symbol 412 MovieClip Frame 1
on (release) {
_root.titleTarget = "backToMain";
_parent._parent.play();
}
Instance of Symbol 385 MovieClip "btnAutoFire" in Symbol 412 MovieClip Frame 1
on (release) {
if (_root.autoFireOn == false) {
_root.autoFireOn = true;
} else {
_root.autoFireOn = false;
}
this.gotoAndStop(3);
}
Instance of Symbol 392 MovieClip "btnSounds" in Symbol 412 MovieClip Frame 1
on (release) {
if (_global.allIsMuted == false) {
_global.allIsMuted = true;
_root.muteAllSounds();
} else {
_global.allIsMuted = false;
_root.unMuteAllSounds();
_root.sAction.stop();
}
this.gotoAndStop(3);
}
Instance of Symbol 396 MovieClip "btnSounds" in Symbol 412 MovieClip Frame 1
on (release) {
if (_root.difficultyAdder == 0) {
_root.difficultyAdder = 10;
} else if (_root.difficultyAdder == 10) {
_root.difficultyAdder = 20;
} else {
_root.difficultyAdder = 0;
}
this.gotoAndStop(3);
}
Symbol 413 MovieClip Frame 1
btn.enabled = false;
Symbol 413 MovieClip Frame 85
stop();
Symbol 413 MovieClip Frame 95
gotoAndPlay(_root.titleTarget);
Symbol 413 MovieClip Frame 110
stop();
Symbol 413 MovieClip Frame 120
gotoAndPlay(_root.titleTarget);
Symbol 413 MovieClip Frame 135
stop();
Symbol 413 MovieClip Frame 145
gotoAndPlay(_root.titleTarget);
Symbol 413 MovieClip Frame 160
gotoAndStop (85);
Symbol 413 MovieClip Frame 175
stop();
Symbol 413 MovieClip Frame 185
gotoAndPlay(_root.titleTarget);
Symbol 417 MovieClip Frame 25
stop();
Symbol 417 MovieClip Frame 40
_root.gotoAndPlay("level1");
Symbol 436 MovieClip Frame 1
timer = 0;
line.onEnterFrame = function () {
timer++;
if (timer > 1) {
timer = 0;
line._x = Math.ceil(650 * Math.random());
}
};
pops.onEnterFrame = function () {
pops._x = Math.ceil(650 * Math.random());
pops._y = Math.ceil(450 * Math.random());
};
Symbol 577 MovieClip Frame 1
stop();
Symbol 578 MovieClip Frame 1
stop();
Symbol 585 MovieClip Frame 1
_root.addCopter(45);
_root.levelEnemies = 17;
Symbol 585 MovieClip Frame 145
_root.addCopter(380);
Symbol 585 MovieClip Frame 214
_root.addCopter(45);
Symbol 585 MovieClip Frame 275
_root.addCopter(445);
Symbol 585 MovieClip Frame 430
_root.addCopter(100);
Symbol 585 MovieClip Frame 575
_root.addCopter(145);
Symbol 585 MovieClip Frame 668
_root.addCopter(275);
Symbol 585 MovieClip Frame 669
_root.addCopter(325);
Symbol 585 MovieClip Frame 860
_root.addCopter(555);
Symbol 585 MovieClip Frame 925
_root.addCopter(45);
Symbol 585 MovieClip Frame 960
_root.addCopter(345);
Symbol 585 MovieClip Frame 1005
_root.addCopter(513);
Symbol 585 MovieClip Frame 1080
_root.addCopter(300);
Symbol 585 MovieClip Frame 1081
_root.addCopter(345);
Symbol 585 MovieClip Frame 1150
_root.addCopter(45);
Symbol 585 MovieClip Frame 1240
_root.addCopter(600);
Symbol 585 MovieClip Frame 1365
_root.addCopter(100);
stop();
Symbol 602 MovieClip Frame 1
stop();
Symbol 602 MovieClip Frame 2
stop();
Symbol 602 MovieClip Frame 3
stop();
Symbol 602 MovieClip Frame 4
stop();
Symbol 602 MovieClip Frame 5
stop();
Symbol 602 MovieClip Frame 6
stop();
Symbol 602 MovieClip Frame 7
stop();
Symbol 602 MovieClip Frame 8
stop();
Symbol 602 MovieClip Frame 9
stop();
Symbol 602 MovieClip Frame 10
stop();
Symbol 602 MovieClip Frame 11
stop();
Symbol 602 MovieClip Frame 12
stop();
Symbol 602 MovieClip Frame 13
stop();
Symbol 602 MovieClip Frame 14
stop();
Symbol 602 MovieClip Frame 15
stop();
Symbol 602 MovieClip Frame 16
stop();
Symbol 602 MovieClip Frame 17
stop();
Symbol 602 MovieClip Frame 18
stop();
Symbol 602 MovieClip Frame 19
stop();
Symbol 602 MovieClip Frame 20
stop();
Symbol 602 MovieClip Frame 21
stop();
Symbol 602 MovieClip Frame 22
stop();
Symbol 602 MovieClip Frame 23
stop();
Symbol 602 MovieClip Frame 24
stop();
Symbol 602 MovieClip Frame 25
stop();
Symbol 602 MovieClip Frame 26
stop();
Symbol 602 MovieClip Frame 27
stop();
Symbol 602 MovieClip Frame 28
stop();
Symbol 602 MovieClip Frame 29
stop();
Symbol 602 MovieClip Frame 30
stop();
Symbol 602 MovieClip Frame 31
stop();
Symbol 602 MovieClip Frame 32
stop();
Symbol 602 MovieClip Frame 33
stop();
Symbol 602 MovieClip Frame 34
stop();
Symbol 602 MovieClip Frame 35
stop();
Symbol 602 MovieClip Frame 36
stop();
Symbol 602 MovieClip Frame 37
stop();
Symbol 602 MovieClip Frame 38
stop();
Symbol 602 MovieClip Frame 39
stop();
Symbol 602 MovieClip Frame 40
stop();
Symbol 602 MovieClip Frame 41
stop();
Symbol 602 MovieClip Frame 42
stop();
Symbol 602 MovieClip Frame 43
stop();
Symbol 602 MovieClip Frame 44
stop();
Symbol 602 MovieClip Frame 45
stop();
Symbol 602 MovieClip Frame 46
stop();
Symbol 602 MovieClip Frame 47
stop();
Symbol 602 MovieClip Frame 48
stop();
Symbol 602 MovieClip Frame 49
stop();
Symbol 602 MovieClip Frame 50
stop();
Symbol 602 MovieClip Frame 51
stop();
Symbol 602 MovieClip Frame 52
stop();
Symbol 602 MovieClip Frame 53
stop();
Symbol 602 MovieClip Frame 54
stop();
Symbol 602 MovieClip Frame 55
stop();
Symbol 602 MovieClip Frame 56
stop();
Symbol 602 MovieClip Frame 57
stop();
Symbol 602 MovieClip Frame 58
stop();
Symbol 602 MovieClip Frame 59
stop();
Symbol 602 MovieClip Frame 60
stop();
Symbol 602 MovieClip Frame 61
stop();
Symbol 602 MovieClip Frame 62
stop();
Symbol 602 MovieClip Frame 63
stop();
Symbol 602 MovieClip Frame 64
stop();
Symbol 602 MovieClip Frame 65
stop();
Symbol 602 MovieClip Frame 66
stop();
Symbol 602 MovieClip Frame 67
stop();
Symbol 602 MovieClip Frame 68
stop();
Symbol 602 MovieClip Frame 69
stop();
Symbol 602 MovieClip Frame 70
stop();
Symbol 602 MovieClip Frame 71
stop();
Symbol 602 MovieClip Frame 72
stop();
Symbol 602 MovieClip Frame 73
stop();
Symbol 602 MovieClip Frame 74
stop();
Symbol 602 MovieClip Frame 75
stop();
Symbol 602 MovieClip Frame 76
stop();
Symbol 602 MovieClip Frame 77
stop();
Symbol 602 MovieClip Frame 78
stop();
Symbol 602 MovieClip Frame 79
stop();
Symbol 602 MovieClip Frame 80
stop();
Symbol 602 MovieClip Frame 81
stop();
Symbol 602 MovieClip Frame 82
stop();
Symbol 602 MovieClip Frame 83
stop();
Symbol 602 MovieClip Frame 84
stop();
Symbol 602 MovieClip Frame 85
stop();
Symbol 602 MovieClip Frame 86
stop();
Symbol 602 MovieClip Frame 87
stop();
Symbol 602 MovieClip Frame 88
stop();
Symbol 602 MovieClip Frame 89
stop();
Symbol 602 MovieClip Frame 90
stop();
Symbol 602 MovieClip Frame 91
stop();
Symbol 602 MovieClip Frame 92
stop();
Symbol 602 MovieClip Frame 93
stop();
Symbol 602 MovieClip Frame 94
stop();
Symbol 602 MovieClip Frame 95
stop();
Symbol 602 MovieClip Frame 96
stop();
Symbol 602 MovieClip Frame 97
stop();
Symbol 602 MovieClip Frame 98
stop();
Symbol 602 MovieClip Frame 99
stop();
Symbol 602 MovieClip Frame 100
stop();
Symbol 611 MovieClip Frame 1
if (_root.autoFireOn == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
stop();
this.onRollOver = function () {
Mouse.show();
};
this.onRollOut = function () {
Mouse.hide();
};
this.onReleaseOutside = function () {
Mouse.hide();
};
this.onRelease = function () {
Mouse.hide();
if (_root.autoFireOn == false) {
this.gotoAndStop(2);
_root.autoFireOn = true;
_root.sPowerup.start();
} else {
this.gotoAndStop(1);
_root.autoFireOn = false;
_root.sPowerup.start();
}
};
Symbol 611 MovieClip Frame 2
stop();
Symbol 622 MovieClip Frame 1
if (_root._quality == "LOW") {
this.gotoAndStop(1);
} else if (_root._quality == "MEDIUM") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
stop();
this.onRollOver = function () {
Mouse.show();
};
this.onRollOut = function () {
Mouse.hide();
};
this.onReleaseOutside = function () {
Mouse.hide();
};
this.onRelease = function () {
if (_root._quality == "LOW") {
_root._quality = "MEDIUM";
this.gotoAndStop(2);
} else if (_root._quality == "MEDIUM") {
_root._quality = "HIGH";
this.gotoAndStop(3);
} else {
_root._quality = "LOW";
this.gotoAndStop(1);
}
};
Symbol 622 MovieClip Frame 2
stop();
Symbol 622 MovieClip Frame 3
stop();
Symbol 624 MovieClip Frame 1
hub.healthBar.gotoAndStop(_root.playerHealth);
stop();
Symbol 627 MovieClip Frame 15
stop();
Symbol 627 MovieClip Frame 30
_root.gotoAndPlay("upgrader");
Symbol 629 MovieClip Frame 1
_root.levelEnemies = 22;
Symbol 629 MovieClip Frame 21
_root.addPlane(340);
Symbol 629 MovieClip Frame 85
_root.addPlane(50);
Symbol 629 MovieClip Frame 87
_root.addPlane(325);
Symbol 629 MovieClip Frame 190
_root.addPlane(380);
Symbol 629 MovieClip Frame 234
_root.addPlane(75);
Symbol 629 MovieClip Frame 295
_root.addPlane(445);
Symbol 629 MovieClip Frame 450
_root.addPlane(450);
Symbol 629 MovieClip Frame 500
_root.addPlane(57);
Symbol 629 MovieClip Frame 595
_root.addPlane(145);
Symbol 629 MovieClip Frame 635
_root.addPlane(400);
Symbol 629 MovieClip Frame 730
_root.addPlane(125);
Symbol 629 MovieClip Frame 774
_root.addPlane(300);
Symbol 629 MovieClip Frame 850
_root.addPlane(150);
Symbol 629 MovieClip Frame 851
_root.addPlane(450);
Symbol 629 MovieClip Frame 905
_root.addPlane(300);
Symbol 629 MovieClip Frame 965
_root.addPlane(500);
Symbol 629 MovieClip Frame 1015
_root.addPlane(600);
Symbol 629 MovieClip Frame 1135
_root.addPlane(150);
Symbol 629 MovieClip Frame 1136
_root.addPlane(400);
Symbol 629 MovieClip Frame 1137
_root.addPlane(200);
Symbol 629 MovieClip Frame 1138
_root.addPlane(300);
Symbol 629 MovieClip Frame 1139
_root.addPlane(350);
stop();
Symbol 630 MovieClip Frame 1
_root.levelEnemies = 15;
Symbol 630 MovieClip Frame 26
_root.addPlane(300);
Symbol 630 MovieClip Frame 27
_root.addPlane(350);
Symbol 630 MovieClip Frame 135
_root.addCopter(500);
Symbol 630 MovieClip Frame 136
_root.addCopter(600);
Symbol 630 MovieClip Frame 185
_root.addPlane(550);
Symbol 630 MovieClip Frame 205
_root.addPlane(140);
Symbol 630 MovieClip Frame 300
_root.addCopter(445);
Symbol 630 MovieClip Frame 455
_root.addPlane(57);
Symbol 630 MovieClip Frame 475
_root.addPlane(107);
Symbol 630 MovieClip Frame 505
_root.addPlane(157);
Symbol 630 MovieClip Frame 575
_root.addPlane(190);
Symbol 630 MovieClip Frame 600
_root.addCopter(125);
Symbol 630 MovieClip Frame 640
_root.addCopter(223);
Symbol 630 MovieClip Frame 662
_root.addPlane(290);
Symbol 630 MovieClip Frame 680
_root.addCopter(325);
Symbol 630 MovieClip Frame 695
stop();
Symbol 631 MovieClip Frame 1
_root.addBomber(300);
_root.levelEnemies = 20;
Symbol 631 MovieClip Frame 2
_root.addBomber(350);
Symbol 631 MovieClip Frame 110
_root.addCopter(500);
Symbol 631 MovieClip Frame 111
_root.addCopter(600);
Symbol 631 MovieClip Frame 120
_root.addPlane(550);
Symbol 631 MovieClip Frame 140
_root.addPlane(550);
Symbol 631 MovieClip Frame 160
_root.addPlane(550);
Symbol 631 MovieClip Frame 180
_root.addBomber(140);
Symbol 631 MovieClip Frame 202
_root.addBomber(66);
Symbol 631 MovieClip Frame 214
_root.addPlane(66);
Symbol 631 MovieClip Frame 275
_root.addPlane(445);
Symbol 631 MovieClip Frame 430
_root.addPlane(57);
Symbol 631 MovieClip Frame 450
_root.addPlane(107);
Symbol 631 MovieClip Frame 480
_root.addPlane(157);
Symbol 631 MovieClip Frame 575
_root.addBomber(325);
Symbol 631 MovieClip Frame 615
_root.addBomber(275);
Symbol 631 MovieClip Frame 616
_root.addBomber(375);
Symbol 631 MovieClip Frame 655
_root.addBomber(275);
Symbol 631 MovieClip Frame 656
_root.addBomber(375);
Symbol 631 MovieClip Frame 657
_root.addBomber(325);
stop();
Symbol 633 MovieClip Frame 1
function getEnemy() {
number = Math.ceil(Math.random() * 15);
place = Math.ceil(Math.random() * 550) + 50;
if ((number >= one) && (number < two)) {
_root.addCopter(place);
} else if ((number >= two) && (number < three)) {
_root.addPlane(place);
} else if ((number >= three) && (number < four)) {
_root.addBomber(place);
} else if ((number >= four) && (number < five)) {
_root.addDouble(place);
} else {
_root.addMissle(place);
}
}
stop();
one = 1;
two = 6;
three = 10;
four = 14;
five = 15;
_root.levelNum = 5;
_root.levelEnemies = _root.levelNum * 4;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 30) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 340) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 15;
}
}
};
Symbol 634 MovieClip Frame 1
function getEnemy() {
number = Math.ceil(Math.random() * 15);
place = Math.ceil(Math.random() * 550) + 50;
if ((number >= one) && (number < two)) {
_root.addCopter(place);
} else if ((number >= two) && (number < three)) {
_root.addPlane(place);
} else if ((number >= three) && (number < four)) {
_root.addBomber(place);
} else if ((number >= four) && (number < five)) {
_root.addDouble(place);
} else {
_root.addMissle(place);
}
}
stop();
one = 1;
two = 5;
three = 8;
four = 13;
five = 14;
_root.levelEnemies = _root.levelNum * 4;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 27) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 330) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 13;
}
}
};
Symbol 635 MovieClip Frame 1
function getEnemy() {
number = Math.ceil(Math.random() * 15);
place = Math.ceil(Math.random() * 550) + 50;
if ((number >= one) && (number < two)) {
_root.addCopter(place);
} else if ((number >= two) && (number < three)) {
_root.addPlane(place);
} else if ((number >= three) && (number < four)) {
_root.addBomber(place);
} else if ((number >= four) && (number < five)) {
_root.addDouble(place);
} else {
_root.addMissle(place);
}
}
stop();
one = 1;
two = 4;
three = 7;
four = 12;
five = 13;
_root.levelEnemies = _root.levelNum * 4;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 24) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 320) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 11;
}
}
};
Symbol 636 MovieClip Frame 1
function getEnemy() {
number = Math.ceil(Math.random() * 15);
place = Math.ceil(Math.random() * 550) + 50;
if ((number >= one) && (number < two)) {
_root.addCopter(place);
} else if ((number >= two) && (number < three)) {
_root.addPlane(place);
} else if ((number >= three) && (number < four)) {
_root.addBomber(place);
} else if ((number >= four) && (number < five)) {
_root.addDouble(place);
} else {
_root.addMissle(place);
}
}
stop();
one = 1;
two = 3;
three = 6;
four = 10;
five = 11;
_root.levelEnemies = _root.levelNum * 4;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 21) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 310) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 9;
}
}
};
Symbol 637 MovieClip Frame 1
function getEnemy() {
number = Math.ceil(Math.random() * 15);
place = Math.ceil(Math.random() * 550) + 50;
if ((number >= one) && (number < two)) {
_root.addCopter(place);
} else if ((number >= two) && (number < three)) {
_root.addPlane(place);
} else if ((number >= three) && (number < four)) {
_root.addBomber(place);
} else if ((number >= four) && (number < five)) {
_root.addDouble(place);
} else {
_root.addMissle(place);
}
}
stop();
one = 1;
two = 1;
three = 3;
four = 6;
five = 8;
_root.levelEnemies = _root.levelNum * 4;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 18) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 300) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 9;
}
}
};
Symbol 640 MovieClip Frame 15
stop();
Symbol 640 MovieClip Frame 16
this.swapDepths(_root.getNextHighestDepth());
Symbol 640 MovieClip Frame 30
_parent.theHealth._visible = false;
_root.gotoAndPlay("preBoss");
Symbol 665 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndPlay(2);
};
this.onRollOut = function () {
this.gotoAndPlay(16);
};
this.onRelease = function () {
_parent.fader.play();
};
Symbol 665 MovieClip Frame 15
stop();
Symbol 666 MovieClip Frame 1
function getEnemy() {
place = Math.ceil(Math.random() * 550) + 50;
_root.addMissle(place);
}
stop();
_root.levelEnemies = _root.levelNum * 6;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 15) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 285) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 7;
}
}
};
Symbol 673 MovieClip Frame 30
stop();
Symbol 673 MovieClip Frame 31
_root.sAction.stop();
_root.sDestruct2.setVolume(75);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 37
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 43
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 49
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 55
_root.sAction.stop();
_root.sDestruct2.setVolume(75);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 61
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 67
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 73
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 79
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 86
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 92
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 97
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 101
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 104
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 107
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 110
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 115
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 119
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 123
_root.sDestruct2.setVolume(65);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 127
_root.sDestruct2.setVolume(60);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 132
_root.sDestruct2.setVolume(55);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 137
_root.sDestruct2.setVolume(45);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 142
_root.sDestruct2.setVolume(40);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 147
_root.sDestruct2.setVolume(35);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 153
_root.sDestruct2.setVolume(30);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 159
_root.sDestruct2.setVolume(25);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 166
_root.sDestruct2.setVolume(15);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 174
_root.sDestruct2.setVolume(5);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 178
_root.sDestruct2.setVolume(5);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 184
_root.sDestruct2.setVolume(35);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 190
_root.sDestruct2.setVolume(55);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 196
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 204
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 212
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 214
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 223
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 233
_root.sDestruct2.setVolume(115);
_root.sDestruct2.start();
Symbol 673 MovieClip Frame 251
stop();
_parent.fader.play();
Symbol 676 MovieClip Frame 15
stop();
Symbol 676 MovieClip Frame 16
this.swapDepths(_root.getNextHighestDepth());
Symbol 676 MovieClip Frame 30
_parent.theHealth._visible = false;
_root.gotoAndPlay("gameOver");
Symbol 677 MovieClip Frame 1
function getEnemy() {
place = Math.ceil(Math.random() * 550) + 50;
_root.addEnterprise(place);
}
stop();
_root.levelEnemies = 50;
_root.originalEnemies = _root.levelEnemies;
var deployed = 0;
var theTimer = 0;
EnTimer.onEnterFrame = function () {
theTimer++;
if (theTimer > 15) {
theTimer = 0;
AdderTimer = Math.random() * 500;
if ((AdderTimer > 285) && (deployed < _root.originalEnemies)) {
AdderTimer = 0;
deployed++;
getEnemy();
} else {
theTimer = 7;
}
}
};
Symbol 680 MovieClip Frame 15
stop();
Symbol 680 MovieClip Frame 16
this.swapDepths(_root.getNextHighestDepth());
Symbol 680 MovieClip Frame 30
_parent.theHealth._visible = false;
_root.gotoAndPlay("gameOver");
Symbol 723 MovieClip Frame 1
stop();
Symbol 723 MovieClip Frame 2
stop();
Symbol 723 MovieClip Frame 3
stop();
Symbol 723 MovieClip Frame 4
stop();
Symbol 723 MovieClip Frame 5
stop();
Symbol 730 MovieClip Frame 1
fire.onEnterFrame = function () {
if (_root.maxShots1 == 3) {
fire.gotoAndStop(1);
} else if (_root.maxShots1 == 2.5) {
fire.gotoAndStop(2);
} else if (_root.maxShots1 == 2) {
fire.gotoAndStop(3);
} else if (_root.maxShots1 == 1.5) {
fire.gotoAndStop(4);
} else if (_root.maxShots1 == 1) {
fire.gotoAndStop(5);
}
if (_root.velocity == 250) {
speed.gotoAndStop(1);
} else if (_root.velocity == 350) {
speed.gotoAndStop(2);
} else if (_root.velocity == 450) {
speed.gotoAndStop(3);
} else if (_root.velocity == 550) {
speed.gotoAndStop(4);
} else if (_root.velocity == 650) {
speed.gotoAndStop(5);
}
if (_root.scale == 60) {
size.gotoAndStop(1);
} else if (_root.scale == 70) {
size.gotoAndStop(2);
} else if (_root.scale == 80) {
size.gotoAndStop(3);
} else if (_root.scale == 90) {
size.gotoAndStop(4);
} else if (_root.scale == 100) {
size.gotoAndStop(5);
}
if (_root.damage1 == 5) {
damage.gotoAndStop(1);
} else if (_root.damage1 == 8) {
damage.gotoAndStop(2);
} else if (_root.damage1 == 11) {
damage.gotoAndStop(3);
} else if (_root.damage1 == 14) {
damage.gotoAndStop(4);
} else if (_root.damage1 == 17) {
damage.gotoAndStop(5);
}
_parent.creditsLeft.text = _root.credits;
};
Instance of Symbol 723 MovieClip "fire" in Symbol 730 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.maxShots1 > 1)) {
_root.credits = _root.credits - 1;
_root.maxShots1 = _root.maxShots1 - 0.5;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Instance of Symbol 723 MovieClip "speed" in Symbol 730 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.velocity < 650)) {
_root.credits = _root.credits - 1;
_root.velocity = _root.velocity + 100;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Instance of Symbol 723 MovieClip "size" in Symbol 730 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.scale < 100)) {
_root.credits = _root.credits - 1;
_root.scale = _root.scale + 10;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Instance of Symbol 723 MovieClip "damage" in Symbol 730 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.damage1 < 17)) {
_root.credits = _root.credits - 1;
_root.damage1 = _root.damage1 + 3;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Symbol 733 MovieClip Frame 1
fire.onEnterFrame = function () {
if (_root.maxShots2 == 3) {
fire.gotoAndStop(1);
} else if (_root.maxShots2 == 2.5) {
fire.gotoAndStop(2);
} else if (_root.maxShots2 == 2) {
fire.gotoAndStop(3);
} else if (_root.maxShots2 == 1.5) {
fire.gotoAndStop(4);
} else if (_root.maxShots2 == 1) {
fire.gotoAndStop(5);
}
if (_root.velocity2 == 250) {
speed.gotoAndStop(1);
} else if (_root.velocity2 == 350) {
speed.gotoAndStop(2);
} else if (_root.velocity2 == 450) {
speed.gotoAndStop(3);
} else if (_root.velocity2 == 550) {
speed.gotoAndStop(4);
} else if (_root.velocity2 == 650) {
speed.gotoAndStop(5);
}
if (_root.scale2 == 60) {
size.gotoAndStop(1);
} else if (_root.scale2 == 70) {
size.gotoAndStop(2);
} else if (_root.scale2 == 80) {
size.gotoAndStop(3);
} else if (_root.scale2 == 90) {
size.gotoAndStop(4);
} else if (_root.scale2 == 100) {
size.gotoAndStop(5);
}
if (_root.damage2 == 5) {
damage.gotoAndStop(1);
} else if (_root.damage2 == 8) {
damage.gotoAndStop(2);
} else if (_root.damage2 == 11) {
damage.gotoAndStop(3);
} else if (_root.damage2 == 14) {
damage.gotoAndStop(4);
} else if (_root.damage2 == 17) {
damage.gotoAndStop(5);
}
_parent.creditsLeft.text = _root.credits;
};
Instance of Symbol 723 MovieClip "fire" in Symbol 733 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.maxShots2 > 1)) {
_root.credits = _root.credits - 1;
_root.maxShots2 = _root.maxShots2 - 0.5;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Instance of Symbol 723 MovieClip "speed" in Symbol 733 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.velocity2 < 650)) {
_root.credits = _root.credits - 1;
_root.velocity2 = _root.velocity2 + 100;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Instance of Symbol 723 MovieClip "size" in Symbol 733 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.scale2 < 100)) {
_root.credits = _root.credits - 1;
_root.scale2 = _root.scale2 + 10;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Instance of Symbol 723 MovieClip "damage" in Symbol 733 MovieClip Frame 1
on (release) {
if ((_root.credits >= 1) && (_root.damage2 < 17)) {
_root.credits = _root.credits - 1;
_root.damage2 = _root.damage2 + 3;
_root.sPowerup.start();
} else {
_root.sError.start();
}
}
Symbol 744 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 2
stop();
Symbol 744 MovieClip Frame 3
stop();
Symbol 744 MovieClip Frame 4
stop();
Symbol 744 MovieClip Frame 5
stop();
Symbol 744 MovieClip Frame 6
stop();
Symbol 744 MovieClip Frame 7
stop();
Symbol 744 MovieClip Frame 8
stop();
Symbol 744 MovieClip Frame 9
stop();
Symbol 744 MovieClip Frame 10
stop();
Symbol 744 MovieClip Frame 11
stop();
Symbol 744 MovieClip Frame 12
stop();
Symbol 744 MovieClip Frame 13
stop();
Symbol 744 MovieClip Frame 14
stop();
Symbol 744 MovieClip Frame 15
stop();
Symbol 744 MovieClip Frame 16
stop();
Symbol 744 MovieClip Frame 17
stop();
Symbol 744 MovieClip Frame 18
stop();
Symbol 744 MovieClip Frame 19
stop();
Symbol 744 MovieClip Frame 20
stop();
Symbol 744 MovieClip Frame 21
stop();
Symbol 744 MovieClip Frame 22
stop();
Symbol 744 MovieClip Frame 23
stop();
Symbol 744 MovieClip Frame 24
stop();
Symbol 744 MovieClip Frame 25
stop();
Symbol 744 MovieClip Frame 26
stop();
Symbol 744 MovieClip Frame 27
stop();
Symbol 744 MovieClip Frame 28
stop();
Symbol 744 MovieClip Frame 29
stop();
Symbol 744 MovieClip Frame 30
stop();
Symbol 744 MovieClip Frame 31
stop();
Symbol 744 MovieClip Frame 32
stop();
Symbol 744 MovieClip Frame 33
stop();
Symbol 744 MovieClip Frame 34
stop();
Symbol 744 MovieClip Frame 35
stop();
Symbol 744 MovieClip Frame 36
stop();
Symbol 744 MovieClip Frame 37
stop();
Symbol 744 MovieClip Frame 38
stop();
Symbol 744 MovieClip Frame 39
stop();
Symbol 744 MovieClip Frame 40
stop();
Symbol 744 MovieClip Frame 41
stop();
Symbol 744 MovieClip Frame 42
stop();
Symbol 744 MovieClip Frame 43
stop();
Symbol 744 MovieClip Frame 44
stop();
Symbol 744 MovieClip Frame 45
stop();
Symbol 744 MovieClip Frame 46
stop();
Symbol 744 MovieClip Frame 47
stop();
Symbol 744 MovieClip Frame 48
stop();
Symbol 744 MovieClip Frame 49
stop();
Symbol 744 MovieClip Frame 50
stop();
Symbol 744 MovieClip Frame 51
stop();
Symbol 744 MovieClip Frame 52
stop();
Symbol 744 MovieClip Frame 53
stop();
Symbol 744 MovieClip Frame 54
stop();
Symbol 744 MovieClip Frame 55
stop();
Symbol 744 MovieClip Frame 56
stop();
Symbol 744 MovieClip Frame 57
stop();
Symbol 744 MovieClip Frame 58
stop();
Symbol 744 MovieClip Frame 59
stop();
Symbol 744 MovieClip Frame 60
stop();
Symbol 744 MovieClip Frame 61
stop();
Symbol 744 MovieClip Frame 62
stop();
Symbol 744 MovieClip Frame 63
stop();
Symbol 744 MovieClip Frame 64
stop();
Symbol 744 MovieClip Frame 65
stop();
Symbol 744 MovieClip Frame 66
stop();
Symbol 744 MovieClip Frame 67
stop();
Symbol 744 MovieClip Frame 68
stop();
Symbol 744 MovieClip Frame 69
stop();
Symbol 744 MovieClip Frame 70
stop();
Symbol 744 MovieClip Frame 71
stop();
Symbol 744 MovieClip Frame 72
stop();
Symbol 744 MovieClip Frame 73
stop();
Symbol 744 MovieClip Frame 74
stop();
Symbol 744 MovieClip Frame 75
stop();
Symbol 744 MovieClip Frame 76
stop();
Symbol 744 MovieClip Frame 77
stop();
Symbol 744 MovieClip Frame 78
stop();
Symbol 744 MovieClip Frame 79
stop();
Symbol 744 MovieClip Frame 80
stop();
Symbol 744 MovieClip Frame 81
stop();
Symbol 744 MovieClip Frame 82
stop();
Symbol 744 MovieClip Frame 83
stop();
Symbol 744 MovieClip Frame 84
stop();
Symbol 744 MovieClip Frame 85
stop();
Symbol 744 MovieClip Frame 86
stop();
Symbol 744 MovieClip Frame 87
stop();
Symbol 744 MovieClip Frame 88
stop();
Symbol 744 MovieClip Frame 89
stop();
Symbol 744 MovieClip Frame 90
stop();
Symbol 744 MovieClip Frame 91
stop();
Symbol 744 MovieClip Frame 92
stop();
Symbol 744 MovieClip Frame 93
stop();
Symbol 744 MovieClip Frame 94
stop();
Symbol 744 MovieClip Frame 95
stop();
Symbol 744 MovieClip Frame 96
stop();
Symbol 744 MovieClip Frame 97
stop();
Symbol 744 MovieClip Frame 98
stop();
Symbol 744 MovieClip Frame 99
stop();
Symbol 744 MovieClip Frame 100
stop();
Symbol 745 MovieClip Frame 1
healthBar.gotoAndStop(_root.playerHealth);
Instance of Symbol 745 MovieClip in Symbol 767 MovieClip Frame 1
onClipEvent (enterFrame) {
this.healthBar.gotoAndStop(_root.playerHealth);
}
Symbol 777 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.credits = _root.heldCredits;
_root.maxShots1 = 3;
_root.maxShots2 = 3;
_root.velocity = 250;
_root.velocity2 = 250;
_root.scale = 60;
_root.scale2 = 60;
_root.damage1 = 5;
_root.damage2 = 5;
};
Symbol 783 MovieClip Frame 1
stop();
Symbol 783 MovieClip Frame 2
stop();
Symbol 787 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndPlay("gameOverReal");
};
Symbol 794 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.heldCredits = 0;
_global.totalHits = 0;
_global.totalShots = 0;
_global.levelHits = 0;
_global.levelShots = 0;
_root.playerHealth = 100;
_root.levelEnemies = 0;
_root.maxShots1 = 3;
_root.maxShots2 = 3;
_root.velocity = 250;
_root.velocity2 = 250;
_root.scale = 60;
_root.scale2 = 60;
_root.damage1 = 5;
_root.damage2 = 5;
_global.allIsMuted = false;
_global.leaked = 0;
_global.totalScore = 0;
_root.score = 0;
_root.leaked = 0;
_root.enemiesDestroyed = 0;
_root.totalHits = 0;
_root.totalShots = 0;
_root.levelHits = 0;
_root.levelShots = 0;
_root.credits = 0;
_root.sTears.setVolume(100);
_root.levelNum = 1;
_root.level = "Level" + _root.levelNum;
_root.levelNum = 1;
_root.levelEnemies = 0;
_global.totalHits = 0;
_global.totalShots = 0;
_global.levelHits = 0;
_global.levelShots = 0;
_root.playerHealth = 100;
_root.maxShots1 = 3;
_root.maxShots2 = 3;
_root.velocity = 250;
_root.velocity2 = 250;
_root.scale = 60;
_root.scale2 = 60;
_root.damage1 = 5;
_root.damage2 = 5;
_global.leaked = 0;
_global.totalScore = 0;
_root.score = 0;
_root.leaked = 0;
_root.enemiesDestroyed = 0;
_root.totalHits = 0;
_root.totalShots = 0;
_root.levelHits = 0;
_root.levelShots = 0;
_root.credits = 0;
_root.sTears.setVolume(100);
_root.gotoAndPlay("main");
trace(_root.levelNum);
trace(_root.levelEnemies);
trace(_global.totalHits);
trace(_global.totalShots);
trace(_global.levelHits);
trace(_global.levelShots);
trace(_root.playerHealth);
trace(_root.maxShots1);
trace(_root.maxShots2);
trace(_root.velocity);
trace(_root.velocity2);
trace(_root.scale);
trace(_root.scale2);
trace(_root.damage1);
trace(_root.damage2);
trace(_root.shotNumber);
trace(_root.shotNumber2);
trace(_global.leaked);
trace(_global.totalScore);
trace(_root.score);
trace(_root.leaked);
trace(_root.enemiesDestroyed);
trace(_root.totalHits);
trace(_root.totalShots);
trace(_root.levelHits);
trace(_root.levelShots);
trace(_root.credits);
trace(_root.enemyArray);
trace(_root.shadowArray);
trace(_root.enemyNum);
};
Symbol 797 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
swan = Math.random() * 10;
if (swan <= 5) {
getURL ("http://www.crookedalley.com");
} else {
getURL ("http://www.arcadefreedom.com");
}
};
this.onRelease = function () {
swan = Math.random() * 10;
if (swan <= 5) {
getURL ("http://www.crookedalley.com");
} else {
getURL ("http://www.arcadefreedom.com");
}
};
Symbol 799 MovieClip Frame 1
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndPlay("thisGame");
};
stop();
Symbol 814 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.heldCredits = 0;
_global.totalHits = 0;
_global.totalShots = 0;
_global.levelHits = 0;
_global.levelShots = 0;
_root.playerHealth = 100;
_root.levelEnemies = 0;
_root.maxShots1 = 3;
_root.maxShots2 = 3;
_root.velocity = 250;
_root.velocity2 = 250;
_root.scale = 60;
_root.scale2 = 60;
_root.damage1 = 5;
_root.damage2 = 5;
_global.allIsMuted = false;
_global.leaked = 0;
_global.totalScore = 0;
_root.score = 0;
_root.leaked = 0;
_root.enemiesDestroyed = 0;
_root.totalHits = 0;
_root.totalShots = 0;
_root.levelHits = 0;
_root.levelShots = 0;
_root.credits = 0;
_root.sTears.setVolume(100);
_root.levelNum = 1;
_root.level = "Level" + _root.levelNum;
_root.levelNum = 1;
_root.levelEnemies = 0;
_global.totalHits = 0;
_global.totalShots = 0;
_global.levelHits = 0;
_global.levelShots = 0;
_root.playerHealth = 100;
_root.maxShots1 = 3;
_root.maxShots2 = 3;
_root.velocity = 250;
_root.velocity2 = 250;
_root.scale = 60;
_root.scale2 = 60;
_root.damage1 = 5;
_root.damage2 = 5;
_global.leaked = 0;
_global.totalScore = 0;
_root.score = 0;
_root.leaked = 0;
_root.enemiesDestroyed = 0;
_root.totalHits = 0;
_root.totalShots = 0;
_root.levelHits = 0;
_root.levelShots = 0;
_root.credits = 0;
_root.sTears.setVolume(100);
_root.gotoAndPlay("main");
trace(_root.levelNum);
trace(_root.levelEnemies);
trace(_global.totalHits);
trace(_global.totalShots);
trace(_global.levelHits);
trace(_global.levelShots);
trace(_root.playerHealth);
trace(_root.maxShots1);
trace(_root.maxShots2);
trace(_root.velocity);
trace(_root.velocity2);
trace(_root.scale);
trace(_root.scale2);
trace(_root.damage1);
trace(_root.damage2);
trace(_root.shotNumber);
trace(_root.shotNumber2);
trace(_global.leaked);
trace(_global.totalScore);
trace(_root.score);
trace(_root.leaked);
trace(_root.enemiesDestroyed);
trace(_root.totalHits);
trace(_root.totalShots);
trace(_root.levelHits);
trace(_root.levelShots);
trace(_root.credits);
trace(_root.enemyArray);
trace(_root.shadowArray);
trace(_root.enemyNum);
};