Frame 1
function doSomething() {
getURL ("http://www.jacobgrahn.com/");
}
function newEnergyBlastLeft(shotAngle, xStart, yStart) {
m = _root.attachMovie("energyBlastLeft", "shot" + setDepth(), setDepth());
m._y = yStart;
m._x = xStart;
m._rotation = shotAngle;
}
function newEnergyBlastRight(shotAngle, xStart, yStart) {
m = _root.attachMovie("energyBlastRight", "shot" + setDepth(), setDepth());
m._y = yStart;
m._x = xStart;
m._rotation = shotAngle;
}
function newShotMiddle(shotAngle, xStart, yStart) {
m = _root.attachMovie("middleShot", "shot" + setDepth(), setDepth());
m._y = yStart;
m._x = xStart;
m._rotation = shotAngle;
}
function findAngle(xDis, yDis) {
radians = Math.atan2(yDis, xDis);
degrees = Math.round((radians * 180) / Math.PI);
return(degrees + 90);
}
function callHugeBoom(x, y) {
m = this.booms.attachMovie("hugeBoom", "boom" + setDepth(), setDepth());
m._x = x;
m._y = y;
}
function callBigBoom(x, y) {
m = this.booms.attachMovie("bigBoom", "boom" + setDepth(), setDepth());
m._x = x;
m._y = y;
}
function callSmallBoom(x, y, rotation) {
m = this.booms.attachMovie("smallBoom", "boom" + setDepth(), setDepth());
m._x = x;
m._y = y;
m._rotation = rotation;
}
function callTarget(x, y) {
m = _root.attachMovie("target", "target" + setDepth(), setDepth());
m._x = x;
m._y = y;
}
function orcBlast(x, y) {
m = _root.baddies.attachMovie("orcBlast", "orcBlast" + setDepth(), setDepth());
m._x = x;
m._y = y;
}
function callRandomOrc() {
m = _root.baddies.attachMovie("orc", "orc" + setBaddieDepth(), setBaddieDepth());
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
while (_root.walls.hitTest(m._x, m._y, true) || (_root.vCam.hitTest(m._x, m._y, true))) {
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
}
}
function callRandomMine() {
m = _root.baddies.attachMovie("mine", "mine" + setBaddieDepth(), setBaddieDepth());
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
while (_root.walls.hitTest(m._x, m._y, true) || (_root.vCam.hitTest(m._x, m._y, true))) {
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
}
}
function callRandomBasher() {
m = _root.baddies.attachMovie("basher", "basher" + setBaddieDepth(), setBaddieDepth());
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
while (_root.walls.hitTest(m._x, m._y, true) || (_root.vCam.hitTest(m._x, m._y, true))) {
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
}
}
function callOrc(x, y) {
m = _root.baddies.attachMovie("basher", "basher" + setBaddieDepth(), setBaddieDepth());
m._x = x;
m._y = y;
while (_root.walls.hitTest(m._x, m._y, true) || (_root.vCam.hitTest(m._x, m._y, true))) {
m._x = Math.random() * _root.bg._width;
m._y = Math.random() * _root.bg._height;
}
}
loaded = getBytesLoaded();
total = getBytesTotal();
percent = loaded / total;
_root.loadBar._width = percent * 300;
if (loaded == total) {
gotoAndPlay ("menuStart");
}
var angle;
var shooting;
var m;
var leftGunTipX;
var leftGunTipY;
health = 100;
leftReloading = 0;
rightReloading = 0;
zoomOut = 0;
zoomIn = 0;
acceleration = 2;
botLife = 100;
orcCallRate = 300;
mineCallRate = 300;
basherCallRate = 300;
maxBasherCount = 5;
maxOrcCount = 5;
maxMineCount = 5;
basherCount = 0;
orcCount = 0;
mineCount = 0;
mineMoveSpeed = 100;
mineLife = 50;
basherSpeed = 3;
basherLife = 20;
basherMaxSpeed = 40;
basherEdge = 100;
orcWalkSpeed = 10;
orcRotateSpeed = 20;
orcFireDist = 400;
orcLife = 100;
keys = 0;
code = 0;
hack = 0;
ambushAmount = 10;
gen2 = 0;
infoChange = 0;
hackTime = 200;
mission = 0;
difficulty = 1;
qualityLevel = 3;
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("Produced by: Jacob Grahn", doSomething);
MENU.customItems.push(Functioned);
_root.menu = MENU;
if (globalDepth == null) {
_global.globalDepth = 1000;
_global.setDepth = function () {
if (globalDepth <= 1500) {
return(globalDepth++);
}
globalDepth = 1000;
return(globalDepth);
};
}
if (baddieDepth == null) {
_global.baddieDepth = 10000;
_global.setBaddieDepth = function () {
if (baddieDepth <= 10050) {
return(baddieDepth++);
}
baddieDepth = 1000;
return(baddieDepth);
};
}
Frame 2
gotoAndPlay (1);
Frame 4
Mouse.show();
stop();
Frame 5
stop();
Frame 6
stop();
Instance of Symbol 200 MovieClip "diff" in Frame 6
onClipEvent (load) {
if (_root.difficulty == 1) {
this._x = 40.6;
}
if (_root.difficulty == 2) {
this._x = 219.6;
}
if (_root.difficulty == 3) {
this._x = 403.6;
}
}
onClipEvent (enterFrame) {
if (_root.difficulty == 1) {
this._x = 40.6;
}
if (_root.difficulty == 2) {
this._x = 219.6;
}
if (_root.difficulty == 3) {
this._x = 403.6;
}
}
Instance of Symbol 200 MovieClip "qual" in Frame 6
onClipEvent (load) {
if (_root.qualityLevel == 1) {
this._x = 40.6;
}
if (_root.qualityLevel == 2) {
this._x = 219.6;
}
if (_root.qualityLevel == 3) {
this._x = 403.6;
}
}
onClipEvent (enterFrame) {
if (_root.qualityLevel == 1) {
this._x = 40.6;
}
if (_root.qualityLevel == 2) {
this._x = 219.6;
}
if (_root.qualityLevel == 3) {
this._x = 403.6;
}
}
Frame 7
stop();
Frame 12
Mouse.hide();
Frame 13
health = 100;
leftReloading = 0;
rightReloading = 0;
zoomOut = 0;
zoomIn = 0;
acceleration = 2;
botLife = 100;
basherCount = 0;
orcCount = 0;
mineCount = 0;
keys = 0;
code = 0;
hack = 0;
gen2 = 0;
infoChange = 0;
hackTime = 200;
mission = 0;
if (_root.difficulty == 1) {
_root.orcCallRate = 300;
_root.mineCallRate = 300;
_root.basherCallRate = 300;
_root.maxBasherCount = 3;
_root.maxOrcCount = 3;
_root.maxMineCount = 3;
_root.basherCount = 0;
_root.orcCount = 0;
_root.mineCount = 0;
_root.mineMoveSpeed = 200;
_root.mineLife = 10;
_root.basherSpeed = 4;
_root.basherLife = 5;
_root.basherMaxSpeed = 40;
_root.basherEdge = 50;
_root.orcWalkSpeed = 10;
_root.orcRotateSpeed = 20;
_root.orcFireDist = 200;
_root.orcLife = 10;
_root.ambushAmount = 5;
}
if (_root.difficulty == 2) {
_root.orcCallRate = 300;
_root.mineCallRate = 300;
_root.basherCallRate = 300;
_root.maxBasherCount = 3;
_root.maxOrcCount = 3;
_root.maxMineCount = 3;
_root.basherCount = 0;
_root.orcCount = 0;
_root.mineCount = 0;
_root.mineMoveSpeed = 100;
_root.mineLife = 20;
_root.basherSpeed = 4;
_root.basherLife = 10;
_root.basherMaxSpeed = 45;
_root.basherEdge = 75;
_root.orcWalkSpeed = 15;
_root.orcRotateSpeed = 20;
_root.orcFireDist = 400;
_root.orcLife = 20;
_root.ambushAmount = 20;
}
if (_root.difficulty == 3) {
_root.orcCallRate = 250;
_root.mineCallRate = 250;
_root.basherCallRate = 250;
_root.maxBasherCount = 4;
_root.maxOrcCount = 4;
_root.maxMineCount = 4;
_root.basherCount = 0;
_root.orcCount = 0;
_root.mineCount = 0;
_root.mineMoveSpeed = 20;
_root.mineLife = 35;
_root.basherSpeed = 3;
_root.basherLife = 20;
_root.basherMaxSpeed = 50;
_root.basherEdge = 100;
_root.orcWalkSpeed = 15;
_root.orcRotateSpeed = 20;
_root.orcFireDist = 600;
_root.orcLife = 25;
_root.ambushAmount = 15;
}
Instance of Symbol 214 MovieClip "walls" in Frame 13
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 215 MovieClip in Frame 13
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.booms)) {
_root.gen2 = 1;
_root.walls.support2.gotoAndStop(2);
_root.shields.support2.gotoAndStop(2);
_root.shieldBreak.gotoAndStop(2);
}
}
Instance of Symbol 216 MovieClip in Frame 13
onClipEvent (load) {
this._visible = false;
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this.hitTest(_root.bot)) {
if (_root.keys == 0) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(2);
}
if (_root.keys == 1) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(3);
}
if (_root.keys == 2) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(4);
}
if (_root.keys == 3) {
_root.vCam.info.gotoAndStop(5);
_root.walls.support3.gotoAndStop(2);
_root.shields.support3.gotoAndStop(2);
_root.infoChange = 1;
}
}
}
}
Instance of Symbol 217 MovieClip in Frame 13
onClipEvent (load) {
this._visible = false;
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this.hitTest(_root.bot)) {
if (_root.gen2 == 0) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(11);
}
if (_root.gen2 == 1) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(5);
}
}
}
}
Instance of Symbol 218 MovieClip in Frame 13
onClipEvent (load) {
this._visible = false;
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this.hitTest(_root.bot)) {
if (_root.code == 0) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(10);
}
if (_root.code == 1) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(5);
_root.walls.support4.gotoAndStop(2);
_root.shields.support4.gotoAndStop(2);
}
}
}
}
Instance of Symbol 219 MovieClip in Frame 13
onClipEvent (load) {
this._visible = false;
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this.hitTest(_root.bot)) {
if (_root.hack == 0) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(12);
}
if (_root.hack == 1) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(5);
}
}
}
}
Instance of Symbol 220 MovieClip in Frame 13
onClipEvent (load) {
this._visible = false;
counter = _root.hackTime;
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (_root.hack == 0) {
if (this.hitTest(_root.bot)) {
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(14);
_root.hack = 1;
}
}
}
}
onClipEvent (enterFrame) {
if ((_root.hack == 1) && (counter > 0)) {
if (lastX == null) {
lastX = _root.bot._x;
lastY = _root.bot._y;
}
_root.bot._x = lastX;
_root.bot._y = lastY;
counter--;
}
if (counter == 0) {
_root.walls.support1.gotoAndStop(2);
_root.shields.support1.gotoAndStop(2);
_root.vCam.info.gotoAndStop(15);
counter--;
}
}
Instance of Symbol 239 MovieClip "baddies" in Frame 13
onClipEvent (load) {
orcCallRate = _root.orcCallRate;
mineCallRate = _root.mineCalleRate;
basherCallRate = _root.basherCallRate;
}
onClipEvent (enterFrame) {
orcCallRate--;
mineCallRate--;
basherCallRate--;
if ((orcCallRate <= 0) && (_root.orcCount < _root.maxOrcCount)) {
_root.callRandomOrc();
orcCallRate = _root.orcCallRate;
}
if ((mineCallRate <= 0) && (_root.mineCount < _root.maxMineCount)) {
_root.callRandomMine();
mineCallRate = _root.mineCallRate;
}
if ((basherCallRate <= 0) && (_root.basherCount < _root.maxBasherCount)) {
_root.callRandomBasher();
basherCallRate = _root.basherCallRate;
}
}
Instance of Symbol 159 MovieClip "bot" in Frame 13
onClipEvent (load) {
moveSpeed = 15;
up = 0;
down = 0;
right = 0;
left = 0;
leftFire = 0;
rightFire = 0;
middleFire = 0;
}
onClipEvent (mouseDown) {
middleFire = 1;
}
onClipEvent (keyDown) {
if (Key.isDown(87)) {
up = 1;
}
if (Key.isDown(83)) {
down = 1;
}
if (Key.isDown(68)) {
right = 1;
}
if (Key.isDown(65)) {
left = 1;
}
if (Key.isDown(90)) {
_root.zoomOut = 1;
}
if (Key.isDown(88)) {
_root.zoomIn = 1;
}
if (Key.isDown(32)) {
rightFire = 1;
leftFire = 1;
}
}
onClipEvent (enterFrame) {
if ((up == 1) && (!_root.walls.hitTest(this._x, this._y - 50, true))) {
this._y = this._y - moveSpeed;
}
if ((down == 1) && (!_root.walls.hitTest(this._x, this._y + 50, true))) {
this._y = this._y + moveSpeed;
}
if ((right == 1) && (!_root.walls.hitTest(this._x + 50, this._y, true))) {
this._x = this._x + moveSpeed;
}
if ((left == 1) && (!_root.walls.hitTest(this._x - 50, this._y, true))) {
this._x = this._x - moveSpeed;
}
mouseXPos = _root._xmouse - this._x;
mouseYPos = _root._ymouse - this._y;
radians = Math.atan2(mouseYPos, mouseXPos);
degrees = (radians * 180) / Math.PI;
this._rotation = degrees + 90;
if ((leftFire == 1) && (_root.leftReloading == 0)) {
_root.newEnergyBlastLeft(this._rotation, this._x, this._y);
_root.leftReloading = 1;
this.leftGun.play();
}
if ((rightFire == 1) && (_root.rightReloading == 0)) {
_root.newEnergyBlastRight(this._rotation, this._x, this._y);
_root.rightReloading = 1;
this.rightGun.play();
}
if (middleFire == 1) {
randNum = (Math.random() * 50) - 25;
xVal = (_root._xmouse - this._x) - randNum;
randNum = (Math.random() * 50) - 25;
yVal = (_root._ymouse - this._y) - randNum;
shotAngle = _root.findAngle(xVal, yVal);
_root.newShotMiddle(shotAngle, this._x, this._y);
randNum = (Math.random() * 50) - 25;
xVal = (_root._xmouse - this._x) - randNum;
randNum = (Math.random() * 50) - 25;
yVal = (_root._ymouse - this._y) - randNum;
shotAngle = _root.findAngle(xVal, yVal);
_root.newShotMiddle(shotAngle, this._x, this._y);
}
if (_root.baddies.hitTest(this._x, this._y, true) || (_root.booms.hitTest(this._x, this._y, true))) {
_root.botLife--;
}
}
onClipEvent (mouseUp) {
middleFire = 0;
}
onClipEvent (keyUp) {
if (!Key.isDown(68)) {
right = 0;
}
if (!Key.isDown(87)) {
up = 0;
}
if (!Key.isDown(83)) {
down = 0;
}
if (!Key.isDown(65)) {
left = 0;
}
if (!Key.isDown(90)) {
_root.zoomOut = 0;
}
if (!Key.isDown(88)) {
_root.zoomIn = 0;
}
if (!Key.isDown(32)) {
leftFire = 0;
rightFire = 0;
}
}
Instance of Symbol 161 MovieClip "cursor" in Frame 13
onClipEvent (mouseMove) {
this._x = _root._xmouse;
this._y = _root._ymouse;
updateAfterEvent();
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
Instance of Symbol 271 MovieClip "vCam" in Frame 13
onClipEvent (load) {
followSpeed = 4;
zoomSpeed = 150;
}
onClipEvent (enterFrame) {
xtogo = this._x - _root.bot._x;
ytogo = this._y - _root.bot._y;
if (Math.abs(xtogo) > 10) {
this._x = this._x - (xtogo / followSpeed);
}
if (Math.abs(ytogo) > 10) {
this._y = this._y - (ytogo / followSpeed);
}
if (_root.zoomOut == 1) {
this._width = this._width + (this._width / zoomSpeed);
this._height = this._height + (this._height / zoomSpeed);
if (this._width > 2200) {
this._width = 2200;
this._height = 1600;
}
}
if (_root.zoomIn == 1) {
this._width = this._width - (this._width / zoomSpeed);
this._height = this._height - (this._height / zoomSpeed);
if (this._width < 550) {
this._width = 550;
this._height = 400;
}
}
}
Frame 14
stop();
Frame 15
Mouse.show();
_root.botLife = 100;
stop();
Frame 16
Mouse.show();
stop();
Instance of Symbol 4 MovieClip "energyBlast" in Symbol 5 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 5 MovieClip in Symbol 6 MovieClip [energyBlastLeft] Frame 1
onClipEvent (load) {
counter = 30;
increment = counter;
xGoTo = _root._xmouse;
yGoTo = _root._ymouse;
xDist = xGoTo - this._parent._x;
yDist = yGoTo - this._parent._y;
_root.callTarget(xGoTo, yGoTo);
}
onClipEvent (enterFrame) {
this._parent._x = this._parent._x + (xDist / increment);
this._parent._y = this._parent._y + (yDist / increment);
counter--;
if (counter <= 0) {
_root.callHugeBoom(this._parent._x, this._parent._y);
this._parent.unloadMovie();
}
}
Instance of Symbol 5 MovieClip in Symbol 7 MovieClip [energyBlastRight] Frame 1
onClipEvent (load) {
counter = 30;
increment = counter;
xGoTo = _root._xmouse;
yGoTo = _root._ymouse;
xDist = xGoTo - this._parent._x;
yDist = yGoTo - this._parent._y;
_root.callTarget(xGoTo, yGoTo);
}
onClipEvent (enterFrame) {
this._parent._x = this._parent._x + (xDist / increment);
this._parent._y = this._parent._y + (yDist / increment);
counter--;
if (counter <= 0) {
_root.callHugeBoom(this._parent._x, this._parent._y);
this._parent.unloadMovie();
}
}
Instance of Symbol 11 MovieClip in Symbol 16 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay(Math.ceil(Math.random() * 2));
}
Symbol 16 MovieClip Frame 9
stop();
Instance of Symbol 16 MovieClip in Symbol 17 MovieClip [middleShot] Frame 1
onClipEvent (load) {
counter = Math.random() * 20;
moveSpeed = (Math.random() * 10) + 50;
degrees = this._parent._rotation;
radians = (degrees * Math.PI) / 180;
radians = radians + 4.71238898038469;
xSpeed = moveSpeed * Math.sin(radians);
ySpeed = moveSpeed * Math.cos(radians);
}
onClipEvent (enterFrame) {
this._parent._y = this._parent._y + xSpeed;
this._parent._x = this._parent._x + ySpeed;
counter--;
if (_root.baddies.hitTest(this._parent._x, this._parent._y, true) || (_root.walls.hitTest(this._parent._x, this._parent._y, true))) {
_root.callSmallBoom(this._parent._x, this._parent._y, this._parent._rotation);
this._parent.unloadMovie();
}
if (counter <= 0) {
this._parent.unloadMovie();
}
}
Instance of Symbol 20 MovieClip in Symbol 21 MovieClip Frame 1
onClipEvent (load) {
this._rotation = Math.random() * 360;
}
onClipEvent (enterFrame) {
this._parent.unloadMovie();
}
Instance of Symbol 25 MovieClip in Symbol 26 MovieClip Frame 1
onClipEvent (load) {
life = 31;
}
onClipEvent (enterFrame) {
life--;
if (life <= 0) {
this._parent.unloadMovie();
}
}
Instance of Symbol 33 MovieClip in Symbol 35 MovieClip [smallBoom] Frame 1
onClipEvent (load) {
this.gotoAndPlay(Math.ceil(Math.random() * 4));
}
onClipEvent (enterFrame) {
this._parent.unloadMovie();
}
Instance of Symbol 37 MovieClip in Symbol 38 MovieClip [orcBlast] Frame 1
onClipEvent (load) {
acc = _root.acceleration;
xVel = (Math.random() * 50) - 25;
yVel = (Math.random() * 50) - 25;
}
onClipEvent (enterFrame) {
xDist = this._parent._x - _root.bot._x;
yDist = this._parent._y - _root.bot._y;
if (xDist > 0) {
xVel = xVel + acc;
} else {
xVel = xVel - acc;
}
if (yDist > 0) {
yVel = yVel + acc;
} else {
yVel = yVel - acc;
}
this._parent._x = this._parent._x - xVel;
this._parent._y = this._parent._y - yVel;
if (this.hitTest(_root.bot)) {
_root.callBigBoom(this._parent._x, this._parent._y);
}
if (this.hitTest(_root.booms) || (_root.walls.hitTest(this._parent._x, this._parent._y, true))) {
_root.callBigBoom(this._parent._x, this._parent._y);
this._parent.unloadMovie();
}
}
Instance of Symbol 42 MovieClip in Symbol 43 MovieClip [hugeBoom] Frame 1
onClipEvent (load) {
counter = 9;
}
onClipEvent (enterFrame) {
counter--;
if (counter <= 0) {
this._parent.unloadMovie();
}
}
Symbol 57 MovieClip Frame 1
rightArm.gotoAndPlay(14);
Symbol 63 MovieClip Frame 1
leftThigh.gotoAndPlay(14);
Symbol 63 MovieClip Frame 5
stop();
Symbol 66 MovieClip Frame 21
_root.orcBlast(this._parent._parent._x, this._parent._parent._y, this._parent._parent._rotation);
Symbol 66 MovieClip Frame 34
gotoAndPlay (16);
Symbol 70 MovieClip Frame 21
_root.callHugeBoom(this._parent._parent._x, this._parent._parent._y);
Symbol 70 MovieClip Frame 22
this._parent._parent.unloadMovie();
stop();
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 2
stop();
Symbol 71 MovieClip Frame 3
stop();
Instance of Symbol 71 MovieClip in Symbol 72 MovieClip [orc] Frame 1
onClipEvent (load) {
walkSpeed = _root.orcWalkSpeed;
rotateSpeed = _root.orcRotateSpeed;
fireDist = _root.orcFireDist;
life = _root.orcLife;
dead = 0;
counter = 0;
_root.orcCount++;
}
onClipEvent (enterFrame) {
if (dead == 0) {
counter--;
xDist = this._parent._x - _root.bot._x;
yDist = this._parent._y - _root.bot._y;
gotoAngle = _root.findAngle(xDist, yDist);
if (gotoAngle > 180) {
gotoAngle = gotoAngle - 360;
}
angleDist = this._parent._rotation - gotoAngle;
if (Math.abs(angleDist) > 90) {
angleDist = 180 - angleDist;
}
this._parent._rotation = this._parent._rotation - (angleDist / rotateSpeed);
if (this._parent.hitTest(_root.booms)) {
life--;
}
if ((Math.abs(xDist) < fireDist) && (Math.abs(yDist) < fireDist)) {
this.gotoAndStop(2);
counter = 21;
} else if (counter <= 0) {
this.gotoAndStop(1);
radians = (this._parent._rotation * Math.PI) / 180;
radians = radians + 4.71238898038469;
xSpeed = walkSpeed * Math.cos(radians);
ySpeed = walkSpeed * Math.sin(radians);
if (xSpeed > 0) {
if (_root.walls.hitTest(this._parent._x - 40, this._parent._y, true)) {
xSpeed = 0;
}
}
if (xSpeed <= 0) {
if (_root.walls.hitTest(this._parent._x + 40, this._parent._y, true)) {
xSpeed = 0;
}
}
if (ySpeed > 0) {
if (_root.walls.hitTest(this._parent._x, this._parent._y - 40, true)) {
ySpeed = 0;
}
}
if (ySpeed <= 0) {
if (_root.walls.hitTest(this._parent._x, this._parent._y + 40, true)) {
ySpeed = 0;
}
}
this._parent._x = this._parent._x - xSpeed;
this._parent._y = this._parent._y - ySpeed;
}
}
if (life <= 0) {
this.gotoAndStop(3);
dead = 1;
}
}
onClipEvent (unload) {
_root.orcCount--;
}
Instance of Symbol 78 MovieClip in Symbol 79 MovieClip [mine] Frame 1
onClipEvent (load) {
moveSpeed = _root.mineMoveSpeed;
_root.mineCount++;
life = _root.mineLife;
}
onClipEvent (enterFrame) {
xSpeed = (this._parent._x - _root.bot._x) / moveSpeed;
ySpeed = (this._parent._y - _root.bot._y) / moveSpeed;
if (xSpeed > 0) {
if (_root.walls.hitTest(this._parent._x - 40, this._parent._y, true)) {
xSpeed = 0;
}
}
if (xSpeed <= 0) {
if (_root.walls.hitTest(this._parent._x + 40, this._parent._y, true)) {
xSpeed = 0;
}
}
if (ySpeed > 0) {
if (_root.walls.hitTest(this._parent._x, this._parent._y - 40, true)) {
ySpeed = 0;
}
}
if (ySpeed <= 0) {
if (_root.walls.hitTest(this._parent._x, this._parent._y + 40, true)) {
ySpeed = 0;
}
}
this._parent._x = this._parent._x - xSpeed;
this._parent._y = this._parent._y - ySpeed;
if (this.hitTest(_root.booms)) {
life--;
}
if (this.hitTest(_root.bot) || (life <= 0)) {
_root.callHugeBoom(this._parent._x, this._parent._y);
this._parent.unloadMovie();
}
}
onClipEvent (unload) {
_root.mineCount--;
}
Instance of Symbol 86 MovieClip in Symbol 87 MovieClip [basher] Frame 1
onClipEvent (load) {
acc = _root.basherSpeed;
life = _root.basherLife;
edge = _root.basherEdge;
maxSpeed = _root.basherMaxSpeed;
xVel = (Math.random() * 100) - 50;
yVel = (Math.random() * 100) - 50;
_root.basherCount++;
}
onClipEvent (enterFrame) {
xDist = this._parent._x - _root.bot._x;
yDist = this._parent._y - _root.bot._y;
if ((xDist > 0) && (xVel < maxSpeed)) {
xVel = xVel + acc;
} else if ((-xVel) < maxSpeed) {
xVel = xVel - acc;
}
if ((yDist > 0) && (yVel < maxSpeed)) {
yVel = yVel + acc;
} else if ((-yVel) < maxSpeed) {
yVel = yVel - acc;
}
if (!_root.walls.hitTest(this._parent._x - xVel, this._parent._y, true)) {
this._parent._x = this._parent._x - xVel;
}
if (!_root.walls.hitTest(this._parent._x, this._parent._y - yVel, true)) {
this._parent._y = this._parent._y - yVel;
}
if (this._parent.hitTest(_root.booms)) {
life--;
}
if (life <= 0) {
_root.callHugeBoom(this._parent._x, this._parent._y);
this._parent.unloadMovie();
}
}
onClipEvent (unload) {
_root.basherCount--;
}
Symbol 95 Button
on (press) {
getURL ("http://jacobgrahn.com/", "_blank");
}
Symbol 98 Button
on (press) {
getURL ("http://gamesofgondor.com/", "_blank");
}
Symbol 117 Button
on (press) {
_root.gotoAndPlay("gameStart");
}
Symbol 118 Button
on (press) {
_root.gotoAndPlay("instructions");
}
Symbol 119 Button
on (press) {
_root.gotoAndPlay("settings");
}
Symbol 120 Button
on (press) {
_root.gotoAndPlay("story");
}
Symbol 123 MovieClip Frame 31
stop();
Symbol 126 Button
on (press) {
_root.gotoAndStop("menu");
}
Symbol 138 Button
on (press) {
play();
}
Symbol 144 Button
on (press) {
prevFrame();
}
Symbol 154 MovieClip Frame 1
_root.rightReloading = 0;
stop();
Symbol 154 MovieClip Frame 2
_root.rightReloading = 1;
Symbol 156 MovieClip Frame 1
_root.leftReloading = 0;
stop();
Symbol 156 MovieClip Frame 2
_root.leftReloading = 1;
Instance of Symbol 158 MovieClip "middleGun" in Symbol 159 MovieClip Frame 1
onClipEvent (mouseDown) {
this._visible = false;
}
onClipEvent (mouseUp) {
this._visible = true;
}
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 2
this._parent._x = -10000;
this._parent._y = -10000;
Instance of Symbol 167 MovieClip in Symbol 168 MovieClip Frame 1
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this._parent.hitTest(_root.bot)) {
_root.keys++;
if (_root.keys == 1) {
_root.vCam.info.gotoAndStop(6);
}
if (_root.keys == 2) {
_root.vCam.info.gotoAndStop(7);
}
if (_root.keys == 3) {
_root.vCam.info.gotoAndStop(8);
}
_root.infoChange = 1;
this.gotoAndStop(2);
}
}
}
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 2
this._parent._x = -10000;
this._parent._y = -10000;
stop();
Instance of Symbol 171 MovieClip in Symbol 172 MovieClip Frame 1
onClipEvent (load) {
counter = _root.ambushAmount;
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this._parent.hitTest(_root.bot)) {
_root.code = 1;
while (counter > 0) {
counter--;
width = _root.vCam._width;
height = _root.vCam._height;
if ((Math.random() - 0.5) > 0) {
xDist = width * 0.75;
yDist = Math.random() * height;
} else {
yDist = height * 0.75;
xDist = Math.random() * width;
}
if ((Math.random() - 0.5) > 0) {
xDist = -xDist;
}
if ((Math.random() - 0.5) > 0) {
yDist = -yDist;
}
x = this._parent._x + xDist;
y = this._parent._y + yDist;
_root.callOrc(x, y);
}
_root.infoChange = 1;
_root.vCam.info.gotoAndStop(9);
this.gotoAndStop(2);
}
}
}
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 2
stop();
Symbol 178 MovieClip Frame 3
stop();
Symbol 178 MovieClip Frame 4
stop();
Symbol 178 MovieClip Frame 5
stop();
Symbol 182 Button
on (press) {
this._quality = "low";
_root.qualityLevel = 1;
}
Symbol 185 Button
on (press) {
this._quality = "medium";
_root.qualityLevel = 2;
}
Symbol 188 Button
on (press) {
this._quality = "high";
_root.qualityLevel = 3;
}
Symbol 192 Button
on (press) {
_root.difficulty = 1;
}
Symbol 195 Button
on (press) {
_root.difficulty = 2;
}
Symbol 198 Button
on (press) {
_root.difficulty = 3;
}
Symbol 208 Button
on (press) {
gotoAndPlay ("menuStart");
}
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 2
stop();
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 2
_root.mission++;
stop();
Instance of Symbol 211 MovieClip "mainForceFeild" in Symbol 214 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.mission >= 4) {
this.gotoAndStop(2);
_root.shields.gotoAndStop(2);
_root.vCam.info.gotoAndStop(16);
}
}
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 2
stop();
Instance of Symbol 226 MovieClip in Symbol 227 MovieClip Frame 1
onClipEvent (keyDown) {
if (Key.isDown(16)) {
if (this._parent.hitTest(_root.bot)) {
_root.gotoAndStop("won");
}
}
}
Symbol 231 MovieClip Frame 17
gotoAndPlay (2);
Symbol 232 MovieClip Frame 1
paul.gotoAndPlay(8);
stop();
Symbol 232 MovieClip Frame 2
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 2
stop();
Symbol 239 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 1
stop();
Instance of Symbol 266 MovieClip in Symbol 267 MovieClip Frame 1
onClipEvent (load) {
bigWidth = _root.bg._width;
bigHeight = _root.bg._height;
}
onClipEvent (enterFrame) {
xPercent = _root.bot._x / bigWidth;
yPercent = _root.bot._y / bigHeight;
this._x = 100 * xPercent;
this._y = 100 * yPercent;
}
Symbol 271 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Instance of Symbol 242 MovieClip in Symbol 271 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 262 MovieClip "info" in Symbol 271 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.infoChange == 1) {
time = 100;
_root.infoChange = 0;
}
time--;
if (time == 0) {
this.gotoAndStop(1);
}
}
Instance of Symbol 270 MovieClip in Symbol 271 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.botLife > 100) {
_root.botLife = 100;
}
if (_root.botLife <= 0) {
_root.gotoAndStop("dead");
}
roundedHealth = Math.round(_root.botLife);
healthFrame = (-(roundedHealth - 100)) + 1;
this.gotoAndStop(healthFrame);
}