Frame 1
if (_global.System) {
System.security.allowDomain("www.emirecords.co.uk", "www.hyperlaunch.com");
}
System.security.loadPolicyFile("http://www.hyperlaunch.com/crossdomain_emirecords.xml");
baseURL = "http://www.hyperlaunch.co.uk/cgi-bin/ironmaiden/";
_level0.hyperlaunchSWF_ID = "IronMaiden_LifeAndDeath";
if (_global.System) {
System.security.allowDomain("www.hyperlaunch.com");
}
loadMovieNum ("http://www.hyperlaunch.com/tracking/tracker.swf?r=" + (Math.floor(Math.random() * 10000) + 10000), 19467);
Frame 10
stop();
Frame 19
gotoAndStop ("blip");
Frame 60
stop();
Instance of Symbol 26 MovieClip "slider" in Symbol 27 MovieClip Frame 1
onClipEvent (load) {
this._x = this._x - this._width;
startPos = this._x;
var done = 0;
}
onClipEvent (enterFrame) {
total = _root.getBytesTotal();
sofar = _root.getBytesLoaded();
percent = Math.floor((sofar / total) * 100);
this._x = startPos + (percent * 4);
if ((percent == 100) and (done == 0)) {
_root.gotoAndPlay("introout");
done = 1;
}
}
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 10
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 10
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 10
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 83 MovieClip [wound] Frame 1
stop();
Symbol 83 MovieClip [wound] Frame 2
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 6
gotoAndPlay (2);
Symbol 174 MovieClip Frame 1
_parent._parent.duckStatus = "ducking";
Symbol 174 MovieClip Frame 27
_parent._parent.duckStatus = "waiting";
stop();
Symbol 174 MovieClip Frame 28
_parent._parent.duckStatus = "getting_up";
Symbol 174 MovieClip Frame 35
_parent._parent.duckStatus = "standing";
_parent._parent.ducked = false;
stop();
Symbol 175 MovieClip [eddie] Frame 1
stop();
Instance of Symbol 111 MovieClip "hit" in Symbol 175 MovieClip [eddie] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 127 MovieClip "hit" in Symbol 175 MovieClip [eddie] Frame 10
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 137 MovieClip "hit" in Symbol 175 MovieClip [eddie] Frame 20
onClipEvent (load) {
this._visible = false;
}
Symbol 186 MovieClip Frame 1
stop();
Symbol 186 MovieClip Frame 10
stop();
Symbol 186 MovieClip Frame 20
stop();
Symbol 201 MovieClip [explosion] Frame 15
this.removeMovieClip();
Symbol 224 MovieClip Frame 29
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 7
stop();
Symbol 242 MovieClip Frame 1
stop();
Symbol 242 MovieClip Frame 7
stop();
Symbol 246 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 7
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 7
stop();
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 7
stop();
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 7
stop();
Symbol 260 Button
on (rollOver) {
volslider.gotoAndPlay("in");
}
on (rollOut) {
volslider.gotoAndPlay("out");
}
Symbol 263 Button
on (rollOver, dragOver) {
forwardtrack.gotoAndPlay("in");
}
on (rollOut, dragOut) {
forwardtrack.gotoAndPlay("out");
}
on (release) {
nextTrack();
}
Symbol 264 Button
on (rollOver, dragOver) {
playtrack.gotoAndPlay("in");
}
on (rollOut, dragOut) {
playtrack.gotoAndPlay("out");
}
on (release) {
trackLoad();
}
Symbol 265 Button
on (rollOver, dragOver) {
pausetrack.gotoAndPlay("in");
}
on (rollOut, dragOut) {
pausetrack.gotoAndPlay("out");
}
on (release) {
trackStop();
}
Symbol 266 Button
on (rollOver, dragOver) {
prevtrack.gotoAndPlay("in");
}
on (rollOut, dragOut) {
prevtrack.gotoAndPlay("out");
}
on (release) {
prevTrack();
}
Symbol 267 MovieClip Frame 1
function trackLoad() {
src = ("mp3/track" + trackNum) + ".mp3";
s.loadSound(src, true);
tracktitles.gotoAndStop(trackNum);
s.setVolume((this.volume_mc.vol_drag._x / this.volume_mc.vol_bg._width) * 100);
}
function trackStop() {
s.stop();
}
function nextTrack() {
if (trackNum < trackTotal) {
trackNum++;
trackLoad();
}
}
function prevTrack() {
if (trackNum > 1) {
trackNum--;
trackLoad();
}
}
function volumeChange() {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
startDrag (_local1.vol_drag, true, _local1.vol_bg._x - (_local1.vol_bg._width / 2), _local1.vol_bg._y + 1, _local1.vol_bg._x + (_local1.vol_bg._width / 2), _local1.vol_bg._y + 1);
var _local2 = (_local1.vol_drag._x / _local1.vol_bg._width) * 100;
if (_local2 > 100) {
_local2 = 100;
}
if (_local2 < 0) {
_local2 = 0;
}
s.setVolume(_local2);
trace(_local2);
};
}
var trackNum = 1;
var trackTotal = 10;
var trackName = ["TRACK1", "TRACK2", "TRACK3"];
var src = (("track" + trackNum) + ".mp3");
var autoplay = 1;
var vol_w = vol_bg.width;
var vol_sx = vol_bg._x;
var currentVolume;
s = new Sound();
s.loadSound(src, true);
s.onSoundComplete = function () {
nextTrack();
};
volume_mc.onPress = volumeChange;
volume_mc.onRelease = (volume_mc.onReleaseOutside = function () {
stopDrag();
this.onEnterFrame = null;
});
if (autoplay == 1) {
trackLoad();
autoplay = 0;
}
Symbol 272 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 10
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 10
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 10
stop();
Symbol 281 Button
on (rollOver, dragOver) {
homemc.gotoAndPlay("in");
}
on (rollOut, dragOut) {
homemc.gotoAndPlay("out");
}
on (release) {
if (_parent.section == "home") {
} else {
_parent.section = "home";
_parent.play();
}
}
Symbol 282 Button
on (rollOver, dragOver) {
infomc.gotoAndPlay("in");
}
on (rollOut, dragOut) {
infomc.gotoAndPlay("out");
}
on (release) {
if (_parent.section == "info") {
} else {
_parent.section = "info";
_parent.play();
}
}
Symbol 283 Button
on (rollOver, dragOver) {
challengefriendmc.gotoAndPlay("in");
}
on (rollOut, dragOut) {
challengefriendmc.gotoAndPlay("out");
}
on (release) {
if (_parent.section == "challenge") {
} else {
_parent.section = "challenge";
_parent.play();
}
}
Symbol 287 Button
on (rollOver, dragOver) {
emi.gotoAndPlay("in");
}
on (rollOut, dragOut) {
emi.gotoAndPlay("out");
}
on (release) {
getURL ("http://clkuk.tradedoubler.com/click?p=23708&a=1129537&epi=ironmaidenmatteroflifedeath&url=http%3A%2F%2Fphobos.apple.com%2FWebObjects%2FMZStore.woa%2Fwa%2FviewAlbum%3Fi%3D177237575%26id%3D177237522%26s%3D143444%26partnerId%3D2003", "_blank");
_level0.trackPoint("Link_iTunes");
}
Symbol 288 Button
on (rollOver, dragOver) {
emi.gotoAndPlay("in");
}
on (rollOut, dragOut) {
emi.gotoAndPlay("out");
}
on (release) {
getURL ("http://www.amazon.co.uk/exec/obidos/ASIN/B000GRU6XS/emi-ironmaidenlifeanddeath-21/ref=nosim", "_blank");
_level0.trackPoint("Link_Amazon");
}
Symbol 293 MovieClip Frame 1
stop();
Symbol 293 MovieClip Frame 5
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 5
stop();
Symbol 298 Button
on (rollOver, dragOver) {
emi.gotoAndPlay("in");
}
on (rollOut, dragOut) {
emi.gotoAndPlay("out");
}
on (release) {
getURL ("http://www.emirecords.co.uk", "_blank");
_level0.trackPoint("Link_EMIRecords");
}
Symbol 299 Button
on (rollOver, dragOver) {
hyperlaunch.gotoAndPlay("in");
}
on (rollOut, dragOut) {
hyperlaunch.gotoAndPlay("out");
}
on (release) {
getURL ("http://www.hyperlaunch.co.uk", "_blank");
_level0.trackPoint("Link_Hyperlaunch");
}
Symbol 335 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 11
stop();
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 8
stop();
Symbol 359 Button
on (rollOver, dragOver) {
playnow.gotoAndPlay("in");
}
on (rollOut, dragOut) {
playnow.gotoAndPlay("out");
}
on (release) {
if (_parent.section == "intructions") {
} else {
_parent.section = "instructions";
_parent.play();
}
}
Symbol 360 MovieClip Frame 16
stop();
Symbol 360 MovieClip Frame 31
_parent.play();
Symbol 383 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 8
stop();
Symbol 384 Button
on (rollOver, dragOver) {
playnow.gotoAndPlay("in");
}
on (rollOut, dragOut) {
playnow.gotoAndPlay("out");
}
on (release) {
_parent.gamebase.gotoAndPlay("out");
if (_parent.section == "game") {
} else {
_parent.section = "game";
_parent.play();
}
}
Symbol 385 MovieClip Frame 21
stop();
Symbol 385 MovieClip Frame 41
_parent.play();
Symbol 390 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 8
stop();
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 8
stop();
Symbol 398 MovieClip Frame 1
stop();
Symbol 398 MovieClip Frame 8
stop();
Symbol 399 Button
on (rollOver, dragOver) {
ama.gotoAndPlay("in");
}
on (rollOut, dragOut) {
ama.gotoAndPlay("out");
}
on (release) {
getURL ("http://www.amazon.co.uk/exec/obidos/ASIN/B000GRU6XS/emi-ironmaidenlifeanddeath-21/ref=nosim", "_blank");
_level0.trackPoint("Info_Link_Amazon");
}
Symbol 400 Button
on (rollOver, dragOver) {
itune.gotoAndPlay("in");
}
on (rollOut, dragOut) {
itune.gotoAndPlay("out");
}
on (release) {
getURL ("http://clkuk.tradedoubler.com/click?p=23708&a=1129537&epi=ironmaidenmatteroflifedeath&url=http%3A%2F%2Fphobos.apple.com%2FWebObjects%2FMZStore.woa%2Fwa%2FviewAlbum%3Fi%3D177237575%26id%3D177237522%26s%3D143444%26partnerId%3D2003", "_blank");
_level0.trackPoint("Info_Link_iTunes");
}
Symbol 401 MovieClip Frame 22
stop();
Symbol 401 MovieClip Frame 43
_parent.play();
Symbol 411 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 8
stop();
Symbol 417 Button
on (rollOver, dragOver) {
sendbt.gotoAndPlay("in");
}
on (rollOut, dragOut) {
sendbt.gotoAndPlay("out");
}
on (release) {
btn_submit();
}
Symbol 420 Button
on (release) {
if (optin2 == "0") {
optin2 = "1";
} else {
optin2 = "0";
}
opt2.nextFrame();
}
Symbol 431 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 1
function checkEmailFormat(email) {
var _local1 = email;
if (((((_local1.indexOf(" ") != -1) || (_local1.indexOf("@") == -1)) || (_local1.indexOf(".") == -1)) || (_local1.length < 6)) || (_local1.lastIndexOf(".") < _local1.indexOf("@"))) {
return(false);
}
return(true);
}
function clearform() {
message = "";
name = "";
email = "";
fname = "";
femail = "";
optin1 = "0";
optin2 = "0";
opt1.gotoAndStop(1);
opt2.gotoAndStop(1);
opt3.gotoAndStop(1);
}
function btn_submit() {
_level0.trackPoint("stf_submitted");
var i = 1;
while (i < 3) {
eval ("alert" + i).gotoAndStop(1);
i++;
}
if (name == "") {
alert1.gotoAndStop("in");
} else if (!checkEmailFormat(email)) {
alert2.gotoAndStop("in");
} else if (fname == "") {
alert3.gotoAndStop("in");
} else if (!checkEmailFormat(femail)) {
alert4.gotoAndStop("in");
} else {
submitURL = "http://www.hyperlaunch.com/ironmaiden/regdetails.php";
formData = new LoadVars();
formData.email = email;
formData.femail1 = femail;
formData.name = name;
formData.fname = fname;
formData.message = message;
formData.opt1 = opt1;
formData.opt2 = opt2;
replyData = new LoadVars();
formData.sendAndLoad(submitURL, replyData, "get");
play();
}
}
stop();
clearform();
Symbol 434 MovieClip Frame 18
stop();
Symbol 434 MovieClip Frame 32
_parent.play();
Symbol 438 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 10
stop();
Symbol 445 MovieClip Frame 20
stop();
Symbol 445 MovieClip Frame 30
stop();
Symbol 467 MovieClip Frame 1
stop();
Symbol 467 MovieClip Frame 10
stop();
Symbol 490 Button
on (release) {
getURL ("javascript:function popSite(){newWin = window.open(\"terms.html\",\"Terms\",\"width=540,height=440,scrollbars=1\")} popSite();");
}
Symbol 494 Button
on (release) {
gotoAndStop ("highscores");
}
Symbol 503 MovieClip Frame 1
stop();
Symbol 503 MovieClip Frame 8
stop();
Symbol 507 Button
on (rollOver, dragOver) {
entercomp.gotoAndPlay("in");
}
on (rollOut, dragOut) {
entercomp.gotoAndPlay("out");
}
on (press) {
if (name eq "") {
alert1.gotoAndStop(2);
} else if (email eq "") {
alert2.gotoAndStop(2);
}
if ((email ne "") && (name ne "")) {
url = _root.baseURL + "/submitscore.pl";
score = _root.score;
loadVariables (url, this, "POST");
_level0.trackPoint("Game_submittedScore");
_root.enteredScore = true;
play();
}
}
Symbol 516 Button
on (release) {
gotoAndStop ("enterscore");
}
Symbol 518 MovieClip Frame 1
stop();
score.text = _root.score;
_root.enteredScore = false;
Symbol 518 MovieClip Frame 50
stop();
if (_root.enteredScore) {
btnEnterScore._visible = false;
}
var sendLV = new LoadVars();
var receiveLV = new LoadVars();
highScores.text = "Loading highscores...";
this.receiveLV.onLoad = function () {
highScores.text = this.highScoresText;
};
strURL = _root.baseURL + "/getscores.pl";
sendLV.sendAndLoad(strURL, this.receiveLV, "POST");
_level0.trackPoint("Game_viewedHighscores");
Symbol 521 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 8
stop();
Symbol 522 Button
on (rollOver, dragOver) {
playnow.gotoAndPlay("in");
}
on (rollOut, dragOut) {
playnow.gotoAndPlay("out");
}
on (release) {
_parent.section = "game";
gotoAndPlay ("out");
_level0.trackPoint("Game_won_playagain");
}
Symbol 523 MovieClip Frame 21
stop();
Symbol 523 MovieClip Frame 47
_parent.gotoAndPlay(_parent.section);
Symbol 533 Button
on (rollOver, dragOver) {
playnow.gotoAndPlay("in");
}
on (rollOut, dragOut) {
playnow.gotoAndPlay("out");
}
on (release) {
_parent.section = "game";
gotoAndPlay ("out");
_level0.trackPoint("Game_lost_playagain");
}
Symbol 534 MovieClip Frame 21
stop();
Symbol 534 MovieClip Frame 47
_parent.gotoAndPlay(_parent.section);
Symbol 535 MovieClip Frame 1
section = home;
Symbol 535 MovieClip Frame 3
Symbol 535 MovieClip Frame 76
Symbol 535 MovieClip Frame 84
stop();
_quality = "best";
if (gamebase._currentframe != 11) {
gamebase.gotoAndPlay("in");
}
_level0.trackPoint("Section_home");
_root.sAmbience.stop();
Symbol 535 MovieClip Frame 85
stop();
homemc.gotoAndPlay("out");
Symbol 535 MovieClip Frame 89
gotoAndPlay(section);
Symbol 535 MovieClip Frame 94
stop();
_quality = "best";
if (gamebase._currentframe != 11) {
gamebase.gotoAndPlay("in");
}
_level0.trackPoint("Section_instructions");
_root.sAmbience.stop();
Symbol 535 MovieClip Frame 95
stop();
instructionsmc.gotoAndPlay("out");
Symbol 535 MovieClip Frame 99
gotoAndPlay(section);
Symbol 535 MovieClip Frame 104
stop();
_quality = "best";
if (gamebase._currentframe != 11) {
gamebase.gotoAndPlay("in");
}
_level0.trackPoint("Section_info");
_root.sAmbience.stop();
Symbol 535 MovieClip Frame 105
stop();
infomc.gotoAndPlay("out");
Symbol 535 MovieClip Frame 109
gotoAndPlay(section);
Symbol 535 MovieClip Frame 114
stop();
_quality = "best";
if (gamebase._currentframe != 11) {
gamebase.gotoAndPlay("in");
}
_level0.trackPoint("Section_STF");
_root.sAmbience.stop();
Symbol 535 MovieClip Frame 115
stop();
challengemc.gotoAndPlay("out");
Symbol 535 MovieClip Frame 119
gotoAndPlay(section);
Symbol 535 MovieClip Frame 128
function paraInitialise(clip) {
var _local1 = clip;
_local1.state = "floating";
_local1.floatRate = Math.randomNum(0.8, 1.3);
_local1.driftRate = Math.randomNum(0.2, 0.8);
_local1.dangleSpeed = Math.randomNum(1, 3);
_local1.dangleAmount = Math.randomNum(0.1, 0.3);
_local1.origRotation = this._rotation;
_local1.parachuteHits = 0;
_local1.registerTargetZone(_local1.para.hitBaddie, paraHitBaddie);
_local1.registerTargetZone(_local1.para.hitParachute, paraHitParachute);
_local1.onEnterFrame = paraFrameLoop;
}
function paraFrameLoop() {
var _local1 = this;
_local1.frame++;
switch (_local1.state) {
case "collapsed" :
_local1.floatRate = _local1.floatRate + paraGravity;
case "shot" :
_local1.dangleAmount = _local1.dangleAmount * 0.95;
case "floating" :
_local1._x = _local1._x + _local1.driftRate;
_local1._y = _local1._y + _local1.floatRate;
_local1._rotation = _local1.origRotation + (_local1.dangleAmount * Math.radToDeg(Math.sin(Math.degToRad(_local1.frame * _local1.dangleSpeed))));
if (_local1._y <= 0) {
break;
}
_local1.removeMovieClip();
}
}
function paraHitBaddie(objHitZone) {
var _local1 = this;
addToScore(50);
objHitZone.owner.state = "shot";
objHitZone.owner.para.gotoAndStop("shot");
var _local3 = objHitZone.owner._parent;
_local3.depth++;
_local3.attachMovie("para_gun", "para_gun" + _local3.depth, _local3.depth);
var _local2 = _local3["para_gun" + _local3.depth];
_local2._x = objHitZone.owner._x;
_local2._y = objHitZone.owner._y + 60;
_local2.vy = Math.randomNum(0, -0.5);
_local2.vx = Math.randomNum(-1, 1);
_local2.vr = Math.randomNum(0, 10);
_local2._rotation = Math.randomNum(0, 50);
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.vy = _local1.vy + paraGravity;
_local1._x = _local1._x + _local1.vx;
_local1._y = _local1._y + _local1.vy;
_local1._rotation = _local1._rotation + _local1.vr;
if (_local1._y > 0) {
_local1.removeMovieClip();
}
};
}
function paraHitParachute(objHitZone) {
var _local1 = objHitZone;
_local1.owner.parachuteHits++;
addToScore(1);
if (_local1.owner.parachuteHits > 5) {
addToScore(25);
_local1.owner.state = "collapsed";
_local1.owner.para.gotoAndStop("collapsed");
}
}
function gruntInitialise(clip) {
var _local1 = clip;
_local1.state = "start";
_local1.torso.depth = 0;
_local1.registerTargetZone(_local1.hitBody, gruntHitBody);
_local1.registerTargetZone(_local1.hitLeftArm, gruntHitLeftArm);
_local1.registerTargetZone(_local1.hitRightArm, gruntHitRightArm);
_local1.registerTargetZone(_local1.hitHead, gruntHitHead);
_local1.leftArmHealth = 1;
_local1.rightArmHealth = 1;
_local1.headHealth = 1;
_local1.bodyHealth = 4;
_local1.muzzleFlash._visible = false;
_local1.head.gotoAndStop(_local1.properties.headStyle);
_local1.properties.startX = _local1._x;
_local1.properties.startY = _local1._y;
switch (Math.randomInt(1, 3)) {
case 1 :
baseClip.sEnemyAppearA.start();
break;
case 2 :
baseClip.sEnemyAppearB.start();
break;
case 3 :
baseClip.sEnemyAppearC.start();
}
_local1.onEnterFrame = gruntFrameLoop;
}
function gruntFrameLoop() {
var _local1 = this;
_local1.frame++;
switch (_local1.state) {
case "start" :
_local1.state = "poppingUp";
_local1.easeProperty(Math.easeOutQuad, ["_x", "_y"], [_local1.properties.finalX, _local1.properties.finalY], 15);
_local1.onEaseComplete = function () {
if (this.state == "poppingUp") {
this.state = "trackingPlayer";
}
};
return;
case "poppingUp" :
return;
case "firing" :
if (((((_local1.frame % 3) == 0) && (_local1.leftArmHealth > 0)) && (_local1.rightArmHealth > 0)) && (_local1.properties.ammo > 0)) {
_local1.properties.ammo--;
var _local2 = {x:0, y:0};
_local1.barrel.localToGlobal(_local2);
var _local3 = {x:Math.easeInOutSine(_local1.sweepSteps - _local1.properties.ammo, _local1.sweepStart.x, _local1.sweepEnd.x - _local1.sweepStart.x, _local1.sweepSteps) + Math.randomNum(-25, 25), y:Math.easeInOutSine(_local1.sweepSteps - _local1.properties.ammo, _local1.sweepStart.y, _local1.sweepEnd.y - _local1.sweepStart.y, _local1.sweepSteps) + Math.randomNum(-25, 25)};
fireEnemyBullet(_local2, _local3);
_local1.muzzleFlash._visible = true;
}
if (_local1.properties.ammo <= 0) {
_local1.muzzleFlash._visible = false;
_local1.state = "trackingPlayer";
}
case "trackingPlayer" :
if ((_local1.bodyHealth == 0) || (_local1.headHealth == 0)) {
_local1._rotation = Math.randomNum(-3, 3);
_local1.easeProperty(Math.easeInQuad, ["_y"], [_local1._y + 350], 40);
_local1.onEaseComplete = function () {
this.removeMovieClip();
};
_local1.state = "dead";
}
if (_local1.frame == _local1.properties.fireAfterFrame) {
_local1.state = "firing";
if ((_local1.leftArmHealth > 0) && (_local1.rightArmHealth > 0)) {
switch (Math.randomInt(1, 2)) {
case 1 :
baseClip.sEnemyFire1.start();
case 2 :
baseClip.sEnemyFire2.start();
}
}
_local1.sweepStart = {x:Math.randomNum(-600, 600), y:-600 + Math.randomNum(0, 400)};
_local1.sweepEnd = {x:Math.randomNum(-20, 20), y:-300 + Math.randomNum(0, 100)};
baseClip.eddie.body.localToGlobal(_local1.sweepStart);
baseClip.eddie.body.localToGlobal(_local1.sweepEnd);
_local1.sweepSteps = _local1.properties.ammo;
}
if (_local1.frame == _local1.properties.runAwayFrame) {
_local1.state = "poppingDown";
_local1.easeProperty(Math.easeInQuad, ["_x", "_y"], [_local1.properties.startX, _local1.properties.startY], 15);
_local1.onEaseComplete = function () {
this.removeMovieClip();
};
}
return;
case "poppingDown" :
case "dead" :
_local1.muzzleFlash._visible = false;
}
}
function gruntHitBody(objHitZone, hitPoint) {
var _local3 = hitPoint;
var _local1 = objHitZone.owner;
addToScore(2);
if (_local1.bodyHealth > 0) {
_local1.bodyHealth--;
}
_local1.torso.depth++;
_local1.torso.attachMovie("wound", "wound" + _local1.torso.depth, _local1.torso.depth);
_local1.torso.globalToLocal(_local3);
var _local2 = _local1.torso["wound" + _local1.torso.depth];
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2.gotoAndStop(Math.randomInt(1, 2));
_local2._rotation = Math.randomInt(0, 359);
_local2._alpha = Math.randomInt(40, 80);
if (_local1.bodyHealth == 0) {
}
}
function gruntHitLeftArm(objHitZone) {
var _local2 = this;
var _local1 = objHitZone.owner;
if (_local1.leftArmHealth > 0) {
addToScore(5);
_local1.leftArmHealth--;
_local1.leftArm.vx = Math.randomNum(-10, -2);
_local1.leftArm.vy = Math.randomNum(-13, -2);
_local1.leftArm.vr = Math.randomNum(-30, -10);
_local1.leftArm.onEnterFrame = function () {
var _local1 = this;
if (_local1._y < 200) {
_local1.vy = _local1.vy + limbGravity;
_local1._x = _local1._x + _local1.vx;
_local1._y = _local1._y + _local1.vy;
_local1._rotation = _local1._rotation + _local1.vr;
}
};
} else {
gruntHitBody(objHitZone);
}
}
function gruntHitRightArm(objHitZone) {
var _local2 = this;
var _local1 = objHitZone.owner;
if (_local1.rightArmHealth > 0) {
addToScore(5);
_local1.rightArmHealth--;
_local1.rightArm.vx = Math.randomNum(2, 10);
_local1.rightArm.vy = Math.randomNum(-13, -2);
_local1.rightArm.vr = Math.randomNum(10, 30);
_local1.rightArm.onEnterFrame = function () {
var _local1 = this;
if (_local1._y < 200) {
_local1.vy = _local1.vy + limbGravity;
_local1._x = _local1._x + _local1.vx;
_local1._y = _local1._y + _local1.vy;
_local1._rotation = _local1._rotation + _local1.vr;
}
};
} else {
gruntHitBody(objHitZone);
}
}
function gruntHitHead(objHitZone) {
var _local1 = objHitZone.owner;
if (_local1.headHealth > 0) {
_local1.headHealth--;
if (_local1.headHealth == 0) {
addToScore(25);
_local1.head._rotation = Math.randomInt(-30, 30);
_local1.head.face.gotoAndPlay("explode");
}
}
}
function fireEnemyBullet(start2D, target2D) {
var _local1 = this;
baseClip.flyingBullets.depth++;
var _local2 = baseClip.flyingBullets.createEmptyMovieClip("bullet" + baseClip.flyingBullets.depth, baseClip.flyingBullets.depth);
_local2.frame = 0;
baseClip.flyingBullets.globalToLocal(start2D);
baseClip.flyingBullets.globalToLocal(target2D);
_local2.pos3D = {x:start2D.x, y:start2D.y, z:crosshairZ};
_local2.target3D = {x:target2D.x, y:target2D.y, z:0};
var invScaleFactor = ((_local2.pos3D.z + focalDist) / focalDist);
_local2.pos3D.x = _local2.pos3D.x * invScaleFactor;
_local2.pos3D.y = _local2.pos3D.y * invScaleFactor;
_local2.dt_pos3D = {x:_local2.target3D.x - _local2.pos3D.x, y:_local2.target3D.y - _local2.pos3D.y, z:_local2.target3D.z - _local2.pos3D.z};
var len = Math.sqrt(((_local2.dt_pos3D.x * _local2.dt_pos3D.x) + (_local2.dt_pos3D.y * _local2.dt_pos3D.y)) + (_local2.dt_pos3D.z * _local2.dt_pos3D.z));
_local2.dt_pos3D.x = _local2.dt_pos3D.x / len;
_local2.dt_pos3D.y = _local2.dt_pos3D.y / len;
_local2.dt_pos3D.z = _local2.dt_pos3D.z / len;
_local2.bulletSpeed = bulletSpeed / 4;
_local2.bulletLeathalAfter = 5;
_local2.bulletLeathalBefore = 30;
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.frame++;
if (_local1.frame > bulletFrames) {
switch (Math.randomInt(1, 4)) {
case 1 :
baseClip.sZing1.setVolume(100);
baseClip.sZing1.start();
break;
case 2 :
baseClip.sZing2.setVolume(100);
baseClip.sZing2.start();
break;
case 3 :
baseClip.sZing3.setVolume(100);
baseClip.sZing3.start();
break;
case 4 :
baseClip.sZing4.setVolume(100);
baseClip.sZing4.start();
}
_local1.removeMovieClip();
} else {
_local1.pos3D.x = _local1.pos3D.x + (_local1.dt_pos3D.x * _local1.bulletSpeed);
_local1.pos3D.y = _local1.pos3D.y + (_local1.dt_pos3D.y * _local1.bulletSpeed);
_local1.pos3D.z = _local1.pos3D.z + (_local1.dt_pos3D.z * _local1.bulletSpeed);
var tail3D = {x:_local1.pos3D.x - (_local1.dt_pos3D.x * _local1.bulletSpeed), y:_local1.pos3D.y - (_local1.dt_pos3D.y * _local1.bulletSpeed), z:_local1.pos3D.z - (_local1.dt_pos3D.z * _local1.bulletSpeed)};
var _local2 = project3Dto2D(_local1.pos3D);
var _local3 = project3Dto2D(tail3D);
if (((((head3D._x < (-Stage.width)) || (head3D._x > Stage.width)) || (head3D._y < (-Stage.height))) || (head3D._y > Stage.height)) || (_local1.pos3D.z < (-focalDist))) {
_local1.removeMovieClip();
}
_local1.clear();
_local1.lineStyle(0, (((_local1.frame >= _local1.bulletLeathalAfter) && (_local1.frame <= _local1.bulletLeathalBefore)) ? 16777215 : 16777215), 70);
_local1.moveTo(_local2.x, _local2.y);
_local1.lineTo(_local3.x, _local3.y);
if (((_local1.frame >= _local1.bulletLeathalAfter) && (_local1.frame <= _local1.bulletLeathalBefore)) && (!baseClip.eddie.ducked)) {
_local1.localToGlobal(_local2);
if (baseClip.eddie.body.hit.hitTest(_local2.x, _local2.y)) {
giveEddieDamage(bulletDamageOnEddie);
_local1.removeMovieClip();
}
}
}
};
}
function initEverything() {
var _local1 = this;
var _local2 = _root;
baseClip.depth = 0;
baseClip.eddie.attachMovie("eddie", "body", baseClip.depth++);
baseClip.eddie.body._x = -100;
baseClip.eddie.body._y = 0;
baseClip.eddie.vx = 0;
baseClip.eddie.health = 100;
baseClip.eddie.score = 0;
baseClip.eddie.body.easeProperty(Math.easeOutExpo, ["_x"], [100], 30);
baseClip.attachMovie("frame", "gameFrame", baseClip.depth++);
baseClip.gameOver = false;
scoreClip.topOffset = scoreClip.s1._y;
_local2.score = "00000";
baseClip.gameHitZone._visible = false;
baseClip.shootHitZone._visible = false;
baseClip.ricochetHitZone._visible = false;
baseClip.crosshair._visible = false;
startSmoke(-1, 0, 2, 4, baseClip.airSmokeHolder1, "airSmoke", 0, 0);
startSmoke(-1, 0, 1, 1, baseClip.groundSmokeHolder1, "groundSmoke", 0, 0);
startSmoke(-100, 0, 2, 1, baseClip.groundSmokeHolder2, "groundSmoke", 0, 0);
startSmoke(-1, 0, -1, 2, baseClip.groundSmokeHolder3, "groundSmoke", 0, 0);
baseClip.airSmokeHolder1.frame = 0;
baseClip.airSmokeHolder1._alpha = 0;
baseClip.groundSmokeHolder1._alpha = 0;
baseClip.groundSmokeHolder2._alpha = 0;
baseClip.groundSmokeHolder3._alpha = 0;
baseClip.airSmokeHolder1.onEnterFrame = function () {
var _local1 = this;
_local1.frame++;
baseClip.airSmokeHolder1._alpha = _local1.frame * 2;
baseClip.groundSmokeHolder1._alpha = _local1.frame * 2;
baseClip.groundSmokeHolder2._alpha = _local1.frame * 2;
baseClip.groundSmokeHolder3._alpha = _local1.frame * 2;
if (_local1._alpha >= 100) {
_local1.onEnterFrame = undefined;
}
};
baseClip.level = 0;
whiteFadeClip._alpha = 0;
_local2.sAmbience = _local2.makeSound("ambience", 10000);
baseClip.sDistantBomb1 = baseClip.makeSound("distantbomb", ++baseClip.depth);
baseClip.sDistantBomb2 = baseClip.makeSound("distantbomb_a", ++baseClip.depth);
baseClip.sNearBomb = baseClip.makeSound("near_bomb", ++baseClip.depth);
baseClip.sDistantBomb1.setVolume(30);
baseClip.sDistantBomb2.setVolume(30);
baseClip.sNearBomb.setVolume(30);
baseClip.sShootLoop = baseClip.makeSound("eddie_shoot", ++baseClip.depth);
baseClip.sShootLoop.playing = false;
baseClip.sShootStop = baseClip.makeSound("eddie_shoot_end", ++baseClip.depth);
baseClip.sGunClick = baseClip.makeSound("gun_click", ++baseClip.depth);
baseClip.sEddieHit = baseClip.makeSound("eddie_shot", ++baseClip.depth);
baseClip.sEddieHit.setVolume(45);
baseClip.splat1 = baseClip.makeSound("splat_a", ++baseClip.depth);
baseClip.splat2 = baseClip.makeSound("splat_b", ++baseClip.depth);
baseClip.splat3 = baseClip.makeSound("splat_c", ++baseClip.depth);
baseClip.splat1.setVolume(40);
baseClip.splat2.setVolume(40);
baseClip.splat3.setVolume(40);
baseClip.sZing1 = baseClip.makeSound("tracers", ++baseClip.depth);
baseClip.sZing2 = baseClip.makeSound("tracers_a", ++baseClip.depth);
baseClip.sZing3 = baseClip.makeSound("tracers_b", ++baseClip.depth);
baseClip.sZing4 = baseClip.makeSound("whiz", ++baseClip.depth);
baseClip.sEnemyAppearA = baseClip.makeSound("enemy_angry", ++baseClip.depth);
baseClip.sEnemyAppearB = baseClip.makeSound("enemy_moan", ++baseClip.depth);
baseClip.sEnemyAppearC = baseClip.makeSound("grunt", ++baseClip.depth);
baseClip.sEnemyFire1 = baseClip.makeSound("distant_gun", ++baseClip.depth);
baseClip.sEnemyFire2 = baseClip.makeSound("enemyfire", ++baseClip.depth);
baseClip.sEnemyFire2.setVolume(50);
baseClip.eddie.objColour = new Color(baseClip.eddie.body);
baseClip.eddie.objTrans = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
baseClip.eddie.objColour.setTransform(baseClip.eddie.objTrans);
_local2.sAmbience.start(0, 9999);
baseClip.onEnterFrame = gameLoop;
}
function initGame() {
baseClip.frame = 0;
baseClip.timelineElement = 0;
baseClip.levelEnding = false;
baseClip.switchingLevel = false;
baseClip.eddie.ammo = ammoPerClip;
baseClip.eddie.lastFiredFrame = 0;
baseClip.eddie.firing = false;
baseClip.eddie.glare = 0;
baseClip.flyingBullets.depth = 0;
baseClip.spentCasings.depth = 0;
baseClip.explosionHolder.depth = 0;
baseClip.enemyHolderClose.depth = 0;
baseClip.enemyHolderDistant.depth = 0;
baseClip.enemyHolderHorizon.depth = 0;
baseClip.eddie.ducked = false;
baseClip.eddie.duckStatus = "standing";
baseClip.eddie.body.gotoAndStop("look_fore");
baseClip.eddie.vx = 0;
updateAmmoDisplay();
updateHealthDisplay();
baseClip.onMouseDown = function () {
if (baseClip.eddie.ammo == 0) {
baseClip.sGunClick.start();
}
};
baseClip.hitZones = [];
baseClip.enemies = [];
}
function gameLoop() {
var _local3 = _root;
baseClip.frame++;
if (baseClip.gameOver) {
whiteFadeClip._alpha = whiteFadeClip._alpha + 5;
if (whiteFadeClip._alpha >= 100) {
if (baseClip.gameWon) {
gotoAndStop ("gamewon");
} else {
gotoAndStop ("gamelost");
}
}
}
baseClip.eddie.body.arm.armHolder.armGfx._x = baseClip.eddie.body.arm.armHolder.armGfx._x + recoilRecoverRate;
if (baseClip.eddie.body.arm.armHolder.armGfx._x > 0) {
baseClip.eddie.body.arm.armHolder.armGfx._x = 0;
}
baseClip.eddie.objTrans.rb = baseClip.eddie.objTrans.rb - 10;
baseClip.eddie.objTrans.ga = baseClip.eddie.objTrans.ga + 5;
baseClip.eddie.objTrans.ba = baseClip.eddie.objTrans.ba + 5;
if (baseClip.eddie.objTrans.rb < 0) {
baseClip.eddie.objTrans.rb = 0;
}
if (baseClip.eddie.objTrans.ga <= 10) {
baseClip.eddie.objTrans.ga = 10;
}
if (baseClip.eddie.objTrans.ba <= 10) {
baseClip.eddie.objTrans.ba = 10;
}
if (baseClip.eddie.objTrans.ga > 100) {
baseClip.eddie.objTrans.ga = 100;
}
if (baseClip.eddie.objTrans.ba > 100) {
baseClip.eddie.objTrans.ba = 100;
}
baseClip.eddie.objColour.setTransform(baseClip.eddie.objTrans);
baseClip.eddie.body._rotation = baseClip.eddie.body._rotation / 1.3;
baseClip.eddie.firing = false;
if (baseClip.gameHitZone.hitTest(_local3._xmouse, _local3._ymouse, true)) {
Mouse.hide();
baseClip.crosshair._visible = true;
baseClip.crosshair._x = baseClip._xmouse;
baseClip.crosshair._y = baseClip._ymouse;
if ((!baseClip.eddie.ducked) && (!baseClip.switchingLevel)) {
var _local1 = baseClip.crosshair._x - baseClip.eddie.body._x;
var _local2 = false;
if (_local1 < -80) {
baseClip.eddie.body.gotoAndStop("look_left");
baseClip.eddie.body.arm._rotation = 180;
}
if ((_local1 >= -80) && (_local1 < 130)) {
baseClip.eddie.body.gotoAndStop("look_fore");
_local2 = true;
}
if ((_local1 >= 130) && (_local1 < 240)) {
baseClip.eddie.body.gotoAndStop("look_right_1");
}
if ((_local1 >= 240) && (_local1 < 300)) {
baseClip.eddie.body.gotoAndStop("look_right_2");
}
if ((_local1 >= 300) && (_local1 < 440)) {
baseClip.eddie.body.gotoAndStop("look_right_3");
}
if (_local1 >= 440) {
baseClip.eddie.body.gotoAndStop("look_right_4");
}
}
if (baseClip.shootHitZone.hitTest(_local3._xmouse, _local3._ymouse, true)) {
switch (baseClip.eddie.ammo) {
case 0 :
baseClip.crosshair.gotoAndStop("reload");
break;
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
case 6 :
case 7 :
baseClip.crosshair.gotoAndStop("reloadsoon");
break;
default :
baseClip.crosshair.gotoAndStop("enabled");
}
if (((!baseClip.switchingLevel) && (!baseClip.eddie.ducked)) && (Mouse.isDown())) {
baseClip.eddie.firing = true;
}
if ((!_local2) && (!baseClip.switchingLevel)) {
aimArm(baseClip.crosshair._x, baseClip.crosshair._y);
}
} else {
baseClip.crosshair.gotoAndStop("disabled");
}
} else {
Mouse.show();
baseClip.crosshair._visible = false;
}
if (baseClip.eddie.firing && (!baseClip.switchingLevel)) {
if (baseClip.frame >= (baseClip.eddie.lastFiredFrame + fireEvery)) {
if (!baseClip.sShootLoop.playing) {
if (baseClip.eddie.ammo > 0) {
baseClip.sShootLoop.playing = true;
baseClip.sShootLoop.start(0, 9999);
}
}
fireBullet();
}
}
if (baseClip.sShootLoop.playing && ((!baseClip.eddie.firing) || (baseClip.eddie.ammo <= 0))) {
baseClip.sShootLoop.stop();
baseClip.sShootLoop.playing = false;
if (baseClip.eddie.ammo > 0) {
baseClip.sShootStop.start();
} else {
baseClip.sGunClick.start();
}
}
baseClip.eddie.glare = baseClip.eddie.glare - 10;
if (baseClip.eddie.glare < 0) {
baseClip.eddie.glare = 0;
}
setEddieGlare(baseClip.eddie.glare);
if (!baseClip.switchingLevel) {
if (Math.randomInt(0, 50) == 0) {
generateExplosion(baseClip.foregroundExplosionHolder, Math.randomNum(0, gameWidth), Math.randomNum(groundMinY, groundMaxY), Math.randomInt(90, 130));
}
if (Math.randomInt(0, 30) == 0) {
generateExplosion(baseClip.backgroundExplosionHolder, Math.randomNum(0, gameWidth), Math.randomNum(groundMinY, groundMaxY), Math.randomInt(60, 80));
}
checkForNewEnemies();
if (Key.isDown(37)) {
baseClip.eddie.vx = baseClip.eddie.vx - eddieAccel;
}
if (Key.isDown(39)) {
baseClip.eddie.vx = baseClip.eddie.vx + eddieAccel;
}
if (Key.isDown(40)) {
if (!baseClip.eddie.ducked) {
baseClip.eddie.duckStatus == "ducking";
baseClip.eddie.ducked = true;
baseClip.eddie.body.gotoAndStop("reload");
baseClip.eddie.body.easeProperty(Math.easeInOutExpo, ["_y"], [baseClip.eddie.body._y + 80], 7);
}
} else if (baseClip.eddie.duckStatus == "waiting") {
baseClip.eddie.body.torso.play();
baseClip.eddie.body.easeProperty(Math.easeInOutExpo, ["_y"], [baseClip.eddie.body._y - 80], 7);
}
if (baseClip.eddie.duckStatus != "standing") {
baseClip.eddie.vx = 0;
}
if (baseClip.eddie.duckStatus == "waiting") {
baseClip.eddie.ammo = ammoPerClip;
updateAmmoDisplay();
}
if ((baseClip.eddie.body._x < eddieMinX) && (baseClip.eddie.vx < 0)) {
baseClip.eddie.vx = 0;
}
if ((baseClip.eddie.body._x > eddieMaxX) && (baseClip.eddie.vx > 0)) {
baseClip.eddie.vx = 0;
}
baseClip.eddie.vx = baseClip.eddie.vx * eddieBrake;
if ((baseClip.eddie.vx > -0.5) && (baseClip.eddie.vx < 0.5)) {
baseClip.eddie.vx = 0;
}
baseClip.eddie.body._x = baseClip.eddie.body._x + baseClip.eddie.vx;
}
if ((baseClip.frame % garbageCollectEvery) == 0) {
garbageCollect();
}
}
function startSmoke(sx, sy, speedX, everyNframes, parentClip, linkage, depth, frameCount) {
var _local1 = this;
var _local3 = linkage;
var _local2 = parentClip.attachMovie(_local3, _local3 + depth, depth);
_local2._x = sx;
_local2._y = sy;
_local2.speedX = speedX;
_local2.everyNframes = everyNframes;
_local2.linkage = _local3;
_local2.depth = depth;
_local2.frameCount = frameCount;
_local2.spawnedNew = false;
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.frameCount++;
if ((_local1.frameCount % _local1.everyNframes) == 0) {
_local1._x = _local1._x + _local1.speedX;
if (((!_local1.spawnedNew) && (_local1._x >= 0)) && (_local1.speedX > 0)) {
_local1.spawnedNew = true;
startSmoke(_local1._x - _local1._width, _local1._y, _local1.speedX, _local1.everyNframes, _local1._parent, _local1.linkage, _local1.depth + 1, _local1.frameCount);
}
if (((!_local1.spawnedNew) && ((_local1._x + _local1._width) <= gameWidth)) && (_local1.speedX < 0)) {
_local1.spawnedNew = true;
startSmoke(_local1._x + _local1._width, _local1._y, _local1.speedX, _local1.everyNframes, _local1._parent, _local1.linkage, _local1.depth + 1, _local1.frameCount);
}
if ((_local1.speedX > 0) && (_local1._x > gameWidth)) {
_local1.removeMovieClip();
}
if ((_local1.speedX < 0) && ((_local1._x + _local1._width) < 0)) {
_local1.removeMovieClip();
}
}
};
}
function aimArm(targetX, targetY) {
var _local1 = {x:targetX, y:targetY};
var _local3 = baseClip.eddie.body.arm;
baseClip.localToGlobal(_local1);
baseClip.eddie.body.globalToLocal(_local1);
var _local2 = Math.atan2(_local1.y - baseClip.eddie.body.arm._y, _local1.x - baseClip.eddie.body.arm._x);
_local3._rotation = Math.radToDeg(_local2);
}
function fireBullet() {
var _local1 = this;
if (baseClip.eddie.ammo > 0) {
baseClip.eddie.ammo--;
baseClip.eddie.lastFiredFrame = baseClip.frame;
updateAmmoDisplay();
baseClip.eddie.glare = 50;
baseClip.flyingBullets.depth++;
var _local2 = baseClip.flyingBullets.createEmptyMovieClip("bullet" + baseClip.flyingBullets.depth, baseClip.flyingBullets.depth);
_local2.frame = 0;
var start2D = {x:0, y:0};
baseClip.eddie.body.arm.barrel.localToGlobal(start2D);
baseClip.flyingBullets.globalToLocal(start2D);
var target2D = {x:baseClip.crosshair._x + Math.randomNum(-inaccuracy, inaccuracy), y:baseClip.crosshair._y + Math.randomNum(-inaccuracy, inaccuracy)};
baseClip.localToGlobal(target2D);
baseClip.flyingBullets.globalToLocal(target2D);
_local2.pos3D = {x:start2D.x, y:start2D.y, z:0};
_local2.target3D = {x:target2D.x, y:target2D.y, z:crosshairZ};
var invScaleFactor = ((_local2.target3D.z + focalDist) / focalDist);
_local2.target3D.x = _local2.target3D.x * invScaleFactor;
_local2.target3D.y = _local2.target3D.y * invScaleFactor;
_local2.dt_pos3D = {x:_local2.target3D.x - _local2.pos3D.x, y:_local2.target3D.y - _local2.pos3D.y, z:_local2.target3D.z - _local2.pos3D.z};
var len = Math.sqrt(((_local2.dt_pos3D.x * _local2.dt_pos3D.x) + (_local2.dt_pos3D.y * _local2.dt_pos3D.y)) + (_local2.dt_pos3D.z * _local2.dt_pos3D.z));
_local2.dt_pos3D.x = _local2.dt_pos3D.x / len;
_local2.dt_pos3D.y = _local2.dt_pos3D.y / len;
_local2.dt_pos3D.z = _local2.dt_pos3D.z / len;
_local2.bulletSpeed = bulletSpeed;
_local2.bulletLeathalAfter = bulletLeathalAfter;
_local2.bulletLeathalBefore = bulletLeathalBefore;
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.frame++;
if (_local1.frame > bulletFrames) {
_local1.removeMovieClip();
} else {
if (_local1.frame > bulletGravityAfter) {
_local1.dt_pos3D.y = _local1.dt_pos3D.y + bulletGravity;
}
_local1.pos3D.x = _local1.pos3D.x + (_local1.dt_pos3D.x * _local1.bulletSpeed);
_local1.pos3D.y = _local1.pos3D.y + (_local1.dt_pos3D.y * _local1.bulletSpeed);
_local1.pos3D.z = _local1.pos3D.z + (_local1.dt_pos3D.z * _local1.bulletSpeed);
var tail3D = {x:_local1.pos3D.x - (_local1.dt_pos3D.x * _local1.bulletSpeed), y:_local1.pos3D.y - (_local1.dt_pos3D.y * _local1.bulletSpeed), z:_local1.pos3D.z - (_local1.dt_pos3D.z * _local1.bulletSpeed)};
var _local2 = project3Dto2D(_local1.pos3D);
var tail2D = project3Dto2D(tail3D);
_local1.clear();
_local1.lineStyle(0, (((_local1.frame >= bulletLeathalAfter) && (_local1.frame <= bulletLeathalBefore)) ? 0 : 0), 30 + ((40 * (bulletFrames - _local1.frame)) / bulletFrames));
_local1.moveTo(_local2.x, _local2.y);
_local1.lineTo(tail2D.x, tail2D.y);
if ((_local1.frame >= _local1.bulletLeathalAfter) && (_local1.frame <= _local1.bulletLeathalBefore)) {
if (testHitPoint(_local2.x, _local2.y)) {
generateBulletSplash(_local2.x, _local2.y, _local2.scaleFactor);
switch (Math.randomInt(1, 3)) {
case 1 :
baseClip.splat1.start();
break;
case 2 :
baseClip.splat2.start();
break;
case 3 :
baseClip.splat3.start();
}
_local1.removeMovieClip();
}
}
if (_local1.frame < bulletRicochetRange) {
var p = {x:_local2.x, y:_local2.y};
baseClip.flyingBullets.localToGlobal(p);
if (baseClip.ricochetHitZone.hitTest(p.x, p.y, true)) {
generateBulletSplash(_local2.x, _local2.y, _local2.scaleFactor);
switch (Math.randomInt(1, 4)) {
case 1 :
baseClip.sZing1.setVolume(50);
baseClip.sZing1.start();
break;
case 2 :
baseClip.sZing2.setVolume(50);
baseClip.sZing2.start();
break;
case 3 :
baseClip.sZing3.setVolume(50);
baseClip.sZing3.start();
}
_local1.dt_pos3D = {x:Math.randomNum(-1, 1), y:Math.randomNum(-1, 0), z:Math.randomNum(0, 0.7)};
var _local3 = Math.sqrt(((_local1.dt_pos3D.x * _local1.dt_pos3D.x) + (_local1.dt_pos3D.y * _local1.dt_pos3D.y)) + (_local1.dt_pos3D.z * _local1.dt_pos3D.z));
_local1.dt_pos3D.x = _local1.dt_pos3D.x / _local3;
_local1.dt_pos3D.y = _local1.dt_pos3D.y / _local3;
_local1.dt_pos3D.z = _local1.dt_pos3D.z / _local3;
_local1.frame = bulletRicochetRange;
_local1.bulletLeathalAfter = 0;
_local1.bulletLeathalBefore = bulletFrames;
_local1.bulletSpeed = _local1.bulletSpeed / 2.5;
}
}
}
};
baseClip.eddie.body.arm.flare.gotoAndPlay(Math.randomInt(2, 6));
baseClip.eddie.body.arm.flare._alpha = 100;
baseClip.eddie.body.arm.flare.onEnterFrame = function () {
var _local1 = this;
_local1._alpha = _local1._alpha - 15;
if (_local1._alpha < 0) {
_local1.onEnterFrame = undefined;
}
};
baseClip.wall.wallFlare.gotoAndPlay(2);
var flare2D = {x:0, y:0};
baseClip.eddie.body.arm.barrel.localToGlobal(flare2D);
baseClip.wall.globalToLocal(flare2D);
baseClip.wall.wallFlareMask._x = flare2D.x;
baseClip.wall.wallFlareMask._y = flare2D.y;
baseClip.spentCasings.depth++;
baseClip.spentCasings.attachMovie("spentCasing", "casing" + baseClip.spentCasings.depth, baseClip.spentCasings.depth);
_local2 = baseClip.spentCasings["casing" + baseClip.spentCasings.depth];
var startPos = {x:0, y:0};
baseClip.eddie.body.arm.breech.localToGlobal(startPos);
baseClip.spentCasings.globalToLocal(startPos);
_local2._x = startPos.x;
_local2._y = startPos.y;
_local2._rotation = Math.randomNum(-20, 20);
_local2.vx = Math.randomNum(6, 10);
_local2.vy = Math.randomNum(-12, -17);
_local2.vr = Math.randomNum(-25, 25);
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.vy = _local1.vy + 2;
_local1._x = _local1._x + _local1.vx;
_local1._y = _local1._y + _local1.vy;
_local1._rotation = _local1._rotation + _local1.vr;
if (_local1._y > 0) {
_local1.removeMovieClip();
}
};
baseClip.eddie.body.arm.armHolder.armGfx._x = -recoilAmount;
}
}
function generateBulletSplash(x, y, scaleFactor) {
var _local2 = this;
baseClip.flyingBullets.depth++;
var _local3 = baseClip.flyingBullets.createEmptyMovieClip("splash" + baseClip.flyingBullets.depth, baseClip.flyingBullets.depth);
_local3._x = x;
_local3._y = y;
_local3.frame = 0;
_local3._xscale = scaleFactor * 100;
_local3._yscale = scaleFactor * 100;
_local3.frag = [];
var _local1 = 0;
while (_local1 < 2) {
_local3.frag[_local1] = {};
_local3.frag[_local1].vx = Math.randomNum(-40, 40);
_local3.frag[_local1].vy = Math.randomNum(-40, 40);
_local3.frag[_local1].x = 0;
_local3.frag[_local1].y = 0;
_local3.frag[_local1].px = 0;
_local3.frag[_local1].py = 0;
_local1++;
}
_local3.onEnterFrame = function () {
var _local2 = this;
_local2.frame++;
if (_local2.frame > 5) {
_local2.removeMovieClip();
}
_local2.clear();
_local2.lineStyle(0, 16777215, 50);
var _local1 = 0;
while (_local1 < _local2.frag.length) {
_local2.frag[_local1].x = _local2.frag[_local1].x + _local2.frag[_local1].vx;
_local2.frag[_local1].y = _local2.frag[_local1].y + _local2.frag[_local1].vy;
_local2.moveTo(_local2.frag[_local1].px, _local2.frag[_local1].py);
_local2.lineTo(_local2.frag[_local1].x, _local2.frag[_local1].y);
_local2.frag[_local1].vx = _local2.frag[_local1].vx * 0.8;
_local2.frag[_local1].vy = _local2.frag[_local1].vy * 0.8;
_local2.frag[_local1].px = _local2.frag[_local1].x;
_local2.frag[_local1].py = _local2.frag[_local1].y;
_local1++;
}
};
}
function project3Dto2D(obj3D) {
var _local3 = obj3D;
var _local2 = focalDist / (_local3.z + focalDist);
var _local1 = {};
_local1.x = _local3.x * _local2;
_local1.y = _local3.y * _local2;
_local1.scaleFactor = _local2;
return(_local1);
}
function updateAmmoDisplay() {
if ((baseClip.eddie.ammo % 2) == 0) {
baseClip.magazine.bullets._y = 7;
} else {
baseClip.magazine.bullets._y = 5;
}
baseClip.magazine.bulletMask._y = -3 * ((ammoPerClip - baseClip.eddie.ammo) - 1);
}
function updateHealthDisplay() {
if (baseClip.eddie.health <= 0) {
if (!baseClip.eddie.body._easePropertyObj) {
baseClip.eddie.body.easeProperty(Math.easeInSine, ["_x", "_y", "_rotation"], [baseClip.eddie.body._x - 40, baseClip.eddie.body._y + 350, -30], 20);
}
whiteFadeClip.gotoAndStop("black");
baseClip.eddie.health = 0;
baseClip.gameOver = true;
}
var _local1 = baseClip.healthbar.bar;
_local1.mask.clear();
_local1.mask.drawFilledSquare(0, 0, _local1._width, (_local1._height * (100 - baseClip.eddie.health)) / 100, 0, 100);
}
function updateScoreDisplay() {
var _local1 = Math.floor((baseClip.eddie.score % 10) / 1);
var s10s = Math.floor((baseClip.eddie.score % 100) / 10);
var _local2 = Math.floor((baseClip.eddie.score % 1000) / 100);
var s1000s = Math.floor((baseClip.eddie.score % 10000) / 1000);
var _local3 = Math.floor((baseClip.eddie.score % 100000) / 10000);
scoreAdjust(scoreClip.s1, _local1);
scoreAdjust(scoreClip.s10, s10s);
scoreAdjust(scoreClip.s100, _local2);
scoreAdjust(scoreClip.s1000, s1000s);
scoreAdjust(scoreClip.s10000, _local3);
_root.score = (((("" + _local3) + s1000s) + _local2) + s10s) + _local1;
}
function addToScore(points) {
baseClip.eddie.score = baseClip.eddie.score + (points * 5);
updateScoreDisplay();
}
function scoreAdjust(clip, units) {
var _local3 = clip;
var _local2 = 28;
var _local1 = _local2 * 10;
if (_local3._y >= _local1) {
_local3._y = _local3._y - _local1;
}
_local3.easeProperty(Math.easeInOutSine, ["_y"], [scoreClip.topOffset - (_local2 * units)], 5);
}
function generateExplosion(holder, x, y, scale) {
var _local1 = holder;
_local1.depth++;
_local1.attachMovie("explosion", "explosion" + _local1.depth, _local1.depth);
_local1["explosion" + _local1.depth]._x = x;
_local1["explosion" + _local1.depth]._y = y;
_local1["explosion" + _local1.depth]._xscale = scale;
_local1["explosion" + _local1.depth]._yscale = scale;
baseClip.skyFlash.gotoAndPlay(1);
switch (Math.randomInt(1, 3)) {
case 1 :
baseClip.sDistantBomb1.start();
case 2 :
baseClip.sDistantBomb2.start();
case 3 :
baseClip.sNearBomb();
}
}
function setEddieGlare(alpha) {
baseClip.eddie.body.arm.armHolder.armGfx.glare._alpha = alpha;
baseClip.eddie.body.glare._alpha = alpha;
}
function giveEddieDamage(hitPoints) {
baseClip.eddie.objTrans.rb = 100;
baseClip.eddie.objTrans.ga = baseClip.eddie.objTrans.ga - 20;
baseClip.eddie.objTrans.ba = baseClip.eddie.objTrans.ba - 20;
baseClip.eddie.objColour.setTransform(baseClip.eddie.objTrans);
baseClip.eddie.body._rotation = baseClip.eddie.body._rotation + Math.randomNum(-3, 3);
baseClip.sEddieHit.start();
baseClip.eddie.health = baseClip.eddie.health - hitPoints;
updateHealthDisplay();
}
function garbageCollect() {
var initialZonesCount = baseClip.hitZones.length;
var initialEnemiesCount = baseClip.enemies.length;
var _local1 = 0;
while (_local1 < baseClip.hitZones.length) {
if (!baseClip.hitZones[_local1].owner._framesloaded) {
baseClip.hitZones.splice(_local1, 1);
_local1--;
}
_local1++;
}
_local1 = 0;
while (_local1 < baseClip.enemies.length) {
if (!baseClip.enemies[_local1]._framesloaded) {
baseClip.enemies.splice(_local1, 1);
_local1--;
}
_local1++;
}
}
function testHitPoint(x, y) {
var _local2 = {x:x, y:y};
baseClip.flyingBullets.localToGlobal(_local2);
var _local1 = 0;
while (_local1 < baseClip.hitZones.length) {
if (baseClip.hitZones[_local1].hit.hitTest(_local2.x, _local2.y, true)) {
baseClip.hitZones[_local1].callback(baseClip.hitZones[_local1], _local2);
return(true);
}
_local1++;
}
return(false);
}
function checkForNewEnemies() {
var lev = baseClip.level;
var _local3 = baseClip.timelineElement;
if (baseClip.frame >= level[lev].maxFrames) {
initNextLevel();
}
if (baseClip.frame == level[lev].timeline[_local3].frame) {
var _local2 = level[lev].timeline[_local3].enemies;
var _local1 = 0;
while (_local1 < _local2.length) {
generateEnemy(_local2[_local1].type, baseClip["enemyHolder" + _local2[_local1].holder], _local2[_local1].x, _local2[_local1].y, _local2[_local1].scale, _local2[_local1].properties);
_local1++;
}
baseClip.timelineElement++;
_local3++;
if (level[lev].timeline[_local3] == undefined) {
baseClip.levelEnding = true;
return;
}
} else if (baseClip.levelEnding && (baseClip.enemies.length == 0)) {
initNextLevel();
}
}
function initNextLevel() {
baseClip.switchingLevel = true;
clearAllEnemies();
baseClip.level++;
if (baseClip.level == 3) {
baseClip.gameOver = true;
baseClip.gameWon = true;
}
baseClip.eddie.body.gotoAndStop("look_right_2");
setEddieGlare(0);
baseClip.eddie.body.easeProperty(Math.easeInOutSine, ["_x", "_y"], [100, 0], 45);
baseClip.wall.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.foregroundObjects.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.midgroundObjects.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.midground.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.sky.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.shootHitZone.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.ricochetHitZone.easeProperty(Math.easeInOutSine, ["_x"], [-level[baseClip.level].scrollOffset], 60);
baseClip.wall.onEaseComplete = function () {
initGame();
};
}
function generateEnemy(type, holder, x, y, scale, properties) {
var _local2 = holder;
var _local3 = type;
_local2.depth++;
_local2.attachMovie("enemy_" + _local3, ("enemy_" + _local3) + _local2.depth, _local2.depth);
var _local1 = _local2[("enemy_" + _local3) + _local2.depth];
_local1._x = x;
_local1._y = y;
_local1._xscale = scale;
_local1._yscale = scale;
_local1.frame = 0;
_local1.registerEnemy();
_local1.properties = properties;
switch (_local3) {
case "para" :
paraInitialise(_local1);
return;
case "grunt" :
gruntInitialise(_local1);
return;
}
}
function clearAllEnemies() {
var _local1 = 0;
while (_local1 < baseClip.enemies.length) {
baseClip.enemies[_local1].removeMovieClip();
_local1++;
}
}
stop();
_level0.trackPoint("Game_started");
Math.randomNum = function (minNum, maxNum) {
return((Math.random() * (maxNum - minNum)) + minNum);
};
Math.randomInt = function (minNum, maxNum) {
return(Math.round((Math.random() * (maxNum - minNum)) + minNum));
};
Math.vectorLength = function (dx, dy) {
return(Math.sqrt((dx * dx) + (dy * dy)));
};
Math.distance = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.vectorLength(_local2, _local1));
};
Math.formatNum = function (num, leadingDigits) {
var _local2 = leadingDigits;
var _local1 = "" + Math.round(num);
while (_local1.length < _local2) {
_local1 = "0" + _local1;
}
return(_local1);
};
Math.degToRad = function (degs) {
return(degs * 0.0174532925);
};
Math.radToDeg = function (rads) {
return(rads * 57.2957795);
};
Mouse._down = false;
_root.createEmptyMovieClip("mouseListenerClip", 14873);
_root.mouseListenerClip.onMouseDown = function () {
Mouse._down = true;
};
_root.mouseListenerClip.onMouseUp = function () {
Mouse._down = false;
};
Mouse.isDown = function () {
return(this._down);
};
MovieClip.prototype.easeProperty = function (p_oEaseFunc, p_oProperties, p_oDestinations, p_nFrames, p_nTweak1, p_nTweak2) {
var _local2 = this;
var m_nFrames = ((p_nFrames != undefined) ? (p_nFrames) : 30);
var m_nDelay = ((p_nDelay != undefined) ? (p_nDelay) : 0);
if (_local2._easePropertyObj) {
_local2._easePropertyObj.removeMovieClip();
}
var oEaseObj = _local2.createEmptyMovieClip("_easePropertyObj", _local2.getNextHighestDepth());
if (typeof(p_oProperties) == "string") {
if (p_oProperties.indexOf(",") != -1) {
p_oProperties = p_oProperties.split(",");
} else {
p_oProperties = [p_oProperties];
}
}
if (typeof(p_oDestinations) == "string") {
if (p_oProperties.indexOf(",") != -1) {
p_oProperties = p_oProperties.split(",");
} else {
p_oProperties = [p_oProperties];
}
} else if (typeof(p_oDestinations) == "number") {
p_oDestinations = [p_oDestinations];
}
var m_aProps = p_oProperties;
var m_aDests = p_oDestinations;
var m_oSelf = _local2;
oEaseObj.oEaseFunc = ((typeof(p_oEaseFunc) == "string") ? (Math[p_oEaseFunc]) : (p_oEaseFunc));
oEaseObj.nFrame = 0;
oEaseObj.aProps = new Array();
oEaseObj.nDelay = p_nDelay;
var _local3 = 0;
while (_local3 < m_aProps.length) {
var _local1 = new Object();
_local1.tag = m_aProps[_local3];
_local1.startVal = _local2[_local1.tag];
_local1.endVal = m_aDests[_local3];
_local1.distance = _local1.endVal - _local1.startVal;
oEaseObj.aProps[_local3] = _local1;
_local3++;
}
oEaseObj.onEnterFrame = function () {
var _local1 = this;
if (m_nDelay != 0) {
m_nDelay--;
} else {
var _local2 = 0;
while (_local2 < _local1.aProps.length) {
var _local3 = _local1.aProps[_local2];
m_oSelf[_local3.tag] = p_oEaseFunc(_local1.nFrame, _local3.startVal, _local3.distance, m_nFrames, p_nTweak1, p_nTweak2);
_local2++;
}
_local1.nFrame++;
if (_local1.nFrame == m_nFrames) {
_local2 = 0;
while (_local2 < _local1.aProps.length) {
var _local3 = _local1.aProps[_local2];
m_oSelf[_local3.tag] = _local3.endVal;
_local2++;
}
if (m_oSelf.onEaseComplete) {
m_oSelf.onEaseComplete();
}
_local1.removeMovieClip();
} else if (m_oSelf.onEaseStep) {
m_oSelf.onEaseStep(_local1.nFrame);
}
}
};
};
MovieClip.prototype.easeToPoint = function (easeFunc, destX, destY, frames, delay) {
var _local1 = this;
var _local2 = frames;
var _local3 = delay;
if (!_local2) {
_local2 = 30;
}
if (!_local3) {
_local3 = 0;
}
_local1.startX = _local1._x;
_local1.startY = _local1._y;
_local1.destX = destX;
_local1.destY = destY;
_local1.dx = _local1.destX - _local1.startX;
_local1.dy = _local1.destY - _local1.startY;
_local1.delay = _local3;
_local1.frames = _local2;
_local1.easeFunc = easeFunc;
_local1.frame = 0;
_local1.onEnterFrame = function () {
var _local1 = this;
if (_local1.delay != 0) {
_local1.delay--;
} else {
_local1._x = _local1.easeFunc(_local1.frame, _local1.startX, _local1.dx, _local1.frames);
_local1._y = _local1.easeFunc(_local1.frame, _local1.startY, _local1.dy, _local1.frames);
_local1.frame++;
if (_local1.frame == _local1.frames) {
_local1._x = _local1.destX;
_local1._y = _local1.destY;
_local1.onEnterFrame = undefined;
}
}
};
};
Math.linearTween = function (t, b, c, d) {
return(((c * t) / d) + b);
};
Math.easeInQuad = function (t, b, c, d) {
return((((c * t) * t) / (d * d)) + b);
};
Math.easeOutQuad = function (t, b, c, d) {
var _local1 = d;
var _local2 = t;
return((((((-c) * _local2) * _local2) / (_local1 * _local1)) + (((2 * c) * _local2) / _local1)) + b);
};
Math.easeInOutQuad = function (t, b, c, d) {
var _local1 = d;
var _local3 = t;
if (_local3 < (_local1 / 2)) {
return(((((2 * c) * _local3) * _local3) / (_local1 * _local1)) + b);
}
var _local2 = _local3 - (_local1 / 2);
return(((((((-2 * c) * _local2) * _local2) / (_local1 * _local1)) + (((2 * c) * _local2) / _local1)) + (c / 2)) + b);
};
Math.easeInSine = function (t, b, c, d) {
return((((-c) * Math.cos(((t / d) * Math.PI) / 2)) + c) + b);
};
Math.easeOutSine = function (t, b, c, d) {
return((c * Math.sin(((t / d) * Math.PI) / 2)) + b);
};
Math.easeInOutSine = function (t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
};
Math.easeInExpo = function (t, b, c, d) {
var _local2 = c;
var _local1 = 1;
if (_local2 < 0) {
_local1 = _local1 * -1;
_local2 = _local2 * -1;
}
return((_local1 * Math.exp((Math.log(_local2) / d) * t)) + b);
};
Math.easeOutExpo = function (t, b, c, d) {
var _local1 = c;
var _local2 = 1;
if (_local1 < 0) {
_local2 = _local2 * -1;
_local1 = _local1 * -1;
}
return((_local2 * (((-Math.exp(((-Math.log(_local1)) / d) * (t - d))) + _local1) + 1)) + b);
};
Math.easeInOutExpo = function (t, b, c, d) {
var _local1 = c;
var _local3 = d;
var _local2 = 1;
if (_local1 < 0) {
_local2 = _local2 * -1;
_local1 = _local1 * -1;
}
if (t < (_local3 / 2)) {
return((_local2 * Math.exp((Math.log(_local1 / 2) / (_local3 / 2)) * t)) + b);
}
return((_local2 * (((-Math.exp(((-2 * Math.log(_local1 / 2)) / _local3) * (t - _local3))) + _local1) + 1)) + b);
};
Math.easeInElastic = function (t, b, c, d, a, p) {
var _local1 = p;
var _local2 = a;
var _local3 = t;
_local2 = ((_local2 == undefined) ? 0.5 : (_local2));
_local1 = ((_local1 == undefined) ? 20 : (_local1));
if (_local3 == 0) {
return(b);
}
_local3 = _local3 / d;
if (_local3 == 1) {
return(b + c);
}
if (!_local1) {
_local1 = d * 0.3;
}
if (_local2 < Math.abs(c)) {
_local2 = c;
var s = (_local1 / 4);
} else {
var s = ((_local1 / (Math.PI*2)) * Math.asin(c / _local2));
}
_local3 = _local3 - 1;
return((-((_local2 * Math.pow(2, 10 * _local3)) * Math.sin((((_local3 * d) - s) * (Math.PI*2)) / _local1))) + b);
};
Math.easeOutElastic = function (t, b, c, d, a, p) {
var _local1 = p;
var _local2 = a;
var _local3 = c;
_local2 = ((_local2 == undefined) ? 0.5 : (_local2));
_local1 = ((_local1 == undefined) ? 20 : (_local1));
if (t == 0) {
return(b);
}
if (((t = t / d)) == 1) {
return(b + _local3);
}
if (!_local1) {
_local1 = d * 0.3;
}
if (_local2 < Math.abs(_local3)) {
_local2 = _local3;
var s = (_local1 / 4);
} else {
var s = ((_local1 / (Math.PI*2)) * Math.asin(_local3 / _local2));
}
return((((_local2 * Math.pow(2, -10 * t)) * Math.sin((((t * d) - s) * (Math.PI*2)) / _local1)) + _local3) + b);
};
Math.easeInOutElastic = function (t, b, c, d, a, p) {
var _local1 = p;
var _local2 = a;
var _local3 = t;
_local2 = ((_local2 == undefined) ? 0.5 : (_local2));
_local1 = ((_local1 == undefined) ? 20 : (_local1));
if (_local3 == 0) {
return(b);
}
_local3 = _local3 / (d / 2);
if (_local3 == 2) {
return(b + c);
}
if (!_local1) {
_local1 = d * 0.45;
}
if (_local2 < Math.abs(c)) {
_local2 = c;
var s = (_local1 / 4);
} else {
var s = ((_local1 / (Math.PI*2)) * Math.asin(c / _local2));
}
if (_local3 < 1) {
_local3 = _local3 - 1;
return((-0.5 * ((_local2 * Math.pow(2, 10 * _local3)) * Math.sin((((_local3 * d) - s) * (Math.PI*2)) / _local1))) + b);
}
_local3 = _local3 - 1;
return(((((_local2 * Math.pow(2, -10 * _local3)) * Math.sin((((_local3 * d) - s) * (Math.PI*2)) / _local1)) * 0.5) + c) + b);
};
Math.easeInBack = function (t, b, c, d, s) {
var _local1 = s;
var _local2 = t;
if (_local1 == undefined) {
_local1 = 1.70158;
}
_local2 = _local2 / d;
return((((c * _local2) * _local2) * (((_local1 + 1) * _local2) - _local1)) + b);
};
Math.easeOutBack = function (t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = (_local1 / d) - 1;
return((c * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 1)) + b);
};
Math.easeInOutBack = function (t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local2 = _local2 * 1.525;
return(((c / 2) * ((_local1 * _local1) * (((_local2 + 1) * _local1) - _local2))) + b);
}
_local1 = _local1 - 2;
_local2 = _local2 * 1.525;
return(((c / 2) * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 2)) + b);
};
Math.easeInBounce = function (t, b, c, d) {
return((c - Math.easeOutBounce(d - t, 0, c, d)) + b);
};
Math.easeOutBounce = function (t, b, c, d) {
var _local1 = t;
var _local2 = c;
var _local3 = b;
_local1 = _local1 / d;
if (_local1 < 0.363636363636364) {
return((_local2 * ((7.5625 * _local1) * _local1)) + _local3);
}
if (_local1 < 0.727272727272727) {
_local1 = _local1 - 0.545454545454545;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.75)) + _local3);
}
if (_local1 < 0.909090909090909) {
_local1 = _local1 - 0.818181818181818;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.9375)) + _local3);
}
_local1 = _local1 - 0.954545454545455;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.984375)) + _local3);
};
Math.easeInOutBounce = function (t, b, c, d) {
var _local1 = d;
var _local2 = t;
var _local3 = c;
if (_local2 < (_local1 / 2)) {
return((Math.easeInBounce(_local2 * 2, 0, _local3, _local1) * 0.5) + b);
}
return(((Math.easeOutBounce((_local2 * 2) - _local1, 0, _local3, _local1) * 0.5) + (_local3 * 0.5)) + b);
};
MovieClip.prototype.drawSquare = function (x, y, w, h) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
_local1.moveTo(_local3, _local2);
_local1.lineTo(_local3 + w, _local2);
_local1.lineTo(_local3 + w, _local2 + h);
_local1.lineTo(_local3, _local2 + h);
_local1.lineTo(_local3, _local2);
};
MovieClip.prototype.drawFilledSquare = function (x, y, w, h, colour, alpha) {
var _local1 = this;
_local1.beginFill(colour, alpha);
_local1.drawSquare(x, y, w, h);
_local1.endFill();
};
MovieClip.prototype.drawCircle = function (x, y, r) {
var _local1 = y;
var _local2 = x;
var _local3 = r;
var c1 = (_local3 * 0.414213562373095);
var c2 = ((_local3 * Math.SQRT2) / 2);
this.moveTo(_local2 + _local3, _local1);
this.curveTo(_local2 + _local3, _local1 + c1, _local2 + c2, _local1 + c2);
this.curveTo(_local2 + c1, _local1 + _local3, _local2, _local1 + _local3);
this.curveTo(_local2 - c1, _local1 + _local3, _local2 - c2, _local1 + c2);
this.curveTo(_local2 - _local3, _local1 + c1, _local2 - _local3, _local1);
this.curveTo(_local2 - _local3, _local1 - c1, _local2 - c2, _local1 - c2);
this.curveTo(_local2 - c1, _local1 - _local3, _local2, _local1 - _local3);
this.curveTo(_local2 + c1, _local1 - _local3, _local2 + c2, _local1 - c2);
this.curveTo(_local2 + _local3, _local1 - c1, _local2 + _local3, _local1);
};
MovieClip.prototype.drawFilledCircle = function (x, y, r, colour, alpha) {
var _local1 = this;
_local1.beginFill(colour, alpha);
_local1.drawCircle(x, y, r);
_local1.endFill();
};
MovieClip.prototype.drawSmoothCurveThroughPoints = function (wibbleFactor, startAngle, points) {
var _local2 = points;
this.moveTo(_local2[0].x, _local2[0].y);
var prevCx = (_local2[0].x - Math.cos((Math.PI * startAngle) / 180));
var prevCy = (_local2[0].y - Math.sin((Math.PI * startAngle) / 180));
var _local1 = 1;
while (_local1 < _local2.length) {
var dCx = (_local2[_local1 - 1].x - prevCx);
var dCy = (_local2[_local1 - 1].y - prevCy);
var dCLength = Math.vectorLength(dCx, dCy);
var dx = (_local2[_local1 - 1].x - _local2[_local1].x);
var dy = (_local2[_local1 - 1].y - _local2[_local1].y);
var dLength = Math.vectorLength(dx, dy);
cScale = 0;
if (dCLength != 0) {
cScale = ((0.5 + wibbleFactor) * dLength) / dCLength;
}
var newCx = (_local2[_local1 - 1].x + (dCx * cScale));
var _local3 = _local2[_local1 - 1].y + (dCy * cScale);
this.curveTo(newCx, _local3, _local2[_local1].x, _local2[_local1].y);
prevCx = newCx;
prevCy = _local3;
_local1++;
}
};
MovieClip.prototype.makeSound = function (soundLinkage, depth) {
var _local1 = this.createEmptyMovieClip((((("soundClip_" + soundLinkage) + "_") + depth) + "_") + Math.floor(Math.randomNum(1000000, 9000000)), depth);
_local1.sound = new Sound(_local1);
_local1.sound.attachSound(soundLinkage);
_local1.sound.sourceClip = _local1;
return(_local1.sound);
};
MovieClip.prototype.attachImage = function (imageURL, newClipName, x, y, w, h, borderColour, depth, fitMode, recentre) {
var _local1 = this;
var _local2 = _local1.createEmptyMovieClip(newClipName, depth);
_local2._x = x;
_local2._y = y;
_local2.imgW = w;
_local2.imgH = h;
_local2.fitMode = fitMode;
_local2.recentre = recentre;
var _local3 = _local2.createEmptyMovieClip("cImg", 0);
var imgLoader = _local3.createEmptyMovieClip("cImgLoader", 0);
if (borderColour != undefined) {
var imgBorder = _local2.createEmptyMovieClip("cBorder", 1);
imgBorder.lineStyle(0, borderColour, 100);
imgBorder.drawFilledSquare(0, 0, w, h, 16711680, 0);
}
imgLoader.loadMovie(imageURL);
_local2.onEnterFrame = function () {
var _local1 = this;
var _local2 = _local1.cImg;
var _local3 = _local2.cImgLoader;
if ((_local3.getBytesLoaded() >= _local3.getBytesTotal()) && (_local2._width)) {
switch (_local1.fitMode) {
case "fitAll" :
_local2.resizeBestFit(_local1.imgW, _local1.imgH, _local1.recentre);
break;
case "coverAll" :
_local2.resizeBestFitCropped(_local1.imgW, _local1.imgH, _local1.recentre);
break;
case "stretch" :
_local2._width = _local1.imgW;
_local2._height = _local1.imgH;
break;
case "none" :
break;
}
_local1.onEnterFrame = undefined;
}
};
};
MovieClip.prototype.resizeBestFit = function (w, h, centreInSpace) {
var _local1 = this;
var _local3 = h / w;
var imgRatio = (_local1._height / _local1._width);
if (imgRatio < _local3) {
var _local2 = w / _local1._width;
_local1._width = _local1._width * _local2;
_local1._height = _local1._height * _local2;
if (centreInSpace) {
_local1._x = 0;
_local1._y = (h - _local1._height) / 2;
} else {
_local1._x = 0;
_local1._y = 0;
}
} else {
var _local2 = h / _local1._height;
_local1._width = _local1._width * _local2;
_local1._height = _local1._height * _local2;
if (centreInSpace) {
_local1._x = (w - _local1._width) / 2;
_local1._y = 0;
} else {
_local1._x = 0;
_local1._y = 0;
}
}
};
MovieClip.prototype.resizeBestFitCropped = function (w, h, centreInSpace) {
var _local1 = this;
var _local3 = h / w;
_local1._x = 0;
_local1._y = 0;
var imgRatio = (_local1._height / _local1._width);
if (imgRatio < _local3) {
var _local2 = h / _local1._height;
_local1._width = _local1._width * _local2;
_local1._height = _local1._height * _local2;
if (centreInSpace) {
_local1._x = 0;
_local1._y = (h - _local1._height) / 2;
} else {
_local1._x = 0;
_local1._y = 0;
}
} else {
var _local2 = w / _local1._width;
_local1._width = _local1._width * _local2;
_local1._height = _local1._height * _local2;
if (centreInSpace) {
_local1._x = (w - _local1._width) / 2;
_local1._y = 0;
} else {
_local1._x = 0;
_local1._y = 0;
}
}
};
var level = [];
level[0] = {scrollOffset:0, maxFrames:9000, timeline:[{frame:30, enemies:[{type:"grunt", x:500, y:290, scale:80, properties:{headStyle:2, finalX:500, finalY:110, runAwayFrame:150, fireAfterFrame:90, ammo:15}, holder:"Close"}]}, {frame:150, enemies:[{type:"grunt", x:200, y:290, scale:60, properties:{headStyle:2, finalX:200, finalY:50, runAwayFrame:120, fireAfterFrame:60, ammo:10}, holder:"Close"}]}, {frame:240, enemies:[{type:"grunt", x:300, y:290, scale:40, properties:{headStyle:2, finalX:300, finalY:15, runAwayFrame:90, fireAfterFrame:30, ammo:7}, holder:"Close"}]}, {frame:360, enemies:[{type:"grunt", x:400, y:290, scale:100, properties:{headStyle:1, finalX:400, finalY:160, runAwayFrame:60, fireAfterFrame:30, ammo:5}, holder:"Close"}, {type:"grunt", x:500, y:310, scale:100, properties:{headStyle:1, finalX:500, finalY:170, runAwayFrame:66, fireAfterFrame:35, ammo:5}, holder:"Close"}, {type:"grunt", x:600, y:300, scale:100, properties:{headStyle:1, finalX:600, finalY:160, runAwayFrame:72, fireAfterFrame:40, ammo:5}, holder:"Close"}]}, {frame:450, enemies:[{type:"para", x:100, y:-390, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-350, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-310, scale:100, properties:{}, holder:"Horizon"}]}, {frame:750, enemies:[{type:"grunt", x:950, y:70, scale:60, properties:{headStyle:1, finalX:530, finalY:75, runAwayFrame:160, fireAfterFrame:90, ammo:10}, holder:"Close"}, {type:"grunt", x:1050, y:70, scale:55, properties:{headStyle:2, finalX:600, finalY:75, runAwayFrame:155, fireAfterFrame:102, ammo:10}, holder:"Close"}, {type:"grunt", x:1150, y:80, scale:60, properties:{headStyle:3, finalX:670, finalY:85, runAwayFrame:150, fireAfterFrame:108, ammo:10}, holder:"Close"}]}, {frame:780, enemies:[{type:"para", x:100, y:-390, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-370, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-350, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:400, y:-330, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-310, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1050, enemies:[{type:"grunt", x:950, y:70, scale:60, properties:{headStyle:3, finalX:530, finalY:80, runAwayFrame:384, fireAfterFrame:30, ammo:10}, holder:"Close"}, {type:"grunt", x:1050, y:70, scale:55, properties:{headStyle:3, finalX:600, finalY:80, runAwayFrame:341, fireAfterFrame:162, ammo:10}, holder:"Close"}, {type:"grunt", x:1150, y:80, scale:60, properties:{headStyle:3, finalX:670, finalY:90, runAwayFrame:300, fireAfterFrame:228, ammo:10}, holder:"Close"}, {type:"grunt", x:-50, y:40, scale:40, properties:{headStyle:1, finalX:200, finalY:45, runAwayFrame:384, fireAfterFrame:210, ammo:10}, holder:"Close"}, {type:"grunt", x:-150, y:40, scale:45, properties:{headStyle:1, finalX:150, finalY:50, runAwayFrame:341, fireAfterFrame:192, ammo:10}, holder:"Close"}, {type:"grunt", x:-250, y:50, scale:40, properties:{headStyle:1, finalX:100, finalY:45, runAwayFrame:300, fireAfterFrame:258, ammo:10}, holder:"Close"}, {type:"para", x:50, y:-420, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-370, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:400, y:-330, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1410, enemies:[{type:"grunt", x:200, y:290, scale:120, properties:{headStyle:2, finalX:200, finalY:130, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1470, enemies:[{type:"grunt", x:400, y:290, scale:100, properties:{headStyle:1, finalX:400, finalY:130, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1530, enemies:[{type:"grunt", x:300, y:290, scale:100, properties:{headStyle:3, finalX:300, finalY:130, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}]};
level[1] = {scrollOffset:470, maxFrames:9000, timeline:[{frame:30, enemies:[{type:"grunt", x:500, y:290, scale:80, properties:{headStyle:2, finalX:500, finalY:100, runAwayFrame:150, fireAfterFrame:90, ammo:15}, holder:"Close"}]}, {frame:150, enemies:[{type:"grunt", x:200, y:290, scale:60, properties:{headStyle:2, finalX:200, finalY:50, runAwayFrame:120, fireAfterFrame:60, ammo:10}, holder:"Close"}]}, {frame:240, enemies:[{type:"grunt", x:300, y:290, scale:40, properties:{headStyle:2, finalX:300, finalY:15, runAwayFrame:90, fireAfterFrame:30, ammo:7}, holder:"Close"}]}, {frame:360, enemies:[{type:"grunt", x:400, y:290, scale:100, properties:{headStyle:1, finalX:400, finalY:160, runAwayFrame:60, fireAfterFrame:30, ammo:5}, holder:"Close"}, {type:"grunt", x:500, y:310, scale:100, properties:{headStyle:1, finalX:500, finalY:170, runAwayFrame:66, fireAfterFrame:35, ammo:5}, holder:"Close"}, {type:"grunt", x:600, y:300, scale:100, properties:{headStyle:1, finalX:600, finalY:150, runAwayFrame:72, fireAfterFrame:40, ammo:5}, holder:"Close"}]}, {frame:450, enemies:[{type:"para", x:100, y:-390, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-350, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-310, scale:100, properties:{}, holder:"Horizon"}]}, {frame:750, enemies:[{type:"grunt", x:950, y:70, scale:60, properties:{headStyle:1, finalX:530, finalY:75, runAwayFrame:160, fireAfterFrame:90, ammo:10}, holder:"Close"}, {type:"grunt", x:1050, y:70, scale:55, properties:{headStyle:2, finalX:600, finalY:75, runAwayFrame:155, fireAfterFrame:102, ammo:10}, holder:"Close"}, {type:"grunt", x:1150, y:80, scale:60, properties:{headStyle:3, finalX:670, finalY:85, runAwayFrame:150, fireAfterFrame:108, ammo:10}, holder:"Close"}]}, {frame:780, enemies:[{type:"para", x:100, y:-390, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-370, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-350, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:400, y:-330, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-310, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1050, enemies:[{type:"grunt", x:950, y:70, scale:60, properties:{headStyle:3, finalX:530, finalY:75, runAwayFrame:384, fireAfterFrame:30, ammo:10}, holder:"Close"}, {type:"grunt", x:1050, y:70, scale:55, properties:{headStyle:3, finalX:600, finalY:75, runAwayFrame:341, fireAfterFrame:162, ammo:10}, holder:"Close"}, {type:"grunt", x:1150, y:80, scale:60, properties:{headStyle:3, finalX:670, finalY:85, runAwayFrame:300, fireAfterFrame:228, ammo:10}, holder:"Close"}, {type:"grunt", x:-50, y:40, scale:40, properties:{headStyle:1, finalX:200, finalY:45, runAwayFrame:384, fireAfterFrame:210, ammo:10}, holder:"Close"}, {type:"grunt", x:-150, y:40, scale:45, properties:{headStyle:1, finalX:150, finalY:50, runAwayFrame:341, fireAfterFrame:192, ammo:10}, holder:"Close"}, {type:"grunt", x:-250, y:50, scale:40, properties:{headStyle:1, finalX:100, finalY:45, runAwayFrame:300, fireAfterFrame:258, ammo:10}, holder:"Close"}, {type:"para", x:50, y:-420, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-370, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:400, y:-330, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1410, enemies:[{type:"grunt", x:200, y:290, scale:120, properties:{headStyle:2, finalX:200, finalY:140, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1470, enemies:[{type:"grunt", x:400, y:290, scale:100, properties:{headStyle:1, finalX:400, finalY:140, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1530, enemies:[{type:"grunt", x:300, y:290, scale:100, properties:{headStyle:3, finalX:300, finalY:140, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1650, enemies:[{type:"para", x:400, y:-340, scale:70, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-320, scale:85, properties:{}, holder:"Horizon"}, {type:"para", x:600, y:-300, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1770, enemies:[{type:"para", x:100, y:-340, scale:120, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-320, scale:120, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-300, scale:120, properties:{}, holder:"Horizon"}]}]};
level[2] = {scrollOffset:940, maxFrames:9000, timeline:[{frame:30, enemies:[{type:"grunt", x:500, y:290, scale:80, properties:{headStyle:2, finalX:500, finalY:100, runAwayFrame:150, fireAfterFrame:90, ammo:15}, holder:"Close"}]}, {frame:150, enemies:[{type:"grunt", x:200, y:290, scale:60, properties:{headStyle:2, finalX:200, finalY:45, runAwayFrame:120, fireAfterFrame:60, ammo:10}, holder:"Close"}]}, {frame:240, enemies:[{type:"grunt", x:300, y:290, scale:40, properties:{headStyle:2, finalX:300, finalY:15, runAwayFrame:90, fireAfterFrame:30, ammo:7}, holder:"Close"}]}, {frame:360, enemies:[{type:"grunt", x:400, y:290, scale:100, properties:{headStyle:1, finalX:400, finalY:150, runAwayFrame:60, fireAfterFrame:30, ammo:5}, holder:"Close"}, {type:"grunt", x:500, y:310, scale:100, properties:{headStyle:1, finalX:500, finalY:170, runAwayFrame:66, fireAfterFrame:35, ammo:5}, holder:"Close"}, {type:"grunt", x:600, y:300, scale:100, properties:{headStyle:1, finalX:600, finalY:160, runAwayFrame:72, fireAfterFrame:40, ammo:5}, holder:"Close"}]}, {frame:450, enemies:[{type:"para", x:100, y:-390, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-350, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-310, scale:100, properties:{}, holder:"Horizon"}]}, {frame:750, enemies:[{type:"grunt", x:950, y:70, scale:60, properties:{headStyle:1, finalX:530, finalY:80, runAwayFrame:160, fireAfterFrame:90, ammo:10}, holder:"Close"}, {type:"grunt", x:1050, y:70, scale:55, properties:{headStyle:2, finalX:600, finalY:80, runAwayFrame:155, fireAfterFrame:102, ammo:10}, holder:"Close"}, {type:"grunt", x:1150, y:80, scale:60, properties:{headStyle:3, finalX:670, finalY:90, runAwayFrame:150, fireAfterFrame:108, ammo:10}, holder:"Close"}]}, {frame:780, enemies:[{type:"para", x:100, y:-390, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-370, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-350, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:400, y:-330, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-310, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1050, enemies:[{type:"grunt", x:950, y:70, scale:60, properties:{headStyle:3, finalX:530, finalY:75, runAwayFrame:384, fireAfterFrame:30, ammo:10}, holder:"Close"}, {type:"grunt", x:1050, y:70, scale:55, properties:{headStyle:3, finalX:600, finalY:75, runAwayFrame:341, fireAfterFrame:162, ammo:10}, holder:"Close"}, {type:"grunt", x:1150, y:80, scale:60, properties:{headStyle:3, finalX:670, finalY:85, runAwayFrame:300, fireAfterFrame:228, ammo:10}, holder:"Close"}, {type:"grunt", x:-50, y:40, scale:40, properties:{headStyle:1, finalX:200, finalY:45, runAwayFrame:384, fireAfterFrame:210, ammo:10}, holder:"Close"}, {type:"grunt", x:-150, y:40, scale:45, properties:{headStyle:1, finalX:150, finalY:50, runAwayFrame:341, fireAfterFrame:192, ammo:10}, holder:"Close"}, {type:"grunt", x:-250, y:50, scale:40, properties:{headStyle:1, finalX:100, finalY:45, runAwayFrame:300, fireAfterFrame:258, ammo:10}, holder:"Close"}, {type:"para", x:50, y:-420, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-370, scale:100, properties:{}, holder:"Horizon"}, {type:"para", x:400, y:-330, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1410, enemies:[{type:"grunt", x:500, y:290, scale:120, properties:{headStyle:2, finalX:500, finalY:130, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1470, enemies:[{type:"grunt", x:400, y:290, scale:100, properties:{headStyle:1, finalX:400, finalY:130, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1530, enemies:[{type:"grunt", x:450, y:290, scale:100, properties:{headStyle:3, finalX:450, finalY:130, runAwayFrame:90, fireAfterFrame:60, ammo:20}, holder:"Close"}]}, {frame:1650, enemies:[{type:"para", x:400, y:-340, scale:70, properties:{}, holder:"Horizon"}, {type:"para", x:500, y:-320, scale:85, properties:{}, holder:"Horizon"}, {type:"para", x:600, y:-300, scale:100, properties:{}, holder:"Horizon"}]}, {frame:1770, enemies:[{type:"para", x:100, y:-340, scale:120, properties:{}, holder:"Horizon"}, {type:"para", x:200, y:-320, scale:120, properties:{}, holder:"Horizon"}, {type:"para", x:300, y:-300, scale:120, properties:{}, holder:"Horizon"}]}]};
var limbGravity = 2;
var gameWidth = 770;
var gameHeight = 458;
var focalDist = 50;
var eddieAccel = 5;
var eddieBrake = 0.7;
var eddieMinX = 50;
var eddieMaxX = (gameWidth - 70);
var ammoPerClip = 30;
var fireEvery = 2;
var bulletFrames = 30;
var bulletSpeed = 200;
var bulletTrailLength = 350;
var inaccuracy = 5;
var bulletGravity = 0.015;
var bulletGravityAfter = 13;
var bulletLeathalAfter = 8;
var bulletLeathalBefore = 10;
var bulletRicochetRange = 6;
var recoilAmount = 6;
var recoilRecoverRate = 2;
var crosshairZ = 500;
var groundMinY = -30;
var groundMaxY = 0;
var garbageCollectEvery = 120;
var paraGravity = 0.3;
var bulletDamageOnEddie = 5;
var baseClip = _root.main.game;
var scoreClip = _root.main.score;
var whiteFadeClip = _root.main.game.fade;
_quality = "low";
initEverything();
initGame();
MovieClip.prototype.registerTargetZone = function (hitClip, callback) {
var _local1 = {};
_local1.owner = this;
_local1.hit = hitClip;
_local1.callback = callback;
_local1.hit._visible = false;
baseClip.hitZones.push(_local1);
};
MovieClip.prototype.registerEnemy = function () {
baseClip.enemies.push(this);
};
Symbol 535 MovieClip Frame 135
gotoAndPlay(section);
Symbol 535 MovieClip Frame 140
stop();
_quality = "best";
_level0.trackPoint("Game_won");
_root.sAmbience.stop();
Symbol 535 MovieClip Frame 141
stop();
gamewon.gotoAndPlay("out");
Symbol 535 MovieClip Frame 145
gotoAndPlay(section);
Symbol 535 MovieClip Frame 149
stop();
_quality = "best";
_level0.trackPoint("Game_lost");
_root.sAmbience.stop();
Symbol 535 MovieClip Frame 150
stop();
gamelost.gotoAndPlay("out");
Symbol 535 MovieClip Frame 154
gotoAndPlay(section);