Frame 1
function urlChecker() {
if (urlCheckerOn == true) {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
pfixEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(pfixEnd, domain.length);
if ((((domain != "") || (domain != "addictinggames.com")) || (domain != "agstage.com")) || (domain != "shockwave.com")) {
securityImage._visible = true;
preloaderPlayButton._x = -30000;
preloaderPlayButton._y = -30000;
} else {
securityImage._visible = false;
init();
}
} else {
securityImage._visible = false;
init();
}
}
function init() {
_quality = "high";
mouseInitialised = "notyet";
this.onEnterFrame = function () {
update();
};
}
function update() {
var _local3 = this.getBytesLoaded();
var _local4 = this.getBytesTotal();
var _local2 = Math.round((_local3 / _local4) * 100);
percentage = _local2 + "%";
preLoaderCombo.percentageTotal.text = percentage;
preLoaderCombo.gameTitle._alpha = _local2;
preLoaderCombo.preloader.loadBar._xscale = _local2;
if (_local2 >= 100) {
onLoadComplete();
delete this.onEnterFrame;
}
}
function onLoadComplete() {
firstLoad = true;
mainMenuLoadedOnce = false;
preloaderPlayButton._alpha = 100;
preloaderPlayButton._visible = true;
preloaderPlayButton.scribbleCircle.play();
}
Stage.showMenu = false;
stop();
goodURL = false;
urlCheckerOn = false;
urlChecker();
Instance of Symbol 32 MovieClip "preloaderPlayButton" in Frame 1
onClipEvent (load) {
this._visible = false;
this.onRelease = function () {
_root.gotoAndPlay("firstLoad");
};
}
Frame 3
function theZombieDirector(currentZombieThreat) {
if (currentZombieThreat < (location[currentTownLocation].zombieThreat + (levelUp / 0.25))) {
delay--;
if ((delay <= 0) && (liveZombieCount < zombieLimit)) {
delay = delayMax;
threatDeficit = location[currentTownLocation].zombieThreat - currentZombieThreat;
hud.locationNameText.text = location[currentTownLocation].name;
hud.zombieThreatText.text = location[currentTownLocation].zombieThreat;
findZombieType(threatDeficit);
}
}
}
function findZombieType(threatDeficit) {
isArmed = false;
semiRareZombieChance = random(100) + 1;
rareZombieChance = random(100) + 1;
veryRareZombieChance = random(100) + 1;
armedZombieChance = random(100) + 1;
if (semiRareZombieChance <= location[currentTownLocation].semiRareZombieChance) {
currentZombieType = semiRareZombies[random(semiRareZombies.length)];
} else if (rareZombieChance <= location[currentTownLocation].rareZombieChance) {
currentZombieType = rareZombies[random(rareZombies.length)];
} else if (veryRareZombieChance <= location[currentTownLocation].veryRareZombieChance) {
currentZombieType = veryRareZombies[random(veryRareZombies.length)];
} else if (armedZombieChance <= location[currentTownLocation].armedZombieChance) {
currentZombieType = armedZombies[random(armedZombies.length)];
isArmed = true;
} else {
currentZombieType = commonZombies[random(commonZombies.length)];
}
assessZombieThreat(currentZombieType, isArmed);
}
function assessZombieThreat(currentZombieType, isArmed) {
if (currentZombieType.threat <= threatDeficit) {
addNewZombie(currentZombieType.name, isArmed);
if ((threatDeficit - currentZombieType.threat) > 0) {
delay = delay - maxDelay;
} else if ((threatDeficit - currentZombieType.threat) > 0) {
delay = delay - maxDelay;
}
}
}
function addNewZombie(zombieType, isArmed) {
zombieDepthCount++;
liveZombieCount++;
if (zombieType == "zombieDog") {
_root.attachMovie("zombieDog", "enemy" + zombieDepthCount, zombieDepthCount + 3);
} else {
_root.attachMovie("newZombie", "enemy" + zombieDepthCount, zombieDepthCount + 3);
}
zombiesCreated++;
_root["enemy" + zombieDepthCount]._visible = false;
_root["enemy" + zombieDepthCount].colorTransformTo(location[currentTownLocation].brightnessLevelZombies, 0, location[currentTownLocation].brightnessLevelZombies, 0, location[currentTownLocation].brightnessLevelZombies, 0, 100, 0, 0);
var _local3 = random(location[currentTownLocation].numSpawnZones);
var _local4 = location[currentTownLocation][("spawnZone" + _local3) + "_min"];
var _local6 = location[currentTownLocation][("spawnZone" + _local3) + "_max"];
var _local7 = _local6 - _local4;
_root["enemy" + zombieDepthCount]._y = random(_local7) + _local4;
_root["enemy" + zombieDepthCount]._x = random(150) - 200;
_root["enemy" + zombieDepthCount].cacheAsBitmap = true;
_root["enemy" + zombieDepthCount]._visible = true;
_root["enemy" + zombieDepthCount].attackingWall = false;
enemyOnScreen.push({ref:_root["enemy" + zombieDepthCount], depth:_root["enemy" + zombieDepthCount]._y});
aliveZombies.push({ref:_root["enemy" + zombieDepthCount], type:zombieType, health:_root[zombieType].health, speed:_root[zombieType].speed, damage:_root[zombieType].damage, depth:_root["enemy" + zombieDepthCount]._y, idle:false, animating:false, eating:false, dead:false, proximity:0, proximityToExplosion:0, targetX:0, targetY:0, tempNum:0, beingExploded:false, arrowsStuckTorso:0, arrowsStuckHead:0, arrowsStuckLegs:0, threat:_root[zombieType].threat, directionCount:200, directionCountMax:120, currentDirection:"straight", burnDamageCountHead:0, burnDamageCountTorso:0, burnDamageCountLegs:0, armed:isArmed, targetYDiff:0, trapped:false});
if ((((zombieType == "zombieSlow") || (zombieType == "zombieFast")) || (zombieType == "zombieSprint")) || (zombieType == "zombieEater")) {
zombieAppearance("enemy" + zombieDepthCount, isArmed);
} else {
zombieAppearanceCustom("enemy" + zombieDepthCount, zombieType, isArmed);
}
currentZombieThreat = currentZombieThreat + _root[zombieType].threat;
}
function spawnFragments(numFrags, grenadeX, grenadeY, range, type, damage) {
i = 0;
while (i <= numFrags) {
bullet++;
var _local4 = new Object();
_local4.x = grenadeX;
_local4.y = grenadeY;
var _local3 = _root.attachMovie("round", "round" + bullet, bullet + 310000);
_root["round" + bullet].gotoAndStop("frag");
var _local5 = 100 - random(40);
_root["round" + bullet]._xscale = _local5;
_root["round" + bullet]._yscale = _local5;
_local3._x = _local4.x;
_local3._y = _local4.y;
_local3.angle = random(360);
_local3._rotation = _local3.angle;
_local3.originX = grenadeX;
_local3.originY = grenadeY;
_local3.proximity = 0;
_local3.ref = _root["round" + bullet];
roundsOnScreen.push({ref:_root["round" + bullet], type:type, range:range + random(50), damage:damage, headShotDamage:damage * 2, owner:"hero", originX:grenadeX, originY:grenadeY, proximity:0});
_local3.onEnterFrame = function () {
this.x = Math.cos((this.angle * Math.PI) / 180) * (80 - random(20));
this.y = Math.sin((this.angle * Math.PI) / 180) * (80 - random(20));
this._x = this._x - this.x;
this._y = this._y - this.y;
};
i++;
}
}
function moveFragRounds(roundName, grenadeX, grenadeY) {
roundName.x = Math.cos((roundName.angle * Math.PI) / 180) * _root[currentWeapon].roundSpeed;
roundName.y = Math.sin((roundName.angle * Math.PI) / 180) * _root[currentWeapon].roundSpeed;
roundName._x = roundName._x - roundName.x;
roundName._y = roundName._y - roundName.y;
}
function particleEmitter(particleType, particleName, particleDepth, particleX, particleY, particleGravity, particleQuantity, particleHorizontalEnergy, particleVerticalEnergy, particleFade, particleRotationRate, particleScaling, particleSplash) {
i = 0;
while (i <= particleQuantity) {
particleCount++;
var _local2 = attachMovie(particleType, particleName + i, particleCount);
_local2.ref = particleName + i;
_local2.partType = particleType;
_local2.gravity = particleGravity;
_local2.HorzEnergy = (Math.random() * particleHorizontalEnergy) - (particleHorizontalEnergy / 4);
_local2.VertEnergy = (Math.random() * particleVerticalEnergy) - (particleVerticalEnergy / 2);
if (particleScaling == true) {
_local2._xscale = (_local2._yscale = random(60) + 30);
}
_local2._x = particleX;
_local2._y = particleY;
_local2.angle = 180;
_local2._rotation = _local2.angle;
_local2.rotation = particleRotationRate;
_local2.acceleration = 5;
_local2.particleFade = particleFade;
_local2.splash = particleSplash;
_local2.onEnterFrame = _root.moveParticle;
i++;
}
}
function moveParticle() {
with (this) {
_alpha = _alpha - particleFade;
if (_alpha < 8) {
removeMovieClip();
}
this._rotation = this._rotation + rotation;
this.x = Math.cos((this.angle * Math.PI) / 180) * HorzEnergy;
_x = _x - this.x;
_y = _y + ((VertEnergy = VertEnergy + gravity));
}
}
function zombieBloodParticle(targetX, targetY) {
particleEmitter("bloodParticle", "bloodPart", 100, targetX, targetY, 0.35, Math.round(_root[currentWeapon].damage / 8), 9, 8, 8, 0, true, false);
}
function zombieHeadBloodParticle(targetX, targetY) {
particleEmitter("bloodParticle", "bloodPart", 100, targetX, targetY, 0.35, Math.round(_root[currentWeapon].headShotDamage / 8), 9, 8, 8, 0, true, false);
}
function zombieLegBloodParticle(targetX, targetY) {
particleEmitter("bloodParticle", "bloodPart", 100, targetX, targetY, 0.35, 1, 10, 8, 8, 0, true, false);
}
function zombieChainsawBloodParticle(targetX, targetY) {
particleEmitter("bloodParticle", "bloodPart", 100, targetX, targetY, 0.35, 8, 9, 8, 4, 0, true, false);
}
function survivorBloodParticle(targetX, targetY) {
particleEmitter("bloodParticle", "bloodPart", 100, targetX, targetY, 0.35, 15, 9, 8, 8, 0, true, false);
}
function depthSortFriendlies() {
var _local2 = new Array();
for (var _local1 in friendliesOnScreen) {
if (friendliesOnScreen[_local1].ref != null) {
friendliesOnScreen[_local1].depth = friendliesOnScreen[_local1].ref._y;
_local2.push(friendliesOnScreen[_local1]);
}
}
_local2.sortOn("depth", Array.NUMERIC, Array.DESCENDING);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].ref.swapDepths((survivorDepthCount + _local1) + 163486);
_local1++;
}
}
function openJournal() {
timeManager.journal.journalScribbles.gotoAndStop("blank");
timeManager.journal.journalDayNumber.text = "DAY " + levelUp;
timeManager.journal.journalText.text = location[currentTownLocation].journalText;
timeManager.journal.journalEntryHeading.text = location[currentTownLocation].journalHeading;
timeManager.journal.ySlideTo(10, 0.8, "easeOutSine", 0);
}
function openIntroJournal() {
introJournal.journalDayNumber.text = "DAY " + levelUp;
introJournal.journalText.text = location.glenDale.journalText;
introJournal.journalEntryHeading.text = location.glenDale.journalHeading;
introJournal.ySlideTo(10, 0.8, "easeOutSine", 1);
}
function closeIntroJournal() {
_root.introBlackOut.alphaTo(100, 3, "easeOutSine", 0, startGameFromJournal);
}
function startGameFromJournal() {
_root.gotoAndStop("game");
}
function closeJournal() {
timeManager.journal.ySlideTo(420, 1.2, "easeOutSine", 0);
clipBoardUp();
}
_global.$createTweenController = function () {
var _local3 = _root.createEmptyMovieClip("__tweenController__", 123432);
_local3.$_tweenPropList = new Array();
_local3.$_tTime = getTimer();
_local3.onEnterFrame = _global.$updateTweens;
};
ASSetPropFlags(_global, "$createTweenController", 1, 0);
_global.$removeTweenController = function () {
delete _root.__tweenController__.$_tweenPropList;
delete _root.__tweenController__.$_tTime;
delete _root.__tweenController__.onEnterFrame;
_root.__tweenController__.removeMovieClip();
};
ASSetPropFlags(_global, "$removeTweenController", 1, 0);
_global.$addTween = function (mtarget, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2, extras) {
if (timeSeconds == undefined) {
timeSeconds = 0;
}
if ((animType == undefined) || (animType == "")) {
animType = "easeOutExpo";
}
if (delay == undefined) {
delay = 0;
}
if (typeof(prop) == "string") {
var _local7 = [prop];
var _local11 = [mtarget[prop]];
var _local9 = [propDest];
} else {
var _local7 = [];
var _local11 = [];
var _local9 = [];
for (var _local32 in prop) {
_local11.push(mtarget[prop[_local32]]);
}
for (var _local32 in prop) {
_local7.push(prop[_local32]);
}
for (var _local32 in propDest) {
_local9.push(propDest[_local32]);
}
}
var _local12 = false;
if (_root.__tweenController__ == undefined) {
_global.$createTweenController();
}
var _local4 = _root.__tweenController__.$_tweenPropList;
var _local8 = _root.__tweenController__.$_tTime;
for (var _local32 in _local11) {
if ((_local9[_local32] != undefined) && (!mtarget.$_isTweenLocked)) {
if (mtarget.$_tweenCount > 0) {
var _local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3]._targ == mtarget) && (_local4[_local3]._prop == _local7[_local32])) {
if ((_local8 + (delay * 1000)) < _local4[_local3]._timeDest) {
_local4.splice(_local3, 1);
_local3--;
mtarget.$_tweenCount--;
}
}
_local3++;
}
}
_local4.push({_prop:_local7[_local32], _targ:mtarget, _propStart:undefined, _propDest:_local9[_local32], _timeStart:_local8, _timeDest:_local8 + (timeSeconds * 1000), _animType:animType, _extra1:extra1, _extra2:extra2, _extras:extras, _delay:delay, _isPaused:false, _timePaused:0, _callback:(_local12 ? undefined : (callback))});
mtarget.$_tweenCount = ((mtarget.$_tweenCount > 0) ? (mtarget.$_tweenCount + 1) : 1);
_local12 = true;
}
}
ASSetPropFlags(mtarget, "$_tweenCount", 1, 0);
};
ASSetPropFlags(_global, "$addTween", 1, 0);
_global.$updateTweens = function () {
var _local8 = (this.$_tTime = getTimer());
var _local6 = 0;
while (_local6 < this.$_tweenPropList.length) {
var _local3 = this.$_tweenPropList[_local6];
if (_local3._targ.toString() == undefined) {
this.$_tweenPropList.splice(_local6, 1);
_local6--;
} else if (((_local3._timeStart + (_local3._delay * 1000)) <= _local8) && (!_local3._isPaused)) {
if (_local3._propStart == undefined) {
if (_local3._prop.substr(0, 10) == "__special_") {
if (_local3._prop == "__special_mc_frame__") {
_local3._propStart = _local3._targ._currentframe;
} else if (_local3._prop == "__special_mc_ra__") {
_local3._propStart = new Color(_local3._targ).getTransform().ra;
} else if (_local3._prop == "__special_mc_rb__") {
_local3._propStart = new Color(_local3._targ).getTransform().rb;
} else if (_local3._prop == "__special_mc_ga__") {
_local3._propStart = new Color(_local3._targ).getTransform().ga;
} else if (_local3._prop == "__special_mc_gb__") {
_local3._propStart = new Color(_local3._targ).getTransform().gb;
} else if (_local3._prop == "__special_mc_ba__") {
_local3._propStart = new Color(_local3._targ).getTransform().ba;
} else if (_local3._prop == "__special_mc_bb__") {
_local3._propStart = new Color(_local3._targ).getTransform().bb;
} else if (_local3._prop == "__special_mc_aa__") {
_local3._propStart = new Color(_local3._targ).getTransform().aa;
} else if (_local3._prop == "__special_mc_ab__") {
_local3._propStart = new Color(_local3._targ).getTransform().ab;
} else if (_local3._prop == "__special_text_r__") {
_local3._propStart = _local3._targ.textColor >> 16;
} else if (_local3._prop == "__special_text_g__") {
_local3._propStart = (_local3._targ.textColor & 65280) >> 8;
} else if (_local3._prop == "__special_text_b__") {
_local3._propStart = _local3._targ.textColor & 255;
} else if (_local3._prop == "__special_sound_volume__") {
_local3._propStart = _local3._targ.getVolume();
} else if (_local3._prop == "__special_sound_pan__") {
_local3._propStart = _local3._targ.getPan();
} else if (_local3._prop == "__special_bst_t__") {
_local3._propStart = 0;
_local3._extras.__special_bst_ix__ = _local3._targ._x;
_local3._extras.__special_bst_iy__ = _local3._targ._y;
} else if (_local3._prop == "__special_blur_x__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BlurFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurX;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_blur_y__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BlurFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurY;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_glow_color__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].color;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 16777215 /* 0xFFFFFF */;
}
} else if (_local3._prop == "__special_glow_alpha__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].alpha;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_glow_blurX__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurX;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_glow_blurY__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurY;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_glow_strength__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.GlowFilter) {
_local3._propStart = _local3._targ.filters[_local5].strength;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_bevel_distance__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].distance;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_angle__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].angle;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 45;
}
} else if (_local3._prop == "__special_bevel_highlightColor__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].highlightColor;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 16777215 /* 0xFFFFFF */;
}
} else if (_local3._prop == "__special_bevel_highlightAlpha__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].highlightAlpha;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_bevel_shadowColor__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].shadowColor;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_shadowAlpha__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].shadowAlpha;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else if (_local3._prop == "__special_bevel_blurX__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurX;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_blurY__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].blurY;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 0;
}
} else if (_local3._prop == "__special_bevel_strength__") {
var _local5 = 0;
while (_local5 < _local3._targ.filters.length) {
if (_local3._targ.filters[_local5] instanceof flash.filters.BevelFilter) {
_local3._propStart = _local3._targ.filters[_local5].strength;
}
_local5++;
}
if (_local3._propStart == undefined) {
_local3._propStart = 1;
}
} else {
_local3._propStart = _local3._targ[_local3._prop];
}
} else {
_local3._propStart = _local3._targ[_local3._prop];
}
}
var _local10 = _local3._timeDest + (_local3._delay * 1000);
if (_local10 <= _local8) {
var _local4 = _local3._propDest;
} else {
var _local4 = _global.findTweenValue(_local3._propStart, _local3._propDest, _local3._timeStart, _local8 - (_local3._delay * 1000), _local3._timeDest, _local3._animType, _local3._extra1, _local3._extra2);
}
_local3._targ[_local3._prop] = (_local3._extras.mustRound ? (Math.round(_local4)) : (_local4));
if (_local3._prop == "__special_mc_frame__") {
_local3._targ.gotoAndStop(Math.round(_local4));
} else if (_local3._prop == "__special_mc_ra__") {
new Color(_local3._targ).setTransform({ra:_local4});
} else if (_local3._prop == "__special_mc_rb__") {
new Color(_local3._targ).setTransform({rb:_local4});
} else if (_local3._prop == "__special_mc_ga__") {
new Color(_local3._targ).setTransform({ga:_local4});
} else if (_local3._prop == "__special_mc_gb__") {
new Color(_local3._targ).setTransform({gb:_local4});
} else if (_local3._prop == "__special_mc_ba__") {
new Color(_local3._targ).setTransform({ba:_local4});
} else if (_local3._prop == "__special_mc_bb__") {
new Color(_local3._targ).setTransform({bb:_local4});
} else if (_local3._prop == "__special_mc_aa__") {
new Color(_local3._targ).setTransform({aa:_local4});
} else if (_local3._prop == "__special_mc_ab__") {
new Color(_local3._targ).setTransform({ab:_local4});
}
if (_local3._prop == "__special_bst_t__") {
var _local7 = _local3._extras;
var _local9 = _global.findPointOnCurve(_local7.__special_bst_ix__, _local7.__special_bst_iy__, _local7.__special_bst_cx__, _local7.__special_bst_cy__, _local7.__special_bst_dx__, _local7.__special_bst_dy__, _local4);
if (_local3._extras.mustRound) {
_local3._targ._x = Math.round(_local9.x);
_local3._targ._y = Math.round(_local9.y);
} else {
_local3._targ._x = _local9.x;
_local3._targ._y = _local9.y;
}
}
if ((typeof(_local3._targ) != "movieclip") && (_local3._prop == "__special_text_b__")) {
_local3._targ.textColor = ((_local3._targ.__special_text_r__ << 16) + (_local3._targ.__special_text_g__ << 8)) + _local3._targ.__special_text_b__;
}
if (_local3._prop == "__special_sound_volume__") {
_local3._targ.setVolume(_local4);
}
if (_local3._prop == "__special_sound_pan__") {
_local3._targ.setPan(_local4);
}
if (_local3._prop == "__special_blur_x__") {
_global.$setFilterProperty(_local3._targ, "blur_blurX", _local4, _local3._extras);
}
if (_local3._prop == "__special_blur_y__") {
_global.$setFilterProperty(_local3._targ, "blur_blurY", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_color__") {
_global.$setFilterProperty(_local3._targ, "glow_color", _global.findTweenColor(_local3, _local8), _local3._extras);
}
if (_local3._prop == "__special_glow_alpha__") {
_global.$setFilterProperty(_local3._targ, "glow_alpha", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_blurX__") {
_global.$setFilterProperty(_local3._targ, "glow_blurX", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_blurY__") {
_global.$setFilterProperty(_local3._targ, "glow_blurY", _local4, _local3._extras);
}
if (_local3._prop == "__special_glow_strength__") {
_global.$setFilterProperty(_local3._targ, "glow_strength", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_distance__") {
_global.$setFilterProperty(_local3._targ, "bevel_distance", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_angle__") {
_global.$setFilterProperty(_local3._targ, "bevel_angle", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_highlightColor__") {
_global.$setFilterProperty(_local3._targ, "bevel_highlightColor", _global.findTweenColor(_local3, _local8), _local3._extras);
}
if (_local3._prop == "__special_bevel_highlightAlpha__") {
_global.$setFilterProperty(_local3._targ, "bevel_highlightAlpha", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_shadowColor__") {
_global.$setFilterProperty(_local3._targ, "bevel_shadowColor", _global.findTweenColor(_local3, _local8), _local3._extras);
}
if (_local3._prop == "__special_bevel_shadowAlpha__") {
_global.$setFilterProperty(_local3._targ, "bevel_shadowAlpha", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_blurX__") {
_global.$setFilterProperty(_local3._targ, "bevel_blurX", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_blurY__") {
_global.$setFilterProperty(_local3._targ, "bevel_blurY", _local4, _local3._extras);
}
if (_local3._prop == "__special_bevel_strength__") {
_global.$setFilterProperty(_local3._targ, "bevel_strength", _local4, _local3._extras);
}
if (_local3._targ.onTweenUpdate != undefined) {
_local3._targ.onTweenUpdate(_local3._prop);
}
if (_local10 <= _local8) {
if (_local3._targ.onTweenComplete != undefined) {
_local3._targ.onTweenComplete(_local3._prop);
}
_global.$stopTween(_local3._targ, [_local3._prop], false);
_local6--;
if (_local3._callback != undefined) {
if (_global.backwardCallbackTweening) {
var _local11 = _local3._targ.createEmptyMovieClip("__child__", 122344);
_local3._callback.apply(_local11, null);
_local11.removeMovieClip();
} else {
_local3._callback.apply(_local3._targ, null);
}
}
}
}
_local6++;
}
if (this.$_tweenPropList.length == 0) {
_global.$removeTweenController();
}
};
ASSetPropFlags(_global, "$updateTween", 1, 0);
_global.$stopTween = function (mtarget, props, wipeFuture) {
var _local4 = _root.__tweenController__.$_tweenPropList;
var _local7;
for (var _local9 in _local4) {
_local7 = _local4[_local9]._prop;
var _local5 = 0;
while ((_local5 < props.length) || ((_local5 < 1) && (props == undefined))) {
if (((_local4[_local9]._targ == mtarget) && ((_local7 == props[_local5]) || (props == undefined))) && (wipeFuture || ((_local4[_local9]._timeDest + (_local4[_local9]._delay * 1000)) <= getTimer()))) {
switch (_local7) {
case "__special_mc_frame__" :
case "__special_mc_ra__" :
case "__special_mc_rb__" :
case "__special_mc_ga__" :
case "__special_mc_gb__" :
case "__special_mc_ba__" :
case "__special_mc_bb__" :
case "__special_mc_aa__" :
case "__special_mc_ab__" :
case "__special_sound_volume__" :
case "__special_bst_t__" :
delete mtarget[_local7];
break;
case "__special_text_b__" :
delete mtarget.__special_text_r__;
delete mtarget.__special_text_g__;
delete mtarget.__special_text_b__;
}
_local4.splice(_local9, 1);
}
_local5++;
}
}
if (props == undefined) {
delete mtarget.$_tweenCount;
} else {
mtarget.$_tweenCount = 0;
for (var _local9 in _local4) {
if (_local4[_local9]._targ == mtarget) {
mtarget.$_tweenCount++;
}
}
if (mtarget.$_tweenCount == 0) {
delete mtarget.$_tweenCount;
}
}
if (_local4.length == 0) {
_global.$removeTweenController();
}
};
ASSetPropFlags(_global, "$stopTween", 1, 0);
_global.$setFilterProperty = function (mtarget, propName, propValue, extras) {
var _local1;
var _local7 = false;
var _local3 = [];
_local1 = 0;
while (_local1 < mtarget.filters.length) {
_local3.push(mtarget.filters[_local1]);
_local1++;
}
if (propName.substr(0, 5) == "blur_") {
_local1 = 0;
while (_local1 < mtarget.filters.length) {
if (_local3[_local1] instanceof flash.filters.BlurFilter) {
_local3[_local1][propName.substr(5)] = propValue;
if (extras.__special_blur_quality__ != undefined) {
_local3[_local1].quality = extras.__special_blur_quality__;
}
_local7 = true;
break;
}
_local1++;
}
if (!_local7) {
var _local9;
var _local8 = ((extras.__special_blur_quality__ == undefined) ? 2 : (extras.__special_blur_quality__));
if (propName == "blur_blurX") {
_local9 = new flash.filters.BlurFilter(propValue, 0, _local8);
}
if (propName == "blur_blurY") {
_local9 = new flash.filters.BlurFilter(0, propValue, _local8);
}
_local3.push(_local9);
}
} else if (propName.substr(0, 5) == "glow_") {
_local1 = 0;
while (_local1 < mtarget.filters.length) {
if (_local3[_local1] instanceof flash.filters.GlowFilter) {
_local3[_local1][propName.substr(5)] = propValue;
if (extras.__special_glow_quality__ != undefined) {
_local3[_local1].quality = extras.__special_glow_quality__;
}
if (extras.__special_glow_inner__ != undefined) {
_local3[_local1].inner = extras.__special_glow_inner__;
}
if (extras.__special_glow_knockout__ != undefined) {
_local3[_local1].knockout = extras.__special_glow_knockout__;
}
_local7 = true;
break;
}
_local1++;
}
if (!_local7) {
var _local8 = ((extras.__special_glow_quality__ == undefined) ? 2 : (extras.__special_glow_quality__));
var _local12 = ((extras.__special_glow_inner__ == undefined) ? false : (extras.__special_glow_inner__));
var _local10 = ((extras.__special_glow_knockout__ == undefined) ? false : (extras.__special_glow_knockout__));
if (propName == "glow_color") {
var _local9 = new flash.filters.GlowFilter(propValue, 1, 0, 0, 1, _local8, _local12, _local10);
}
if (propName == "glow_alpha") {
var _local9 = new flash.filters.GlowFilter(16777215, propValue, 0, 0, 1, _local8, _local12, _local10);
}
if (propName == "glow_blurX") {
var _local9 = new flash.filters.GlowFilter(16777215, 1, propValue, 0, 1, _local8, _local12, _local10);
}
if (propName == "glow_blurY") {
var _local9 = new flash.filters.GlowFilter(16777215, 1, 0, propValue, 1, _local8, _local12, _local10);
}
if (propName == "glow_strength") {
var _local9 = new flash.filters.GlowFilter(16777215, 1, 0, 0, propValue, _local8, _local12, _local10);
}
_local3.push(_local9);
}
} else if (propName.substr(0, 6) == "bevel_") {
_local1 = 0;
while (_local1 < mtarget.filters.length) {
if (_local3[_local1] instanceof flash.filters.BevelFilter) {
_local3[_local1][propName.substr(6)] = propValue;
if (extras.__special_bevel_quality__ != undefined) {
_local3[_local1].quality = extras.__special_bevel_quality__;
}
if (extras.__special_bevel_type__ != undefined) {
_local3[_local1].inner = extras.__special_bevel_type__;
}
if (extras.__special_bevel_knockout__ != undefined) {
_local3[_local1].knockout = extras.__special_bevel_knockout__;
}
_local7 = true;
break;
}
_local1++;
}
if (!_local7) {
var _local8 = ((extras.__special_bevel_quality__ == undefined) ? 2 : (extras.__special_bevel_quality__));
var _local11 = ((extras.__special_bevel_type__ == undefined) ? "inner" : (extras.__special_bevel_type__));
var _local10 = ((extras.__special_bevel_knockout__ == undefined) ? false : (extras.__special_bevel_knockout__));
if (propName == "bevel_distance") {
var _local9 = new flash.filters.BevelFilter(propValue, 45, 16777215, 1, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_angle") {
var _local9 = new flash.filters.BevelFilter(0, propValue, 16777215, 1, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_highlightColor") {
var _local9 = new flash.filters.BevelFilter(0, 45, propValue, 1, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_highlightAlpha") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, propValue, 0, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_shadowColor") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, propValue, 1, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_shadowAlpha") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, propValue, 0, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_blurX") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, propValue, 0, 1, _local8, _local11, _local10);
}
if (propName == "bevel_blurY") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, 0, propValue, 1, _local8, _local11, _local10);
}
if (propName == "bevel_strength") {
var _local9 = new flash.filters.BevelFilter(0, 45, 16777215, 1, 0, 1, 0, 0, propValue, _local8, _local11, _local10);
}
_local3.push(_local9);
}
} else {
return(undefined);
}
mtarget.filters = _local3;
};
MovieClip.prototype.tween = (TextField.prototype.tween = (Sound.prototype.tween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2);
}));
ASSetPropFlags(MovieClip.prototype, "tween", 1, 0);
ASSetPropFlags(TextField.prototype, "tween", 1, 0);
ASSetPropFlags(Sound.prototype, "tween", 1, 0);
MovieClip.prototype.roundedTween = (TextField.prototype.roundedTween = (Sound.prototype.roundedTween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
}));
ASSetPropFlags(MovieClip.prototype, "roundedTween", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedTween", 1, 0);
ASSetPropFlags(Sound.prototype, "roundedTween", 1, 0);
MovieClip.prototype.stopTween = (TextField.prototype.stopTween = (Sound.prototype.stopTween = function (props) {
if (typeof(props) == "string") {
props = [props];
}
if (props != undefined) {
var _local4 = 1;
while (_local4 < arguments.length) {
props.push(arguments[_local4]);
_local4++;
}
}
_global.$stopTween(this, props, true);
}));
ASSetPropFlags(MovieClip.prototype, "stopTween", 1, 0);
ASSetPropFlags(TextField.prototype, "stopTween", 1, 0);
ASSetPropFlags(Sound.prototype, "stopTween", 1, 0);
MovieClip.prototype.pauseTween = (TextField.prototype.pauseTween = (Sound.prototype.pauseTween = function (props) {
if (props != undefined) {
if (typeof(props) == "string") {
props = [props];
}
var _local6 = 1;
while (_local6 < Arguments.length) {
props.push(Arguments[_local6]);
_local6++;
}
}
var _local4 = _root.__tweenController__.$_tweenPropList;
var _local5;
for (var _local7 in _local4) {
if ((_local4[_local7]._targ == this) && (!_local4[_local7]._isPaused)) {
if (props != undefined) {
_local5 = false;
for (var _local6 in props) {
if (props[_local6] == _local4[_local7]._prop) {
_local5 = true;
break;
}
}
}
if ((props == undefined) || (_local5)) {
_local4[_local7]._isPaused = true;
_local4[_local7]._timePaused = _root.__tweenController__.$_tTime;
}
}
}
}));
ASSetPropFlags(MovieClip.prototype, "pauseTween", 1, 0);
ASSetPropFlags(TextField.prototype, "pauseTween", 1, 0);
ASSetPropFlags(Sound.prototype, "pauseTween", 1, 0);
MovieClip.prototype.resumeTween = (TextField.prototype.resumeTween = (Sound.prototype.resumeTween = function (props) {
if (props != undefined) {
if (typeof(props) == "string") {
props = [props];
}
var _local7 = 1;
while (_local7 < Arguments.length) {
props.push(Arguments[_local7]);
_local7++;
}
}
var _local3 = _root.__tweenController__.$_tweenPropList;
var _local5;
var _local6;
for (var _local8 in _local3) {
if ((_local3[_local8]._targ == this) && (_local3[_local8]._isPaused)) {
if (props != undefined) {
_local5 = false;
for (var _local7 in props) {
if (props[_local7] == _local3[_local8]._prop) {
_local5 = true;
break;
}
}
}
if ((props == undefined) || (_local5)) {
_local3[_local8]._isPaused = false;
_local6 = _root.__tweenController__.$_tTime - _local3[_local8]._timePaused;
_local3[_local8]._timeStart = _local3[_local8]._timeStart + _local6;
_local3[_local8]._timeDest = _local3[_local8]._timeDest + _local6;
_local3[_local8]._timePaused = 0;
}
}
}
}));
ASSetPropFlags(MovieClip.prototype, "resumeTween", 1, 0);
ASSetPropFlags(TextField.prototype, "resumeTween", 1, 0);
ASSetPropFlags(Sound.prototype, "resumeTween", 1, 0);
MovieClip.prototype.lockTween = (TextField.prototype.lockTween = (Sound.prototype.lockTween = function () {
this.$_isTweenLocked = true;
ASSetPropFlags(this, "this.$_isTweenLocked", 1, 0);
}));
ASSetPropFlags(MovieClip.prototype, "lockTween", 1, 0);
ASSetPropFlags(TextField.prototype, "lockTween", 1, 0);
ASSetPropFlags(Sound.prototype, "lockTween", 1, 0);
MovieClip.prototype.unlockTween = (TextField.prototype.unlockTween = (Sound.prototype.unlockTween = function () {
delete this.$_isTweenLocked;
}));
ASSetPropFlags(MovieClip.prototype, "unlockTween", 1, 0);
ASSetPropFlags(TextField.prototype, "unlockTween", 1, 0);
ASSetPropFlags(Sound.prototype, "unlockTween", 1, 0);
MovieClip.prototype.getTweens = (TextField.prototype.getTweens = (Sound.prototype.getTweens = function () {
return(this.$_tweenCount);
}));
ASSetPropFlags(MovieClip.prototype, "getTweens", 1, 0);
ASSetPropFlags(TextField.prototype, "getTweens", 1, 0);
ASSetPropFlags(Sound.prototype, "getTweens", 1, 0);
MovieClip.prototype.isTweening = (TextField.prototype.isTweening = (Sound.prototype.isTweening = function () {
return(((this.$_tweenCount > 0) ? true : false));
}));
ASSetPropFlags(MovieClip.prototype, "isTweening", 1, 0);
ASSetPropFlags(TextField.prototype, "isTweening", 1, 0);
ASSetPropFlags(Sound.prototype, "isTweening", 1, 0);
MovieClip.prototype.alphaTo = (TextField.prototype.alphaTo = function (propDest_a, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_alpha", propDest_a, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "alphaTo", 1, 0);
ASSetPropFlags(TextField.prototype, "alphaTo", 1, 0);
MovieClip.prototype.frameTo = function (propDest_frame, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_mc_frame__", propDest_frame, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(MovieClip.prototype, "frameTo", 1, 0);
MovieClip.prototype.resizeTo = (TextField.prototype.resizeTo = function (propDest_width, propDest_height, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_width", "_height"], [propDest_width, propDest_height], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "resizeTo", 1, 0);
ASSetPropFlags(TextField.prototype, "resizeTo", 1, 0);
MovieClip.prototype.rotateTo = (TextField.prototype.rotateTo = function (propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_rotation", propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "rotateTo", 1, 0);
ASSetPropFlags(TextField.prototype, "rotateTo", 1, 0);
MovieClip.prototype.scaleTo = (TextField.prototype.scaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_xscale", "_yscale"], [propDest_scale, propDest_scale], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "scaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "scaleTo", 1, 0);
MovieClip.prototype.xScaleTo = (TextField.prototype.xScaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_xscale", propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "xScaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xScaleTo", 1, 0);
MovieClip.prototype.yScaleTo = (TextField.prototype.yScaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_yscale", propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "yScaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "yScaleTo", 1, 0);
TextField.prototype.scrollTo = function (propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "scroll", propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(TextField.prototype, "scrollTo", 1, 0);
MovieClip.prototype.slideTo = (TextField.prototype.slideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_x", "_y"], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "slideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "slideTo", 1, 0);
MovieClip.prototype.roundedSlideTo = (TextField.prototype.roundedSlideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["_x", "_y"], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
});
ASSetPropFlags(MovieClip.prototype, "roundedSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedSlideTo", 1, 0);
MovieClip.prototype.xSlideTo = (TextField.prototype.xSlideTo = function (propDest_x, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_x", propDest_x, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "xSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xSlideTo", 1, 0);
MovieClip.prototype.roundedXSlideTo = (TextField.prototype.roundedXSlideTo = function (propDest_x, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_x", propDest_x, timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
});
ASSetPropFlags(MovieClip.prototype, "roundedXSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedXSlideTo", 1, 0);
MovieClip.prototype.ySlideTo = (TextField.prototype.ySlideTo = function (propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_y", propDest_y, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "ySlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "ySlideTo", 1, 0);
MovieClip.prototype.roundedYSlideTo = (TextField.prototype.roundedYSlideTo = function (propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "_y", propDest_y, timeSeconds, animType, delay, callback, extra1, extra2, {mustRound:true});
});
ASSetPropFlags(MovieClip.prototype, "roundedYSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedYSlideTo", 1, 0);
MovieClip.prototype.bezierSlideTo = (TextField.prototype.bezierSlideTo = function (cpoint_x, cpoint_y, propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = new Object();
_local3.__special_bst_ix__ = undefined;
_local3.__special_bst_iy__ = undefined;
_local3.__special_bst_cx__ = cpoint_x;
_local3.__special_bst_cy__ = cpoint_y;
_local3.__special_bst_dx__ = propDest_x;
_local3.__special_bst_dy__ = propDest_y;
_global.$addTween(this, "__special_bst_t__", 1, timeSeconds, animType, delay, callback, extra1, extra2, _local3);
});
ASSetPropFlags(MovieClip.prototype, "bezierSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "bezierSlideTo", 1, 0);
MovieClip.prototype.roundedBezierSlideTo = (TextField.prototype.roundedBezierSlideTo = function (cpoint_x, cpoint_y, propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = new Object();
_local3.__special_bst_ix__ = undefined;
_local3.__special_bst_iy__ = undefined;
_local3.__special_bst_cx__ = cpoint_x;
_local3.__special_bst_cy__ = cpoint_y;
_local3.__special_bst_dx__ = propDest_x;
_local3.__special_bst_dy__ = propDest_y;
_local3.mustRound = true;
_global.$addTween(this, "__special_bst_t__", 1, timeSeconds, animType, delay, callback, extra1, extra2, _local3);
});
ASSetPropFlags(MovieClip.prototype, "roundedBezierSlideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "roundedBezierSlideTo", 1, 0);
Sound.prototype.volumeTo = function (propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_sound_volume__", propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Sound.prototype, "volumeTo", 1, 0);
Sound.prototype.panTo = function (propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_sound_pan__", propDest_volume, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Sound.prototype, "panTo", 1, 0);
MovieClip.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) {
if (propDest_color == null) {
this.colorTransformTo(100, 0, 100, 0, 100, 0, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2);
} else {
var _local3 = propDest_color >> 16;
var _local5 = (propDest_color & 65280) >> 8;
var _local4 = propDest_color & 255;
this.colorTransformTo(0, _local3, 0, _local5, 0, _local4, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2);
}
};
ASSetPropFlags(MovieClip.prototype, "colorTo", 1, 0);
TextField.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = propDest_color >> 16;
var _local6 = (propDest_color & 65280) >> 8;
var _local4 = propDest_color & 255;
_global.$addTween(this, ["__special_text_r__", "__special_text_g__", "__special_text_b__"], [_local3, _local6, _local4], timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(TextField.prototype, "colorTo", 1, 0);
MovieClip.prototype.colorTransformTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_mc_ra__", "__special_mc_rb__", "__special_mc_ga__", "__special_mc_gb__", "__special_mc_ba__", "__special_mc_bb__", "__special_mc_aa__", "__special_mc_ab__"], [arguments[0].ra, arguments[0].rb, arguments[0].ga, arguments[0].gb, arguments[0].ba, arguments[0].bb, arguments[0].aa, arguments[0].ab], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);
} else {
_global.$addTween(this, ["__special_mc_ra__", "__special_mc_rb__", "__special_mc_ga__", "__special_mc_gb__", "__special_mc_ba__", "__special_mc_bb__", "__special_mc_aa__", "__special_mc_ab__"], [arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], arguments[13]);
}
};
ASSetPropFlags(MovieClip.prototype, "colorTransformTo", 1, 0);
MovieClip.prototype.blurTo = (TextField.prototype.blurTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_blur_x__", "__special_blur_y__"], [arguments[0].blurX, arguments[0].blurY], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {__special_blur_quality__:arguments[0].quality});
} else {
_global.$addTween(this, ["__special_blur_x__", "__special_blur_y__"], [arguments[0], arguments[0]], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], {__special_blur_quality__:arguments[1]});
}
});
ASSetPropFlags(MovieClip.prototype, "blurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "blurTo", 1, 0);
MovieClip.prototype.xyBlurTo = (TextField.prototype.xyBlurTo = function (propDest_blurX, propDest_blurY, quality, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_blur_x__", "__special_blur_y__"], [propDest_blurX, propDest_blurY], timeSeconds, animType, delay, callback, extra1, extra2, {__special_blur_quality__:quality});
});
ASSetPropFlags(MovieClip.prototype, "xyBlurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xyBlurTo", 1, 0);
MovieClip.prototype.xBlurTo = (TextField.prototype.xBlurTo = function (propDest_blur, quality, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_blur_x__", propDest_blur, timeSeconds, animType, delay, callback, extra1, extra2, {__special_blur_quality__:quality});
});
ASSetPropFlags(MovieClip.prototype, "xBlurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xBlurTo", 1, 0);
MovieClip.prototype.yBlurTo = (TextField.prototype.yBlurTo = function (propDest_blur, quality, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, "__special_blur_y__", propDest_blur, timeSeconds, animType, delay, callback, extra1, extra2, {__special_blur_quality__:quality});
});
ASSetPropFlags(MovieClip.prototype, "yBlurTo", 1, 0);
ASSetPropFlags(TextField.prototype, "yBlurTo", 1, 0);
MovieClip.prototype.glowTo = (TextField.prototype.glowTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_blurY__", "__special_glow_strength__"], [arguments[0].color, arguments[0].alpha, arguments[0].blurX, arguments[0].blurY, arguments[0].strength], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {__special_glow_quality__:arguments[0].quality, __special_glow_inner__:arguments[0].inner, __special_glow_knockout__:arguments[0].knockout});
} else {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_blurY__", "__special_glow_strength__"], [arguments[0], arguments[1], arguments[2], arguments[2], arguments[3]], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11], arguments[12], {__special_glow_quality__:arguments[4], __special_glow_inner__:arguments[5], __special_glow_knockout__:arguments[6]});
}
});
ASSetPropFlags(MovieClip.prototype, "glowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "glowTo", 1, 0);
MovieClip.prototype.xyGlowTo = (TextField.prototype.xyGlowTo = function (propDest_color, propDest_alpha, propDest_blurX, propDest_blurY, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_blurY__", "__special_glow_strength__"], [propDest_color, propDest_alpha, propDest_blurX, propDest_blurY, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_glow_quality__:quality, __special_glow_inner__:inner, __special_glow_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "xyGlowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xyGlowTo", 1, 0);
MovieClip.prototype.xGlowTo = (TextField.prototype.xGlowTo = function (propDest_color, propDest_alpha, propDest_blur, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurX__", "__special_glow_strength__"], [propDest_color, propDest_alpha, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_glow_quality__:quality, __special_glow_inner__:inner, __special_glow_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "xGlowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xGlowTo", 1, 0);
MovieClip.prototype.yGlowTo = (TextField.prototype.yGlowTo = function (propDest_color, propDest_alpha, propDest_blur, propDest_strength, quality, inner, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_glow_color__", "__special_glow_alpha__", "__special_glow_blurY__", "__special_glow_strength__"], [propDest_color, propDest_alpha, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_glow_quality__:quality, __special_glow_inner__:inner, __special_glow_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "yGlowTo", 1, 0);
ASSetPropFlags(TextField.prototype, "yGlowTo", 1, 0);
MovieClip.prototype.bevelTo = (TextField.prototype.bevelTo = function () {
if ((typeof(arguments[0]) == "object") && (arguments[0] != undefined)) {
_global.$addTween(this, ["__special_bevel_distance__", "__special_bevel_angle__", "__special_bevel_highlightColor__", "__special_bevel_highlightAlpha__", "__special_bevel_shadowColor__", "__special_bevel_shadowAlpha__", "__special_bevel_blurX__", "__special_bevel_blurY__", "__special_bevel_strength__"], [arguments[0].distance, arguments[0].angle, arguments[0].highlightColor, arguments[0].highlightAlpha * 100, arguments[0].shadowColor, arguments[0].shadowAlpha * 100, arguments[0].blurX, arguments[0].blurY, arguments[0].strength], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], {__special_bevel_quality__:arguments[0].quality, __special_bevel_type__:arguments[0].type, __special_bevel_knockout__:arguments[0].knockout});
} else {
_global.$addTween(this, ["__special_bevel_distance__", "__special_bevel_angle__", "__special_bevel_highlightColor__", "__special_bevel_highlightAlpha__", "__special_bevel_shadowColor__", "__special_bevel_shadowAlpha__", "__special_bevel_blurX__", "__special_bevel_blurY__", "__special_bevel_strength__"], [arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[6], arguments[7]], arguments[11], arguments[12], arguments[13], arguments[14], arguments[15], arguments[16], {__special_bevel_quality__:arguments[8], __special_bevel_type__:arguments[9], __special_bevel_knockout__:arguments[10]});
}
});
ASSetPropFlags(MovieClip.prototype, "bevelTo", 1, 0);
ASSetPropFlags(TextField.prototype, "bevelTo", 1, 0);
MovieClip.prototype.xyBevelTo = (TextField.prototype.xyBevelTo = function (propDest_distance, propDest_angle, propDest_highlightColor, propDest_highlightAlpha, propDest_shadowColor, propDest_shadowAlpha, propDest_blurX, propDest_blurY, propDest_strength, quality, type, knockout, timeSeconds, animType, delay, callback, extra1, extra2) {
_global.$addTween(this, ["__special_bevel_distance__", "__special_bevel_angle__", "__special_bevel_highlightColor__", "__special_bevel_highlightAlpha__", "__special_bevel_shadowColor__", "__special_bevel_shadowAlpha__", "__special_bevel_blurX__", "__special_bevel_blurY__", "__special_bevel_blurY__", "__special_bevel_strength__"], [propDest_distance, propDest_angle, propDest_highlightColor, propDest_highlightAlpha, propDest_shadowColor, propDest_shadowAlpha, propDest_blur, propDest_blur, propDest_strength], timeSeconds, animType, delay, callback, extra1, extra2, {__special_bevel_quality__:quality, __special_bevel_type__:type, __special_bevel_knockout__:knockout});
});
ASSetPropFlags(MovieClip.prototype, "xyBevelTo", 1, 0);
ASSetPropFlags(TextField.prototype, "xyBevelTo", 1, 0);
_global.findPointOnCurve = function (p1x, p1y, cx, cy, p2x, p2y, t) {
return({x:p1x + (t * (((2 * (1 - t)) * (cx - p1x)) + (t * (p2x - p1x)))), y:p1y + (t * (((2 * (1 - t)) * (cy - p1y)) + (t * (p2y - p1y))))});
};
ASSetPropFlags(_global, "findPointOnCurve", 1, 0);
_global.findTweenColor = function (objProp, tTime) {
var _local8 = objProp._propStart >> 16;
var _local4 = objProp._propDest >> 16;
var _local5 = (objProp._propStart >> 8) & 255;
var _local6 = (objProp._propDest >> 8) & 255;
var _local9 = objProp._propStart & 255;
var _local7 = objProp._propDest & 255;
var _local12 = Math.round(_global.findTweenValue(_local8, _local4, objProp._timeStart, tTime - (objProp._delay * 1000), objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2));
var _local10 = Math.round(_global.findTweenValue(_local5, _local6, objProp._timeStart, tTime - (objProp._delay * 1000), objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2));
var _local3 = Math.round(_global.findTweenValue(_local9, _local7, objProp._timeStart, tTime - (objProp._delay * 1000), objProp._timeDest, objProp._animType, objProp._extra1, objProp._extra2));
return(((_local12 << 16) + (_local10 << 8)) + _local3);
};
_global.findTweenValue = function (_propStart, _propDest, _timeStart, _timeNow, _timeDest, _animType, _extra1, _extra2) {
var _local1 = _timeNow - _timeStart;
var _local4 = _propStart;
var _local2 = _propDest - _propStart;
var _local3 = _timeDest - _timeStart;
var _local6 = _extra1;
var _local7 = _extra2;
var _local5 = _extra1;
switch (_animType.toLowerCase()) {
case "linear" :
return(((_local2 * _local1) / _local3) + _local4);
case "easeinquad" :
_local1 = _local1 / _local3;
return(((_local2 * _local1) * _local1) + _local4);
case "easeoutquad" :
_local1 = _local1 / _local3;
return((((-_local2) * _local1) * (_local1 - 2)) + _local4);
case "easeinoutquad" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return((((_local2 / 2) * _local1) * _local1) + _local4);
}
_local1--;
return((((-_local2) / 2) * ((_local1 * (_local1 - 2)) - 1)) + _local4);
case "easeoutinquad" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutQuad") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInQuad") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeincubic" :
_local1 = _local1 / _local3;
return((((_local2 * _local1) * _local1) * _local1) + _local4);
case "easeoutcubic" :
_local1 = (_local1 / _local3) - 1;
return((_local2 * (((_local1 * _local1) * _local1) + 1)) + _local4);
case "easeinoutcubic" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((((_local2 / 2) * _local1) * _local1) * _local1) + _local4);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((_local1 * _local1) * _local1) + 2)) + _local4);
case "easeoutincubic" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutCubic") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInCubic") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinquart" :
_local1 = _local1 / _local3;
return(((((_local2 * _local1) * _local1) * _local1) * _local1) + _local4);
case "easeoutquart" :
_local1 = (_local1 / _local3) - 1;
return(((-_local2) * ((((_local1 * _local1) * _local1) * _local1) - 1)) + _local4);
case "easeinoutquart" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return((((((_local2 / 2) * _local1) * _local1) * _local1) * _local1) + _local4);
}
_local1 = _local1 - 2;
return((((-_local2) / 2) * ((((_local1 * _local1) * _local1) * _local1) - 2)) + _local4);
case "easeoutinquart" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutQuart") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInQuart") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinquint" :
_local1 = _local1 / _local3;
return((((((_local2 * _local1) * _local1) * _local1) * _local1) * _local1) + _local4);
case "easeoutquint" :
_local1 = (_local1 / _local3) - 1;
return((_local2 * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 1)) + _local4);
case "easeinoutquint" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((((((_local2 / 2) * _local1) * _local1) * _local1) * _local1) * _local1) + _local4);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 2)) + _local4);
case "easeoutinquint" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutQuint") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInQuint") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinsine" :
return((((-_local2) * Math.cos((_local1 / _local3) * (Math.PI/2))) + _local2) + _local4);
case "easeoutsine" :
return((_local2 * Math.sin((_local1 / _local3) * (Math.PI/2))) + _local4);
case "easeinoutsine" :
return((((-_local2) / 2) * (Math.cos((Math.PI * _local1) / _local3) - 1)) + _local4);
case "easeoutinsine" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutSine") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInSine") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinexpo" :
return(((_local1 == 0) ? (_local4) : ((_local2 * Math.pow(2, 10 * ((_local1 / _local3) - 1))) + _local4)));
case "easeoutexpo" :
return(((_local1 == _local3) ? (_local4 + _local2) : ((_local2 * ((-Math.pow(2, (-10 * _local1) / _local3)) + 1)) + _local4)));
case "easeinoutexpo" :
if (_local1 == 0) {
return(_local4);
}
if (_local1 == _local3) {
return(_local4 + _local2);
}
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((_local2 / 2) * Math.pow(2, 10 * (_local1 - 1))) + _local4);
}
_local1--;
return(((_local2 / 2) * ((-Math.pow(2, -10 * _local1)) + 2)) + _local4);
case "easeoutinexpo" :
if (_local1 == 0) {
return(_local4);
}
if (_local1 == _local3) {
return(_local4 + _local2);
}
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return(((_local2 / 2) * ((-Math.pow(2, (-10 * _local1) / 1)) + 1)) + _local4);
}
return(((_local2 / 2) * (Math.pow(2, (10 * (_local1 - 2)) / 1) + 1)) + _local4);
case "easeincirc" :
_local1 = _local1 / _local3;
return(((-_local2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + _local4);
case "easeoutcirc" :
_local1 = (_local1 / _local3) - 1;
return((_local2 * Math.sqrt(1 - (_local1 * _local1))) + _local4);
case "easeinoutcirc" :
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
return((((-_local2) / 2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + _local4);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (Math.sqrt(1 - (_local1 * _local1)) + 1)) + _local4);
case "easeoutincirc" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutCirc") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInCirc") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinelastic" :
if (_local1 == 0) {
return(_local4);
}
_local1 = _local1 / _local3;
if (_local1 == 1) {
return(_local4 + _local2);
}
if (!_local7) {
_local7 = _local3 * 0.3;
}
if ((!_local6) || (_local6 < Math.abs(_local2))) {
_local6 = _local2;
_local5 = _local7 / 4;
} else {
_local5 = (_local7 / (Math.PI*2)) * Math.asin(_local2 / _local6);
}
_local1 = _local1 - 1;
return((-((_local6 * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7))) + _local4);
case "easeoutelastic" :
if (_local1 == 0) {
return(_local4);
}
_local1 = _local1 / _local3;
if (_local1 == 1) {
return(_local4 + _local2);
}
if (!_local7) {
_local7 = _local3 * 0.3;
}
if ((!_local6) || (_local6 < Math.abs(_local2))) {
_local6 = _local2;
_local5 = _local7 / 4;
} else {
_local5 = (_local7 / (Math.PI*2)) * Math.asin(_local2 / _local6);
}
return((((_local6 * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7)) + _local2) + _local4);
case "easeinoutelastic" :
if (_local1 == 0) {
return(_local4);
}
_local1 = _local1 / (_local3 / 2);
if (_local1 == 2) {
return(_local4 + _local2);
}
if (!_local7) {
_local7 = _local3 * 0.45;
}
if ((!_local6) || (_local6 < Math.abs(_local2))) {
_local6 = _local2;
_local5 = _local7 / 4;
} else {
_local5 = (_local7 / (Math.PI*2)) * Math.asin(_local2 / _local6);
}
if (_local1 < 1) {
_local1 = _local1 - 1;
return((-0.5 * ((_local6 * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7))) + _local4);
}
_local1 = _local1 - 1;
return(((((_local6 * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * _local3) - _local5) * (Math.PI*2)) / _local7)) * 0.5) + _local2) + _local4);
case "easeoutinelastic" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutElastic") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInElastic") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinback" :
if (_local5 == undefined) {
_local5 = 1.70158;
}
_local1 = _local1 / _local3;
return((((_local2 * _local1) * _local1) * (((_local5 + 1) * _local1) - _local5)) + _local4);
case "easeoutback" :
if (_local5 == undefined) {
_local5 = 1.70158;
}
_local1 = (_local1 / _local3) - 1;
return((_local2 * (((_local1 * _local1) * (((_local5 + 1) * _local1) + _local5)) + 1)) + _local4);
case "easeinoutback" :
if (_local5 == undefined) {
_local5 = 1.70158;
}
_local1 = _local1 / (_local3 / 2);
if (_local1 < 1) {
_local5 = _local5 * 1.525;
return(((_local2 / 2) * ((_local1 * _local1) * (((_local5 + 1) * _local1) - _local5))) + _local4);
}
_local1 = _local1 - 2;
_local5 = _local5 * 1.525;
return(((_local2 / 2) * (((_local1 * _local1) * (((_local5 + 1) * _local1) + _local5)) + 2)) + _local4);
case "easeoutinback" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutBack") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInBack") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeinbounce" :
return((_local2 - findTweenValue(0, _local2, 0, _local3 - _local1, _local3, "easeOutBounce")) + _local4);
case "easeoutbounce" :
_local1 = _local1 / _local3;
if (_local1 < 0.363636363636364) {
return((_local2 * ((7.5625 * _local1) * _local1)) + _local4);
}
if (_local1 < 0.727272727272727) {
_local1 = _local1 - 0.545454545454545;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.75)) + _local4);
}
if (_local1 < 0.909090909090909) {
_local1 = _local1 - 0.818181818181818;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.9375)) + _local4);
}
_local1 = _local1 - 0.954545454545455;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.984375)) + _local4);
case "easeinoutbounce" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeInBounce") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeOutBounce") * 0.5) + (_local2 * 0.5)) + _local4);
case "easeoutinbounce" :
if (_local1 < (_local3 / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, _local3, "easeOutBounce") * 0.5) + _local4);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - _local3, _local3, "easeInBounce") * 0.5) + (_local2 * 0.5)) + _local4);
}
return(0);
};
ASSetPropFlags(_global, "findTweenValue", 1, 0);
var currentZombieThreat = 0;
var threatDeficit = 0;
var liveZombieCount = 0;
var zombieLimit = 10;
var delayMax = 40;
var delay = delayMax;
var rareZombie = false;
var findZombieRetry = false;
var commonZombieChance = 0;
var semiRareZombieChance = 0;
var rareZombieChance = 0;
var veryRareZombieChance = 0;
var isArmed = false;
var zombieDepthCount = 0;
var particleCount = 480000;
var friendlyDepthSortCount = 0;
var friendlyDepthSortCountMax = 0;
loadJournal();
Frame 5
function timer(timerTarget) {
timerCount--;
if ((timerCount <= 0) && (gamePaused != true)) {
timerCount = timerMax + (levelUp / 1.25);
targetCount++;
if ((targetCount >= (timerTarget - (timerTarget / 6))) && (sunriseStarted == false)) {
startSunRise();
}
if (targetCount >= (timerTarget - (timerTarget / 8))) {
delete makeEnemy.onEnterFrame;
}
if ((targetCount >= timerTarget) && (aliveZombies.length == 0)) {
stopTimer();
}
}
}
function startTimer(levelTime) {
levelClock.onEnterFrame = function () {
timer(levelTime);
};
}
function stopTimer() {
delete levelClock.onEnterFrame;
targetCount = 0;
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
loadTimeManager();
}
function startSunRise() {
if (sunriseStarted == false) {
sunriseStarted = true;
bgImage.dawn._visible = true;
bgImage.dawn._alpha = 0;
alphaSun = setInterval(alphaUpSun, 500);
}
}
function alphaUpSun() {
if (bgImage.dawn._alpha <= 100) {
bgImage.dawn._alpha = bgImage.dawn._alpha + 2;
} else {
clearInterval(alphaSun);
}
}
function resetSunRise() {
sunriseStarted = false;
clearInterval(alphaSun);
bgImage.dawn._alpha = 0;
bgImage.dawn._visible = false;
}
function variableReset() {
bullet = 0;
bulletLevel = 1;
projectile = 0;
smokePuff = 0;
zombieDepthCount = 0;
particleCount = 480000 /* 0x075300 */;
explosionNumber = 0;
}
function addTrap(trapType, trapLocationNumber) {
trapNumber++;
_root.attachMovie("trap_" + trapType, "trap" + trapNumber, 29500 + trapNumber);
_root["trap" + trapNumber]._x = _root["trapSpot" + trapLocationNumber].x;
_root["trap" + trapNumber]._y = _root["trapSpot" + trapLocationNumber].y;
activeTraps.push({ref:_root["trap" + trapNumber], type:trapType, range:_root[trapType].range, damage:_root[trapType].damage, location:trapLocationNumber});
enemyOnScreen.push({ref:_root["trap" + trapNumber], depth:_root["trap" + trapNumber]._y});
}
function cleanUpTraps() {
for (x in activeTraps) {
removeMovieClip(_root[activeTraps[x].ref]);
trapLocations[activeTraps[x].location].empty = true;
trapLocations[activeTraps[x].location].type = "empty";
timeManager.trapMap["location" + activeTraps[x].location].trapIcon.gotoAndStop("empty");
activeTraps.splice(x, 1);
}
}
function trapLocationObjects() {
i = 0;
while (i < 20) {
trapLocations.push({ref:_root.trapMap["location" + i], type:"empty", empty:true});
i++;
}
}
function populateTrapMap() {
for (v in _root.trapLocations) {
timeManager.trapMap["location" + v].trapIcon.gotoAndStop(_root.trapLocations[v].type);
timeManager.trapMap["location" + v].cross.alphaTo(0, 0.5);
if (_root.trapLocations[v].type != "empty") {
addTrap(_root.trapLocations[v].type, v);
}
}
}
function placeTrapOnMap(trapButton, trapType) {
if ((currentSelectedTrap != "empty") && (_root["total_" + trapType] > 0)) {
_root["total_" + trapType]--;
updateTrapMapText();
trapLocations[trapButton].empty = false;
trapLocations[trapButton].type = trapType;
}
}
function removeTrapOnMap(trapButton, trapType) {
_root["total_" + trapType]++;
updateTrapMapText();
trapLocations[trapButton].empty = true;
trapLocations[trapButton].type = "empty";
timeManager.trapMap["location" + trapButton].trapIcon.gotoAndStop("empty");
}
function removeTrapOnMapFromExplosion(trapButton) {
updateTrapMapText();
trapLocations[trapButton].empty = true;
trapLocations[trapButton].type = "empty";
}
function updateTrapMapText() {
timeManager.trapMap.gasCylinderText.text = "x" + total_gasCylinder;
timeManager.trapMap.mineText.text = "x" + total_mine;
timeManager.trapMap.bearTrapText.text = "x" + total_bearTrap;
}
function trapSetupButton(butName) {
timeManager.trapMap[butName].onRollOver = function () {
this.colorTo(10027008, 0.5, "easeOutSine");
};
timeManager.trapMap[butName].onRollOut = function () {
this.colorTo(null, 0.5, "easeOutSine");
};
timeManager.trapMap[butName].onRelease = function () {
if (trapMapOpen == false) {
openTrapMap();
timeManager.trapMap[butName].gotoAndStop("accept");
trapMapOpen = true;
} else {
closeTrapMap();
timeManager.trapMap[butName].gotoAndStop("setup");
trapMapOpen = false;
}
};
}
function trapMapPlacementButtons(butName) {
timeManager.trapMap[butName]._rotation = random(10) - 5;
timeManager.trapMap[butName]._xscale = (timeManager.trapMap[butName]._yscale = random(5) + 95);
timeManager.trapMap[butName].cross._alpha = 0;
timeManager.trapMap[butName].onRollOver = function () {
this.colorTo(10027008, 0.5, "easeOutSine");
var _local3 = butName.substring(8, 10);
for (v in _root.trapLocations) {
if (v == _local3) {
if ((_root.trapLocations[v].empty == true) && (_root["total_" + currentSelectedTrap] > 0)) {
_root.timeManager.trapMap["location" + v].trapIcon.gotoAndStop(currentSelectedTrap);
} else if (_root.trapLocations[v].empty == false) {
_root.timeManager.trapMap["location" + v].cross.alphaTo(100, 0.5);
}
}
}
};
timeManager.trapMap[butName].onRollOut = function () {
this.colorTo(null, 0.5, "easeOutSine");
this.cross.alphaTo(0, 0.5);
for (v in _root.trapLocations) {
timeManager.trapMap["location" + v].trapIcon.gotoAndStop(_root.trapLocations[v].type);
}
};
timeManager.trapMap[butName].onRelease = function () {
var _local2 = butName.substring(8, 10);
for (v in _root.trapLocations) {
if (v == _local2) {
if (_root.trapLocations[v].empty == true) {
placeTrapOnMap(_local2, currentSelectedTrap);
} else {
removeTrapOnMap(_local2, _root.trapLocations[v].type);
}
}
}
};
}
function trapSelectionButtons(butName) {
timeManager.trapMap[butName].onRollOver = function () {
this.colorTo(10027008, 0.5, "easeOutSine");
};
timeManager.trapMap[butName].onRollOut = function () {
this.colorTo(null, 0.5, "easeOutSine");
};
timeManager.trapMap[butName].onRelease = function () {
if (trapMapOpen == false) {
openTrapMap();
trapMapOpen = true;
}
currentSelectedTrap = butName.substring(4, 50);
};
}
function loadTimeManager() {
_root.mainBlackOut.alphaTo(0, 1, "easeOutSine");
chainsawSound.stop("sound_chainsawIdle");
stopChainsawIdle();
timeManagerOpen = true;
if (retryLevel == false) {
levelUp++;
}
pauseGame();
_root.attachMovie("timeManager", "timeManager", 900021);
timeManager.blackOut.alphaTo(100, 1, "easeOutSine", 0.2, startTimeManager);
hoursSpentSurvivors = 0;
hoursSpentWeapons = 0;
hoursSpentRepairingWall = 0;
hoursSpentSupplies = 0;
wallRepairs = 0;
survivorsFound = 0;
suppliesFound = 0;
searchPartyMembersKilled = 0;
hoursInDay = 12;
searchFoundAWeapon = 0;
currentZombieThreat = 0;
threatDeficit = 0;
liveZombieCount = 0;
tempFoundSurvivors = 0;
tempFoundSupplies = 0;
for (v in searchWeaponsFound) {
searchWeaponsFound.pop();
}
}
function startTimeManager() {
hideCrosshairs();
bgMusic.volumeTo(20, 3, "easeOutSine");
cleanUpZombies();
timeManager.gotoAndStop("timeManage");
cleanUpSurvivors();
setupTravelMap();
firstTravelSetup(currentTownLocation);
changeClipBoardMap(currentTownLocation);
setupSearchedBuildings();
changeBackdrops(currentTownLocation);
timeManager.blackOut.alphaTo(0, 2, "easeOutSine");
updateClipBoardText();
weaponMeter();
if (survivors >= maxHelpers) {
timeManager.theClipBoard.noVacancy._visible = true;
} else {
timeManager.theClipBoard.noVacancy._visible = false;
}
if (retryLevel == true) {
calculateFindings();
confirmResults();
} else {
clipBoardUp();
}
loadHints();
}
function closeManager() {
dropWeapon();
cleanUpZombies();
removeMapOverlay();
createTownMapOverlay(currentTownLocation);
populateTrapMap();
if (_root.primaryWeapon != undefined) {
showCrosshairs();
bgMusic.volumeTo(100, 8, "easeOutSine");
retryLevel = false;
startOfLevelWallHealth = wall.health;
_root.timeManager.blackOut.alphaTo(100, 2, "easeOutSine", 0, startNextLevel);
assignSurvivorWeapons();
swapWeapon(primaryWeapon.name);
variableReset();
if (bgMusicPlaying == false) {
changeMusic();
}
} else {
_root.timeManager.tm_backgrounds.needAWeapon.alphaTo(100, 1);
}
}
function updateClipBoardText() {
clearInterval(updateClipBoard);
timeManager.theClipBoard.hoursRemaining.text = hoursInDay;
timeManager.theClipBoard.hoursSurvivors.text = hoursSpentSurvivors;
timeManager.theClipBoard.hoursWeapons.text = hoursSpentWeapons;
timeManager.theClipBoard.hoursSupplies.text = hoursSpentSupplies;
timeManager.theClipBoard.hoursRepairingWallText.text = hoursSpentRepairingWall;
timeManager.theClipBoard.repairRateText.text = Math.round((repairRate * Math.round(survivors / 2)) / 100);
timeManager.clipBoardResults.wallRepairedBy.text = Math.round(wallRepairs / 100);
timeManager.clipBoardResults.survivorsFoundText.text = tempFoundSurvivors;
timeManager.clipBoardResults.suppliesFoundText.text = tempFoundSupplies;
timeManager.clipBoardResults.survivorsKilledText.text = searchPartyMembersKilled;
timeManager.clipBoardResults.clipBoardDay.text = levelUp;
timeManager.theClipBoard.barricadeTotal.text = Math.round(wall.health / 100);
timeManager.theClipBoard.barricadeMax.text = Math.round(wall.maxHealth / 100);
timeManager.clipBoardResults.barricadeTotal.text = Math.round(wall.health / 100);
timeManager.clipBoardResults.barricadeMax.text = Math.round(wall.maxHealth / 100);
timeManager.theClipBoard.survivorsTotal.text = survivors;
timeManager.clipBoardResults.survivorsTotal.text = survivors;
timeManager.theClipBoard.suppliesTotal.text = supplies;
timeManager.clipBoardResults.suppliesTotal.text = supplies;
timeManager.theClipBoard.townNameText.text = location[currentTownLocation].name;
timeManager.theClipBoard.dayNumberText.text = "DAY " + levelUp;
}
function resetClipBoardText() {
timeManager.theClipBoard.hoursRemaining.text = "12";
timeManager.theClipBoard.hoursSurvivors.text = "0";
timeManager.theClipBoard.hoursWeapons.text = "0";
timeManager.theClipBoard.hoursSupplies.text = "0";
timeManager.theClipBoard.hoursRepairingWall.text = "0";
timeManager.clipBoardResults.wallRepairedTo.text = "0";
timeManager.clipBoardResults.survivorsFound.text = "0";
timeManager.clipBoardResults.suppliesFoundText.text = "0";
timeManager.clipBoardResults.barricadeTotal.text = Math.round(wall.health / 100);
timeManager.theClipBoard.barricadeTotal.text = Math.round(wall.health / 100);
timeManager.clipBoardResults.foundWeapons.text = "";
timeManager.clipBoardResults.survivorsFoundText.text = "0";
timeManager.clipBoardResults.suppliesFoundText.text = "0";
}
function calculateFindings() {
tempWallHealth = wall.health;
wallRepairs = (hoursSpentRepairingWall * repairRate) * Math.round(survivors / 2);
wall.health = wall.health + wallRepairs;
checkWallStatus();
if (wall.health > 0) {
wall.destroyed = false;
}
if (wall.health >= wall.maxHealth) {
wallRepairs = wall.maxHealth - tempWallHealth;
wall.health = wall.maxHealth;
}
checkWallStatus();
startOfLevelWallHealth = wall.health;
if (survivors <= maxSurvivorsOnScreen) {
survivors = survivors + tempFoundSurvivors;
}
if (survivors > maxSurvivorsOnScreen) {
survivors = maxSurvivorsOnScreen;
}
scroungedSupplies = scroungedSupplies + 0.25;
if (scroungedSupplies >= 1) {
supplies = supplies + scroungedSupplies;
scroungedSupplies = 0;
}
supplies = supplies + tempFoundSupplies;
v = 0;
while (v < searchWeaponsFound.length) {
_root[searchWeaponsFound[v]].found = true;
timeManager.clipBoardResults.foundWeapons.text = timeManager.clipBoardResults.foundWeapons.text + _root[searchWeaponsFound[v]].description;
if (((searchWeaponsFound.length - 1) - v) > 0) {
timeManager.clipBoardResults.foundWeapons.text = timeManager.clipBoardResults.foundWeapons.text + ", ";
}
v++;
}
if (searchWeaponsFound[0] == undefined) {
timeManager.clipBoardResults.foundWeapons.text = "NONE";
}
setupSurvivors();
checkWeaponSlots();
for (i in allWeapons) {
if (_root[allWeapons[i]].found == true) {
timeManager.tm_backgrounds["shadow_" + _root[allWeapons[i]].name].attachMovie(_root[allWeapons[i]].name + "_Icon", _root[allWeapons[i]].name + "_Weapon", this.getNextHighestDepth);
}
if (_root[allWeapons[i]].inUse == true) {
timeManager.tm_backgrounds["shadow_" + _root[allWeapons[i]].name][_root[allWeapons[i]].name + "_Weapon"].alphaTo(0, 0);
} else {
timeManager.tm_backgrounds["shadow_" + _root[allWeapons[i]].name][_root[allWeapons[i]].name + "_Weapon"].alphaTo(100, 0);
}
}
_root.timeManager.tm_backgrounds.primary.attachMovie(primaryWeapon.name + "_Icon", "primaryWeapon", this.getNextHighestDepth);
_root.timeManager.tm_backgrounds.secondary.attachMovie(secondaryWeapon.name + "_Icon", "secondaryWeapon", this.getNextHighestDepth);
_root.timeManager.tm_backgrounds.slot3.attachMovie(slot3Weapon.name + "_Icon", "slot3Weapon", this.getNextHighestDepth);
_root.timeManager.tm_backgrounds.slot4.attachMovie(slot4Weapon.name + "_Icon", "slot4Weapon", this.getNextHighestDepth);
_root.timeManager.tm_backgrounds.slot5.attachMovie(slot5Weapon.name + "_Icon", "slot5Weapon", this.getNextHighestDepth);
_root.timeManager.tm_backgrounds.slot6.attachMovie(slot6Weapon.name + "_Icon", "slot6Weapon", this.getNextHighestDepth);
debugDay++;
updateClipBoard = setInterval(updateClipBoardText, 1000);
}
function weaponMeter() {
for (i in weaponPoints) {
i = nextWeaponPoint;
if (weaponPoints[i] != undefined) {
pointsDifference = weaponPoints[i] - weaponPoints[i - 1];
earnedPointsPastDiff = foundWeaponsTotal - weaponPoints[i - 1];
if (earnedPointsPastDiff <= 0) {
earnedPointsPastDiff = 0;
}
} else {
pointsDifference = weaponPoints[i];
earnedPointsPastDiff = foundWeaponsTotal;
}
var _local1 = Math.round((earnedPointsPastDiff / pointsDifference) * 100);
timeManager.theClipBoard.findOmeter.findBar.bar._xscale = _local1;
break;
}
}
function slideToToolBench() {
timeManager.tm_backgrounds.xSlideTo(-1695, 1.2, "easeOutSine", 0.5);
timeManager.trapMap.xSlideTo(-400, 0.5, "easeOutSine", 2);
populateTrapMap();
updateTrapMapText();
}
function openTrapMap() {
dropWeapon();
timeManager.trapMap.xSlideTo(20, 0.8, "easeOutSine");
}
function closeTrapMap() {
dropWeapon();
timeManager.trapMap.xSlideTo(-400, 0.8, "easeOutSine");
}
function openPostCard() {
timeManager.theClipBoard.postCard.xSlideTo(-320, 1, "easeOutSine");
}
function closePostCard() {
timeManager.theClipBoard.postCard.xSlideTo(-520, 1, "easeOutSine");
}
function openTravelMap() {
travelMapOpen = true;
timeManager.travelMap.blockerButton._visible = false;
clipBoardDown();
timeManager.travelMap.ySlideTo(220, 1.5, "easeOutSine", 1);
}
function closeTravelMap() {
travelMapOpen = false;
timeManager.travelMap.blockerButton._visible = true;
timeManager.travelMap.ySlideTo(629, 2, "easeOutSine", 1, openJournal);
updateClipBoardText();
updateClipBoardResultsText();
}
function clipBoardUp() {
checkIfCanTravel();
timeManager.theClipBoard.ySlideTo(30, 0.5, "easeOutSine", 1);
}
function clipBoardDown() {
timeManager.theClipBoard.ySlideTo(420, 0.5, "easeOutSine");
timeManager.tm_backgrounds.xSlideTo(-950, 1.8, "easeOutSine", 0.5);
}
function clipBoardResultsUp() {
timeManager.clipBoardResults.ySlideTo(15, 0.5, "easeOutSine");
}
function clipBoardResultsDown() {
timeManager.clipBoardResults.ySlideTo(420, 0.5, "easeOutSine");
}
function confirmTimeManagement() {
clipBoardDown();
calculateFindings();
timeManager.tm_backgrounds.night.alphaTo(100, 1.8, "easeOutSine", 0, clipBoardResultsUp);
}
function confirmResults() {
clipBoardResultsDown();
resetClipBoardText();
slideToToolBench();
}
function clipBoardButtons(btnName) {
_root.timeManager.theClipBoard[btnName].onRelease = function () {
switch (btnName) {
case "barricadePlus" :
if (hoursInDay > 0) {
hoursSpentRepairingWall++;
hoursInDay--;
updateClipBoardText();
}
return;
case "barricadeMinus" :
if (hoursSpentRepairingWall > 0) {
hoursSpentRepairingWall--;
hoursInDay++;
updateClipBoardText();
}
return;
case "weaponsMinus" :
if (hoursSpentWeapons > 0) {
hoursSpentWeapons--;
hoursInDay++;
updateClipBoardText();
}
return;
case "weaponsPlus" :
if (hoursInDay > 0) {
hoursSpentWeapons++;
hoursInDay--;
updateClipBoardText();
}
return;
case "survivorsMinus" :
if (hoursSpentSurvivors > 0) {
hoursSpentSurvivors--;
hoursInDay++;
updateClipBoardText();
}
return;
case "survivorsPlus" :
if (hoursInDay > 0) {
hoursSpentSurvivors++;
hoursInDay--;
updateClipBoardText();
}
return;
case "suppliesPlus" :
if (hoursInDay > 0) {
hoursSpentSupplies++;
hoursInDay--;
updateClipBoardText();
}
return;
case "suppliesMinus" :
if (hoursSpentSupplies > 0) {
hoursSpentSupplies--;
hoursInDay++;
updateClipBoardText();
}
return;
}
};
}
function setupTravelMap() {
_root.timeManager.travelMap.supplyWarning._alpha = 0;
for (m in _root.allTownLocations) {
timeManager.travelMap[allTownLocations[m]].gotoAndStop("noTravel");
}
for (v in location[currentTownLocation].destinations) {
timeManager.travelMap[location[currentTownLocation].destinations[v]].gotoAndStop("yesTravel");
timeManager.travelMap[currentTownLocation].gotoAndStop("youAreHere");
}
for (v in travelledLocations) {
_root.timeManager.travelMap.travelLines[travelledLocations[v]].lineMask.xScaleTo(100, 0);
}
timeManager.travelMap.blockerButton._visible = false;
if (travelMapOpen) {
closeTravelMap();
timeManager.travelMap.blockerButton._visible = true;
}
timeManager.travelMap.suppliesTotalText.text = supplies;
timeManager.travelMap.daysLeftText.text = (40 - levelUp) + 1;
}
function changeBackdrops(townName) {
timeManager.tm_backgrounds.colorTo(0, 1, "easeOutSine", null, function () {
timeManager.tm_backgrounds.gotoAndStop(townName);
});
timeManager.tm_backgrounds.colorTo(null, 2, "easeOutSine", 2);
bgImage.gotoAndStop(townName);
}
function createTownMapOverlay(townName) {
townNameOverlays++;
_root.attachMovie(("bg_" + townName) + "_overlay", "mapOverlay", 864235 + townNameOverlays);
_root.mapOverlay._x = 0;
_root.mapOverlay._y = 420;
}
function removeMapOverlay() {
removeMovieClip(mapOverlay);
}
function changeClipBoardMap(townName) {
timeManager.theClipBoard.searchMap.gotoAndStop(townName);
updateClipBoardText();
}
function townButton(townName) {
_root.timeManager.travelMap[townName].onRollOver = function () {
this.scribble.gotoAndPlay(1);
for (v in location[currentTownLocation].destinations) {
if (location[currentTownLocation].destinations[v] == townName) {
_root.validTownRollOver = true;
}
}
if (_root.validTownRollOver) {
calculateTravelTime(currentTownLocation, townName);
_root.timeManager.travelMap.townInfoCard.townNameText.text = location[townName].name;
_root.timeManager.travelMap.townInfoCard.townPopText.text = location[townName].population;
_root.timeManager.travelMap.townInfoCard.daysTravelText.text = travelTime;
_root.timeManager.travelMap.townInfoCard.slideTo(_root.timeManager.travelMap[townName]._x, _root.timeManager.travelMap[townName]._y, 1);
_root.timeManager.travelMap.townInfoCard.rotateTo(random(10) - 15, 1);
_root.validTownRollOver = false;
}
};
_root.timeManager.travelMap[townName].onRollOut = function () {
_root.timeManager.travelMap.townInfoCard.slideTo(-600, 50, 0.5);
_root.timeManager.travelMap.townInfoCard.rotateTo(random(30), 0.5);
};
_root.timeManager.travelMap[townName].onRelease = function () {
_root.travelToLocation(townName);
};
}
function checkIfCanTravel() {
for (v in location[currentTownLocation].destinations) {
calculateTravelTime(currentTownLocation, location[currentTownLocation].destinations[v]);
if (travelTime <= supplies) {
openPostCard();
} else {
closePostCard();
}
}
}
function travelToLocation(townName) {
for (v in location[currentTownLocation].destinations) {
if (location[currentTownLocation].destinations[v] == townName) {
validTravelDestination = true;
}
}
calculateTravelTime(currentTownLocation, townName);
if (validTravelDestination && (travelTime <= supplies)) {
_root.timeManager.travelMap.blockerButton._visible = true;
currentTownTarget = townName;
if (travelTime <= 1) {
_root.timeManager.travelMap.confirmTravel.travelTimeText.text = travelTime + " DAY";
} else {
_root.timeManager.travelMap.confirmTravel.travelTimeText.text = travelTime + " DAYS";
}
_root.timeManager.travelMap.confirmTravel.townNameText.text = location[currentTownTarget].name + " ?";
_root.timeManager.travelMap.confirmTravel.slideTo(-13, 1.5, 0.8);
} else if ((travelTime > supplies) && (validTravelDestination)) {
validTravelDestination = false;
_root.timeManager.travelMap.supplyWarning.slideTo(_root.timeManager.travelMap[townName]._x, _root.timeManager.travelMap[townName]._y - 50, 0);
_root.timeManager.travelMap.supplyWarning.scaleTo(5, 0);
_root.timeManager.travelMap.supplyWarning.alphaTo(100, 0, "easeOutSine");
_root.timeManager.travelMap.supplyWarning.scaleTo(110, 0.25, "easeOutBounce");
_root.timeManager.travelMap.supplyWarning.scaleTo(5, 0.25, "easeOutBounce", 2);
_root.timeManager.travelMap.supplyWarning.alphaTo(0, 0, "easeOutSine", 2.2);
}
}
function travelConfirmed(currentTown, targetTown) {
cleanUpTraps();
hoursSpentRepairingWall = 0;
supplies = supplies - travelTime;
levelUp = levelUp + travelTime;
validTravelDestination = false;
if (targetTown == "unionCity") {
endGame();
endingGame = true;
}
if (endingGame == false) {
_root.timeManager.travelMap.travelLines[(currentTown + "_") + targetTown].lineMask.xScaleTo(100, travelTime, "linear", null, setupTravelMap);
var _local5 = (currentTown + "_") + targetTown;
travelledLocations.push(_local5);
var _local3 = currentTownLocation;
currentTownLocation = targetTown;
currentTownTarget = "";
changeBackdrops(currentTownLocation);
changeClipBoardMap(currentTownLocation);
firstTravelSetup(currentTownLocation);
setupSearchedBuildings();
resetNonConfirmedSearches(_local3);
setupWall(currentTownLocation);
fadeAndChangeMusic();
}
}
function firstTravelSetup(townName) {
if (location[townName].travelledTo == false) {
setupBuildings("weapons", townName);
setupBuildings("supplies", townName);
setupBuildings("survivors", townName);
location[townName].travelledTo = true;
}
}
function cancelTravel(butName) {
_root.timeManager.travelMap[butName].onRelease = function () {
this._parent.ySlideTo(629, 1, "easeOutSine");
_root.updateClipBoardText();
_root.updateClipBoardResultsText();
_root.clipBoardUp();
};
}
function cancelTravelConfirm(butName) {
_root.timeManager.travelMap.confirmTravel[butName].onRelease = function () {
this._parent.slideTo(-13, 420, 0.5);
_root.validTravelDestination = false;
_root.timeManager.travelMap.blockerButton._visible = false;
};
}
function calculateTravelTime(depart, arrive) {
if (((depart == "glenDale") && (arrive == "whistlersGrove")) || ((depart == "whistlersGrove") && (arrive == "glenDale"))) {
travelTime = 4;
} else if (((depart == "glenDale") && (arrive == "claysBurg")) || ((depart == "claysBurg") && (arrive == "glenDale"))) {
travelTime = 4;
} else if (((depart == "whistlersGrove") && (arrive == "claysBurg")) || ((depart == "claysBurg") && (arrive == "whistlersGrove"))) {
travelTime = 5;
} else if (((depart == "whistlersGrove") && (arrive == "aspenWood")) || ((depart == "aspenWood") && (arrive == "whistlersGrove"))) {
travelTime = 4;
} else if (((depart == "claysBurg") && (arrive == "aspenWood")) || ((depart == "aspenWood") && (arrive == "claysBurg"))) {
travelTime = 3;
} else if (((depart == "whistlersGrove") && (arrive == "aspenWood")) || ((depart == "aspenWood") && (arrive == "whistlersGrove"))) {
travelTime = 4;
} else if (((depart == "whistlersGrove") && (arrive == "jonesTown")) || ((depart == "jonesTown") && (arrive == "whistlersGrove"))) {
travelTime = 4;
} else if (((depart == "aspenWood") && (arrive == "jonesTown")) || ((depart == "jonesTown") && (arrive == "aspenWood"))) {
travelTime = 3;
} else if (((depart == "jonesTown") && (arrive == "armyBase")) || ((depart == "armyBase") && (arrive == "jonesTown"))) {
travelTime = 3;
} else if (((depart == "armyBase") && (arrive == "unionCity")) || ((depart == "unionCity") && (arrive == "armyBase"))) {
travelTime = 4;
} else if (((depart == "jonesTown") && (arrive == "unionCity")) || ((depart == "unionCity") && (arrive == "jonesTown"))) {
travelTime = 6;
}
}
function shuffleArray() {
var _local1 = Math.round(Math.random() * 2);
return(_local1);
}
function searchBuilding(buildingName, townName, buildingType) {
_root[townName + "BuildingsSearched"].push({butName:buildingName, buildingType:buildingType});
for (v in _root[buildingType + "Buildings"]) {
if (_root[buildingType + "Buildings"][v].ref == buildingName) {
if ((_root.hoursInDay - _root[buildingType + "Buildings"][v].searchTime) >= 0) {
_root.hoursInDay = _root.hoursInDay - _root[buildingType + "Buildings"][v].searchTime;
_root.updateClipBoardText();
switch (buildingType) {
case "weapons" :
if (_root[buildingType + "Buildings"][v].hasItem != "empty") {
_root[_root[buildingType + "Buildings"][v].hasItem].found = true;
searchWeaponsFound.push(_root[buildingType + "Buildings"][v].hasItem);
allWeaponsFound.push(_root[buildingType + "Buildings"][v].hasItem);
}
break;
case "survivors" :
if (_root[buildingType + "Buildings"][v].hasItem == "survivor") {
if (survivors < maxSurvivorsOnScreen) {
tempFoundSurvivors++;
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "survivors2") {
if (survivors < maxSurvivorsOnScreen) {
tempFoundSurvivors = tempFoundSurvivors + 2;
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "supplies") {
tempFoundSupplies++;
}
if (_root[buildingType + "Buildings"][v].hasItem == "supplies2") {
tempFoundSupplies = tempFoundSupplies + 2;
}
if (_root[buildingType + "Buildings"][v].hasItem == "gasCylinder") {
total_gasCylinder = total_gasCylinder + 4;
searchWeaponsFound.push("gasCylinder");
}
if (_root[buildingType + "Buildings"][v].hasItem == "mine") {
total_mine = total_mine + 4;
searchWeaponsFound.push("mine");
}
if (_root[buildingType + "Buildings"][v].hasItem == "bearTrap") {
total_bearTrap = total_bearTrap + 4;
searchWeaponsFound.push("bearTrap");
}
break;
case "supplies" :
if (_root[buildingType + "Buildings"][v].hasItem == "supplies") {
tempFoundSupplies++;
}
if (_root[buildingType + "Buildings"][v].hasItem == "supplies2") {
tempFoundSupplies = tempFoundSupplies + 2;
}
if (_root[buildingType + "Buildings"][v].hasItem == "survivor") {
if (survivors < maxSurvivorsOnScreen) {
tempFoundSurvivors++;
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "survivors2") {
if (survivors < maxSurvivorsOnScreen) {
tempFoundSurvivors = tempFoundSurvivors + 2;
}
}
break;
}
}
}
}
}
function cancelSearchBuilding(buildingName, townName, buildingType) {
for (v in _root[buildingType + "Buildings"]) {
if (_root[buildingType + "Buildings"][v].ref == buildingName) {
if ((_root.hoursInDay + _root[buildingType + "Buildings"][v].searchTime) <= 12) {
_root.hoursInDay = _root.hoursInDay + _root[buildingType + "Buildings"][v].searchTime;
_root.updateClipBoardText();
switch (buildingType) {
case "weapons" :
if (_root[buildingType + "Buildings"][v].hasItem != "empty") {
for (x in searchWeaponsFound) {
if (_root[buildingType + "Buildings"][v].hasItem == searchWeaponsFound[x]) {
_root[searchWeaponsFound[x]].found = false;
searchWeaponsFound.splice(x, 1);
}
}
}
break;
case "survivors" :
if (_root[buildingType + "Buildings"][v].hasItem == "survivor") {
if (tempFoundSurvivors > 0) {
tempFoundSurvivors--;
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "supplies") {
if (tempFoundSupplies > 0) {
tempFoundSupplies--;
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "mine") {
for (x in searchWeaponsFound) {
if (searchWeaponsFound[x] == "mine") {
searchWeaponsFound.splice(x, 1);
if (total_mine > 0) {
total_mine = total_mine - 4;
}
}
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "gasCylinder") {
for (x in searchWeaponsFound) {
if (searchWeaponsFound[x] == "gasCylinder") {
searchWeaponsFound.splice(x, 1);
if (total_gasCylinder > 0) {
total_gasCylinder = total_gasCylinder - 4;
}
}
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "bearTrap") {
for (x in searchWeaponsFound) {
if (searchWeaponsFound[x] == "bearTrap") {
searchWeaponsFound.splice(x, 1);
if (total_bearTrap > 0) {
total_bearTrap = total_bearTrap - 4;
}
}
}
}
break;
case "supplies" :
if (_root[buildingType + "Buildings"][v].hasItem == "supplies") {
if (tempFoundSupplies > 0) {
tempFoundSupplies--;
}
}
if (_root[buildingType + "Buildings"][v].hasItem == "survivor") {
if (tempFoundSurvivors > 0) {
tempFoundSurvivors--;
}
}
break;
}
}
}
}
for (v in _root[townName + "BuildingsSearched"]) {
if (_root[townName + "BuildingsSearched"][v].butName == buildingName) {
_root[townName + "BuildingsSearched"].splice(v, 1);
}
}
}
function clearBuildings() {
delete suppliesBuildings;
delete survivorBuildings;
delete weaponBuildings;
delete glenDaleBuildingsSearched;
delete claysBurgBuildingsSearched;
delete whistlersGroveBuildingsSearched;
delete aspenWoodBuildingsSearched;
delete jonesTownBuildingsSearched;
delete armyBaseBuildingsSearched;
}
function setupBuildings(buildingType, townName) {
updateClipBoardText();
_root.timeManager.theClipBoard.searchMap.gotoAndStop(currentTownLocation);
if (_root[townName + "BuildingsSearched"][0].butName == undefined) {
_root[townName + "BuildingsSearched"] = new Array();
}
_root[buildingType + "Buildings"] = new Array();
_root[buildingType + "Buildings"] = location[townName][buildingType + "Buildings"];
_root[(townName + buildingType) + "ToFind"] = new Array();
_root[(townName + buildingType) + "ToFind"] = location[townName][buildingType].sort(shuffleArray);
for (v in _root[buildingType + "Buildings"]) {
_root[buildingType + "Buildings"][v].hasItem = _root[(townName + buildingType) + "ToFind"][v];
}
}
function resetNonConfirmedSearches(townName) {
for (e in searchWeaponsFound) {
searchWeaponsFound.splice(e, 1);
}
hoursInDay = 12;
updateClipBoardText();
}
function setupSearchedBuildings() {
for (v in _root[currentTownLocation + "BuildingsSearched"]) {
_root.timeManager.theClipBoard.searchMap[_root[currentTownLocation + "BuildingsSearched"][v].buildingType][_root[currentTownLocation + "BuildingsSearched"][v].butName].gotoAndStop("searched");
_root.timeManager.theClipBoard.searchMap[_root[currentTownLocation + "BuildingsSearched"][v].buildingType][_root[currentTownLocation + "BuildingsSearched"][v].butName].enabled = false;
}
}
function searchBuildingButtons(buildingType, butName) {
_root.timeManager.theClipBoard.searchMap[buildingType][butName].onLoad = function () {
this.searched = false;
};
_root.timeManager.theClipBoard.searchMap[buildingType][butName].onRollOver = function () {
_root.timeManager.theClipBoard.searchInfoCard._alpha = 100;
mapPoint = new Object();
mapPoint.x = this._x;
mapPoint.y = this._y;
_root.timeManager.theClipBoard.searchMap[buildingType].localToGlobal(mapPoint);
_root.timeManager.theClipBoard.searchInfoCard.slideTo(mapPoint.x, mapPoint.y, 0.2);
for (v in _root[buildingType + "Buildings"]) {
if (_root[buildingType + "Buildings"][v].ref == butName) {
_root.timeManager.theClipBoard.searchInfoCard.hasItem.text = _root[buildingType + "Buildings"][v].hasItem;
_root.timeManager.theClipBoard.searchInfoCard.searchTime.text = _root[buildingType + "Buildings"][v].searchTime;
_root.timeManager.theClipBoard.searchInfoCard.buildingName.text = _root[buildingType + "Buildings"][v].ref;
_root.timeManager.theClipBoard.searchInfoCard.searchTypeText.text = buildingType;
_root.timeManager.theClipBoard.searchInfoCard.buildingNameText.text = _root[buildingType + "Buildings"][v].name;
}
}
};
_root.timeManager.theClipBoard.searchMap[buildingType][butName].onRollOut = function () {
_root.timeManager.theClipBoard.searchInfoCard._alpha = 0;
};
_root.timeManager.theClipBoard.searchMap[buildingType][butName].onRelease = function () {
if (this.searched == false) {
for (v in _root[buildingType + "Buildings"]) {
if (_root[buildingType + "Buildings"][v].ref == butName) {
if ((_root.hoursInDay - _root[buildingType + "Buildings"][v].searchTime) >= 0) {
this.searched = true;
_root[currentTownLocation + "BuildingsSearched"].push({butName:butName, buildingType:buildingType});
this.scribbleCircle.play();
_root.searchBuilding(butName, currentTownLocation, buildingType);
}
}
}
} else {
this.searched = false;
_root.cancelSearchBuilding(butName, currentTownLocation, buildingType);
this.scribbleCircle.gotoAndStop(1);
}
};
}
function setupSurvivorSlots() {
survivorPosition1 = new Object();
survivorPosition1.free = true;
survivorPosition1.weapon = "snubnose";
survivorPosition1.x = 645;
survivorPosition1.y = 100;
survivorPosition1.section = "section1";
survivorPosition2 = new Object();
survivorPosition2.free = true;
survivorPosition2.weapon = "snubnose";
survivorPosition2.x = 683;
survivorPosition2.y = 202;
survivorPosition2.section = "section3";
survivorPosition3 = new Object();
survivorPosition3.free = true;
survivorPosition3.weapon = "snubnose";
survivorPosition3.x = 664;
survivorPosition3.y = 245;
survivorPosition3.section = "section3";
survivorPosition4 = new Object();
survivorPosition4.free = true;
survivorPosition4.weapon = "snubnose";
survivorPosition4.x = 650;
survivorPosition4.y = 72;
survivorPosition4.section = "section1";
survivorSlot.push(survivorPosition1, survivorPosition2, survivorPosition3, survivorPosition4);
for (x in survivorSlot) {
}
}
function cleanUpSurvivors() {
for (v in survivorsOnScreen) {
if (survivorsOnScreen[v].dead == true) {
survivorSlot[survivorsOnScreen[v].slotNumber].free = true;
for (x in friendliesOnScreen) {
if (survivorsOnScreen[v].ref == friendliesOnScreen[x].ref) {
friendliesOnScreen.splice(x, 1);
}
}
removeMovieClip(survivorsOnScreen[v].ref);
survivorsOnScreen.splice(v, 1);
}
}
}
function removeSurvivors() {
survivors = 0;
for (v in survivorsOnScreen) {
survivorSlot[survivorsOnScreen[v].slotNumber].free = true;
removeMovieClip(survivorsOnScreen[v].ref);
survivorsOnScreen.splice(v, 1);
}
}
function assignSurvivorWeapons() {
for (v in survivorsOnScreen) {
_root.survivorsOnScreen[v].weapon = survivorSlot[survivorsOnScreen[v].slotNumber].weapon;
_root.survivorsOnScreen[v].holdType = _root[survivorSlot[survivorsOnScreen[v].slotNumber].weapon].holdType;
_root.survivorsOnScreen[v].ammo = _root[survivorSlot[survivorsOnScreen[v].slotNumber].weapon].magazineCapacity;
_root.survivorsOnScreen[v].maxAmmo = _root[survivorSlot[survivorsOnScreen[v].slotNumber].weapon].magazineCapacity;
_root.survivorsOnScreen[v].shotCounter = _root[survivorSlot[survivorsOnScreen[v].slotNumber].weapon].survivorRPM;
_root.survivorsOnScreen[v].shotCounterMax = _root[survivorSlot[survivorsOnScreen[v].slotNumber].weapon].survivorRPM;
_root.survivorsOnScreen[v].ref.gotoAndStop(1);
_root.survivorsOnScreen[v].ref.helperMainGun.helperGun.gotoAndStop(survivorsOnScreen[v].weapon);
_root.survivorsOnScreen[v].ref.helperMainGun.gotoAndStop(survivorsOnScreen[v].holdType);
_root.survivorsOnScreen[v].running = false;
_root.survivorsOnScreen[v].firing = false;
_root.survivorsOnScreen[v].reloading = false;
}
}
function setupSurvivors() {
v = 0;
while (v <= survivorSlot.length) {
if ((survivorSlot[v].free == true) && (survivorOnScreenCount < survivors)) {
survivorSlot[v].free = false;
survivorOnScreenCount++;
survivorInc++;
_root.attachMovie("survivorDummy", "survivor" + survivorInc, survivorDepthCount + survivorSlot[v].y);
_root["survivor" + survivorInc]._x = survivorSlot[v].x;
_root["survivor" + survivorInc]._y = survivorSlot[v].y;
_root["survivor" + survivorInc].reloading = false;
randomTorsoColour = survivorTorsoColours[random(survivorTorsoColours.length)];
_root["survivor" + survivorInc].helperMainGun.dummyHead.gotoAndStop("survivor_head" + random(10));
_root["survivor" + survivorInc].helperMainGun.dummyFrontHand.attachMovie("survivorHand" + randomZombieTorso, "torso", x);
_root["survivor" + survivorInc].helperMainGun.dummyBackHand.attachMovie("survivorHand" + randomZombieTorso, "torso", x);
_root["survivor" + survivorInc].dummyHead.head.accessories.gotoAndStop(randomHeadAccessory);
_root["survivor" + survivorInc].dummyTorso.torsoAddons.gotoAndStop(randomTorsoAccessory);
_root["survivor" + survivorInc].dummyTorso.torso.colorTo(randomTorsoColour, 0);
_root["survivor" + survivorInc].helperMainGun.dummyFrontUpperArm.upperArm.colorTo(randomTorsoColour, 0);
_root["survivor" + survivorInc].helperMainGun.dummyFrontLowerArm.lowerArm.colorTo(randomTorsoColour, 0);
_root["survivor" + survivorInc].helperMainGun.dummyBackUpperArm.upperArm.colorTo(randomTorsoColour, 0);
_root["survivor" + survivorInc].helperMainGun.dummyBackLowerArm.lowerArm.colorTo(randomTorsoColour, 0);
randomLegColour = survivorLegColours[random(survivorLegColours.length)];
_root["survivor" + survivorInc].dummyFrontUpperLeg.upperLeg.colorTo(randomLegColour, 0);
_root["survivor" + survivorInc].dummyFrontLowerLeg.lowerLeg.colorTo(randomLegColour, 0);
_root["survivor" + survivorInc].dummyBackUpperLeg.upperLeg.colorTo(randomLegColour, 0);
_root["survivor" + survivorInc].dummyBackLowerLeg.lowerLeg.colorTo(randomLegColour, 0);
survivorsOnScreen.push({ref:_root["survivor" + survivorInc], depth:_root["survivor" + survivorInc]._y, running:false, firing:false, reloading:false, dead:false, ammo:_root[survivorSlot[v].weapon].magazineCapacity, maxAmmo:_root[survivorSlot[v].weapon].magazineCapacity, weapon:survivorSlot[v].weapon, holdType:_root[survivorSlot[v].weapon].holdType, shotCounter:_root[survivorSlot[v].weapon].survivorRPM, shotCounterMax:_root[survivorSlot[v].weapon].survivorRPM, burstCounter:0, targetDiffX:1000, targetDiffY:1000, sectionName:survivorSlot[v].section, slotNumber:v});
friendliesOnScreen.push({ref:_root["survivor" + survivorInc], depth:_root["survivor" + survivorInc]._y});
}
v++;
}
}
function survivorFindTarget() {
findTargetTimer--;
if ((findTargetTimer < 0) && (survivors > 0)) {
_root.survivorSection_1.occupied = false;
_root.survivorSection_2.occupied = false;
_root.survivorSection_3.occupied = false;
findTargetTimer = findTargetTimerMax;
i = 1;
while (i <= 3) {
for (z in aliveZombies) {
if (((aliveZombies[z].ref._x >= _root["survivorSection_" + i].startX) && (aliveZombies[z].ref._y >= _root["survivorSection_" + i].startY)) && (aliveZombies[z].ref._y <= _root["survivorSection_" + i].endY)) {
_root["survivorSection_" + i].occupied = true;
}
}
i++;
}
}
}
function survivorWeaponFire() {
v = 0;
while (v <= survivorsOnScreen.length) {
if (((wall.health < 400) && (survivorsOnScreen[v].running == false)) && (survivorsOnScreen[v].dead == false)) {
survivorsOnScreen[v].running = true;
survivorsOnScreen[v].ref.reloading = false;
survivorsOnScreen[v].firing = false;
survivorsOnScreen[v].ref.gotoAndPlay("runAway");
survivorsOnScreen[v].ref.helperMainGun.gotoAndPlay("scared");
}
if ((((survivorsOnScreen[v].firing == false) && (survivorsOnScreen[v].ref.reloading == false)) && (survivorsOnScreen[v].dead == false)) && (survivorsOnScreen[v].running == false)) {
survivorsOnScreen[v].shotCounter--;
if ((survivorsOnScreen[v].ammo > 0) && (survivorsOnScreen[v].shotCounter < 0)) {
i = 0;
while (i <= 3) {
if ((survivorsOnScreen[v].sectionName == _root["survivorSection_" + i].name) && (_root["survivorSection_" + i].occupied == true)) {
survivorsOnScreen[v].burstCounter--;
if (survivorsOnScreen[v].burstCounter < 5) {
if (survivorsOnScreen[v].burstCounter < 0) {
survivorsOnScreen[v].burstCounter = 45 - survivorsOnScreen[v].shotCounterMax;
}
firingHelperSound = new Sound(survivorsOnScreen[v].ref);
firingHelperSound.attachSound(("sound_" + survivorsOnScreen[v].weapon) + "Fire");
firingHelperSound.setVolume(40);
firingHelperSound.start(0, 1);
survivorsOnScreen[v].firing = true;
survivorsOnScreen[v].shotCounter = survivorsOnScreen[v].shotCounterMax + (random(survivorsOnScreen[v].shotCounterMax) / 2);
bullet++;
survivorsOnScreen[v].ref.helperMainGun.helperGun.muzzleFlash.play();
var _local4 = new Object();
_local4.x = survivorsOnScreen[v].ref.helperMainGun.helperGun.barrelEnd._x + random(30);
_local4.y = survivorsOnScreen[v].ref.helperMainGun.helperGun.barrelEnd._y - 15;
survivorsOnScreen[v].ref.helperMainGun.localToGlobal(_local4);
survivorsOnScreen[v].ammo--;
var _local3 = _root.attachMovie("round", "helperRound" + bullet, bullet + 100);
_local3.gotoAndStop("off");
_local3._x = _local4.x;
_local3._y = _local4.y;
_local3.angle = random(8) - 4;
_local3._rotation = _local3.angle;
_local3.onEnterFrame = function () {
this._x = this._x - 90;
};
if ((survivorsOnScreen[v].weapon == "shotgun") || (survivorsOnScreen[v].weapon == "sawnOff")) {
roundsOnScreen.push({ref:_root["helperRound" + bullet], damage:_root[survivorsOnScreen[v].weapon].survivorDamage, headShotDamage:_root[survivorsOnScreen[v].weapon].survivorHeadShotDamage, owner:"helper"});
} else {
roundsOnScreen.push({ref:_root["helperRound" + bullet], damage:_root[survivorsOnScreen[v].weapon].damage, headShotDamage:_root[survivorsOnScreen[v].weapon].headShotDamage, owner:"helper"});
}
survivorsOnScreen[v].ref.helperMainGun.gotoAndPlay(survivorsOnScreen[v].holdType + "_fire");
survivorsOnScreen[v].firing = false;
}
if (((survivorsOnScreen[v].ammo <= 0) && (survivorsOnScreen[v].ref.reloading == false)) && (survivorsOnScreen[v].firing == false)) {
survivorsOnScreen[v].ref.helperMainGun.gotoAndPlay(survivorsOnScreen[v].holdType + "_reload");
survivorsOnScreen[v].ammo = survivorsOnScreen[v].maxAmmo;
}
}
i++;
}
}
}
v++;
}
}
function checkHitsOnSurvivors() {
for (s in survivorsOnScreen) {
for (v in aliveZombies) {
if ((aliveZombies[v].armed == true) && (survivorsOnScreen[s].dead == false)) {
aliveZombies[v].targetYDiff = (aliveZombies[v].ref._y - 60) - survivorsOnScreen[s].ref._y;
if ((aliveZombies[v].targetYDiff <= 20) && (aliveZombies[v].targetYDiff >= -20)) {
if (aliveZombies[v].ref.dummyFrontHand.frontHand.accessories.weapon.collision.hitTest(survivorsOnScreen[s].ref.collision)) {
var _local1 = new Object();
_local1.x = survivorsOnScreen[s].ref.collision._x;
_local1.y = survivorsOnScreen[s].ref.collision._y;
survivorsOnScreen[s].ref.collision.localToGlobal(_local1);
survivorBloodParticle(_local1.x, _local1.y);
survivorsOnScreen[s].dead = true;
survivors = survivors - 1;
survivorOnScreenCount--;
survivorsOnScreen[s].ref.helperMainGun.gotoAndPlay("dead");
survivorsOnScreen[s].ref.gotoAndPlay("death");
killingHelperSound = new Sound(survivorsOnScreen[s].ref);
killingHelperSound.attachSound("sound_survivorHeadExplode");
killingHelperSound.setVolume(100);
killingHelperSound.start(0, 1);
}
}
}
}
}
}
function fadeAndChangeMusic() {
bgMusic.volumeTo(0, 3, "linear", 0, changeMusic);
}
function changeMusic() {
bgMusic.stop();
bgMusicPlaying = true;
bgMusic = new Sound(stageBG);
bgMusic.attachSound("music_" + location[currentTownLocation].musicTrack);
bgMusic.setVolume(0);
bgMusic.start(0, 999999);
bgMusic.volumeTo(20, 3);
}
function stopMusic() {
bgMusicPlaying = false;
_root.bgMusic.stop();
}
levelUp = 1;
clearBuildings();
var timerMax = 35;
var timerCount = timerMax;
var targetCount = 0;
var sunriseStarted = false;
testingWeapons = false;
allWeapons = new Array();
allWeapons.push("chainsaw", "pistol", "revolver", "shotgun", "barrett", "huntingRifle", "UZI", "UMP", "M4A1", "AK47", "sawnOff", "M249", "RPG", "grenade", "compoundBow");
snubnose = new Object();
snubnose.name = "snubnose";
snubnose.description = "snubnose revolver";
snubnose.fireMode = "semi";
snubnose.weaponGroup = "pistol";
snubnose.holdType = "handgun";
snubnose.damage = 5;
snubnose.headShotDamage = 10;
snubnose.weaponRPM = 200;
snubnose.survivorRPM = 6;
snubnose.roundSpeed = 120;
snubnose.reloadTime = 2280;
snubnose.reloadType = "auto";
snubnose.magazineCapacity = 6;
snubnose.shotsPerRound = 1;
snubnose.recoil = 4;
snubnose.casingEject = false;
snubnose.showTracers = true;
snubnose.accuracy = 8;
snubnose.powerRating = 2;
snubnose.inUse = false;
pistol = new Object();
pistol.name = "pistol";
pistol.description = ".45 Pistol";
pistol.weaponGroup = "pistol";
pistol.holdType = "handgun";
pistol.fireMode = "semi";
pistol.damage = 5;
pistol.headShotDamage = 8;
pistol.weaponRPM = 200;
pistol.survivorRPM = 7;
pistol.roundSpeed = 120;
pistol.reloadTime = 1000;
pistol.reloadType = "auto";
pistol.pumpWeapon = true;
pistol.pumpTime = 125;
pistol.magazineCapacity = 17;
pistol.shotsPerRound = 1;
pistol.recoil = 4;
pistol.casingEject = true;
pistol.showTracers = true;
pistol.accuracy = 3;
pistol.powerRating = 3;
pistol.inUse = true;
revolver = new Object();
revolver.name = "revolver";
revolver.description = ".357 Revolver";
revolver.fireMode = "semi";
revolver.weaponGroup = "pistol";
revolver.holdType = "handgun";
revolver.damage = 10;
revolver.headShotDamage = 30;
revolver.weaponRPM = 200;
revolver.survivorRPM = 8;
revolver.roundSpeed = 120;
revolver.reloadTime = 2280;
revolver.reloadType = "auto";
revolver.pumpWeapon = true;
revolver.pumpTime = 425;
revolver.magazineCapacity = 6;
revolver.shotsPerRound = 1;
revolver.recoil = 8;
revolver.casingEject = false;
revolver.showTracers = true;
revolver.accuracy = 3;
revolver.powerRating = 5;
revolver.inUse = false;
UMP = new Object();
UMP.name = "UMP";
UMP.description = "UMP 45";
UMP.fireMode = "auto";
UMP.weaponGroup = "pistol";
UMP.holdType = "rifle";
UMP.damage = 3;
UMP.headShotDamage = 4;
UMP.weaponRPM = 75;
UMP.survivorRPM = 3;
UMP.roundSpeed = 120;
UMP.reloadTime = 1800;
UMP.reloadType = "auto";
UMP.magazineCapacity = 25;
UMP.shotsPerRound = 1;
UMP.recoil = 3;
UMP.casingEject = true;
UMP.showTracers = true;
UMP.accuracy = 3;
UMP.recoilAnimated = true;
UMP.recoiling = false;
UMP.powerRating = 7;
UMP.inUse = false;
UZI = new Object();
UZI.name = "UZI";
UZI.description = "UZI";
UZI.fireMode = "auto";
UZI.weaponGroup = "pistol";
UZI.holdType = "handgun";
UZI.damage = 2.5;
UZI.headShotDamage = 3;
UZI.weaponRPM = 60;
UZI.survivorRPM = 2;
UZI.roundSpeed = 120;
UZI.reloadTime = 1800;
UZI.reloadType = "auto";
UZI.magazineCapacity = 50;
UZI.shotsPerRound = 1;
UZI.recoil = 5;
UZI.casingEject = true;
UZI.showTracers = true;
UZI.accuracy = 6;
UZI.powerRating = 8;
UZI.inUse = false;
huntingRifle = new Object();
huntingRifle.name = "huntingRifle";
huntingRifle.description = "HUNTING RIFLE";
huntingRifle.weaponGroup = "rifle";
huntingRifle.holdType = "rifle";
huntingRifle.fireMode = "semi";
huntingRifle.damage = 30;
huntingRifle.headShotDamage = 40;
huntingRifle.weaponRPM = 500;
huntingRifle.survivorRPM = 40;
huntingRifle.roundSpeed = 150;
huntingRifle.reloadTime = 1800;
huntingRifle.penetrates = true;
huntingRifle.goesThrough = 2;
huntingRifle.pumpWeapon = false;
huntingRifle.pumpTime = 800;
huntingRifle.reloadType = "auto";
huntingRifle.magazineCapacity = 1;
huntingRifle.shotsPerRound = 1;
huntingRifle.accuracy = 0;
huntingRifle.casingEject = true;
huntingRifle.showTracers = true;
huntingRifle.recoil = 10;
huntingRifle.powerRating = 10;
huntingRifle.inUse = false;
barrett = new Object();
barrett.name = "barrett";
barrett.description = "BARRETT";
barrett.weaponGroup = "rifle";
barrett.fireMode = "semi";
barrett.damage = 40;
barrett.headShotDamage = 100;
barrett.weaponRPM = 500;
barrett.roundSpeed = 150;
barrett.reloadTime = 1800;
barrett.penetrates = true;
barrett.goesThrough = 5;
barrett.pumpWeapon = true;
barrett.pumpTime = 1200;
barrett.reloadType = "auto";
barrett.magazineCapacity = 10;
barrett.shotsPerRound = 1;
barrett.accuracy = 1;
barrett.casingEject = true;
barrett.showTracers = true;
barrett.recoil = 10;
sawnOff = new Object();
sawnOff.name = "sawnOff";
sawnOff.description = "Sawn-off shotgun";
sawnOff.fireMode = "semi";
sawnOff.weaponGroup = "shotgun";
sawnOff.holdType = "handgun";
sawnOff.damage = 5;
sawnOff.headShotDamage = 7;
sawnOff.survivorDamage = 30;
sawnOff.survivorHeadShotDamage = 42;
sawnOff.weaponRPM = 500;
sawnOff.roundSpeed = 120;
sawnOff.reloadTime = 2000;
sawnOff.reloadType = "manual";
sawnOff.pumpWeapon = true;
sawnOff.pumpTime = 400;
sawnOff.magazineCapacity = 2;
sawnOff.shotsPerRound = 6;
sawnOff.accuracy = 15;
sawnOff.casingEject = true;
sawnOff.showTracers = true;
sawnOff.recoil = 8;
sawnOff.survivorRPM = 12;
sawnOff.inUse = false;
shotgun = new Object();
shotgun.name = "shotgun";
shotgun.description = "shotgun";
shotgun.fireMode = "semi";
shotgun.weaponGroup = "shotgun";
shotgun.holdType = "rifle";
shotgun.damage = 3.5;
shotgun.headShotDamage = 2.5;
shotgun.survivorDamage = 30;
shotgun.survivorHeadShotDamage = 42;
shotgun.weaponRPM = 500;
shotgun.roundSpeed = 120;
shotgun.reloadTime = 700;
shotgun.reloadType = "manual";
shotgun.pumpWeapon = true;
shotgun.pumpTime = 700;
shotgun.magazineCapacity = 8;
shotgun.shotsPerRound = 8;
shotgun.accuracy = 5;
shotgun.casingEject = true;
shotgun.showTracers = true;
shotgun.recoil = 5;
shotgun.survivorRPM = 15;
shotgun.inUse = false;
autoShotgun = new Object();
autoShotgun.name = "autoShotgun";
autoShotgun.description = "Auto Shotgun";
autoShotgun.fireMode = "auto";
autoShotgun.weaponGroup = "shotgun";
autoShotgun.damage = 7;
autoShotgun.headShotDamage = 7;
autoShotgun.weaponRPM = 250;
autoShotgun.roundSpeed = 120;
autoShotgun.reloadTime = 700;
autoShotgun.reloadType = "automatic";
autoShotgun.pumpWeapon = false;
autoShotgun.pumpTime = 700;
autoShotgun.magazineCapacity = 12;
autoShotgun.shotsPerRound = 3;
autoShotgun.accuracy = 5;
autoShotgun.casingEject = true;
autoShotgun.showTracers = true;
autoShotgun.recoil = 5;
autoShotgun.recoilAnimated = true;
autoShotgun.recoiling = false;
M4A1 = new Object();
M4A1.name = "M4A1";
M4A1.description = "M4A1";
M4A1.fireMode = "auto";
M4A1.weaponGroup = "rifle";
M4A1.holdType = "rifle";
M4A1.damage = 3.25;
M4A1.headShotDamage = 5.5;
M4A1.weaponRPM = 90;
M4A1.survivorRPM = 3;
M4A1.roundSpeed = 150;
M4A1.reloadTime = 1800;
M4A1.reloadType = "auto";
M4A1.magazineCapacity = 30;
M4A1.shotsPerRound = 1;
M4A1.accuracy = 3;
M4A1.casingEject = true;
M4A1.showTracers = true;
M4A1.recoil = 5;
M4A1.recoilAnimated = true;
M4A1.recoiling = false;
M4A1.powerRating = 12;
M4A1.inUse = false;
AK47 = new Object();
AK47.name = "AK47";
AK47.description = "AK47";
AK47.fireMode = "auto";
AK47.weaponGroup = "rifle";
AK47.holdType = "rifle";
AK47.damage = 4.5;
AK47.headShotDamage = 5.5;
AK47.weaponRPM = 101;
AK47.survivorRPM = 3;
AK47.roundSpeed = 120;
AK47.reloadTime = 1800;
AK47.reloadType = "auto";
AK47.magazineCapacity = 30;
AK47.shotsPerRound = 1;
AK47.accuracy = 5;
AK47.casingEject = true;
AK47.showTracers = true;
AK47.recoil = 8;
AK47.recoilAnimated = true;
AK47.recoiling = false;
AK47.powerRating = 15;
AK47.inUse = false;
M249 = new Object();
M249.name = "M249";
M249.description = "M249 Minimi";
M249.fireMode = "auto";
M249.weaponGroup = "rifle";
M249.holdType = "rifle";
M249.recoilAnimated = true;
M249.recoiling = false;
M249.damage = 3.5;
M249.headShotDamage = 4;
M249.weaponRPM = 90;
M249.survivorRPM = 3;
M249.roundSpeed = 120;
M249.reloadTime = 3600;
M249.reloadType = "auto";
M249.magazineCapacity = 200;
M249.shotsPerRound = 1;
M249.accuracy = 8;
M249.casingEject = true;
M249.showTracers = true;
M249.recoil = 8;
M249.powerRating = 13;
M249.inUse = false;
grenade = new Object();
grenade.name = "grenade";
grenade.type = "explosive";
grenade.description = "HAND GRENADES";
grenade.fireMode = "thrown";
grenade.damage = 90;
grenade.headShotDamage = 90;
grenade.weaponRPM = 90;
grenade.frags = 10;
grenade.fragDistance = 150;
grenade.roundSpeed = 90;
grenade.reloadTime = 1700;
grenade.reloadType = "auto";
grenade.magazineCapacity = 1;
grenade.shotsPerRound = 1;
grenade.timer = 25;
grenade.inUse = false;
chainsaw = new Object();
chainsaw.name = "chainsaw";
chainsaw.description = "CHAINSAW";
chainsaw.fireMode = "auto";
chainsaw.weaponGroup = "rifle";
chainsaw.damage = 8;
chainsaw.headShotDamage = 12;
chainsaw.weaponRPM = 150;
chainsaw.roundSpeed = 80;
chainsaw.reloadTime = 1000;
chainsaw.reloadType = "auto";
chainsaw.magazineCapacity = 50;
chainsaw.shotsPerRound = 1;
chainsaw.accuracy = 0;
chainsaw.type = "melee";
chainsaw.range = 120;
chainsaw.casingEject = false;
chainsaw.showTracers = true;
chainsaw.recoil = 0;
chainsaw.inUse = false;
var roundsBeforeBurn = 10;
flameThrower = new Object();
flameThrower.name = "flameThrower";
flameThrower.description = "FLAMETHROWER";
flameThrower.fireMode = "auto";
flameThrower.weaponGroup = "rifle";
flameThrower.damage = 1;
flameThrower.headShotDamage = 1;
flameThrower.weaponRPM = 20;
flameThrower.roundSpeed = 80;
flameThrower.reloadTime = 1000;
flameThrower.reloadType = "auto";
flameThrower.magazineCapacity = 1000;
flameThrower.shotsPerRound = 1;
flameThrower.accuracy = 0;
flameThrower.type = "melee";
flameThrower.range = 130;
flameThrower.penetrates = false;
flameThrower.casingEject = false;
flameThrower.showTracers = false;
flameThrower.recoil = 0;
RPG = new Object();
RPG.name = "RPG";
RPG.description = "RPG";
RPG.fireMode = "semi";
RPG.weaponGroup = "impactExplosives";
RPG.damage = 100;
RPG.headShotDamage = 100;
RPG.weaponRPM = 150;
RPG.roundSpeed = 120;
RPG.reloadTime = 800;
RPG.reloadType = "auto";
RPG.magazineCapacity = 1;
RPG.shotsPerRound = 1;
RPG.accuracy = 0;
RPG.type = "impactExplosive";
RPG.range = 120;
RPG.penetrates = false;
RPG.casingEject = false;
RPG.showTracers = true;
RPG.recoil = 0;
RPG.inUse = false;
compoundBow = new Object();
compoundBow.description = "Compound Bow";
compoundBow.name = "compoundBow";
compoundBow.fireMode = "semi";
compoundBow.weaponGroup = "bow";
compoundBow.damage = 15;
compoundBow.explodeDamage = 0;
compoundBow.headShotDamage = 30;
compoundBow.weaponRPM = 150;
compoundBow.roundSpeed = 80;
compoundBow.reloadTime = 800;
compoundBow.reloadType = "auto";
compoundBow.magazineCapacity = 1;
compoundBow.shotsPerRound = 1;
compoundBow.accuracy = 5;
compoundBow.penetrates = false;
compoundBow.casingEject = false;
compoundBow.showTracers = true;
compoundBow.recoil = 0;
compoundBow.inUse = false;
snubnose.found = false;
pistol.found = true;
revolver.found = false;
huntingRifle.found = false;
chainsaw.found = false;
shotgun.found = false;
sawnOff.found = false;
grenade.found = false;
UMP.found = false;
UZI.found = false;
M4A1.found = false;
AK47.found = false;
M249.found = false;
barrett.found = false;
compoundBow.found = false;
RPG.found = false;
if (testingWeapons == true) {
snubnose.found = true;
pistol.found = true;
revolver.found = true;
huntingRifle.found = true;
chainsaw.found = true;
shotgun.found = true;
sawnOff.found = true;
grenade.found = true;
UMP.found = true;
UZI.found = true;
M4A1.found = true;
AK47.found = true;
M249.found = true;
barrett.found = true;
compoundBow.found = true;
RPG.found = true;
}
var trapNumber = 0;
var currentSelectedTrap = "empty";
var trapMapOpen = false;
var total_gasCylinder = 0;
var total_mine = 0;
var total_bearTrap = 0;
activeTraps = new Array();
trapLocations = new Array();
gasCylinder = new Object();
gasCylinder.name = "gasCylinder";
gasCylinder.description = "GAS CYLINDER";
gasCylinder.health = 5;
gasCylinder.damage = 400;
gasCylinder.range = 120;
mine = new Object();
mine.name = "mine";
mine.description = "LAND MINE";
mine.health = 0;
mine.damage = 800;
mine.range = 90;
bearTrap = new Object();
bearTrap.name = "bearTrap";
bearTrap.description = "BEAR TRAP";
bearTrap.health = 0;
bearTrap.damage = 0;
bearTrap.range = 0;
trapSpot0 = new Object();
trapSpot0.x = 80;
trapSpot0.y = 130;
trapSpot1 = new Object();
trapSpot1.x = 200;
trapSpot1.y = 136;
trapSpot2 = new Object();
trapSpot2.x = 320;
trapSpot2.y = 135;
trapSpot3 = new Object();
trapSpot3.x = 440;
trapSpot3.y = 132;
trapSpot4 = new Object();
trapSpot4.x = 560;
trapSpot4.y = 131;
trapSpot5 = new Object();
trapSpot5.x = 75;
trapSpot5.y = 180;
trapSpot6 = new Object();
trapSpot6.x = 195;
trapSpot6.y = 181;
trapSpot7 = new Object();
trapSpot7.x = 322;
trapSpot7.y = 183;
trapSpot8 = new Object();
trapSpot8.x = 445;
trapSpot8.y = 188;
trapSpot9 = new Object();
trapSpot9.x = 562;
trapSpot9.y = 180;
trapSpot10 = new Object();
trapSpot10.x = 75;
trapSpot10.y = 235;
trapSpot11 = new Object();
trapSpot11.x = 196;
trapSpot11.y = 236;
trapSpot12 = new Object();
trapSpot12.x = 325;
trapSpot12.y = 238;
trapSpot13 = new Object();
trapSpot13.x = 440;
trapSpot13.y = 234;
trapSpot14 = new Object();
trapSpot14.x = 557;
trapSpot14.y = 237;
trapSpot15 = new Object();
trapSpot15.x = 75;
trapSpot15.y = 301;
trapSpot16 = new Object();
trapSpot16.x = 190;
trapSpot16.y = 300;
trapSpot17 = new Object();
trapSpot17.x = 322;
trapSpot17.y = 302;
trapSpot18 = new Object();
trapSpot18.x = 439;
trapSpot18.y = 309;
trapSpot19 = new Object();
trapSpot19.x = 560;
trapSpot19.y = 300;
trapLocationObjects();
updateTrapMapText();
timeManager._visible = false;
blackOut._visible = false;
timeManagerOpen = false;
nextWeaponPoint = 1;
retryLevel = false;
var beenHere = true;
var previousTownLocation = "";
repairRate = 505;
hoursInDay = 12;
hoursSpentRepairingWall = 0;
hoursSpentWeapons = 0;
hoursSpentSurvivors = 0;
survivorsFound = 0;
foundSurvivors = 0;
foundWeaponsTotal = 1;
searchPartyMembersKilled = 0;
debugDay = 0;
searchFoundAWeapon = 0;
var supplies = 0;
var suppliesFound = 0;
var hoursSpentSupplies = 0;
var scroungedSupplies = 0;
var allTownLocations = new Array("glenDale", "claysBurg", "whistlersGrove", "aspenWood", "jonesTown", "armyBase", "unionCity");
var currentTownLocation = "glenDale";
location = new Object();
location.armyBase = new Object();
location.armyBase.ref = "armyBase";
location.armyBase.name = "FORT TRAN";
location.armyBase.description = "The small Army base where I arrived in this area.";
location.armyBase.population = "Unknown";
location.armyBase.destinations = ["jonesTown", "unionCity"];
location.armyBase.journalHeading = "FORT TRAN";
location.armyBase.journalText = "I ASSUME THIS IS WHERE THE CHOPPER WAS SUPPOSED TO BE HEADED.\r\rIT'S BEEN COMPLETELY OVERRUN, MANAGED STILL TO PULL TOGETHER SOME SANDBAGS TO PUT TOGETHER A STURDY WALL THOUGH.";
location.armyBase.weaponsBuildings = [{ref:"weaponsPlace0", name:"WEAPON STORAGE", searchTime:2, hasItem:"empty"}, {ref:"weaponsPlace1", name:"POLICE STATION", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace2", name:"GUN SHOP", searchTime:5, hasItem:"empty"}];
location.armyBase.weapons = ["RPG", "M249", "empty"];
location.armyBase.survivorsBuildings = [{ref:"survivorsPlace0", name:"MEDICAL CLINIC", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace1", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace2", name:"TOWN HALL", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace3", name:"HOUSE", searchTime:3, hasItem:"empty"}];
location.armyBase.survivors = ["mine", "mine", "mine", "bearTrap"];
location.armyBase.suppliesBuildings = [{ref:"suppliesPlace0", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"suppliesPlace1", name:"SMALL STORE", searchTime:3, hasItem:"empty"}];
location.armyBase.supplies = ["supplies2", "supplies2"];
location.armyBase.maxWallHealth = 5000;
location.armyBase.zombieThreat = 8;
location.armyBase.semiRareZombieChance = 20;
location.armyBase.rareZombieChance = 5;
location.armyBase.veryRareZombieChance = 1;
location.armyBase.armedZombieChance = 0;
location.armyBase.levelTime = 30;
location.armyBase.gunLevel = 1;
location.armyBase.supplyLevel = 1;
location.armyBase.survivorLevel = 1;
location.armyBase.numSpawnZones = 1;
location.armyBase.spawnZone0_min = 120;
location.armyBase.spawnZone0_max = 300;
location.armyBase.brightnessLevelZombies = 60;
location.armyBase.brightnessLevelHero = 70;
location.armyBase.travelledTo = false;
location.glenDale = new Object();
location.glenDale.ref = "glenDale";
location.glenDale.name = "GLENDALE";
location.glenDale.description = "A rural town.";
location.glenDale.population = "20,420";
location.glenDale.journalHeading = "40 DAYS";
location.glenDale.journalText = "IT'S BEEN A MONTH. BACK AT SQUARE ONE. THE CRASH STILL HAUNTS ME. THEY'RE STILL EVERYWHERE\r\rRADIO BROADCAST SAID TODAY THAT THEY'RE SEALING OFF THE MAINLAND.\r\r40 DAYS UNTIL THE LAST BOATS AND AIRCRAFT LEAVE. GOT TO MAKE IT TO UNION CITY.";
location.glenDale.destinations = ["claysBurg", "whistlersGrove"];
location.glenDale.weaponsBuildings = [{ref:"weaponsPlace0", name:"SHERRIF'S OFFICE", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace1", name:"QUICKSTOP", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace2", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace3", name:"HOUSE", searchTime:4, hasItem:"empty"}];
location.glenDale.weapons = ["empty", "chainsaw", "empty", "revolver"];
location.glenDale.survivorsBuildings = [{ref:"survivorsPlace0", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace1", name:"CHURCH", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace2", name:"PARK", searchTime:3, hasItem:"empty"}];
location.glenDale.survivors = ["bearTrap", "gasCylinder", "supplies"];
location.glenDale.suppliesBuildings = [{ref:"suppliesPlace0", name:"OLD HOUSE", searchTime:5, hasItem:"empty"}, {ref:"suppliesPlace1", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"suppliesPlace2", name:"SUPERMARKET", searchTime:4, hasItem:"empty"}, {ref:"suppliesPlace3", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"suppliesPlace4", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"suppliesPlace5", name:"BIG HOUSE", searchTime:4, hasItem:"empty"}];
location.glenDale.supplies = ["supplies", "supplies", "supplies", "survivor", "survivor", "empty"];
location.glenDale.maxWallHealth = 8000;
location.glenDale.zombieThreat = 4.5;
location.glenDale.commonZombieChance = 80;
location.glenDale.semiRareZombieChance = 40;
location.glenDale.rareZombieChance = 20;
location.glenDale.veryRareZombieChance = 0;
location.glenDale.armedZombieChance = 0;
location.glenDale.levelTime = 25;
location.glenDale.gunLevel = 0.5;
location.glenDale.supplyLevel = 1.2;
location.glenDale.survivorLevel = 0.5;
location.glenDale.numSpawnZones = 1;
location.glenDale.spawnZone0_min = 160;
location.glenDale.spawnZone0_max = 220;
location.glenDale.brightnessLevelZombies = 40;
location.glenDale.brightnessLevelHero = 50;
location.glenDale.travelledTo = false;
location.whistlersGrove = new Object();
location.whistlersGrove.ref = "whistlersGrove";
location.whistlersGrove.name = "WHISTLER'S GROVE";
location.whistlersGrove.description = "Just another small rural town.";
location.whistlersGrove.population = "10,913";
location.whistlersGrove.journalHeading = "WHISTLERS GROVE";
location.whistlersGrove.journalText = "BASEMENTS. NOT A FAN BUT IT'S A NECESSITY AT THE MOMENT.\r\rBUILT A CRUDE BARRICADE UPSTAIRS TO HOLD THEM OFF TONIGHT, SHOULD DO THE TRICK. DON'T HAVE MUCH TIME OR ENERGY TO BUILD ANYTHING SUBSTANTIAL.\r\rBEST BET IS TO FIND WHAT I CAN AND KEEP MOVING TOWARDS UNION CITY.";
location.whistlersGrove.destinations = ["glenDale", "claysBurg", "aspenWood"];
location.whistlersGrove.weaponsBuildings = [{ref:"weaponsPlace0", name:"HALL", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace1", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace2", name:"BIG HOUSE", searchTime:5, hasItem:"empty"}, {ref:"weaponsPlace3", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace4", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace5", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace6", name:"HOUSE", searchTime:4, hasItem:"empty"}];
location.whistlersGrove.weapons = ["shotgun", "compoundBow", "empty", "empty", "empty", "empty", "empty"];
location.whistlersGrove.survivorsBuildings = [{ref:"survivorsPlace0", name:"RUNDOWN HOUSE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace1", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace2", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace3", name:"MEDICAL CENTRE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace4", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace5", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace6", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace7", name:"HOUSE", searchTime:3, hasItem:"empty"}];
location.whistlersGrove.survivors = ["survivor", "supplies", "gasCylinder", "bearTrap", "empty", "survivor", "supplies2", "empty"];
location.whistlersGrove.suppliesBuildings = [{ref:"suppliesPlace0", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"suppliesPlace1", name:"CORNER STORE", searchTime:3, hasItem:"empty"}];
location.whistlersGrove.supplies = ["supplies", "supplies"];
location.whistlersGrove.maxWallHealth = 6000;
location.whistlersGrove.zombieThreat = 6;
location.whistlersGrove.commonZombieChance = 80;
location.whistlersGrove.semiRareZombieChance = 30;
location.whistlersGrove.rareZombieChance = 15;
location.whistlersGrove.veryRareZombieChance = 5;
location.whistlersGrove.armedZombieChance = 25;
location.whistlersGrove.levelTime = 35;
location.whistlersGrove.gunLevel = 0.75;
location.whistlersGrove.supplyLevel = 1;
location.whistlersGrove.survivorLevel = 0.75;
location.whistlersGrove.numSpawnZones = 1;
location.whistlersGrove.spawnZone0_min = 160;
location.whistlersGrove.spawnZone0_max = 215;
location.whistlersGrove.brightnessLevelZombies = 40;
location.whistlersGrove.brightnessLevelHero = 50;
location.whistlersGrove.travelledTo = false;
location.claysBurg = new Object();
location.claysBurg.ref = "claysBurg";
location.claysBurg.name = "CLAYSBURG";
location.claysBurg.description = "Larger rural centre, large industry.";
location.claysBurg.population = "60,044";
location.claysBurg.destinations = ["glenDale", "whistlersGrove", "aspenWood"];
location.claysBurg.weaponsBuildings = [{ref:"weaponsPlace0", name:"GAS STATION", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace1", name:"7/11", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace2", name:"POLICE STATION", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace3", name:"HOUSE", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace4", name:"GUN STORE", searchTime:4, hasItem:"empty"}];
location.claysBurg.journalHeading = "HOLY GROUND";
location.claysBurg.journalText = "HAH! DON'T THINK IT'LL MAKE A DIFFERENCE TO THEM, THE BASTARDS, THE PEWS MAKE A FAIRLY DECENT BARRICADE THOUGH.\r\rA LOT OF STORES AROUND HERE, HOPEFULLY I CAN DIG UP SOME SUPPLIES.\r\rNOTE: I'VE SEEN A NUMBER OF THEM CARRYING WEAPONS, COULD GET NASTY.";
location.claysBurg.weapons = ["empty", "UMP", "empty", "empty", "UZI"];
location.claysBurg.survivorsBuildings = [{ref:"survivorsPlace0", name:"DEPT.STORE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace1", name:"DRESS SHOP", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace2", name:"SHOE SHOP", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace3", name:"HANDBAGS", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace4", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace5", name:"APARTMENT", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace6", name:"OFFICE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace7", name:"APARTMENTS", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace8", name:"LARGE STORE", searchTime:5, hasItem:"empty"}, {ref:"survivorsPlace9", name:"APARTMENT", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace10", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace11", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace12", name:"WAREHOUSE", searchTime:5, hasItem:"empty"}];
location.claysBurg.survivors = ["survivor", "supplies", "empty", "supplies2", "survivor", "bearTrap", "empty", "gasCylinder", "empty", "bearTrap", "empty", "survivor", "empty"];
location.claysBurg.suppliesBuildings = [{ref:"suppliesPlace0", name:"BLANK", searchTime:4, hasItem:"empty"}, {ref:"suppliesPlace1", name:"BLANK", searchTime:4, hasItem:"empty"}];
location.claysBurg.supplies = ["supplies", "empty"];
location.claysBurg.maxWallHealth = 5500;
location.claysBurg.zombieThreat = 6;
location.claysBurg.commonZombieChance = 80;
location.claysBurg.semiRareZombieChance = 35;
location.claysBurg.rareZombieChance = 10;
location.claysBurg.veryRareZombieChance = 4;
location.claysBurg.armedZombieChance = 20;
location.claysBurg.levelTime = 40;
location.claysBurg.gunLevel = 1.25;
location.claysBurg.supplyLevel = 1.5;
location.claysBurg.survivorLevel = 0.5;
location.claysBurg.numSpawnZones = 1;
location.claysBurg.spawnZone0_min = 120;
location.claysBurg.spawnZone0_max = 300;
location.claysBurg.brightnessLevelZombies = 50;
location.claysBurg.brightnessLevelHero = 55;
location.claysBurg.travelledTo = false;
location.aspenWood = new Object();
location.aspenWood.ref = "aspenWood";
location.aspenWood.name = "ASPENWOOD";
location.aspenWood.description = "Farmland on the outskirts of Jonestown.";
location.aspenWood.population = "1040";
location.aspenWood.destinations = ["jonesTown", "whistlersGrove", "claysBurg"];
location.aspenWood.journalHeading = "MIDDLE OF NOWHERE";
location.aspenWood.journalText = "HAVEN'T HEARD ANYTHING MORE ON THE RADIO ABOUT THE EVACUATION, CAN ONLY HOPE THEY STICK TO THEIR TIMEFRAME.\r\rDON'T LIKE MY CHANCES OF FINDING MUCH HERE, BEST TO GET WHAT I CAN AND KEEP MOVING.\r\rUNION CITY OR BUST.";
location.aspenWood.weaponsBuildings = [{ref:"weaponsPlace0", name:"GAS STATION", searchTime:5, hasItem:"empty"}, {ref:"weaponsPlace1", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace2", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"weaponsPlace3", name:"SHERRIF'S", searchTime:4, hasItem:"empty"}];
location.aspenWood.weapons = ["huntingRifle", "empty", "sawnOff", "empty"];
location.aspenWood.survivorsBuildings = [{ref:"survivorsPlace0", name:"DINER", searchTime:5, hasItem:"empty"}, {ref:"survivorsPlace1", name:"FARMHOUSE", searchTime:5, hasItem:"empty"}, {ref:"survivorsPlace2", name:"FARMHOUSE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace3", name:"FARMHOUSE", searchTime:5, hasItem:"empty"}, {ref:"survivorsPlace4", name:"OLD HOUSE", searchTime:5, hasItem:"empty"}];
location.aspenWood.survivors = ["survivors2", "supplies2", "bearTrap", "mine", "supplies2"];
location.aspenWood.suppliesBuildings = [{ref:"suppliesPlace0", name:"STORE", searchTime:4, hasItem:"empty"}, {ref:"suppliesPlace1", name:"STORE", searchTime:4, hasItem:"empty"}];
location.aspenWood.supplies = ["supplies", "supplies"];
location.aspenWood.maxWallHealth = 5000;
location.aspenWood.zombieThreat = 8;
location.aspenWood.commonZombieChance = 80;
location.aspenWood.semiRareZombieChance = 40;
location.aspenWood.rareZombieChance = 10;
location.aspenWood.veryRareZombieChance = 5;
location.aspenWood.armedZombieChance = 40;
location.aspenWood.levelTime = 45;
location.aspenWood.gunLevel = 2;
location.aspenWood.supplyLevel = 1;
location.aspenWood.survivorLevel = 1;
location.aspenWood.numSpawnZones = 1;
location.aspenWood.spawnZone0_min = 120;
location.aspenWood.spawnZone0_max = 300;
location.aspenWood.brightnessLevelZombies = 40;
location.aspenWood.brightnessLevelHero = 50;
location.aspenWood.travelledTo = false;
location.jonesTown = new Object();
location.jonesTown.ref = "jonesTown";
location.jonesTown.name = "JONESTOWN";
location.jonesTown.description = "There's something about this place.";
location.jonesTown.population = "100,027";
location.jonesTown.journalHeading = "LAST STOP";
location.jonesTown.journalText = "UNION CITY IS ONLY A FEW DAYS FROM HERE, BETTER HURRY. MISS THAT BOAT AND I GET THE FEELING IT'S ALL OVER.";
location.jonesTown.destinations = ["unionCity", "aspenWood", "armyBase"];
location.jonesTown.weaponsBuildings = [{ref:"weaponsPlace0", name:"APARTMENT", searchTime:2, hasItem:"empty"}, {ref:"weaponsPlace1", name:"SECURITY CO.", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace2", name:"STORE", searchTime:5, hasItem:"empty"}, {ref:"weaponsPlace3", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace4", name:"POLICE", searchTime:3, hasItem:"empty"}];
location.jonesTown.weapons = ["grenade", "AK47", "M4A1", "empty", "empty"];
location.jonesTown.survivorsBuildings = [{ref:"survivorsPlace0", name:"APARTMENT", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace1", name:"APARTMENT", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace2", name:"APARTMENT", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace3", name:"APARTMENT", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace4", name:"APARTMENT", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace5", name:"APARTMENT", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace6", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace7", name:"APARTMENT", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace8", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace9", name:"APARTMENT", searchTime:3, hasItem:"empty"}];
location.jonesTown.survivors = ["survivor", "supplies2", "survivor", "mine", "empty", "empty", "gasCylinder", "empty", "bearTrap", "empty"];
location.jonesTown.suppliesBuildings = [{ref:"suppliesPlace0", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"suppliesPlace1", name:"CAMPING STORE", searchTime:3, hasItem:"empty"}];
location.jonesTown.supplies = ["supplies", "supplies"];
location.jonesTown.maxWallHealth = 5000;
location.jonesTown.zombieThreat = 8;
location.jonesTown.commonZombieChance = 80;
location.jonesTown.semiRareZombieChance = 60;
location.jonesTown.rareZombieChance = 15;
location.jonesTown.veryRareZombieChance = 10;
location.jonesTown.armedZombieChance = 50;
location.jonesTown.levelTime = 50;
location.jonesTown.gunLevel = 1.25;
location.jonesTown.supplyLevel = 1.5;
location.jonesTown.survivorLevel = 0.5;
location.jonesTown.numSpawnZones = 1;
location.jonesTown.spawnZone0_min = 120;
location.jonesTown.spawnZone0_max = 300;
location.jonesTown.brightnessLevelZombies = 50;
location.jonesTown.brightnessLevelHero = 50;
location.jonesTown.travelledTo = false;
location.unionCity = new Object();
location.unionCity.ref = "unionCity";
location.unionCity.name = "UNION CITY";
location.unionCity.description = "The population is huge here, makes it dangerous.";
location.unionCity.population = "350,148";
location.unionCity.destinations = ["jonesTown"];
location.unionCity.weaponsBuildings = [{ref:"weaponsPlace0", name:"WEAPON STORAGE", searchTime:2, hasItem:"empty"}, {ref:"weaponsPlace1", name:"POLICE STATION", searchTime:3, hasItem:"empty"}, {ref:"weaponsPlace2", name:"GUN SHOP", searchTime:5, hasItem:"empty"}];
location.unionCity.weapons = ["revolver", "empty", "empty"];
location.unionCity.survivorsBuildings = [{ref:"survivorsPlace0", name:"MEDICAL CLINIC", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace1", name:"HOUSE", searchTime:4, hasItem:"empty"}, {ref:"survivorsPlace2", name:"TOWN HALL", searchTime:3, hasItem:"empty"}, {ref:"survivorsPlace3", name:"HOUSE", searchTime:3, hasItem:"empty"}];
location.unionCity.survivors = ["survivor", "supplies", "mine", "mine"];
location.unionCity.suppliesBuildings = [{ref:"suppliesPlace0", name:"STORE", searchTime:3, hasItem:"empty"}, {ref:"suppliesPlace1", name:"SMALL STORE", searchTime:3, hasItem:"empty"}];
location.unionCity.supplies = ["supplies", "supplies"];
location.unionCity.maxWallHealth = 3000;
location.unionCity.zombieThreat = 20;
location.unionCity.commonZombieChance = 80;
location.unionCity.semiRareZombieChance = 60;
location.unionCity.rareZombieChance = 50;
location.unionCity.veryRareZombieChance = 20;
location.unionCity.armedZombieChance = 80;
location.unionCity.levelTime = 60;
location.unionCity.numSpawnZones = 1;
location.unionCity.spawnZone0_min = 120;
location.unionCity.spawnZone0_max = 300;
location.unionCity.brightnessLevelZombies = 60;
location.unionCity.brightnessLevelHero = 70;
location.unionCity.travelledTo = false;
var travelTime = 0;
var daysAtCurrentLocation = 0;
var currentTownLocation = "armyBase";
var currentTownTarget = "";
var validTravelDestination = false;
var validTownRollOver = false;
var canTravel = false;
var travelMapOpen = false;
var travelledLocations = new Array();
var townNameOverlays = 0;
var endingGame = false;
var tempFoundSurvivors = 0;
var tempFoundSupplies = 0;
var searchWeaponsFound = new Array();
var allWeaponsFound = new Array();
var survivors = 0;
var maxSurvivorsOnScreen = 5;
var survivorDepthCount = 350;
var survivorOnScreenCount = 0;
var survivorInc = 0;
var currentSurvivorBurstModeCount = 0;
var findTargetTimerMax = 100;
var findTargetTimer = findTargetTimerMax;
var survivorsOnScreen = new Array();
var friendliesOnScreen = new Array();
var survivorSlot = new Array();
var tempWeaponPower = new Array();
var survivorSection_1 = new Object();
survivorSection_1.name = "section1";
survivorSection_1.startY = 0;
survivorSection_1.endY = 230;
survivorSection_1.startX = 50;
survivorSection_1.occupied = false;
var survivorSection_2 = new Object();
survivorSection_2.name = "section2";
survivorSection_2.startY = 0;
survivorSection_2.endY = 0;
survivorSection_2.startX = 0;
survivorSection_2.occupied = false;
var survivorSection_3 = new Object();
survivorSection_3.name = "section3";
survivorSection_3.startY = 210;
survivorSection_3.endY = 420;
survivorSection_3.startX = 50;
survivorSection_3.occupied = false;
survivorTorsoColours = new Array("0x53552F", "0x993333", "0x333333", "0x996600", "0x888888", "0x4E462C", "0x3A4958", "0x3E373A", "0xB2987F", "0x222222", "0xcccccc", "0x451616", "0x571542", "0x6A6846");
survivorLegColours = new Array("0x333333", "0x182746", "0x333300", "0x111111");
var bgMusicPlaying = false;
location.glenDale.musicTrack = "track1";
location.claysBurg.musicTrack = "track2";
location.whistlersGrove.musicTrack = "track3";
location.aspenWood.musicTrack = "track4";
location.jonesTown.musicTrack = "track5";
location.unionCity.musicTrack = "track6";
function showCrosshairs() {
_root.aimer.gotoAndStop("crosshair");
Mouse.hide();
}
function hideCrosshairs() {
_root.aimer.gotoAndStop("cursor");
Mouse.show();
}
stop();
fscommand ("allowscale", false);
stopChainsawIdle();
if (firstLoad == true) {
firstLoad = false;
preLoaderCombo.alphaTo(0, 2, "easeOutSine");
} else {
preLoaderCombo._visible = false;
}
if (mouseInitialised == "notyet") {
_root.attachMovie("aimingReticle", "aimer", 900300);
aimer.startDrag("true");
Mouse.hide();
hideCrosshairs();
mouseInitialised = "soup";
}
hideCrosshairs();
Key.removeListener(keyListener);
function loadCredits() {
mainMenu.credits.creditsButton._visible = true;
mainMenu.credits.creditList._alpha = 0;
mainMenu.credits.creditList._visible = true;
mainMenu.credits._alpha = 0;
mainMenu.credits._visible = true;
mainMenu.credits.alphaTo(100, 2, "easeInSine");
mainMenu.credits.creditList.alphaTo(100, 3, "easeOutSine", 2, hideMenuAnims);
mainMenu.credits.creditList.ySlideTo(-1500, 45, "easeOutSine", 2);
mainMenu.credits.creditList.alphaTo(0, 3, "easeOutSine", 24);
mainMenu.credits.alphaTo(100, 0, "easeOutSine", 27, closeCredits);
}
function hideMenuAnims() {
mainMenu.mainButtons._visible = false;
mainMenu.bloodSplatter._visible = false;
}
function closeCredits() {
mainMenu.credits.creditsButton._visible = false;
mainMenu.mainButtons._visible = true;
mainMenu.bloodSplatter._visible = true;
mainMenu.credits.alphaTo(0, 3, "easeOutSine", 0, function () {
this._visible = false;
});
mainMenu.credits.creditList.ySlideTo(890, 0, "easeOutSine", 0);
}
function optionsButtons(butName) {
_root.optionsMenu[butName].butLabel.text = butName;
switch (butName) {
case "QUALITY" :
_root.optionsMenu[butName].onRelease = function () {
_root.setCurrentQuality();
_root.toggleQuality();
};
_root.optionsMenu[butName].onRollOver = function () {
_root.setCurrentQuality();
_root.optionsMenu.submenu_Quality.alphaTo(100, 0.5, "easeOutSine");
};
_root.optionsMenu[butName].onRollOut = (_root.optionsMenu[butName].onDragOut = function () {
_root.optionsMenu.submenu_Quality.alphaTo(0, 0.5, "easeOutSine");
});
break;
case "MUSIC" :
_root.optionsMenu[butName].onRollOver = function () {
_root.optionsMenu.submenu_Music.alphaTo(100, 0.5, "easeOutSine");
};
_root.optionsMenu[butName].onRollOut = (_root.optionsMenu[butName].onDragOut = function () {
_root.optionsMenu.submenu_Music.alphaTo(0, 0.5, "easeOutSine");
});
_root.optionsMenu[butName].onRelease = function () {
_root.toggleMusic();
};
break;
case "MAIN MENU" :
_root.optionsMenu[butName].onRelease = function () {
_root.mainChar.removeMovieClip();
_root.hud.removeMovieClip();
cleanUpScreen();
cleanUpSurvivors();
removeSurvivors();
loadOptions();
delete game.onEnterFrame;
gotoAndStop ("main");
delete this.onRelease;
};
break;
case "RESUME" :
_root.optionsMenu[butName].onRelease = function () {
loadOptions();
};
break;
}
}
function loadOptions() {
if ((optionsLoaded == false) && (timeManagerOpen == false)) {
hideWholeMenu();
pauseGame();
hideCrosshairs();
bgMusic.volumeTo(10, 3, "easeOutSine");
_root.attachMovie("optionsMenu", "optionsMenu", 891039);
optionsMenu._alpha = 0;
optionsMenu.alphaTo(100, 1, "easeOutSine");
optionsLoaded = true;
} else if (timeManagerOpen == false) {
loadWholeMenuNow();
pauseGame();
showCrosshairs();
bgMusic.volumeTo(20, 3, "easeOutSine");
optionsMenu.alphaTo(0, 0.5, "easeOutSine", null, removeOptions);
optionsLoaded = false;
}
}
function removeOptions() {
showCrosshairs();
optionsMenu.removeMovieClip();
}
function setCurrentQuality() {
_root.optionsMenu.submenu_Quality.currentQuality.text = _root._quality;
}
function toggleQuality() {
switch (_root._quality) {
case "HIGH" :
_root._quality = "medium";
setCurrentQuality();
break;
case "MEDIUM" :
_root._quality = "low";
setCurrentQuality();
break;
case "LOW" :
_root._quality = "high";
setCurrentQuality();
break;
default :
setCurrentQuality();
}
}
function toggleMusic() {
if (musicIsPlaying) {
bgMusic.stop();
musicIsPlaying = false;
_root.optionsMenu.submenu_Music.gotoAndStop("off");
} else {
musicIsPlaying = true;
bgMusic = new Sound(musicAmbience);
bgMusic.attachSound("inGameMusic");
bgMusic.setVolume(0);
bgMusic.start(0, 999999);
bgMusic.volumeTo(20, 8);
_root.optionsMenu.submenu_Music.gotoAndStop("on");
}
}
timeManagerOpen = false;
optionsLoaded = false;
function unhideAllMenu() {
mainMenu.dawn._visible = true;
mainMenu.bgLawn._visible = true;
mainMenu.noise._visible = true;
}
function loadWholeMenuNow() {
_root.alphaTo(100, 1);
mainMenuLoadedOnce = true;
mainMenu.dawn._visible = true;
mainMenu.bgLawn._visible = true;
mainMenu.skipButton.alphaTo(0, 2, "easeOutSine", null, disableSkipButton);
mainMenu.conArtistsLogo.stop();
mainMenu.conArtistsLogo.alphaTo(0, 0, "easeOutSine");
mainMenu.dawn.alphaTo(100, 5, "easeOutSine");
mainMenu.logo.stopTween();
mainMenu.logo.alphaTo(0, 1, "easeOutSine");
mainMenu.gameTitle.blurTo(2, 2, 3, "easeOutSine");
mainMenu.gameTitle.alphaTo(100, 2, "easeOutSine", null, playSplatter);
mainMenu.mainMenuButtons.alphaTo(100, 2);
}
function enableSkipButton() {
unhideAllMenu();
mainMenu.skipButton._alpha = 0;
mainMenu.skipButton._visible = true;
mainMenu.skipButton.alphaTo(100, 1);
}
function disableSkipButton() {
mainMenu.skipButton._visible = false;
}
function hideWholeMenu() {
mainMenu.gameTitle.stopTween();
mainMenu.gameTitle.blurTo(2, 2, 3, "easeOutSine");
mainMenu.gameTitle.alphaTo(0, 2, "easeOutSine");
mainMenu.mainMenuButtons.alphaTo(0, 2);
}
function playSplatter() {
mainMenu.mainMenuButtons._visible = true;
mainMenu.bloodSplatter.play();
mainMenu.noise.play();
}
function mainButtons(butName) {
_root.mainMenu.mainButtons._visible = false;
_root.mainMenu.mainMenuButtons._alpha = 0;
_root.mainMenu.mainMenuButtons.alphaTo(100, 2, "easeOutSine", 18, playSplatter);
currentX = _root.mainMenu[butName]._x;
currentY = _root.mainMenu[butName]._y;
_root.mainMenu.mainMenuButtons[butName].butLabel.text = butName;
if (butName == "PLAYTLS1") {
_root.mainMenu.mainMenuButtons[butName].butLabel.text = "PLAY THE LAST STAND - PART 1";
}
if (butName == "PLAY MORE GAMES") {
_root.mainMenu.mainMenuButtons[butName].butLabel.text = "PLAY MORE ZOMBIE GAMES";
}
_root.mainMenu.mainMenuButtons[butName].blurTo(3, 2, 0.1, "easeOutSine");
_root.mainMenu.mainMenuButtons[butName].onRollOver = function () {
this.blurTo(1, 2, 0.8, "easeOutSine");
};
_root.mainMenu.mainMenuButtons[butName].onRollOut = (_root.mainMenu.mainMenuButtons[butName].onDragOut = function () {
this.blurTo(3.5, 2, 2, "easeOutSine", 0.2);
});
_root.mainMenu.mainMenuButtons[butName].onRelease = function () {
switch (butName) {
case "PLAY" :
menuMusic.stop();
showCrosshairs();
_root.gotoAndStop("firstLevel");
break;
case "INSTRUCTIONS" :
showInstructions("mainMenu");
break;
case "OPTIONS" :
_root.loadOptions();
break;
case "CREDITS" :
_root.loadCredits();
break;
case "PLAY MORE GAMES" :
getURL ("http://armorgames.com/tag/zombie/", "_blank");
break;
case "PLAYTLS1" :
getURL ("http://armorgames.com/play/269/the-last-stand", "_blank");
break;
}
};
}
stop();
mainMenu.dawn._visible = false;
mainMenu.bgLawn._visible = false;
mainMenu.noise._visible = false;
menuMusic = new Sound(mainMenu);
menuMusic.attachSound("menuMusic");
menuMusic.setVolume(0);
menuMusic.start(0, 1);
menuMusic.volumeTo(80, 0.5, "easeOutSine", 13);
if (mainMenuLoadedOnce != true) {
_root.alphaTo(100, 1);
mainMenuLoadedOnce = true;
mainMenu.setVolume(0);
mainMenu._alpha = 0;
mainMenu.alphaTo(100, 0, "easeOutSine");
mainMenu.skipButton.alphaTo(0, 0, "easeOutSine", 15, enableSkipButton);
mainMenu.conArtistsLogo.alphaTo(0, 4, "easeOutSine", 13);
mainMenu.dawn.alphaTo(100, 30, "easeOutSine", 15);
mainMenu.gameTitle.blurTo(2, 2, 8, "easeOutSine", 15, disableSkipButton);
mainMenu.gameTitle.alphaTo(100, 2, "easeOutSine", 15, playSplatter);
mainMenu.skipButton.alphaTo(0, 2, "easeOutSine", 20);
} else {
_root.alphaTo(100, 1);
unhideAllMenu();
loadWholeMenuNow();
}
function showInstructions(loadedFrom) {
hideWholeMenu();
instructionsLoadedFrom = loadedFrom;
mainMenu.instructionsHolder.attachMovie("instructionsMenu", "instructionsMenuIn", 15000);
mainMenu.instructionsHolder._alpha = 0;
mainMenu.instructionsHolder.alphaTo(100, 1.2, "easeOutSine");
}
function loadFromInstructions() {
switch (instructionsLoadedFrom) {
case "mainMenu" :
loadWholeMenuNow();
return;
case "options" :
return;
}
}
Instance of Symbol 95 MovieClip "musicAmbience" in Frame 5
onClipEvent (load) {
_root.gameStopStart(this._name);
}
Frame 6
stop();
hideCrosshairs();
Frame 7
function setupLighting() {
for (v in friendliesOnScreen) {
friendliesOnScreen[v].ref.colorTransformTo(location[currentTownLocation].brightnessLevelHero, 0, location[currentTownLocation].brightnessLevelHero, 0, location[currentTownLocation].brightnessLevelHero, 0, 100, 0, 0);
}
}
function addHeroToSurvivorArray() {
friendliesOnScreen.push({ref:mainChar, depth:mainChar._y});
survivorOnScreenCount++;
survivors++;
}
function gameStopStart(butName) {
_root[butName].onEnterFrame = function () {
_root.turretControl();
_root.collisionTest();
_root.survivorFindTarget();
_root.survivorWeaponFire();
_root.checkHitsOnSurvivors();
_root.depthSortFriendlies();
};
}
function enemyStopStart(butName) {
_root[butName].onEnterFrame = function () {
theZombieDirector(currentZombieThreat);
};
}
function pauseGame() {
if (gamePaused == true) {
if (reloading == true) {
mainChar.mainGun.play();
}
gameStopStart("game");
enemyStopStart("makeEnemy");
fireButton("stageBG");
mainChar.onEnterFrame = moveCharacter;
gamePaused = false;
timeClock = setInterval(passingTime, 1000);
startTimer(location[currentTownLocation].levelTime);
for (v in aliveZombies) {
aliveZombies[v].ref.play();
}
} else {
if (reloading == true) {
mainChar.mainGun.stop();
}
delete game.onEnterFrame;
delete mainChar.onEnterFrame;
delete makeEnemy.onEnterFrame;
delete stageBG.onPress;
delete stageBG.onRelease;
gamePaused = true;
clearInterval(timeClock);
mainChar.legs.gotoAndStop("idle");
for (v in aliveZombies) {
aliveZombies[v].ref.stop();
}
stopFire();
}
}
function cleanUpZombies() {
for (i in deadZombies) {
deadZombies[i].ref.removeMovieClip();
deadZombies.splice(i, 1);
deadZombieCount = 0;
}
for (o in enemyOnScreen) {
enemyOnScreen[o].ref.removeMovieClip();
enemyOnScreen.splice(o, 1);
}
for (p in aliveZombies) {
aliveZombies[p].ref.removeMovieClip();
aliveZombies.splice(p, 1);
}
}
function cleanUpScreen() {
_root.stopMusic();
cleanUpSurvivors();
removeMapOverlay();
for (p in enemyOnScreen) {
enemyOnScreen[p].ref.removeMovieClip();
enemyOnScreen.splice(p, 1);
}
for (i in deadZombies) {
deadZombies[i].ref.removeMovieClip();
deadZombies.splice(i, 1);
deadZombieCount = 0;
}
for (e in roundsOnScreen) {
roundsOnScreen[e].ref.removeMovieClip();
roundsOnScreen.splice(e, 1);
}
for (p in aliveZombies) {
aliveZombies[p].ref.removeMovieClip();
aliveZombies.splice(p, 1);
}
}
function startNextLevel() {
removeMovieClip(_root.timeManager);
_root.mainBlackOut._visible = true;
_root.mainBlackOut.alphaTo(100, 0);
_root.mainBlackOut.alphaTo(0, 2, "easeOutSine", 0.1, hideBlackOut);
timeManagerOpen = false;
currentLevel = "day_" + _root.levelUp;
zombiesKilled = 0;
zombiesCreated = 0;
bullet = 0;
x = 0;
resetSunRise();
fillWeaponMagazines();
pauseGame();
timeClock = setInterval(passingTime, 700);
mainChar.gotoAndStop("alive");
startTimer(location[currentTownLocation].levelTime);
setupLighting();
if (_root[currentWeapon].name == "chainsaw") {
chainsawSound = new Sound(stageBG);
chainsawSound.attachSound("sound_chainsawIdle");
chainsawSound.setVolume(100);
chainsawSound.start(0, 999);
} else {
chainsawSound.stop("sound_chainsawIdle");
}
}
function playChainsawIdle() {
chainsawSound = new Sound(stageBG);
chainsawSound.attachSound("sound_chainsawIdle");
chainsawSound.setVolume(100);
chainsawSound.start(0, 999);
}
function playChainsawPullSound() {
chainsawPullSound = new Sound(stageBg);
chainsawPullSound.attachSound("sound_chainsawPull");
chainsawPullSound.volumeTo(100);
chainsawPullSound.start(0, 1);
}
function playChainsawOffSound() {
chainsawPullSound = new Sound(stageBg);
chainsawPullSound.attachSound("sound_chainsawOff");
chainsawPullSound.volumeTo(100);
chainsawPullSound.start(0, 1);
}
function fireButton(butName) {
_root[butName].onPress = function () {
_root.fire();
};
_root[butName].onRelease = function () {
_root.stopFire();
};
}
function swapWeapon(weaponName) {
currentWeapon = weaponName;
mainGunRef.gotoAndStop(weaponName);
if (_root[currentWeapon].name != "chainsaw") {
chainsawSound.stop("sound_chainsawIdle");
}
}
function stopChainsawIdle() {
chainsawSound.stop("sound_chainsawWorking");
chainsawSound.stop("sound_chainsawIdle");
}
function fire() {
if (((ammoInMag > 0) && (reloading == false)) && (pumping == false)) {
if ((_root[currentWeapon].fireMode == "auto") && (firing == false)) {
firing = true;
attachRound("hero");
automaticFire = setInterval(attachRound, _root[currentWeapon].weaponRPM, "hero");
if (_root[currentWeapon].name == "chainsaw") {
chainsawSound = new Sound(stageBG);
chainsawSound.attachSound("sound_chainsawWorking");
chainsawSound.setVolume(20);
chainsawSound.start(0, 999);
}
} else {
if ((_root[currentWeapon].fireMode == "thrown") && (reloading == false)) {
throwingAWeapon = true;
chargingThrow = setInterval(chargeThrow, 20);
} else {
firing = true;
attachRound("hero");
}
if (_root[currentWeapon].pumpWeapon == true) {
pumpWeapon();
}
}
mainGunRef.muzzleFlash.play();
} else if (((reloading == false) && (ammoInMag <= 0)) && (_root[currentWeapon].fireMode != "auto")) {
reloadWeapon();
} else if ((((_root[currentWeapon].name == "shotgun") && (reloading)) && (!interruptingReload)) && (ammoInMag >= 1)) {
interruptingReload = true;
reloadAnimPlaying = false;
bringBackWeapon = setInterval(raiseWeapon, 800);
mainGunRef.gotoAndPlay("shogtun_bringUpWeapon");
}
}
function stopFire() {
if ((_root[currentWeapon].fireMode == "thrown") && (throwingAWeapon == true)) {
throwingAWeapon = false;
thrownWeapon();
}
firing = false;
mainGunRef.muzzleFlash.gotoAndStop("off");
if (_root[currentWeapon].name == "flameThrower") {
mainGunRef.muzzleFlash.gotoAndPlay("off");
}
clearInterval(automaticFire);
if (_root[currentWeapon].name == "chainsaw") {
chainsawSound.stop("sound_chainsawWorking");
chainsawSound = new Sound(stageBG);
chainsawSound.attachSound("sound_chainsawEnd");
chainsawSound.setVolume(60);
chainsawSound.start(0, 1);
}
}
function reloadWeapon() {
_root[currentWeapon].recoiling = false;
stopFire();
clearInterval(reloadinTime);
if (_root[currentWeapon].name == "shotgun") {
shellsToLoad = shotgun.magazineCapacity - ammoInMag;
totalReloadTime = (_root[currentWeapon].reloadTime * shellsToLoad) + 800;
reloading = true;
pumping = false;
mainGunRef.gotoAndPlay(_root[currentWeapon].name + "_Reloading");
clearInterval(pumpTime);
} else {
clearInterval(pumpTime);
reloading = true;
playReloadSound();
mainGunRef.gotoAndPlay(_root[currentWeapon].name + "_Reloading");
reloadAnimPlaying = true;
}
}
function reloadEmptyWeapon() {
if (((_root[currentWeapon].reloadType == "auto") && (ammoInMag <= 0)) && (!autoReloading)) {
autoReloading = true;
reloadWeapon();
}
}
function playReloadSound() {
reloadingSound = new Sound(stageBG);
reloadingSound.attachSound(("sound_" + _root[currentWeapon].name) + "Reload");
reloadingSound.setVolume(100);
reloadingSound.start(0, 1);
}
function reloadMagazine() {
autoReloading = false;
reloading = false;
pumping = false;
ammoInMag = ammoInMag;
if (_root[currentWeapon].name != "shotgun") {
ammoInMag = _root[currentWeapon].magazineCapacity;
}
clearInterval(reloadinTime);
clearInterval(pumpTime);
}
function pumpWeapon() {
pumping = true;
reloading = false;
interruptingReload = false;
clearInterval(reloadinTime);
mainGunRef.gotoAndPlay(_root[currentWeapon].name + "_Pumping");
pumpTime = setInterval(pumpedWeapon, _root[currentWeapon].pumpTime);
}
function pumpedWeapon() {
pumping = false;
reloading = false;
clearInterval(pumpTime);
clearInterval(reloadinTime);
}
function raiseWeapon() {
reloading = false;
autoReloading = false;
pumping = false;
interruptingReload = false;
clearInterval(pumpTime);
clearInterval(reloadinTime);
clearInterval(bringBackWeapon);
}
function pumpWeaponSound() {
pumpSound = new Sound(stageBG);
pumpSound.attachSound(("sound_" + _root[currentWeapon].name) + "Pump");
pumpSound.setVolume(100);
pumpSound.start(0, 1);
}
function shellReloadSound() {
shellSound = new Sound(stageBG);
shellSound.attachSound(("sound_" + _root[currentWeapon].name) + "ShellReload");
shellSound.setVolume(100);
shellSound.start(0, 1);
}
function bowReloadSound() {
shellSound = new Sound(stageBG);
shellSound.attachSound("sound_bowDraw");
shellSound.setVolume(100);
shellSound.start(0, 1);
}
function attachRound(ownerName) {
bullet++;
ammoInMag--;
if (ammoInMag <= 0) {
stopFire();
}
if (((_root[currentWeapon].recoilAnimated == true) && (_root[currentWeapon].recoiling == false)) && (!reloading)) {
_root[currentWeapon].recoiling = true;
mainGunRef.gotoAndPlay(_root[currentWeapon].name + "_Recoil");
}
firing = true;
firingSound = new Sound(stageBG);
firingSound.attachSound(("sound_" + _root[currentWeapon].name) + "Fire");
firingSound.setVolume(100);
firingSound.start(0, 1);
var _local3 = new Object();
_local3.x = mainGunRef.barrelEnd._x;
_local3.y = mainGunRef.barrelEnd._y;
mainGunRef.localToGlobal(_local3);
if (_root[currentWeapon].shotsPerRound > 1) {
bullet++;
shellCasing = random(4) + 1;
if (_root[currentWeapon].name == "shotgun") {
mainGunRef.ejectionPort.attachMovie("shellcasing_Shotgun" + shellCasing, "casing" + bullet, bullet + 98);
} else {
mainGunRef.ejectionPort.attachMovie("shellcasing_noPumpShotgun" + shellCasing, "casing" + bullet, bullet + 98);
}
roundsToFire = _root[currentWeapon].shotsPerRound;
while (roundsToFire > -1) {
bullet++;
var round = _root.attachMovie("round", "round" + bullet, bullet + 350000);
if (_root[currentWeapon].showTracers == true) {
randomlyShowATracer = random(2) + 1;
if (randomlyShowATracer > 1) {
round.gotoAndPlay("on");
} else {
round.gotoAndStop("off");
}
} else {
round.gotoAndStop("off");
}
round._x = _local3.x - random(50);
round._y = _local3.y;
round.angle = currentAngle - random(_root[currentWeapon].accuracy);
round._rotation = round.angle;
round.onEnterFrame = function () {
this.x = Math.cos((this.angle * Math.PI) / 180) * _root[currentWeapon].roundSpeed;
this.y = Math.sin((this.angle * Math.PI) / 180) * _root[currentWeapon].roundSpeed;
this._x = this._x - this.x;
this._y = this._y - this.y;
};
roundsOnScreen.push({ref:_root["round" + bullet], damage:_root[currentWeapon].damage, headShotDamage:_root[currentWeapon].headShotDamage, owner:ownerName});
roundsToFire--;
}
} else {
if (_root[currentWeapon].casingEject == true) {
shellCasing = random(3) + 1;
mainGunRef.ejectionPort.attachMovie((("shellcasing_" + _root[currentWeapon].weaponGroup) + "_") + shellCasing, "casing" + bullet, bullet + 98);
}
if ((_root[currentWeapon].name == "flameThrower") && (ownerName == "hero")) {
var _local5 = _root.attachMovie("flameParticle", "flame" + bullet, bullet + 320000);
_local5._x = _local3.x;
_local5._y = _local3.y;
_local5._xscale = (_local5._yscale = random(40) + 65);
_local5._rotation = _local5._rotation + (random(10) - 5);
roundsOnScreen.push({ref:_root["flame" + bullet], penetrateCount:0, damage:_root[currentWeapon].damage, headShotDamage:_root[currentWeapon].headShotDamage, owner:ownerName, range:_root[currentWeapon].range, type:_root[currentWeapon].type, originX:_local3.x, originY:_local3.y, proximity:0});
} else {
var round = _root.attachMovie("round", "round" + bullet, bullet + 350000);
}
if ((_root[currentWeapon].showTracers == true) && (ownerName == "hero")) {
if (_root[currentWeapon].name == "RPG") {
round.gotoAndPlay("RPG");
} else if (_root[currentWeapon].name == "compoundBow") {
round.gotoAndPlay("compoundBow");
} else {
randomlyShowATracer = random(2) + 1;
if (randomlyShowATracer > 1) {
round.gotoAndPlay("on");
} else {
round.gotoAndStop("off");
}
}
} else {
round.gotoAndStop("off");
}
round._x = _local3.x;
round._y = _local3.y;
round.angle = currentAngle - random(_root[currentWeapon].accuracy);
round._rotation = round.angle;
round.onEnterFrame = function () {
var _local4 = Math.cos((round.angle * Math.PI) / 180) * _root[currentWeapon].roundSpeed;
var _local3 = Math.sin((round.angle * Math.PI) / 180) * _root[currentWeapon].roundSpeed;
this._x = this._x - _local4;
this._y = this._y - _local3;
};
roundsOnScreen.push({ref:_root["round" + bullet], penetrateCount:0, damage:_root[currentWeapon].damage, headShotDamage:_root[currentWeapon].headShotDamage, owner:ownerName, range:_root[currentWeapon].range, type:_root[currentWeapon].type, originX:_local3.x, originY:_local3.y, proximity:0});
}
}
function sortZombieDepths() {
var _local2 = new Array();
for (var _local1 in enemyOnScreen) {
if (enemyOnScreen[_local1].ref != null) {
enemyOnScreen[_local1].depth = enemyOnScreen[_local1].ref._y + 71651;
_local2.push(enemyOnScreen[_local1]);
}
}
_local2.sortOn("depth", Array.NUMERIC, Array.DESCENDING);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].ref.swapDepths(_local1 + 71651);
_local1++;
}
}
function sortDeadCats() {
var _local2 = new Array();
for (var _local1 in deadZombies) {
if (deadZombies[_local1].ref != null) {
deadZombies[_local1].ref.depth = deadZombies[_local1].ref._y + 2124;
_local2.push(deadZombies[_local1]);
}
}
_local2.sortOn("depth", Array.NUMERIC);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].ref.swapDepths(_local1 + 2124);
_local1++;
}
}
function collisionTest() {
reloadEmptyWeapon();
sortZombieDepths();
hud.ammoCountHud.debug_ammoCount.text = ammoInMag;
hud.dayNumber.text = "NIGHT " + levelUp;
deathToll.text = zombiesKilled;
hud.wallHealthIndicator.wallhealth.text = Math.round(wall.health / 100);
zombieProximityCheck();
zombieProximitySort();
for (i in roundsOnScreen) {
if (((roundsOnScreen[i].ref._x < -150) || (roundsOnScreen[i].ref._x > 900)) || (roundsOnScreen[i].ref._y < -50)) {
roundsOnScreen[i].ref.removeMovieClip();
roundsOnScreen.splice(i, 1);
}
if ((roundsOnScreen[i].type == "frag") || (roundsOnScreen[i].type == "melee")) {
currentRoundProx = Math.round(Math.sqrt(((roundsOnScreen[i].originX - roundsOnScreen[i].ref._x) * (roundsOnScreen[i].originX - roundsOnScreen[i].ref._x)) + ((roundsOnScreen[i].originY - roundsOnScreen[i].ref._y) * (roundsOnScreen[i].originY - roundsOnScreen[i].ref._y))));
if (currentRoundProx >= roundsOnScreen[i].range) {
roundsOnScreen[i].ref.removeMovieClip();
roundsOnScreen.splice(i, 1);
}
}
}
for (j in aliveZombies) {
if ((aliveZombies[j].ref == null) || (aliveZombies[j].ref == undefined)) {
aliveZombies.splice(j, 1);
}
enemyOnScreen[j].ref.zombieHealth.text = enemyOnScreen[j].health;
enemyOnScreen[j].ref.zombieDead.text = enemyOnScreen[j].dead;
if (aliveZombies[j].dead == false) {
for (t in activeTraps) {
if (activeTraps[t].ref.collisionFeet.hitTest(aliveZombies[j].ref.collisionFeet)) {
if (activeTraps[t].type == "bearTrap") {
aliveZombies[j].trapped = true;
bearTrapCloseSound = new Sound(stageBG);
bearTrapCloseSound.attachSound("sound_trapShut");
bearTrapCloseSound.setVolume(100);
bearTrapCloseSound.start(0, 1);
zombieTrapScream = new Sound(stageBG);
zombieTrapScream.attachSound("sound_zombieFast");
zombieTrapScream.setVolume(100);
zombieTrapScream.start(0, 1);
activeTraps[t].ref.gotoAndStop("snap");
aliveZombies[j].ref.gotoAndPlay("trapped");
removeTrapOnMapFromExplosion(activeTraps[t].location);
activeTraps.splice(t, 1);
} else if (activeTraps[t].type == "mine") {
spawnFragments(30, activeTraps[t].ref._x, activeTraps[t].ref._y + 60, activeTraps[t].range, "frag", activeTraps[t].damage);
explosionNumber++;
_root.attachMovie("explosion_grenade", "grensplosion" + explosionNumber, explosionNumber + 88213);
_root["grensplosion" + explosionNumber]._x = activeTraps[t].ref._x;
_root["grensplosion" + explosionNumber]._y = activeTraps[t].ref._y + 60;
_root["grensplosion" + explosionNumber].play;
removeTrapOnMapFromExplosion(activeTraps[t].location);
activeTraps[t].ref.removeMovieClip();
activeTraps.splice(t, 1);
}
}
}
if (aliveZombies[j].trapped) {
aliveZombies[j].health = aliveZombies[j].health - (random(0.5) + 0.1);
if ((aliveZombies[j].health <= 0) && (aliveZombies[j].beingExploded == false)) {
deathSound = new Sound(stageBG);
deathSound.attachSound("sound_zombieDeath_" + (random(11) + 1));
deathSound.setVolume(100);
deathSound.start(0, 1);
deadZombies.push({ref:aliveZombies[j].ref});
randomDeath = random(3) + 1;
aliveZombies[j].ref.gotoAndPlay("fallBackwards" + randomDeath);
zombiesKilled++;
overallDeadZombies++;
deadZombieCount++;
currentZombieThreat = currentZombieThreat - aliveZombies[j].threat;
aliveZombies[j].dead = true;
aliveZombies.splice(j, 1);
liveZombieCount--;
}
}
if (((aliveZombies[j].ref._x > (520 + ((aliveZombies[j].ref._y * 20) / 100))) && ((!aliveZombies[j].idle) == true)) && (aliveZombies[j].dead == false)) {
aliveZombies[j].ref.gotoAndPlay("idlestop1");
aliveZombies[j].idle = true;
} else if (((aliveZombies[j].idle == true) && (!wall.destroyed)) && (aliveZombies[j].dead == false)) {
if (aliveZombies[j].ref.attackingWall == false) {
aliveZombies[j].ref.gotoAndPlay("attackWall" + random(2));
}
if (aliveZombies[j].armed) {
wall.health = wall.health - ((aliveZombies[j].damage * 1.5) * zombieDamageMultiplier);
} else {
wall.health = wall.health - (aliveZombies[j].damage * zombieDamageMultiplier);
}
checkWallStatus();
if (wall.health <= -1) {
wall.destroyed = true;
}
} else if ((((aliveZombies[j].idle == false) && (aliveZombies[j].dead == false)) && (aliveZombies[j].beingExploded == false)) && (aliveZombies[j].trapped == false)) {
aliveZombies[j].ref._x = aliveZombies[j].ref._x + aliveZombies[j].speed;
aliveZombies[j].directionCount--;
if (aliveZombies[j].directionCount < 0) {
var _local5 = "direction" + (random(3) + 1);
aliveZombies[j].directionCount = aliveZombies[j].directionCountMax;
switch (_local5) {
case "direction1" :
aliveZombies[j].currentDirection = "up";
break;
case "direction2" :
aliveZombies[j].currentDirection = "down";
break;
case "direction3" :
aliveZombies[j].currentDirection = "straight";
break;
default :
aliveZombies[j].currentDirection = "straight";
}
}
if ((aliveZombies[j].ref._y > 120) && (aliveZombies[j].ref._y < 300)) {
switch (aliveZombies[j].currentDirection) {
case "straight" :
break;
case "up" :
aliveZombies[j].ref._y = aliveZombies[j].ref._y - (aliveZombies[j].speed / 3.5);
break;
case "down" :
aliveZombies[j].ref._y = aliveZombies[j].ref._y + (aliveZombies[j].speed / 3.5);
break;
}
}
} else if ((wall.destroyed && (aliveZombies[j].idle == true)) && (aliveZombies[j].dead == false)) {
wall.health = 0;
if ((aliveZombies[j].animating == false) && (aliveZombies[j].type != "zombieDog")) {
aliveZombies[j].ref.gotoAndPlay(random(10) + 25);
aliveZombies[j].animating = true;
} else if ((aliveZombies[j].type == "zombieDog") && (aliveZombies[j].animating == false)) {
aliveZombies[j].ref.gotoAndPlay("walk1");
aliveZombies[j].animating = true;
}
if ((aliveZombies[j].ref._x <= (_root.mainChar._x + 39)) && (!aliveZombies[j].eating)) {
aliveZombies[j].ref._xscale = 100;
aliveZombies[j].ref._x = aliveZombies[j].ref._x + 1;
}
if ((aliveZombies[j].ref._x >= (_root.mainChar._x + 40)) && (!aliveZombies[j].eating)) {
aliveZombies[j].ref._xscale = -100;
aliveZombies[j].ref._x = aliveZombies[j].ref._x - 1;
}
if ((aliveZombies[j].ref._y <= (_root.mainChar._y + 40)) && (!aliveZombies[j].eating)) {
aliveZombies[j].ref._y = aliveZombies[j].ref._y + 1;
}
if ((aliveZombies[j].ref._y >= (_root.mainChar._y + 40)) && (!aliveZombies[j].eating)) {
aliveZombies[j].ref._y = aliveZombies[j].ref._y - 1;
}
if (aliveZombies[j].ref.reach.hitTest(_root.mainChar._x + 70, _root.mainChar._y + 10, true)) {
if (hero.isAlive) {
aliveZombies[j].eating = true;
_root.mainChar.gotoAndPlay("dead");
aliveZombies[j].ref.gotoAndPlay("lunge");
_root.attachMovie("gameOver", "gameOver", 993900);
if (levelUp == 1) {
gameOver.gameOverDays.gameOverDaysText.text = ("AFTER SURVIVING " + levelUp) + " DAY";
} else {
gameOver.gameOverDays.gameOverDaysText.text = ("AFTER SURVIVING " + levelUp) + " DAYS";
}
gameOver._alpha = 0;
gameOver.alphaTo(100, 8, "easeOutSine");
hideCrosshairs();
hero.isAlive = false;
delete mainChar.onEnterFrame;
delete stageBG.onPress;
delete stageBG.onRelease;
} else if (!hero.isAlive) {
aliveZombies[j].eating = true;
aliveZombies[j].ref.gotoAndPlay("bendDown");
}
}
}
}
for (k in roundsOnScreen) {
randomBloodPack = random(3) + 1;
randomBloodAnim = random(fx_totalBloodAnims) + 1;
randomBloodAnimHead = random(fx_totalBloodAnimsHead) + 1;
randomBloodAnimChainsaw = random(fx_totalBloodAnimsChainsaw) + 1;
if (roundsOnScreen[k].type == "impactExplosive") {
for (v in aliveZombies) {
if (((aliveZombies[v].ref.head.hitTest(roundsOnScreen[k].ref.collision) || (aliveZombies[v].ref.torso.hitTest(roundsOnScreen[k].ref.collision))) || (aliveZombies[v].ref.legs.hitTest(roundsOnScreen[k].ref.collision))) && (aliveZombies[v].dead == false)) {
var _local2 = new Object();
_local2.x = roundsOnScreen[k].ref.collision._x + 70;
_local2.y = roundsOnScreen[k].ref.collision._y;
roundsOnScreen[k].ref.localToGlobal(_local2);
roundsOnScreen[k].ref.removeMovieClip();
roundsOnScreen.splice(k, 1);
spawnFragments(30, _local2.x, _local2.y, _root[currentWeapon].range, "frag", _root[currentWeapon].damage);
explosionNumber++;
_root.attachMovie("explosion_grenade", "grensplosion" + explosionNumber, explosionNumber + 163040);
_root["grensplosion" + explosionNumber]._x = _local2.x;
_root["grensplosion" + explosionNumber]._y = _local2.y;
_root["grensplosion" + explosionNumber]._rotation = -90;
_root["grensplosion" + explosionNumber].play;
}
}
}
for (t in activeTraps) {
if ((activeTraps[t].ref.collision.hitTest(roundsOnScreen[k].ref.collision) && (activeTraps[t].type == "gasCylinder")) && (roundsOnScreen[k].owner == "hero")) {
spawnFragments(30, activeTraps[t].ref._x, activeTraps[t].ref._y + 60, activeTraps[t].range, "frag", activeTraps[t].damage);
explosionNumber++;
_root.attachMovie("explosion_grenade", "grensplosion" + explosionNumber, explosionNumber + 142300);
_root["grensplosion" + explosionNumber]._x = activeTraps[t].ref._x;
_root["grensplosion" + explosionNumber]._y = activeTraps[t].ref._y + 60;
_root["grensplosion" + explosionNumber].play;
removeTrapOnMapFromExplosion(activeTraps[t].location);
activeTraps[t].ref.removeMovieClip();
activeTraps.splice(t, 1);
roundsOnScreen[k].ref.removeMovieClip();
roundsOnScreen.splice(k, 1);
}
}
for (v in aliveZombies) {
if (((roundsOnScreen[k].ref._x - aliveZombies[v].ref._x) < 100) && ((roundsOnScreen[k].ref._y - aliveZombies[v].ref._y) < 100)) {
if (aliveZombies[v].ref.head.hitTest(roundsOnScreen[k].ref.collision) && (aliveZombies[v].dead == false)) {
hitHelmet = random(5);
if ((hitHelmet <= 2) && ((aliveZombies[v].type == "zombieSoldier") || (aliveZombies[v].type == "zombieSoldierSprint"))) {
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("zombie_hitBody2");
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["thudPackHead" + randomBloodPack].gotoAndPlay("base1");
roundsOnScreen[k].ref.removeMovieClip();
roundsOnScreen.splice(k, 1);
} else {
aliveZombies[v].health = aliveZombies[v].health - (roundsOnScreen[k].headShotDamage + random(3));
if (roundsOnScreen[k].owner == "hero") {
switch (_root[currentWeapon].name) {
case "chainsaw" :
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].gotoAndPlay("chainsaw" + randomBloodAnimChainsaw);
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitChainsaw" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
var _local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y + 45;
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].localToGlobal(_local3);
if (aliveZombies[v].type == "zombieDog") {
_local3.x = aliveZombies[v].ref.head._x + 5;
_local3.y = aliveZombies[v].ref.head._y + 5;
aliveZombies[v].ref.head.localToGlobal(_local3);
}
zombieChainsawBloodParticle(_local3.x, _local3.y);
break;
case "compoundBow" :
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitHead" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
aliveZombies[v].arrowsStuckHead++;
aliveZombies[v].ref.dummyHead.head.arrowPack.gotoAndStop("arrow" + aliveZombies[v].arrowsStuckHead);
_local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y + 45;
if (aliveZombies[v].type == "zombieDog") {
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y;
}
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].localToGlobal(_local3);
zombieBloodParticle(_local3.x, _local3.y);
break;
case "flameThrower" :
aliveZombies[v].burnDamageCountHead++;
if (aliveZombies[v].burnDamageCountHead > roundsBeforeBurn) {
aliveZombies[v].ref.dummyHead.head.flamepack.play();
}
break;
default :
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].gotoAndPlay("head" + randomBloodAnimHead);
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitHead1");
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
_local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y + 45;
if (aliveZombies[v].type == "zombieDog") {
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y;
}
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].localToGlobal(_local3);
zombieHeadBloodParticle(_local3.x, _local3.y);
}
} else {
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitHead" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackHead" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
}
aliveZombies[v].ref._x = aliveZombies[v].ref._x - 1;
aliveZombies[v].ref.prevFrame;
checkPenetration();
if ((aliveZombies[v].health <= 0) && (aliveZombies[v].beingExploded == false)) {
deathSound = new Sound(stageBG);
if (aliveZombies[v].type == "zombieDog") {
deathSound.attachSound("sound_dogDeath_" + (random(5) + 1));
} else {
deathSound.attachSound("sound_zombieDeath_" + (random(11) + 1));
}
deathSound.setVolume(100);
deathSound.start(0, 1);
deadZombies.push({ref:aliveZombies[v].ref});
if (_root[currentWeapon].name == "compoundBow") {
randomDeath = random(2) + 1;
} else {
randomDeath = random(3) + 1;
}
if (aliveZombies[v].ref._x > 450) {
aliveZombies[v].ref.gotoAndPlay("fallBackwards" + randomDeath);
zombiesKilled++;
overallDeadZombies++;
deadZombieCount++;
currentZombieThreat = currentZombieThreat - aliveZombies[v].threat;
aliveZombies[v].dead = true;
aliveZombies.splice(v, 1);
liveZombieCount--;
} else {
aliveZombies[v].ref.gotoAndPlay("fallHead" + randomDeath);
zombiesKilled++;
overallDeadZombies++;
deadZombieCount++;
currentZombieThreat = currentZombieThreat - aliveZombies[v].threat;
aliveZombies[v].dead = true;
aliveZombies.splice(v, 1);
liveZombieCount--;
}
}
}
}
if (aliveZombies[v].ref.torso.hitTest(roundsOnScreen[k].ref.collision) && (aliveZombies[j].dead == false)) {
if ((((aliveZombies[v].type == "zombieSoldier") || (aliveZombies[v].type == "zombieSoldierSprint")) || (aliveZombies[v].type == "zombieSWAT")) || (aliveZombies[v].type == "zombieSWATSprint")) {
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("zombie_hitBody2");
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["thudPackTorso" + randomBloodPack].gotoAndPlay("base1");
roundsOnScreen[k].ref.removeMovieClip();
roundsOnScreen.splice(k, 1);
} else {
aliveZombies[v].health = aliveZombies[v].health - (roundsOnScreen[k].damage + random(2));
if (roundsOnScreen[k].owner == "hero") {
switch (_root[currentWeapon].name) {
case "chainsaw" :
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].gotoAndPlay("chainsaw" + randomBloodAnimChainsaw);
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitChainsaw" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
var _local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackTorso" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackTorso" + randomBloodPack]._y;
if (aliveZombies[v].type == "zombieDog") {
_local3.x = aliveZombies[v].ref.torso._x - 30;
_local3.y = aliveZombies[v].ref.torso._y - 30;
}
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].localToGlobal(_local3);
zombieChainsawBloodParticle(_local3.x, _local3.y);
break;
case "flameThrower" :
aliveZombies[v].burnDamageCountTorso++;
if (aliveZombies[v].burnDamageCountTorso > roundsBeforeBurn) {
aliveZombies[v].ref.flamePackTorso.play();
}
break;
case "compoundBow" :
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitBody" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
aliveZombies[v].arrowsStuckTorso++;
aliveZombies[v].ref.dummyTorso.torso.arrowPack.gotoAndStop("arrow" + aliveZombies[v].arrowsStuckTorso);
_local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackTorso" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackTorso" + randomBloodPack]._y;
if (aliveZombies[v].type == "zombieDog") {
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y;
}
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].localToGlobal(_local3);
zombieBloodParticle(_local3.x, _local3.y);
break;
default :
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitBody" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
_local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackTorso" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackTorso" + randomBloodPack]._y;
if (aliveZombies[v].type == "zombieDog") {
_local3.y = aliveZombies[v].ref["bloodPackHead" + randomBloodPack]._y;
}
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].localToGlobal(_local3);
zombieBloodParticle(_local3.x, _local3.y);
}
} else {
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitBody" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
}
currentRoundType = roundsOnScreen[k].type;
checkPenetration();
aliveZombies[v].ref._x = aliveZombies[v].ref._x - _root[currentWeapon].knockBack;
aliveZombies[v].ref.prevFrame;
if ((aliveZombies[v].health <= 0) && (aliveZombies[v].beingExploded == false)) {
deathSound = new Sound(stageBG);
if (aliveZombies[v].type == "zombieDog") {
deathSound.attachSound("sound_dogDeath_" + (random(5) + 1));
} else {
deathSound.attachSound("sound_zombieDeath_" + (random(11) + 1));
}
deathSound.setVolume(100);
deathSound.start(0, 1);
deadZombies.push({ref:enemyOnScreen[j].ref});
randomDeath = random(3) + 1;
if ((currentRoundType == "frag") && (randomDeath > 1)) {
aliveZombies[v].ref.gotoAndPlay("exploded1");
} else {
aliveZombies[v].ref.gotoAndPlay("fallBackwards" + randomDeath);
}
zombiesKilled++;
overallDeadZombies++;
deadZombieCount++;
currentZombieThreat = currentZombieThreat - aliveZombies[v].threat;
aliveZombies[v].dead = true;
aliveZombies.splice(v, 1);
liveZombieCount--;
sunRiseCheck();
}
}
}
if (aliveZombies[v].ref.legs.hitTest(roundsOnScreen[k].ref.collision) && (aliveZombies[j].dead == false)) {
aliveZombies[v].health = aliveZombies[v].health - (roundsOnScreen[k].damage + random(1));
if (roundsOnScreen[k].owner == "hero") {
switch (_root[currentWeapon].name) {
case "chainsaw" :
aliveZombies[v].ref["bloodPackTorso" + randomBloodPack].gotoAndPlay("chainsaw" + randomBloodAnimChainsaw);
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitChainsaw" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
break;
case "flameThrower" :
aliveZombies[v].burnDamageCountLegs++;
if (aliveZombies[v].burnDamageCountLegs > roundsBeforeBurn) {
aliveZombies[v].ref.burnDamageCountLegs.play();
}
break;
case "compoundBow" :
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitBody" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackLegs" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
aliveZombies[v].arrowsStuckLegs++;
aliveZombies[v].ref.dummyFrontUpperLeg.arrowPack.gotoAndStop("arrow" + aliveZombies[v].arrowsStuckLegs);
break;
default :
aliveZombies[v].ref["bloodPackLegs" + randomBloodPack].play();
hitLegSound = new Sound(stageBG);
hitLegSound.attachSound("sound_hitBody1");
hitLegSound.setVolume(100);
hitLegSound.start(0, 1);
var _local3 = new Object();
_local3.x = aliveZombies[v].ref["bloodPackLegs" + randomBloodPack]._x;
_local3.y = aliveZombies[v].ref["bloodPackLegs" + randomBloodPack]._y;
aliveZombies[v].ref["bloodPackLegs" + randomBloodPack].localToGlobal(_local3);
zombieLegBloodParticle(_local3.x, _local3.y);
}
} else {
hitBodySound = new Sound(stageBG);
hitBodySound.attachSound("sound_hitBody" + (random(2) + 1));
hitBodySound.setVolume(100);
hitBodySound.start(0, 1);
aliveZombies[v].ref["bloodPackLegs" + randomBloodPack].gotoAndPlay("base" + randomBloodAnim);
}
checkPenetration();
aliveZombies[v].ref._x = aliveZombies[v].ref._x - 2;
aliveZombies[v].ref.prevFrame;
if ((aliveZombies[v].health <= 0) && (aliveZombies[v].beingExploded == false)) {
deathSound = new Sound(stageBG);
if (aliveZombies[v].type == "zombieDog") {
deathSound.attachSound("sound_dogDeath_" + (random(5) + 1));
} else {
deathSound.attachSound("sound_zombieDeath_" + (random(11) + 1));
}
deathSound.setVolume(100);
deathSound.start(0, 1);
randomDeath = random(3) + 1;
if (aliveZombies[v].ref._x > 450) {
aliveZombies[v].ref.gotoAndPlay("fallBackwards" + randomDeath);
zombiesKilled++;
overallDeadZombies++;
deadZombieCount++;
liveZombieCount--;
currentZombieThreat = currentZombieThreat - aliveZombies[v].threat;
aliveZombies[v].dead = true;
aliveZombies.splice(v, 1);
} else {
aliveZombies[v].ref.gotoAndPlay("fallForward" + randomDeath);
zombiesKilled++;
overallDeadZombies++;
deadZombieCount++;
liveZombieCount--;
currentZombieThreat = currentZombieThreat - aliveZombies[v].threat;
aliveZombies[v].dead = true;
aliveZombies.splice(v, 1);
sunRiseCheck();
}
}
}
}
}
}
}
}
function ceaseFire() {
firing = false;
clearInterval(weaponDelay);
mainGunRef.muzzleFlash.gotoAndStop(1);
}
function turretControl() {
var _local2 = new Object();
_local2.x = mainGunRef._x;
_local2.y = mainGunRef._y;
mainGunRef._parent.localToGlobal(_local2);
var _local4 = _local2.x - _root._xmouse;
var _local3 = _local2.y - _root._ymouse;
var _local5 = Math.atan2(_local3, _local4) * 57.2957795130823;
currentAngle = _local5;
if (currentAngle > 15) {
currentAngle = 15;
}
if (currentAngle < -10) {
currentAngle = -10;
}
mainGunRef._rotation = currentAngle;
}
stop();
var overallDeadZombies = 0;
delete game.onEnterFrame;
delete mainChar.onEnterFrame;
delete makeEnemy.onEnterFrame;
delete stageBG.onPress;
delete stageBG.onRelease;
fscommand ("allowscale", false);
enemyStopStart("makeEnemy");
if ((_quality != "MEDIUM") && (_quality != "LOW")) {
_quality = "medium";
}
mouseInitialised = "notyet";
_root.attachMovie("blackOut", "mainBlackOut", 999788);
_root.mainBlackOut.alphaTo(0, 1.5, "easeOutSine", 0.5, hideBlackOut);
_root.mainBlackOut.depth = 994000 /* 0x0F2AD0 */;
_root.attachMovie("hud", "hud", 894351);
_root.hud._x = 660;
_root.hud._y = 335.4;
_root.attachMovie("mainCharacter", "mainChar", 97500);
mainChar._x = 605;
mainChar._y = 175;
setupSurvivorSlots();
setupSurvivors();
assignSurvivorWeapons();
addHeroToSurvivorArray();
bullet = 0;
bulletLevel = 1;
projectile = 0;
smokePuff = 0;
firstRound = true;
reloading = false;
reloadAnimPlaying = false;
autoReloading = false;
pumping = false;
firing = false;
interruptingReload = false;
wall_health = 1000;
currentLevel = "day_1";
levelUp = 1;
zombiesKilled = 0;
chainsawSoundPlaying = false;
optionsLoaded = false;
zombiesAnimating = false;
gamePaused = false;
endGameStarted = false;
currentZombieThreat = 0;
switchingWeapons = false;
currentTownLocation = "glenDale";
createTownMapOverlay(currentTownLocation);
setupLighting();
delay = 6;
roundsOnScreen = new Array();
enemyOnScreen = new Array();
deadZombies = new Array();
aliveZombies = new Array();
x = 1;
zombiesCreated = 0;
var bodysOnScreenTime = 50;
showCrosshairs();
startTimer(location[currentTownLocation].levelTime);
mainGunRef = mainChar.mainGun;
bgMusic = new Sound(musicAmbience);
bgMusic.attachSound("music_track1");
bgMusic.setVolume(100);
bgMusic.start(0, 999999);
function removeThisZombie(zombieRef) {
if (deadZombieCount >= deadZombieCountMax) {
_root[zombieRef].alphaTo(0, 0.3, "linear", 0, function () {
removeMovieClip(_root[zombieRef]);
});
deadZombieCount--;
}
}
deadZombieCount = 0;
deadZombieCountMax = 5;
removeZombieDelay = 8000;
function zombieProximityCheck() {
var _local2 = {x:_root.mainChar.mainGun.barrelEnd._x, y:_root.mainChar.mainGun.barrelEnd._y};
_root.mainChar.mainGun.barrelEnd.localToGlobal(_local2);
for (v in aliveZombies) {
_root.aliveZombies[v].targetX = _root.aliveZombies[v].ref._x;
_root.aliveZombies[v].targetY = _root.aliveZombies[v].ref._y - 45;
_root.aliveZombies[v].proximity = Math.round(Math.sqrt(((_local2.x - _root.aliveZombies[v].targetX) * (_local2.x - _root.aliveZombies[v].targetX)) + ((_local2.y - _root.aliveZombies[v].targetY) * (_local2.y - _root.aliveZombies[v].targetY))));
aliveZombies[v].ref.zombieProximity.text = v;
}
}
function zombieProximitySort() {
_root.aliveZombies.sortOn("proximity", Array.DESCENDING, Array.NUMERIC);
}
function hideBlackOut() {
_root.mainBlackOut._visible = false;
}
function endGame() {
hideCrosshairs();
if (levelUp > 40) {
_root.attachMovie("ending2_badEnding", "endingAnim", 999002);
_root.endingAnim.gotoAndPlay(1);
} else {
_root.HPScoreService.postScore(overallDeadZombies, "");
_root.attachMovie("ending2_goodEnding", "endingAnim", 999002);
_root.endingAnim.gotoAndPlay(1);
}
}
function loadHints() {
if (hints[_root.levelUp] == "") {
timeManager.theClipBoard.hintCard._alpha = 0;
} else {
timeManager.theClipBoard.hintCard._alpha = 100;
timeManager.theClipBoard.hintCard.hintText.text = hints[_root.levelUp];
}
}
hints = new Array();
hints.push("", "MORE SURVIVORS MEANS MORE CAN BE DONE", "TIME SEARCHING FOR WEAPONS ADDS UP", "SOME ZOMBIES CARRY WEAPONS YOU CAN USE", "", "SPACEBAR SWITCHES WEAPONS", "HIT 'R' TO RELOAD YOUR WEAPON", "", "ANY SEARCHING CAN BE DANGEROUS", "BETTER WEAPONS TAKE TIME TO FIND", "", "REMEMBER TO WRITE TOMMOROW'S NOTE", "DON'T WASTE TIME OVER REPAIRING", "ESCAPE OPENS THE OPTIONS", "", "CALL MUM IF I LIVE", "BROKEN WALL PLUS ZOMBIES EQUALS DEATH", "", "OH I DON'T KNOW", "", "", "DON'T DIE", "", "KILL ZOMBIES...AND STUFF", "", "", "I THINK I CAN. I THINK I CAN.", "", "", "ZOMBIE ARMS AREN'T FOOD");
fx_totalBloodAnims = 4;
fx_totalBloodAnimsHead = 2;
fx_totalBloodAnimsChainsaw = 2;
function moveCharacter() {
if ((((((((!Key.isDown(65)) && (!Key.isDown(68))) && (!Key.isDown(87))) && (!Key.isDown(83))) && (!Key.isDown(37))) && (!Key.isDown(39))) && (!Key.isDown(38))) && (!Key.isDown(40))) {
characterWalkAnim("idle");
}
if ((Key.isDown(65) || (Key.isDown(37))) && (!blockFront.hitTest(mainChar._x + 90, mainChar._y + 100, true))) {
this._x = this._x - hero.speed;
characterWalkAnim("forward");
}
if ((Key.isDown(68) || (Key.isDown(39))) && (!blockBack.hitTest(mainChar._x + 90, mainChar._y + 100, true))) {
this._x = this._x + hero.speed;
characterWalkAnim("backward");
}
if (((Key.isDown(87) || (Key.isDown(38))) && (!blockTop.hitTest(mainChar._x + 90, mainChar._y + 100, true))) && (!blockBack.hitTest(mainChar._x + 90, mainChar._y + 100, true))) {
this._y = this._y - hero.speed;
if (Key.isDown(68)) {
characterWalkAnim("backward");
} else if (Key.isDown(65)) {
characterWalkAnim("forward");
} else {
characterWalkAnim("up");
}
}
if (((Key.isDown(83) || (Key.isDown(40))) && (!blockFront.hitTest(mainChar._x + 90, mainChar._y + 100, true))) && (!blockBottom.hitTest(mainChar._x + 90, mainChar._y + 100, true))) {
this._y = this._y + hero.speed;
if (Key.isDown(68) || (Key.isDown(39))) {
characterWalkAnim("backward");
} else if (Key.isDown(65) || (Key.isDown(37))) {
characterWalkAnim("forward");
} else {
characterWalkAnim("down");
}
}
if (Key.isDown(82)) {
if ((reloading == false) && (ammoInMag != _root[currentWeapon].magazineCapacity)) {
reloadWeapon();
}
if (Key.isDown(49)) {
_root.swapWeapon("pistol");
}
}
}
function characterWalkAnim(currentDirection) {
_root.mainChar.legs.gotoAndStop(currentDirection);
}
hero = new Object();
hero.health = 100;
hero.speed = 5;
hero.isAlive = true;
mainChar.depthSwappedWith5 = false;
keyListener = new Object();
keyListener.onKeyDown = function () {
if (((Key.isDown(32) && (switchingWeapons == false)) && (firing == false)) && (secondaryWeapon != null)) {
switchWeapons();
handlingSound = new Sound(stageBG);
handlingSound.attachSound("sound_switchWeapons");
handlingSound.setVolume(100);
handlingSound.start(0, 1);
if (_root[currentWeapon].name == "chainsaw") {
chainsawSound = new Sound(stageBG);
chainsawSound.attachSound("sound_chainsawIdle");
chainsawSound.setVolume(100);
chainsawSound.start(0, 999);
}
}
if (Key.isDown(27)) {
loadOptions();
}
};
keyListener.onKeyUp = function () {
if ((switchingWeapons == true) && (Key.isDown(32) == false)) {
switchingWeapons = false;
}
};
Key.addListener(keyListener);
_root.mainChar.onEnterFrame = moveCharacter;
function zombieGroanSound(zombieType) {
playASound = random(10) + 1;
if (playASound == 1) {
zombieGroan = new Sound(stageBG);
zombieGroan.attachSound("sound_zombie" + zombieType);
zombieGroan.setVolume(100);
zombieGroan.start(0, 1);
}
}
function zombieHitWallSound() {
zombieHitWallSnd = new Sound(stageBG);
zombieHitWallSnd.attachSound("zombie_hitWall" + (random(2) + 1));
zombieHitWallSnd.setVolume(50);
zombieHitWallSnd.start(0, 1);
}
function destroyBody() {
this.removeMovieClip;
}
function zombieAppearance(zombieRef, isArmed) {
randomZombieHead = random(zombieHeads) + 1;
randomZombieTorso = random(zombieTorsos) + 1;
randomHeadAccessory = random(zombieHeadAccessories) + 1;
randomTorsoAccessory = random(zombieTorsoAccessories) + 1;
randomTorsoColour = torsoColours[random(torsoColours.length)];
_root[zombieRef].dummyHead.attachMovie("zombieHead" + randomZombieHead, "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso" + randomZombieTorso, "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
if (isArmed) {
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("armedWeapon" + random(numberZombieWeapons));
}
_root[zombieRef].dummyTorso.torso.play();
_root[zombieRef].dummyHead.head.accessories.gotoAndStop(randomHeadAccessory);
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop(randomTorsoAccessory);
_root[zombieRef].dummyTorso.torso.torso.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyFrontUpperArm.upperArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyBackUpperArm.upperArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop(randomTorsoColour);
randomLegColour = legColours[random(legColours.length)];
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop(randomLegColour);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop(randomLegColour);
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop(randomLegColour);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop(randomLegColour);
_root[zombieRef].cacheAsBitmap = true;
if (currentZombieType.name == "zombieSlow") {
_root[zombieRef].gotoAndPlay(random(20) + 45);
}
if (currentZombieType.name == "zombieFast") {
_root[zombieRef].gotoAndPlay(random(20) + 1);
}
if (currentZombieType.name == "zombieSprint") {
_root[zombieRef].gotoAndPlay(random(10) + 80);
}
}
function zombieAppearanceCustom(zombieRef, zombieType, zombieArmed) {
randomZombieHead = random(zombieHeads) + 1;
randomZombieTorso = random(zombieTorsos) + 1;
randomHeadAccessory = random(zombieHeadAccessories) + 1;
randomTorsoAccessory = random(zombieTorsoAccessories) + 1;
randomTorsoColour = torsoColours[random(torsoColours.length)];
randomLegColour = legColours[random(legColours.length)];
if (zombieType == "zombieFatManSprint") {
zombieType = "zombieFatMan";
}
if (zombieType == "zombieFatWomanSprint") {
zombieType = "zombieFatWoman";
}
if (zombieType == "zombieSoldierSprint") {
zombieType = "zombieSoldier";
}
if (zombieType == "zombieSWATSprint") {
zombieType = "zombieSWAT";
}
switch (zombieType) {
case "zombieSoldier" :
_root[zombieRef].dummyHead.attachMovie("zombieHead1", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("armyHelmet");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("armyVest");
_root[zombieRef].dummyBackHand.backHand.accessories.gotoAndStop("armyM4");
_root[zombieRef].dummyTorso.torso.torso.gotoAndStop("khaki");
_root[zombieRef].dummyFrontUpperArm.upperArm.gotoAndStop("khaki");
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop("khaki");
_root[zombieRef].dummyBackUpperArm.upperArm.gotoAndStop("khaki");
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop("khaki");
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop("khaki");
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop("khaki");
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop("khaki");
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop("khaki");
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieSWAT" :
_root[zombieRef].dummyHead.attachMovie("zombieHead1", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("SWAT");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("SWAT");
_root[zombieRef].dummyTorso.torso.torso.gotoAndStop("denim");
_root[zombieRef].dummyFrontUpperArm.upperArm.gotoAndStop("denim");
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop("denim");
_root[zombieRef].dummyBackUpperArm.upperArm.gotoAndStop("denim");
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop("denim");
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop("denim");
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop("denim");
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop("denim");
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop("denim");
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieFatCop" :
_root[zombieRef].dummyHead.attachMovie("zombieHead1", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("copFat" + (random(3) + 1));
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("copFat");
_root[zombieRef].dummyBackHand.backHand.accessories.gotoAndStop("copNightStick");
_root[zombieRef].dummyTorso.torso.torso.colorTo(6737151, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(6737151, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop("skin");
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(6737151, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop("skin");
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop("nearBlack");
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop("nearBlack");
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop("nearBlack");
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop("nearBlack");
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieDropRevolver" :
_root[zombieRef].dummyHead.attachMovie("zombieHead1", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("copFat" + (random(3) + 1));
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("copFat");
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("copRevolver");
_root[zombieRef].dummyTorso.torso.torso.colorTo(6737151, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(6737151, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(16771797, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(6737151, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(16771797, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(7208, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(7208, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(7208, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(7208, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieClown" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso2", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("clown");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("clown");
_root[zombieRef].dummyTorso.torso.torso.colorTo(6710988, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(39168, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(39168, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(6710988, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(6710988, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(13382400, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(13382400, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(13260, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(13260, 0);
_root[zombieRef].dummyFrontFoot.foot.colorTo(10027008, 0);
_root[zombieRef].dummyBackFoot.foot.colorTo(10027008, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieMechanic" :
_root[zombieRef].dummyHead.attachMovie("zombieHead2", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop(randomHeadAccessory);
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("mechanic");
if (isArmed) {
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("armedWeapon" + random(numberZombieWeapons));
}
_root[zombieRef].dummyTorso.torso.torso.colorTo(3691610, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(3691610, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(3691610, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(3691610, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(3691610, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(3691610, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(3691610, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(3691610, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(3691610, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombiePriest" :
_root[zombieRef].dummyHead.attachMovie("zombieHead1", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso2", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("priest");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("priest");
_root[zombieRef].dummyBackHand.backHand.accessories.gotoAndStop("bible");
_root[zombieRef].dummyTorso.torso.torso.gotoAndStop("nearBlack");
_root[zombieRef].dummyFrontUpperArm.upperArm.gotoAndStop("nearBlack");
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop("nearBlack");
_root[zombieRef].dummyBackUpperArm.upperArm.gotoAndStop("nearBlack");
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop("nearBlack");
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop("nearBlack");
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop("nearBlack");
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop("nearBlack");
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop("nearBlack");
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieNewsReporter" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("newsReporter");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("newsReporter");
_root[zombieRef].dummyBackHand.backHand.accessories.gotoAndStop("microphone");
_root[zombieRef].dummyTorso.torso.torso.colorTo(13412704, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(13412704, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(13412704, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(13412704, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(13412704, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(3355443, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(3355443, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(3355443, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(3355443, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieNewsCameraman" :
_root[zombieRef].dummyHead.attachMovie("zombieHead1", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("newsCameraman");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("newsCameraman");
_root[zombieRef].dummyBackHand.backHand.accessories.gotoAndStop("newsCamera");
_root[zombieRef].dummyTorso.torso.torso.colorTo(10040115, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(10040115, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(16771797, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(10040115, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(16771797, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(3355443, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(3355443, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(3355443, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(3355443, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieFatWoman" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("fatWoman" + (random(5) + 1));
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("fatWoman" + (random(5) + 1));
if (isArmed) {
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("armedWeapon" + random(numberZombieWeapons));
}
_root[zombieRef].dummyTorso.torso.torso.gotoAndStop("skin");
_root[zombieRef].dummyFrontUpperArm.upperArm.gotoAndStop("skin");
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop("skin");
_root[zombieRef].dummyBackUpperArm.upperArm.gotoAndStop("skin");
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop("skin");
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop("skin");
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop("skin");
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop("skin");
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop("skin");
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieFatMan" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("fatMan" + (random(4) + 1));
if (isArmed) {
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("armedWeapon" + random(numberZombieWeapons));
}
zombieRandomClothesSet = "" + (random(4) + 1);
switch (zombieRandomClothesSet) {
case "1" :
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("fatMan1");
_root[zombieRef].dummyTorso.torso.torso.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(15260631, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(15260631, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(15260631, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(6697728, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(15260631, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(6697728, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(15260631, 0);
break;
case "2" :
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("fatMan2");
_root[zombieRef].dummyTorso.torso.torso.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(15260631, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(15260631, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(15260631, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(13158, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(13158, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(13158, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(13158, 0);
break;
case "3" :
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("fatMan3");
_root[zombieRef].dummyTorso.torso.torso.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(5266279, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(5266279, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(5266279, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(5266279, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(1510144, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(1510144, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(1510144, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(1510144, 0);
break;
case "4" :
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("fatMan4");
_root[zombieRef].dummyTorso.torso.torso.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(5780532, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(5780532, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(5780532, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(5780532, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(4993566, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(4993566, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(4993566, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(4993566, 0);
break;
}
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(6697728, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(15260631, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(6697728, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(15260631, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombiePrisoner" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop(randomHeadAccessory);
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("prisoner");
_root[zombieRef].dummyTorso.torso.torso.colorTo(16750848, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(16750848, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(16750848, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(16750848, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(16750848, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(16750848, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(16750848, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(16750848, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(16750848, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
case "zombieDropShotgun" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("biker");
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("biker");
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("bikerShotgun");
_root[zombieRef].dummyTorso.torso.torso.colorTo(6737151, 0);
_root[zombieRef].dummyFrontUpperArm.upperArm.colorTo(15260631, 0);
_root[zombieRef].dummyFrontLowerArm.lowerArm.colorTo(15260631, 0);
_root[zombieRef].dummyBackUpperArm.upperArm.colorTo(15260631, 0);
_root[zombieRef].dummyBackLowerArm.lowerArm.colorTo(15260631, 0);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.colorTo(1313280, 0);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.colorTo(1313280, 0);
_root[zombieRef].dummyBackUpperLeg.upperLeg.colorTo(1313280, 0);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.colorTo(1313280, 0);
_root[zombieRef].cacheAsBitmap = true;
break;
default :
break;
case "zombieDecayed" :
_root[zombieRef].dummyHead.attachMovie("zombieHead3", "head", x);
_root[zombieRef].dummyTorso.attachMovie("zombieTorso1", "torso", x);
_root[zombieRef].dummyFrontHand.attachMovie("zombie_Hand", "frontHand", x);
_root[zombieRef].dummyBackHand.attachMovie("zombie_Hand", "backHand", x);
_root[zombieRef].dummyHead.head.accessories.gotoAndStop("decayed" + (random(4) + 1));
_root[zombieRef].dummyTorso.torso.torsoAddons.gotoAndStop("decayed" + (random(4) + 1));
if (isArmed) {
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("armedWeapon" + random(numberZombieWeapons));
}
_root[zombieRef].dummyFrontHand.frontHand.handskin.colorTo(8223810, 0);
_root[zombieRef].dummyBackHand.backHand.handskin.colorTo(8223810, 0);
_root[zombieRef].dummyTorso.torso.torso.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyFrontUpperArm.upperArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyFrontLowerArm.lowerArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyBackUpperArm.upperArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyBackLowerArm.lowerArm.gotoAndStop(randomTorsoColour);
_root[zombieRef].dummyFrontUpperLeg.upperLeg.gotoAndStop(randomLegColour);
_root[zombieRef].dummyFrontLowerLeg.lowerLeg.gotoAndStop(randomLegColour);
_root[zombieRef].dummyBackUpperLeg.upperLeg.gotoAndStop(randomLegColour);
_root[zombieRef].dummyBackLowerLeg.lowerLeg.gotoAndStop(randomLegColour);
_root[zombieRef].cacheAsBitmap = true;
}
_root[zombieRef].cacheAsBitmap = false;
if (zombieArmed) {
_root[zombieRef].dummyFrontHand.frontHand.accessories.gotoAndStop("armedWeapon" + random(numberZombieWeapons));
}
switch (currentZombieType.walkAnimation) {
case "slow" :
_root[zombieRef].gotoAndPlay(random(20) + 45);
break;
case "fast" :
_root[zombieRef].gotoAndPlay(random(20) + 1);
break;
case "sprint" :
_root[zombieRef].gotoAndPlay(random(10) + 80);
break;
}
}
var numberZombieWeapons = 5;
var zombieDamageMultiplier = 1.5;
zombieSlow = new Object();
zombieSlow.speed = 1.3;
zombieSlow.health = 50;
zombieSlow.damage = 3;
zombieSlow.threat = 0.5;
zombieSlow.common = true;
zombieSlow.name = "zombieSlow";
zombieFast = new Object();
zombieFast.speed = 3;
zombieFast.health = 40;
zombieFast.damage = 2;
zombieFast.threat = 0.75;
zombieFast.common = true;
zombieFast.name = "zombieFast";
zombieSprint = new Object();
zombieSprint.speed = 13;
zombieSprint.health = 40;
zombieSprint.damage = 2;
zombieSprint.threat = 1;
zombieSprint.common = true;
zombieSprint.name = "zombieSprint";
zombieDog = new Object();
zombieDog.speed = 13.5;
zombieDog.health = 30;
zombieDog.damage = 1.5;
zombieDog.threat = 0.25;
zombieDog.common = true;
zombieDog.name = "zombieDog";
zombieSoldier = new Object();
zombieSoldier.speed = 1.3;
zombieSoldier.health = 40;
zombieSoldier.damage = 2;
zombieSoldier.threat = 1.5;
zombieSoldier.common = false;
zombieSoldier.name = "zombieSoldier";
zombieSoldier.walkAnimation = "fast";
zombieSoldierSprint = new Object();
zombieSoldierSprint.speed = 13;
zombieSoldierSprint.health = 40;
zombieSoldierSprint.damage = 2;
zombieSoldierSprint.threat = 2;
zombieSoldierSprint.common = false;
zombieSoldierSprint.name = "zombieSoldierSprint";
zombieSoldierSprint.walkAnimation = "sprint";
zombieSWAT = new Object();
zombieSWAT.speed = 1.3;
zombieSWAT.health = 40;
zombieSWAT.damage = 2;
zombieSWAT.threat = 1.25;
zombieSWAT.common = false;
zombieSWAT.name = "zombieSWAT";
zombieSWAT.walkAnimation = "fast";
zombieSWATSprint = new Object();
zombieSWATSprint.speed = 13;
zombieSWATSprint.health = 40;
zombieSWATSprint.damage = 2;
zombieSWATSprint.threat = 2;
zombieSWATSprint.common = false;
zombieSWATSprint.name = "zombieSWATSprint";
zombieSWATSprint.walkAnimation = "sprint";
zombieFatCop = new Object();
zombieFatCop.speed = 1.3;
zombieFatCop.health = 65;
zombieFatCop.damage = 2;
zombieFatCop.threat = 1;
zombieFatCop.common = false;
zombieFatCop.name = "zombieFatCop";
zombieFatCop.walkAnimation = "slow";
zombieDropRevolver = new Object();
zombieDropRevolver.speed = 1.3;
zombieDropRevolver.health = 65;
zombieDropRevolver.damage = 2;
zombieDropRevolver.threat = 1;
zombieDropRevolver.common = false;
zombieDropRevolver.name = "zombieDropRevolver";
zombieDropRevolver.walkAnimation = "slow";
zombieDropShotgun = new Object();
zombieDropShotgun.speed = 1.3;
zombieDropShotgun.health = 65;
zombieDropShotgun.damage = 2;
zombieDropShotgun.threat = 1;
zombieDropShotgun.common = false;
zombieDropShotgun.name = "zombieDropShotgun";
zombieDropShotgun.walkAnimation = "slow";
zombieFatWoman = new Object();
zombieFatWoman.speed = 1;
zombieFatWoman.health = 65;
zombieFatWoman.damage = 3;
zombieFatWoman.threat = 1.25;
zombieFatWoman.common = false;
zombieFatWoman.name = "zombieFatWoman";
zombieFatWoman.walkAnimation = "slow";
zombieFatWomanSprint = new Object();
zombieFatWomanSprint.speed = 13;
zombieFatWomanSprint.health = 65;
zombieFatWomanSprint.damage = 3;
zombieFatWomanSprint.threat = 1.5;
zombieFatWomanSprint.common = false;
zombieFatWomanSprint.name = "zombieFatWomanSprint";
zombieFatWomanSprint.walkAnimation = "sprint";
zombieFatManSprint = new Object();
zombieFatManSprint.speed = 10;
zombieFatManSprint.health = 70;
zombieFatManSprint.damage = 3;
zombieFatManSprint.threat = 1.75;
zombieFatManSprint.common = false;
zombieFatManSprint.name = "zombieFatManSprint";
zombieFatManSprint.walkAnimation = "sprint";
zombieFatMan = new Object();
zombieFatMan.speed = 1.3;
zombieFatMan.health = 70;
zombieFatMan.damage = 3;
zombieFatMan.threat = 1.5;
zombieFatMan.common = false;
zombieFatMan.name = "zombieFatMan";
zombieFatMan.walkAnimation = "fast";
zombieClown = new Object();
zombieClown.speed = 13;
zombieClown.health = 40;
zombieClown.damage = 2;
zombieClown.threat = 1;
zombieClown.common = false;
zombieClown.name = "zombieClown";
zombieClown.walkAnimation = "sprint";
zombieMechanic = new Object();
zombieMechanic.speed = 3;
zombieMechanic.health = 40;
zombieMechanic.damage = 2;
zombieMechanic.threat = 1;
zombieMechanic.common = false;
zombieMechanic.name = "zombieMechanic";
zombieMechanic.walkAnimation = "fast";
zombiePriest = new Object();
zombiePriest.speed = 3;
zombiePriest.health = 40;
zombiePriest.damage = 2;
zombiePriest.threat = 1;
zombiePriest.common = false;
zombiePriest.name = "zombiePriest";
zombiePriest.walkAnimation = "fast";
zombieNewsReporter = new Object();
zombieNewsReporter.speed = 3;
zombieNewsReporter.health = 40;
zombieNewsReporter.damage = 2;
zombieNewsReporter.threat = 1;
zombieNewsReporter.common = false;
zombieNewsReporter.name = "zombieNewsReporter";
zombieNewsReporter.walkAnimation = "fast";
zombieNewsCameraman = new Object();
zombieNewsCameraman.speed = 1.3;
zombieNewsCameraman.health = 40;
zombieNewsCameraman.damage = 2;
zombieNewsCameraman.threat = 1;
zombieNewsCameraman.common = false;
zombieNewsCameraman.name = "zombieNewsCameraman";
zombieNewsCameraman.walkAnimation = "slow";
zombiePrisoner = new Object();
zombiePrisoner.speed = 3;
zombiePrisoner.health = 40;
zombiePrisoner.damage = 2;
zombiePrisoner.threat = 1;
zombiePrisoner.common = false;
zombiePrisoner.name = "zombiePrisoner";
zombiePrisoner.walkAnimation = "fast";
zombieCrawler = new Object();
zombieCrawler.speed = 1.2;
zombieCrawler.health = 60;
zombieCrawler.damage = 2;
zombieCrawler.threat = 1.5;
zombieCrawler.common = false;
zombieCrawler.name = "zombieCrawler";
zombieCrawler.walkAnimation = "crawl";
zombieDecayed = new Object();
zombieDecayed.speed = 1.2;
zombieDecayed.health = 80;
zombieDecayed.damage = 1;
zombieDecayed.threat = 1.5;
zombieDecayed.common = true;
zombieDecayed.name = "zombieDecayed";
zombieDecayed.walkAnimation = "slow";
zombieEater = new Object();
zombieEater.speed = 3;
zombieEater.health = 50;
zombieEater.damage = 2;
zombieEater.threat = 1.25;
zombieEater.common = false;
zombieEater.name = "zombieEater";
zombieEater.walkAnimation = "slow";
allZombies = new Array(zombieSlow, zombieFast, zombieDog, zombieSprint, zombieSoldier, zombieFatCop, zombieClown, zombieMechanic, zombiePriest, zombieNewsReporter, zombieNewsCameraman, zombieFatWoman, zombieFatWomanSprint, zombieFatMan, zombieFatManSprint, zombiePrisoner, zombieDropRevolver, zombieDropShotgun, zombieCrawler, zombieEater, zombieDecayed, zombieArmedFast, zombieArmedSprint, zombieArmedSlow);
commonZombies = new Array(zombieSlow, zombieFast, zombieSprint, zombieDecayed, zombieSprint);
semiRareZombies = new Array(zombieDog, zombieFatWoman, zombieFatWomanSprint, zombieFatMan, zombieFatManSprint);
rareZombies = new Array(zombieSprint, zombieFatCop, zombieMechanic, zombiePriest, zombieNewsReporter, zombieNewsCameraman, zombiePrisoner, zombieDropRevolver, zombieDropShotgun);
veryRareZombies = new Array(zombieSoldier, zombieSoldierSprint, zombieSoldier, zombieSoldierSprint, zombieSWAT, zombieSWATSprint);
armedZombies = new Array(zombieSprint, zombieMechanic, zombieFatMan, zombieSlow, zombieFast, zombieFatManSprint, zombieFatWomanSprint, zombieFatWoman, zombieDecayed, zombieSoldier, zombieSWAT);
zombieHeads = 3;
zombieTorsos = 4;
zombieHeadAccessories = 25;
zombieTorsoAccessories = 15;
torsoColours = new Array("khaki", "rose", "darkGrey", "tan", "lightGrey", "darkKhaki", "denim", "plum", "camel", "nearBlack", "nearWhite", "darkMaroon", "darkPurple", "gold");
legColours = new Array("darkGrey", "darkBlue", "darkKhaki", "nearBlack", "brown", "darkBrown", "lightGrey");
function enemyGenerator() {
delay--;
liveZombieCount = zombiesCreated - zombiesKilled;
if (((delay <= 0) && (zombiesCreated <= _root[currentLevel].zombiePool)) && (liveZombieCount < zombieLimit)) {
delay = _root[currentLevel].spawnRate;
x++;
currentZombieType = _root[currentLevel].zombieTypes[random(_root[currentLevel].totalTypes)];
if (_root[currentLevel][currentZombieType] > 0) {
if (currentZombieType == "zombieDog") {
_root.attachMovie("zombieDog", "enemy" + x, x + 3);
} else {
_root.attachMovie("newZombie", "enemy" + x, x + 3);
}
_root[currentLevel][currentZombieType]--;
zombiesCreated++;
if (_root[currentLevel][currentZombieType] <= 0) {
_root[currentLevel].totalTypes--;
removeZombieType(currentZombieType);
}
}
_root["enemy" + x]._visible = false;
_root["enemy" + x].colorTransformTo(60, 0, 60, 0, 60, 0, 100, 0, 0);
_root["enemy" + x]._y = random(180) + 120;
_root["enemy" + x]._x = -90;
_root["enemy" + x].cacheAsBitmap = true;
_root["enemy" + x]._visible = true;
enemyOnScreen.push({ref:_root["enemy" + x], depth:_root["enemy" + x]._y});
aliveZombies.push({ref:_root["enemy" + x], type:currentZombieType, health:_root[currentZombieType].health, speed:_root[currentZombieType].speed, damage:_root[currentZombieType].damage, depth:_root["enemy" + x]._y, idle:false, animating:false, eating:false, dead:false, proximity:0, proximityToExplosion:0, targetX:0, targetY:0, tempNum:0, beingExploded:false});
if ((((currentZombieType == "zombieSlow") || (currentZombieType == "zombieFast")) || (currentZombieType == "zombieSprint")) || (currentZombieType == "zombieEater")) {
zombieAppearance("enemy" + x);
} else {
zombieAppearanceCustom("enemy" + x, currentZombieType);
}
}
if (zombiesCreated == _root[currentLevel].zombiePool) {
delete makeEnemy.onEnterFrame;
}
}
function removeZombieType(zombieTypeName) {
for (i in _root[currentLevel].zombieTypes) {
if (_root[currentLevel].zombieTypes[i] == zombieTypeName) {
_root[currentLevel].zombieTypes.splice(i, 1);
break;
}
}
}
function removeSmoke(smokeName) {
removeMovieClip(_root[smokeName]);
}
function fillWeaponMagazines() {
ammoInMag = _root[primaryWeapon.name].magazineCapacity;
primaryAmmo = _root[primaryWeapon.name].magazineCapacity;
secondaryAmmo = _root[secondaryWeapon.name].magazineCapacity;
currentWeaponInHand = "primary";
}
function switchWeapons() {
if (((currentWeaponInHand == "primary") && (secondaryWeapon != undefined)) && (!reloading)) {
switchingWeapons = true;
primaryAmmo = ammoInMag;
swapWeapon(secondaryWeapon.name);
currentWeaponInHand = "secondary";
ammoInMag = secondaryAmmo;
} else if ((!reloading) && (secondaryWeapon != undefined)) {
switchingWeapons = true;
secondaryAmmo = ammoInMag;
swapWeapon(primaryWeapon.name);
currentWeaponInHand = "primary";
ammoInMag = primaryAmmo;
}
}
function checkWeaponSlots() {
timeManager.tm_backgrounds.slot3_outline._alpha = 100;
timeManager.tm_backgrounds.slot4_outline._alpha = 100;
timeManager.tm_backgrounds.slot5_outline._alpha = 100;
timeManager.tm_backgrounds.slot6_outline._alpha = 100;
if (secondaryWeaponSlot == "full") {
timeManager.tm_backgrounds.secondary.isAvailable = false;
}
if (survivorSlot[0].free == true) {
slot3WeaponSlot = "empty";
slot3Weapon.inUse = false;
slot3Weapon = snubnose;
_root.timeManager.tm_backgrounds.slot3.onRelease = null;
_root.timeManager.tm_backgrounds.slot3_outline._alpha = 0;
}
if (survivorSlot[1].free == true) {
slot4WeaponSlot = "empty";
slot4Weapon.inUse = false;
slot4Weapon = snubnose;
_root.timeManager.tm_backgrounds.slot4.onRelease = null;
_root.timeManager.tm_backgrounds.slot4_outline._alpha = 0;
}
if (survivorSlot[2].free == true) {
slot5WeaponSlot = "empty";
_root[slot5Weapon.name].inUse = false;
slot5Weapon = snubnose;
_root.timeManager.tm_backgrounds.slot5.onRelease = null;
_root.timeManager.tm_backgrounds.slot5_outline._alpha = 0;
}
if (survivorSlot[3].free == true) {
slot6WeaponSlot = "empty";
_root[slot6Weapon.name].inUse = false;
slot6Weapon = snubnose;
_root.timeManager.tm_backgrounds.slot6.onRelease = null;
_root.timeManager.tm_backgrounds.slot6_outline._alpha = 0;
}
}
function pickupWeapon(wpnName) {
if ((_root[wpnName].found == true) && (_root[wpnName].inUse == false)) {
handlingSound = new Sound(stageBG);
handlingSound.attachSound("sound_gunUp");
handlingSound.setVolume(100);
handlingSound.start(0, 1);
timeManager.tm_backgrounds["shadow_" + _root[wpnName].name][_root[wpnName].name + "_Weapon"].alphaTo(0, 0);
weaponInHand = true;
weaponToAssign = wpnName;
_root.attachMovie(wpnName + "_Icon", "floatingGunIcon", 900034);
_root.attachMovie(wpnName + "_Icon", "floatingGunShadow", 900033);
floatingGunIcon._x = -3000;
floatingGunIcon._y = -3000;
floatingGunShadow._x = -3000;
floatingGunShadow._y = -3000;
floatingGunIcon.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
};
floatingGunShadow.onEnterFrame = function () {
this._x = _xmouse + 5;
this._y = _ymouse + 5;
};
floatingGunShadow.alphaTo(20);
floatingGunShadow.colorTo(0, 0);
floatingGunShadow.blurTo(5, 0);
}
}
function dropWeapon() {
timeManager.tm_backgrounds["shadow_" + _root[weaponToAssign].name][_root[weaponToAssign].name + "_Weapon"].alphaTo(100, 0);
weaponInHand = false;
weaponToAssign = null;
removeMovieClip(floatingGunIcon);
removeMovieClip(floatingGunShadow);
handlingSound = new Sound(stageBG);
handlingSound.attachSound("sound_gunDown");
handlingSound.setVolume(100);
handlingSound.start(0, 1);
}
function weaponRackButtons(btnName) {
_root.timeManager.tm_backgrounds[btnName].onRelease = function () {
if (weaponInHand && (btnName != weaponToAssign)) {
_root.dropWeapon();
_root.pickupWeapon(btnName);
} else {
_root.pickupWeapon(btnName);
}
};
}
function weaponSlotButtons(btnName) {
_root.timeManager.tm_backgrounds.primary.isAvailable = false;
_root.timeManager.tm_backgrounds[btnName].onRelease = function () {
if (weaponInHand && (_root[btnName + "Weapon"].name != weaponToAssign)) {
assignWeapon(btnName, weaponToAssign);
} else {
unassignWeapon(btnName);
if (weaponInHand && (_root[btnName + "Weapon"].name != weaponToAssign)) {
assignWeapon(btnName, weaponToAssign);
}
}
};
_root.timeManager.tm_backgrounds[btnName].onRollOver = function () {
if (_root[btnName + "WeaponSlot"] == "full") {
_root.timeManager.tm_backgrounds["remove_" + btnName].alphaTo(100, 0.2);
}
};
_root.timeManager.tm_backgrounds[btnName].onRollOut = function () {
_root.timeManager.tm_backgrounds["remove_" + btnName].alphaTo(0, 0.2);
};
}
function assignWeapon(btnName, wpnName) {
if (((((btnName == "slot3") || (btnName == "slot4")) || (btnName == "slot5")) || (btnName == "slot6")) && ((((wpnName == "chainsaw") || (wpnName == "grenade")) || (wpnName == "RPG")) || (wpnName == "compoundBow"))) {
handlingSound = new Sound(stageBG);
handlingSound.attachSound("sound_scratch");
handlingSound.setVolume(100);
handlingSound.start(0, 1);
} else if ((_root[wpnName].found == true) && (_root[wpnName].inUse == false)) {
if (_root[btnName + "WeaponSlot"] == "empty") {
_root.timeManager.tm_backgrounds[btnName].isAvailable = false;
handlingSound = new Sound(stageBG);
handlingSound.attachSound("sound_gunDown");
handlingSound.setVolume(100);
handlingSound.start(0, 1);
weaponToAssign = null;
weaponInHand = false;
removeMovieClip(floatingGunIcon);
removeMovieClip(floatingGunShadow);
_root.timeManager.tm_backgrounds.needAWeapon.alphaTo(0, 0.2);
_root[btnName + "WeaponSlot"] = "full";
_root.timeManager.tm_backgrounds[btnName].attachMovie(_root[wpnName].name + "_Icon", btnName + "Weapon", this.getNextHighestDepth);
_root[wpnName].inUse = true;
_root[btnName + "Weapon"] = _root[wpnName];
swapWeapon(_root[btnName + "Weapon"].name);
fillWeaponMagazines();
switch (btnName) {
case "slot3" :
survivorSlot[0].weapon = slot3Weapon.name;
break;
case "slot4" :
survivorSlot[1].weapon = slot4Weapon.name;
break;
case "slot5" :
survivorSlot[2].weapon = slot5Weapon.name;
break;
case "slot6" :
survivorSlot[3].weapon = slot6Weapon.name;
break;
}
}
}
}
function unassignWeapon(btnName) {
for (v in survivorSlot) {
if (survivorSlot[v].weapon == _root[btnName + "Weapon"].name) {
survivorSlot[v].weapon = "snubnose";
}
}
_root.timeManager.tm_backgrounds["shadow_" + _root[btnName + "Weapon"].name][_root[btnName + "Weapon"].name + "_Weapon"].alphaTo(100, 0);
handlingSound = new Sound(stageBG);
handlingSound.attachSound("sound_gunUnassign");
handlingSound.setVolume(100);
handlingSound.start(0, 1);
_root.timeManager.tm_backgrounds[btnName][btnName + "Weapon"].removeMovieClip();
_root.timeManager.tm_backgrounds[btnName].isAvailable = true;
_root[btnName + "Weapon"].inUse = false;
_root[btnName + "WeaponSlot"] = "empty";
_root[btnName + "Weapon"] = null;
}
currentWeapon = "pistol";
primaryWeapon = _root.pistol;
secondaryWeapon = null;
var primaryWeaponSlot = "full";
var secondaryWeaponSlot = "empty";
var slot3WeaponSlot = "empty";
var slot3Weapon = null;
var slot4WeaponSlot = "empty";
var slot4Weapon = null;
var slot5WeaponSlot = "empty";
var slot5Weapon = null;
var slot6WeaponSlot = "empty";
var slot6Weapon = null;
var weaponToAssign = "";
var weaponInHand = false;
currentWeaponInHand = "primary";
primaryAmmo = 0;
secondaryAmmo = 0;
slot3Ammo = 0;
slot4Ammo = 0;
slot5Ammo = 0;
slot6Ammo = 0;
primaryWeaponSlot.free = true;
secondaryWeaponSlot.free = true;
ammoInMag = _root[primaryWeapon.name].magazineCapacity;
primaryAmmo = _root[primaryWeapon.name].magazineCapacity;
secondaryAmmo = _root[secondaryWeapon.name].magazineCapacity;
function removeParentGameOverRetry() {
_root.cleanUpScreen();
_root.retryLevelAgain();
removeMovieClip(_root.gameOver);
}
function retryLevelAgain() {
hero.isAlive = true;
mainChar.gotoAndStop("alive");
wall.health = startOfLevelWallHealth;
checkWallStatus();
retryLevel = true;
stopTimer();
}
var startOfLevelWallHealth = 8000;
function checkPenetration() {
if (_root[currentWeapon].penetrates == true) {
roundsOnScreen[k].penetrateCount++;
if (roundsOnScreen[k].penetrateCount >= _root[currentWeapon].goesThrough) {
enemyOnScreen[j].ref.penetrateCount.text = roundsOnScreen[k].penetrateCount;
roundsOnScreen[k].ref.removeMovieClip();
roundsOnScreen.splice(k, 1);
}
} else {
roundsOnScreen[k].ref.removeMovieClip();
roundsOnScreen.splice(k, 1);
}
}
function chargeThrow() {
throwCharge++;
}
function thrownWeapon(weaponName) {
if ((ammoInMag >= 1) && (reloading == false)) {
clearInterval(chargingThrow);
ammoInMag = ammoInMag - 1;
if (_root.throwCharge >= _root.throwChargeMax) {
_root.throwCharge = _root.throwChargeMax;
}
thrownNumber++;
var _local3 = _root.attachMovie(_root[currentWeapon].name, "thrown" + thrownNumber, thrownNumber + 37000);
thrownWeaponsOnScreen.push({ref:_root["thrown" + _local3]});
var _local4 = new Object();
_local4.x = mainGunRef.barrelEnd._x;
_local4.y = mainGunRef.barrelEnd._y;
mainGunRef.localToGlobal(_local4);
_local3.grenadeGraph._rotation = random(360);
_local3._x = _local4.x - random(50);
_local3._y = _local4.y;
_local3.angle = currentAngle - random(_root[currentWeapon].accuracy);
_local3._rotation = round.angle;
_local3.initGravity = false;
_local3.thrownWeaponTimer = 0;
_local3.onEnterFrame = function () {
this.thrownWeaponTimer++;
if (this.initGravity == false) {
this.ySpeed = _root.ySpeed;
this.xSpeed = -_root.throwCharge;
this.gravity = _root.gravity;
this.bounce = _root.bounce;
this.ground = _root.mainChar._y + 100;
this.initGravity = true;
_root.throwCharge = _root.throwChargeMin;
}
if (this._y < this.ground) {
this.ySpeed = this.ySpeed + this.gravity;
} else if (this.ySpeed > (this.gravity * 4)) {
this._y = this.ground;
this.ySpeed = this.ySpeed * (-this.bounce);
} else {
this.ySpeed = 0;
this._y = this.ground;
}
this._y = this._y + this.ySpeed;
if (this.xSpeed < 2) {
this._x = this._x + this.xSpeed;
this.xSpeed = this.xSpeed * 0.95;
this.grenadeGraph._rotation = this.grenadeGraph._rotation + (random(4) + 3);
}
if (this.thrownWeaponTimer >= _root[currentWeapon].timer) {
explosionNumber++;
_root.attachMovie("explosion_grenade", "grensplosion" + explosionNumber, explosionNumber + 48000);
_root["grensplosion" + explosionNumber]._x = this._x;
_root["grensplosion" + explosionNumber]._y = this._y;
_root["grensplosion" + explosionNumber].play;
this.thrownWeaponTimer = 0;
_root.spawnFragments(_root[currentWeapon].frags, this._x, this._y, _root[currentWeapon].fragDistance, "frag", _root[currentWeapon].damage);
delete this.onEnterFrame;
removeMovieClip(this);
}
};
}
}
function blowThisZombie(zombieToExplode) {
zombieToExplode.gotoAndPlay("exploded1");
}
thrownNumber = 0;
explosionNumber = 0;
zombieExplodeCount = 0;
throwCharge = 0;
throwChargeMin = 15;
throwChargeMax = 50;
ySpeed = -15;
xSpeed = -32;
gravity = 3;
bounce = 0.5;
ground = _root.mainChar._y + 100;
function setupWall(townName) {
wall = new Object();
wall.health = location[townName].maxWallHealth;
wall.maxHealth = location[townName].maxWallHealth;
wall.destroyed = false;
startOfLevelWallHealth = wall.health;
wallAnimatedDestroyed = false;
}
function checkWallStatus() {
if ((wall.health == wall.maxHealth) || (wall.health >= ((wall.maxHealth * 51) / 100))) {
_root.theWall.gotoAndStop(location[currentTownLocation].ref + "_full");
wallAnimatedDestroyed = false;
wall.destroyed = false;
} else if ((wall.health <= ((wall.maxHealth * 50) / 100)) && (wall.health >= ((wall.maxHealth * 1) / 100))) {
_root.theWall.gotoAndStop(location[currentTownLocation].ref + "_half");
wallAnimatedDestroyed = false;
wall.destroyed = false;
} else if ((wall.health <= 0) && (!wallAnimatedDestroyed)) {
_root.theWall.gotoAndStop(location[currentTownLocation].ref + "_dead");
wallAnimatedDestroyed = true;
}
}
setupWall(currentTownLocation);
Instance of Symbol 2126 MovieClip "stageBG" in Frame 7
onClipEvent (load) {
_root.fireButton(this._name);
}
Instance of Symbol 2128 MovieClip "blockFront" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 2130 MovieClip "blockTop" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 2132 MovieClip "blockBack" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 2133 MovieClip "blockBottom" in Frame 7
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 95 MovieClip "game" in Frame 7
onClipEvent (load) {
_root.gameStopStart(this._name);
}
Instance of Symbol 2181 MovieClip in Frame 7
on (release) {
_root.loadOptions();
}
on (rollOver) {
this.menuText.alphaTo(100, 0.5, "easeOutSine");
}
on (rollOut) {
this.menuText.alphaTo(0, 0.8, "easeOutSine");
}
Symbol 4 MovieClip [performanceTester] Frame 1
function doEnterFrame() {
f++;
if ((f % c) == 0) {
var _local2 = getTimer();
var _local3 = _local2 - lastMeasured;
lastMeasured = _local2;
var _local1 = (c / _local3) * 1000;
framerate_txt.text = "fps = " + String(setFloatPrecision(_local1, 2));
createGraphPixel(f / c, displayRoot.bg._height - _local1);
}
}
function createBackdrop() {
var _local4 = [2, 128, 40, false, "normal", "round", "round", 3];
var _local1 = 200;
bgWidth = _local1;
var _local3 = 120;
var _local2 = createRectangle(displayRoot, "bg", 16777215, 100, _local1, _local3, _local4);
_local2._x = 10;
_local2._y = 50;
}
function createGraphDisplay(yval) {
var _local1 = createMc(displayRoot.bg, "displayClip");
_local1.lineStyle(1, 10485760, 70, false, "normal", "round", "round", 3);
if (yval == undefined) {
yval = displayRoot.bg._height - 12;
}
_local1.moveTo(1, yval);
}
function createGraphPixel(x, y) {
var _local1 = x % bgWidth;
if (_local1 == 0) {
displayRoot.bg.displayClip.removeMovieClip();
createGraphDisplay(y);
}
if (_local1 > 0) {
history.push({frame:x * 10, fps:y});
displayRoot.bg.displayClip.lineTo(_local1, y);
}
}
function setFloatPrecision(inValue, decimals) {
d = Math.pow(10, decimals);
return(Math.round(inValue * d) / d);
}
function createRectangle(attachTimeLine, idName, bgCol, alpha, width, height, lineStyle, depth) {
if (depth == undefined) {
depth = attachTimeLine.getNextHighestDepth();
}
var _local1 = attachTimeLine.createEmptyMovieClip(idName, depth);
_local1.beginFill(bgCol, alpha);
_local1.lineStyle.apply(_local1, lineStyle);
_local1.lineTo(0, height);
_local1.lineTo(width, height);
_local1.lineTo(width, 0);
_local1.lineTo(0, 0);
return(_local1);
}
function createMc(attachTimeLine, idName, depth, dynamicNaming) {
if (depth == undefined) {
depth = attachTimeLine.getNextHighestDepth();
}
if (dynamicNaming) {
var _local2 = attachTimeLine.createEmptyMovieClip(idName + String(depth), depth);
} else {
var _local2 = attachTimeLine.createEmptyMovieClip(idName, depth);
}
return(_local2);
}
var displayRoot = this;
var history;
var lastMeasured = getTimer();
var f = 0;
var c = 10;
var bgWidth;
createBackdrop();
createGraphDisplay();
this.onEnterFrame = doEnterFrame;
this.onPress = function () {
this.onMouseMove = function () {
updateAfterEvent();
};
this.startDrag();
};
this.onRelease = function () {
this.onMouseMove = null;
this.stopDrag();
};
Symbol 10 Button
on (release) {
getURL ("http://armorgames.com/play/1443/the-last-stand-2", "_blank");
}
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 11
stop();
Symbol 38 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 70 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 72 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
this._rotation = this._rotation + (random(20) - 10);
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 7
stop();
Symbol 243 MovieClip Frame 17
stop();
Symbol 243 MovieClip Frame 26
stop();
Symbol 243 MovieClip Frame 65
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 1
stop();
Instance of Symbol 268 MovieClip "dummyHead" in Symbol 273 MovieClip Frame 1
/* no clip actions */
Symbol 273 MovieClip Frame 21
gotoAndStop ("rifle");
Symbol 273 MovieClip Frame 24
_root[this._parent._name].reloading = true;
Symbol 273 MovieClip Frame 79
_root[this._parent._name].reloading = false;
gotoAndStop ("rifle");
Symbol 273 MovieClip Frame 107
gotoAndStop ("handgun");
Symbol 273 MovieClip Frame 119
_root[this._parent._name].reloading = true;
Symbol 273 MovieClip Frame 182
_root[this._parent._name].reloading = false;
gotoAndStop ("handgun");
Symbol 273 MovieClip Frame 198
stop();
Symbol 273 MovieClip Frame 212
stop();
Symbol 286 MovieClip [survivorDummy] Frame 1
stop();
Instance of Symbol 275 MovieClip "collision" in Symbol 286 MovieClip [survivorDummy] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 286 MovieClip [survivorDummy] Frame 33
stop();
Symbol 286 MovieClip [survivorDummy] Frame 56
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 1
this._rotation = this._rotation + (random(20) - 10);
stop();
Instance of Symbol 309 MovieClip "arrowPack" in Symbol 310 MovieClip [zombieTorso3] Frame 1
/* no clip actions */
Symbol 325 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
Symbol 495 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
this._rotation = this._rotation + (random(20) - 10);
stop();
Symbol 550 MovieClip Frame 1
stop();
Symbol 596 MovieClip Frame 1
stop();
Symbol 674 MovieClip [bloodPack1] Frame 1
stop();
Symbol 674 MovieClip [bloodPack1] Frame 9
stop();
Symbol 674 MovieClip [bloodPack1] Frame 19
stop();
Symbol 674 MovieClip [bloodPack1] Frame 26
stop();
Symbol 674 MovieClip [bloodPack1] Frame 34
stop();
Symbol 674 MovieClip [bloodPack1] Frame 41
stop();
Symbol 674 MovieClip [bloodPack1] Frame 50
stop();
Symbol 674 MovieClip [bloodPack1] Frame 58
stop();
Symbol 674 MovieClip [bloodPack1] Frame 67
stop();
Symbol 686 MovieClip [zombieDog] Frame 1
_root.zombieGroanSound("dog");
Instance of Symbol 275 MovieClip "torso" in Symbol 686 MovieClip [zombieDog] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "reach" in Symbol 686 MovieClip [zombieDog] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 686 MovieClip [zombieDog] Frame 10
gotoAndPlay ("walk1");
Symbol 686 MovieClip [zombieDog] Frame 32
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 686 MovieClip [zombieDog] Frame 76
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 686 MovieClip [zombieDog] Frame 103
gotoAndPlay ("idlestop1");
Symbol 686 MovieClip [zombieDog] Frame 147
gotoAndPlay ("eating");
Instance of Symbol 275 MovieClip "collision" in Symbol 695 MovieClip [round] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 695 MovieClip [round] Frame 3
stop();
Symbol 695 MovieClip [round] Frame 4
stop();
Symbol 695 MovieClip [round] Frame 14
_root.smokePuff++;
_root.attachMovie("RPG_Smoke", "RPG_Smoke" + _root.smokePuff, _root.smokePuff + 534346);
_root["RPG_Smoke" + _root.smokePuff]._x = this._x;
_root["RPG_Smoke" + _root.smokePuff]._y = this._y + (random(10) - 5);
_root["RPG_Smoke" + _root.smokePuff]._rotation = _root.mainGunRef._rotation;
gotoAndPlay ("RPG");
Symbol 695 MovieClip [round] Frame 22
stop();
Symbol 702 MovieClip [bloodPack2] Frame 1
stop();
Instance of Symbol 704 MovieClip "hand" in Symbol 705 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 707 MovieClip in Symbol 708 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 710 MovieClip in Symbol 711 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 719 MovieClip Frame 1
stop();
Symbol 719 MovieClip Frame 16
stop();
Symbol 719 MovieClip Frame 26
stop();
Symbol 719 MovieClip Frame 33
stop();
Symbol 719 MovieClip Frame 41
stop();
Symbol 719 MovieClip Frame 48
stop();
Symbol 719 MovieClip Frame 57
stop();
Symbol 719 MovieClip Frame 65
stop();
Symbol 719 MovieClip Frame 74
stop();
Symbol 906 MovieClip [newZombie] Frame 1
_root.zombieGroanSound("fast");
Instance of Symbol 708 MovieClip "dummyHead" in Symbol 906 MovieClip [newZombie] Frame 1
/* no clip actions */
Instance of Symbol 275 MovieClip "head" in Symbol 906 MovieClip [newZombie] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "legs" in Symbol 906 MovieClip [newZombie] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "torso" in Symbol 906 MovieClip [newZombie] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "reach" in Symbol 906 MovieClip [newZombie] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "collisionFeet" in Symbol 906 MovieClip [newZombie] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 906 MovieClip [newZombie] Frame 35
gotoAndPlay ("walk1");
Symbol 906 MovieClip [newZombie] Frame 41
_root.zombieGroanSound("slow");
Symbol 906 MovieClip [newZombie] Frame 72
gotoAndPlay ("walk2");
Symbol 906 MovieClip [newZombie] Frame 80
_root.zombieGroanSound("Sprint");
Instance of Symbol 275 MovieClip "head" in Symbol 906 MovieClip [newZombie] Frame 80
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "legs" in Symbol 906 MovieClip [newZombie] Frame 80
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "torso" in Symbol 906 MovieClip [newZombie] Frame 80
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "reach" in Symbol 906 MovieClip [newZombie] Frame 80
onClipEvent (load) {
this._visible = false;
}
Symbol 906 MovieClip [newZombie] Frame 96
gotoAndPlay ("walk3");
Symbol 906 MovieClip [newZombie] Frame 163
gotoAndPlay ("idlestop1");
Symbol 906 MovieClip [newZombie] Frame 186
gotoAndPlay ("trapped");
_root.zombieLegBloodParticle(this._x, this._y + 45);
Symbol 906 MovieClip [newZombie] Frame 191
_root[this._name].attackingWall = true;
Symbol 906 MovieClip [newZombie] Frame 205
_root.zombieHitWallSound();
Symbol 906 MovieClip [newZombie] Frame 214
gotoAndPlay ("idlestop1");
_root[this._name].attackingWall = false;
Symbol 906 MovieClip [newZombie] Frame 215
_root[this._name].attackingWall = true;
Symbol 906 MovieClip [newZombie] Frame 235
_root.zombieHitWallSound();
Symbol 906 MovieClip [newZombie] Frame 236
_root.zombieHitWallSound();
Symbol 906 MovieClip [newZombie] Frame 246
gotoAndPlay ("idlestop1");
_root[this._name].attackingWall = false;
Symbol 906 MovieClip [newZombie] Frame 274
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 295
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 321
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 348
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 369
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 397
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 436
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 469
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 512
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Symbol 906 MovieClip [newZombie] Frame 539
_root.hero.isAlive = false;
Symbol 906 MovieClip [newZombie] Frame 592
gotoAndPlay ("eat");
Symbol 906 MovieClip [newZombie] Frame 616
setTimeout(_root.removeThisZombie, _root.removeZombieDelay, this._name);
stop();
Instance of Symbol 275 MovieClip "collision" in Symbol 915 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "collision" in Symbol 917 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "collision" in Symbol 919 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "collision" in Symbol 921 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 275 MovieClip "collision" in Symbol 923 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 924 MovieClip Frame 1
stop();
Symbol 933 MovieClip [RPG_Smoke] Frame 34
_root.removeSmoke(this._name);
stop();
Instance of Symbol 939 MovieClip "collision" in Symbol 940 MovieClip [trap_gasCylinder] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Instance of Symbol 943 MovieClip in Symbol 944 MovieClip [bloodParticle] Frame 1
onClipEvent (load) {
this._x = this._x + random(15);
this._y = this._y + random(15);
this._rotation = this._rotation + random(360);
}
Symbol 960 MovieClip Frame 1
stop();
Symbol 960 MovieClip Frame 12
stop();
Symbol 960 MovieClip Frame 22
stop();
Symbol 960 MovieClip Frame 31
stop();
Symbol 984 MovieClip [muzzleFlash_pistol] Frame 1
stop();
Symbol 998 MovieClip Frame 1
stop();
Symbol 1006 MovieClip [shellcasing_rifle_2] Frame 19
stop();
removeMovieClip(this);
Symbol 1007 MovieClip [shellcasing_rifle_1] Frame 19
stop();
removeMovieClip(this);
Symbol 1015 MovieClip Frame 1
stop();
Symbol 1022 MovieClip Frame 1
stop();
Symbol 1034 MovieClip Frame 1
stop();
Symbol 1034 MovieClip Frame 15
gotoAndPlay ("loop");
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 16
gotoAndPlay ("loop");
Symbol 1047 MovieClip Frame 1
stop();
Symbol 1047 MovieClip Frame 7
gotoAndPlay ("loop");
Symbol 1052 MovieClip Frame 1
stop();
Symbol 1052 MovieClip Frame 16
gotoAndPlay ("loop");
Symbol 1068 MovieClip Frame 1
stop();
Symbol 1068 MovieClip Frame 15
gotoAndPlay ("loop");
Symbol 1068 MovieClip Frame 21
gotoAndStop (1);
Symbol 1074 MovieClip Frame 1
stop();
Symbol 1074 MovieClip Frame 26
gotoAndPlay ("loop");
Symbol 1077 MovieClip Frame 56
stop();
Symbol 1085 MovieClip Frame 1
stop();
Symbol 1091 MovieClip Frame 1
stop();
Symbol 1091 MovieClip Frame 16
gotoAndPlay ("loop");
Symbol 1100 MovieClip Frame 1
stop();
Symbol 1118 MovieClip Frame 1
stop();
Symbol 1118 MovieClip Frame 16
gotoAndPlay ("loop");
Symbol 1125 MovieClip Frame 1
stop();
Symbol 1125 MovieClip Frame 6
gotoAndPlay ("loop");
Symbol 1150 MovieClip Frame 1
stop();
Symbol 1150 MovieClip Frame 17
gotoAndPlay ("loop");
Symbol 1151 MovieClip Frame 1
stop();
Symbol 1151 MovieClip Frame 15
gotoAndStop ("pistol");
Symbol 1151 MovieClip Frame 61
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("pistol");
Symbol 1151 MovieClip Frame 88
gotoAndStop ("revolver");
Symbol 1151 MovieClip Frame 167
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("revolver");
Symbol 1151 MovieClip Frame 168
stop();
Symbol 1151 MovieClip Frame 193
_root.pumpWeaponSound();
Symbol 1151 MovieClip Frame 218
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("huntingRifle");
Symbol 1151 MovieClip Frame 274
gotoAndStop ("huntingRifle");
Symbol 1151 MovieClip Frame 294
_root.pumpWeaponSound();
Symbol 1151 MovieClip Frame 313
gotoAndStop ("shotgun");
Symbol 1151 MovieClip Frame 343
gotoAndPlay(("load_" + _root.shellsToLoad) + "_Shells");
Symbol 1151 MovieClip Frame 351
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 367
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 380
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 396
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 408
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 421
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 435
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 448
_root.ammoInMag = _root.ammoInMag + 1;
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 459
_root.pumpWeaponSound();
Symbol 1151 MovieClip Frame 482
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("shotgun");
Symbol 1151 MovieClip Frame 493
_root[_root.currentWeapon].recoiling = false;
gotoAndStop ("M4A1");
Symbol 1151 MovieClip Frame 549
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("M4A1");
Symbol 1151 MovieClip Frame 557
_root[_root.currentWeapon].recoiling = false;
gotoAndStop ("AK47");
Symbol 1151 MovieClip Frame 613
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("AK47");
Symbol 1151 MovieClip Frame 620
_root[_root.currentWeapon].recoiling = false;
gotoAndStop ("UMP");
Symbol 1151 MovieClip Frame 663
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("UMP");
Symbol 1151 MovieClip Frame 664
gun.gotoAndPlay("loop");
Symbol 1151 MovieClip Frame 676
_root.stopChainsawIdle();
Symbol 1151 MovieClip Frame 692
_root.playChainsawOffSound();
Symbol 1151 MovieClip Frame 711
_root.playChainsawPullSound();
Symbol 1151 MovieClip Frame 749
_root.playChainsawPullSound();
Symbol 1151 MovieClip Frame 761
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("chainsaw");
_root.playChainsawIdle();
Symbol 1151 MovieClip Frame 799
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("flameThrower");
Symbol 1151 MovieClip Frame 872
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("grenade");
Symbol 1151 MovieClip Frame 873
stop();
Symbol 1151 MovieClip Frame 897
gotoAndStop ("sawnOff");
Symbol 1151 MovieClip Frame 910
_root.pumpWeaponSound();
Symbol 1151 MovieClip Frame 929
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 940
_root.shellReloadSound();
Symbol 1151 MovieClip Frame 954
_root.pumpWeaponSound();
Symbol 1151 MovieClip Frame 959
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("sawnOff");
Symbol 1151 MovieClip Frame 1029
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("UZI");
Symbol 1151 MovieClip Frame 1067
gotoAndStop ("barrett");
Symbol 1151 MovieClip Frame 1117
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("barrett");
Symbol 1151 MovieClip Frame 1127
_root[_root.currentWeapon].recoiling = false;
gotoAndStop ("M249");
Symbol 1151 MovieClip Frame 1257
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("M249");
Symbol 1151 MovieClip Frame 1327
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("RPG");
Symbol 1151 MovieClip Frame 1365
_root.bowReloadSound();
Symbol 1151 MovieClip Frame 1376
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("compoundBow");
Symbol 1151 MovieClip Frame 1394
_root[_root.currentWeapon].recoiling = false;
gotoAndStop ("autoShotgun");
Symbol 1151 MovieClip Frame 1421
_root.reloadAnimPlaying = false;
_root.reloadMagazine();
gotoAndStop ("autoShotgun");
Symbol 1167 MovieClip [mainCharacter] Frame 1
stop();
Symbol 1167 MovieClip [mainCharacter] Frame 65
gotoAndPlay ("loop");
Symbol 1182 MovieClip Frame 1
stop();
Symbol 1194 MovieClip Frame 1
Symbol 1217 MovieClip [aimingReticle] Frame 1
stop();
Symbol 1217 MovieClip [aimingReticle] Frame 10
stop();
Symbol 1218 MovieClip [grenade] Frame 1
stop();
Symbol 1227 MovieClip [explosion_grenade] Frame 2
boomSound = new Sound(stageBG);
boomSound.attachSound("sound_explosion");
boomSound.setVolume(100);
boomSound.start(0, 1);
Symbol 1227 MovieClip [explosion_grenade] Frame 59
stop();
removeMovieClip(this);
Instance of Symbol 275 MovieClip "collision" in Symbol 1230 MovieClip [RPG_Explosion] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1230 MovieClip [RPG_Explosion] Frame 11
this.removeMovieClip();
Symbol 1231 MovieClip [shellcasing_pistol_3] Frame 20
removeMovieClip(this);
Symbol 1232 MovieClip [shellcasing_Pistol_1] Frame 21
removeMovieClip(this);
Symbol 1233 MovieClip [shellcasing_Pistol_2] Frame 21
removeMovieClip(this);
Symbol 1234 MovieClip [shellcasing_rifle_3] Frame 19
stop();
removeMovieClip(this);
Symbol 1235 MovieClip [shellcasing_Shotgun1] Frame 36
removeMovieClip(this);
Symbol 1236 MovieClip [shellcasing_Shotgun2] Frame 37
removeMovieClip(this);
Symbol 1305 MovieClip [soundHolder] Frame 1
stop();
Symbol 1308 MovieClip [shellcasing_noPumpShotgun1] Frame 22
removeMovieClip(this);
Symbol 1309 MovieClip [shellcasing_noPumpShotgun2] Frame 22
removeMovieClip(this);
Symbol 1310 MovieClip [shellcasing_noPumpShotgun3] Frame 22
removeMovieClip(this);
Symbol 1311 MovieClip [shellcasing_noPumpShotgun4] Frame 22
removeMovieClip(this);
Symbol 1312 MovieClip [shellcasing_Shotgun3] Frame 37
removeMovieClip(this);
Symbol 1313 MovieClip [shellcasing_Shotgun4] Frame 36
removeMovieClip(this);
Symbol 1341 MovieClip Frame 1
stop();
Symbol 1344 MovieClip Frame 1
stop();
Symbol 1345 MovieClip [optionsMenu] Frame 1
stop();
Instance of Symbol 1338 MovieClip "MAIN MENU" in Symbol 1345 MovieClip [optionsMenu] Frame 1
onClipEvent (load) {
_root.optionsButtons(this._name);
}
Instance of Symbol 1338 MovieClip "RESUME" in Symbol 1345 MovieClip [optionsMenu] Frame 1
onClipEvent (load) {
_root.optionsButtons(this._name);
}
Instance of Symbol 1338 MovieClip "QUALITY" in Symbol 1345 MovieClip [optionsMenu] Frame 1
onClipEvent (load) {
_root.optionsButtons(this._name);
}
Symbol 1407 Button
on (release) {
_root.closeManager();
}
Symbol 1436 MovieClip Frame 1
stop();
Instance of Symbol 939 MovieClip "empty" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "pistol" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "revolver" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "UMP" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "huntingRifle" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "AK47" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "M4A1" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "shotgun" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "sawnOff" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "UZI" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "chainsaw" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "M249" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "compoundBow" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "RPG" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "pistol" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "revolver" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "UMP" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "huntingRifle" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "AK47" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "M4A1" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "shotgun" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "sawnOff" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "UZI" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "grenade" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 939 MovieClip "barrett" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponRackButtons(this._name);
}
Instance of Symbol 1403 MovieClip "slot3" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponSlotButtons(this._name);
}
Instance of Symbol 1403 MovieClip "slot4" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponSlotButtons(this._name);
}
Instance of Symbol 1403 MovieClip "slot5" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponSlotButtons(this._name);
}
Instance of Symbol 1403 MovieClip "slot6" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponSlotButtons(this._name);
}
Instance of Symbol 1403 MovieClip "secondary" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponSlotButtons(this._name);
}
Instance of Symbol 1403 MovieClip "primary" in Symbol 1436 MovieClip Frame 1
onClipEvent (load) {
_root.weaponSlotButtons(this._name);
}
Symbol 1445 MovieClip Frame 1
stop();
Symbol 1455 MovieClip Frame 1
stop();
Instance of Symbol 1446 MovieClip "location1" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location2" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location3" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location4" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location6" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location7" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location8" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location9" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location11" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location12" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location13" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location14" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location16" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location17" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location18" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1446 MovieClip "location19" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapMapPlacementButtons(this._name);
}
Instance of Symbol 1448 MovieClip "but_gasCylinder" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapSelectionButtons(this._name);
}
Instance of Symbol 1450 MovieClip "but_mine" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapSelectionButtons(this._name);
}
Instance of Symbol 1455 MovieClip "trapSetupButton" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapSetupButton(this._name);
}
Instance of Symbol 1458 MovieClip "but_bearTrap" in Symbol 1467 MovieClip Frame 1
onClipEvent (load) {
_root.trapSelectionButtons(this._name);
}
Symbol 1477 Button
on (release) {
_root.closeJournal();
}
Symbol 1509 MovieClip Frame 1
stop();
Symbol 1513 Button
on (release) {
_root.confirmResults();
}
Symbol 1534 MovieClip Frame 1
stop();
Symbol 1536 MovieClip Frame 1
stop();
Symbol 1541 MovieClip Frame 1
stop();
Instance of Symbol 1541 MovieClip "survivorsPlace0" in Symbol 1542 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1541 MovieClip "survivorsPlace1" in Symbol 1542 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1541 MovieClip "survivorsPlace2" in Symbol 1542 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace1" in Symbol 1543 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace0" in Symbol 1543 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace2" in Symbol 1543 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace3" in Symbol 1543 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace4" in Symbol 1543 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace5" in Symbol 1543 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace1" in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace2" in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace3" in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace0" in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Symbol 1562 MovieClip Frame 1
stop();
Instance of Symbol 1562 MovieClip "survivorsPlace0" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1541 MovieClip "survivorsPlace1" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace2" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace3" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace4" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace5" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace6" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace7" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace8" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace9" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace10" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace11" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace12" in Symbol 1563 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace2" in Symbol 1564 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace0" in Symbol 1564 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace1" in Symbol 1564 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace3" in Symbol 1564 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace4" in Symbol 1564 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace3" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace2" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace1" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace0" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace4" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace5" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace6" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace7" in Symbol 1580 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace1" in Symbol 1581 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace0" in Symbol 1581 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace1" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace4" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace5" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace2" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace0" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace3" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace6" in Symbol 1582 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace0" in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace2" in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace1" in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace3" in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace4" in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace0" in Symbol 1595 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace3" in Symbol 1595 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace2" in Symbol 1595 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace1" in Symbol 1595 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace0" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1541 MovieClip "survivorsPlace1" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace2" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace3" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace4" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace5" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace6" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace7" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace8" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "survivorsPlace9" in Symbol 1605 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace2" in Symbol 1606 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace0" in Symbol 1606 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace1" in Symbol 1606 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace3" in Symbol 1606 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace4" in Symbol 1606 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace0" in Symbol 1608 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace1" in Symbol 1608 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace0" in Symbol 1617 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1541 MovieClip "suppliesPlace1" in Symbol 1617 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("supplies", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace0" in Symbol 1620 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace1" in Symbol 1620 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace2" in Symbol 1620 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace3" in Symbol 1620 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1562 MovieClip "survivorsPlace3" in Symbol 1620 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("survivors", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace1" in Symbol 1621 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace2" in Symbol 1621 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Instance of Symbol 1534 MovieClip "weaponsPlace0" in Symbol 1621 MovieClip Frame 1
onClipEvent (load) {
_root.searchBuildingButtons("weapons", this._name);
}
Symbol 1634 MovieClip Frame 1
stop();
Symbol 1653 Button
on (release) {
_root.confirmTimeManagement();
}
Instance of Symbol 1669 MovieClip in Symbol 1670 MovieClip Frame 1
on (release) {
_root.openTravelMap();
}
Instance of Symbol 1657 MovieClip "barricadeMinus" in Symbol 1678 MovieClip Frame 1
onClipEvent (load) {
_root.clipBoardButtons(this._name);
}
Instance of Symbol 1657 MovieClip "barricadePlus" in Symbol 1678 MovieClip Frame 1
onClipEvent (load) {
_root.clipBoardButtons(this._name);
}
Symbol 1697 MovieClip Frame 14
stop();
Symbol 1708 MovieClip Frame 1
Symbol 1708 MovieClip Frame 10
stop();
Symbol 1709 MovieClip Frame 1
stop();
Symbol 1709 MovieClip Frame 13
Symbol 1747 Button
on (release) {
_root.travelConfirmed(_root.currentTownLocation, _root.currentTownTarget);
this.slideTo(-13, 420, 0.5);
}
Instance of Symbol 1711 MovieClip "cancel" in Symbol 1748 MovieClip Frame 1
onClipEvent (load) {
_root.cancelTravelConfirm(this._name);
}
Instance of Symbol 1709 MovieClip "glenDale" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.townButton(this._name);
}
Instance of Symbol 1709 MovieClip "claysBurg" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.townButton(this._name);
}
Instance of Symbol 1709 MovieClip "whistlersGrove" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.townButton(this._name);
}
Instance of Symbol 1709 MovieClip "aspenWood" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.townButton(this._name);
}
Instance of Symbol 1709 MovieClip "jonesTown" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.townButton(this._name);
}
Instance of Symbol 1709 MovieClip "unionCity" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.townButton(this._name);
}
Instance of Symbol 1711 MovieClip "cancel" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
_root.cancelTravel(this._name);
}
Instance of Symbol 1715 MovieClip "blockerButton" in Symbol 1749 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.useHandCursor = false;
};
this._visible = false;
}
Instance of Symbol 1738 MovieClip "townInfoCard" in Symbol 1749 MovieClip Frame 1
/* no clip actions */
Symbol 1750 MovieClip [timeManager] Frame 1
stop();
Symbol 1750 MovieClip [timeManager] Frame 2
stop();
Instance of Symbol 275 MovieClip "collision" in Symbol 1775 MovieClip [flameParticle] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1775 MovieClip [flameParticle] Frame 18
this.removeMovieClip();
Symbol 1786 MovieClip Frame 40
stop();
Instance of Symbol 1778 MovieClip in Symbol 1813 MovieClip [ending2_badEnding] Frame 1
onClipEvent (load) {
this.useHandCursor = false;
this.onRelease = function () {
};
}
Instance of Symbol 1807 MovieClip "mainMenuButton" in Symbol 1813 MovieClip [ending2_badEnding] Frame 679
onClipEvent (load) {
this.butLabel.text = "MAIN MENU";
this.onRelease = function () {
function removeParentGameOver() {
_root.mainChar.removeMovieClip();
_root.hud.removeMovieClip();
_root.cleanUpScreen();
_root.cleanUpSurvivors();
_root.removeSurvivors();
delete game.onEnterFrame;
_root.gotoAndStop("main");
_root.mainBlackOut.removeMovieClip();
_root.timeManager.removeMovieClip();
_parent.removeMovieClip();
}
_root.mainBlackOut.alphaTo(100, 2, "easeOutSine", 0, removeParentGameOver);
};
}
Symbol 1813 MovieClip [ending2_badEnding] Frame 746
stop();
Instance of Symbol 1778 MovieClip in Symbol 1820 MovieClip [ending2_goodEnding] Frame 1
onClipEvent (load) {
this.useHandCursor = false;
this.onRelease = function () {
};
}
Instance of Symbol 1807 MovieClip "mainMenuButton" in Symbol 1820 MovieClip [ending2_goodEnding] Frame 693
onClipEvent (load) {
this.butLabel.text = "MAIN MENU";
this.onRelease = function () {
function removeParentGameOver() {
_root.mainChar.removeMovieClip();
_root.hud.removeMovieClip();
_root.cleanUpScreen();
_root.cleanUpSurvivors();
_root.removeSurvivors();
delete game.onEnterFrame;
_root.gotoAndStop("main");
_root.mainBlackOut.removeMovieClip();
_root.timeManager.removeMovieClip();
_parent.removeMovieClip();
}
_root.mainBlackOut.alphaTo(100, 2, "easeOutSine", 0, removeParentGameOver);
};
}
Symbol 1820 MovieClip [ending2_goodEnding] Frame 782
stop();
Instance of Symbol 1821 MovieClip "creditsButton" in Symbol 1836 MovieClip [credits] Frame 1
onClipEvent (load) {
this.onRelease = function () {
_root.closeCredits();
};
}
Instance of Symbol 1834 MovieClip "creditList" in Symbol 1836 MovieClip [credits] Frame 1
/* no clip actions */
Instance of Symbol 1330 MovieClip in Symbol 1863 MovieClip [instructionsMenu] Frame 1
onClipEvent (load) {
this.useHandCursor = false;
this.onRelease = function () {
};
}
Instance of Symbol 1862 MovieClip "BACK" in Symbol 1863 MovieClip [instructionsMenu] Frame 1
onClipEvent (load) {
this.butLabel.text = this._name;
this.onRelease = function () {
function removeParent() {
removeMovieClip(_parent);
loadFromInstructions(mainMenu);
}
_parent.alphaTo(0, 0.8, "easeOutSine", 0, removeParent);
};
}
Symbol 1867 MovieClip Frame 36
stop();
Instance of Symbol 1807 MovieClip "MAIN MENU" in Symbol 1878 MovieClip [gameOver] Frame 1
onClipEvent (load) {
this.butLabel.text = this._name;
this.onRelease = function () {
function removeParentGameOver() {
_root.mainChar.removeMovieClip();
_root.hud.removeMovieClip();
_root.cleanUpScreen();
_root.removeSurvivors();
delete game.onEnterFrame;
_root.gotoAndStop("main");
removeMovieClip(_parent);
}
_parent.mainBlackOut.alphaTo(100, 2, "easeOutSine", 0, removeParentGameOver);
};
}
Instance of Symbol 1874 MovieClip "RETRY" in Symbol 1878 MovieClip [gameOver] Frame 1
onClipEvent (load) {
this.butLabel.text = this._name;
this.onRelease = function () {
_root.mainBlackOut._visible = true;
_root.mainBlackOut.alphaTo(100, 2, "easeOutSine", 0, _root.removeParentGameOverRetry);
};
}
Instance of Symbol 1807 MovieClip "VISIT ARMORGAMES.COM" in Symbol 1878 MovieClip [gameOver] Frame 1
onClipEvent (load) {
this.butLabel.text = "ARMORGAMES.COM";
this.onRelease = function () {
getURL ("http://armorgames.com/play/1443/the-last-stand-2", "_blank");
};
}
Instance of Symbol 1807 MovieClip "musicBy" in Symbol 1878 MovieClip [gameOver] Frame 1
onClipEvent (load) {
this.butLabel.text = "EVIL-LIVES.COM";
this.onRelease = function () {
getURL ("http://www.evil-lives.com/", "_blank");
};
}
Symbol 1911 MovieClip Frame 1
Symbol 1916 MovieClip Frame 1
Symbol 1922 MovieClip Frame 1
Symbol 1922 MovieClip Frame 13
Symbol 1930 MovieClip Frame 29
Symbol 1939 MovieClip [endingAnimation] Frame 393
this.blackhawk1.frontWindowGunner.gotoAndPlay("waving");
Instance of Symbol 1807 MovieClip "MAIN MENU" in Symbol 1939 MovieClip [endingAnimation] Frame 829
onClipEvent (load) {
this.butLabel.text = this._name;
this.onRelease = function () {
_root.cleanUpScreen();
_root.gotoAndPlay(1);
removeMovieClip(_root.endingAnim);
};
}
Instance of Symbol 1807 MovieClip "VISIT ARMORGAMES.COM" in Symbol 1939 MovieClip [endingAnimation] Frame 833
onClipEvent (load) {
this.butLabel.text = this._name;
this.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
}
Instance of Symbol 1807 MovieClip "MAIN MENU" in Symbol 1939 MovieClip [endingAnimation] Frame 839
onClipEvent (load) {
this.butLabel.text = this._name;
this.onRelease = function () {
_root.cleanUpScreen();
_root.gotoAndStop("main");
removeMovieClip(_root.endingAnim);
};
}
Symbol 1939 MovieClip [endingAnimation] Frame 1384
stop();
Instance of Symbol 939 MovieClip "collisionFeet" in Symbol 1942 MovieClip [trap_mine] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1948 MovieClip [trap_bearTrap] Frame 1
stop();
Instance of Symbol 939 MovieClip "collisionFeet" in Symbol 1948 MovieClip [trap_bearTrap] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 1972 MovieClip Frame 63
gotoAndPlay (2);
Instance of Symbol 1978 MovieClip "PLAY MORE GAMES" in Symbol 1979 MovieClip Frame 1
onClipEvent (load) {
_root.mainButtons(this._name);
}
Instance of Symbol 1978 MovieClip "OPTIONS" in Symbol 1979 MovieClip Frame 1
onClipEvent (load) {
_root.mainButtons(this._name);
}
Instance of Symbol 1978 MovieClip "INSTRUCTIONS" in Symbol 1979 MovieClip Frame 1
onClipEvent (load) {
_root.mainButtons(this._name);
}
Instance of Symbol 1978 MovieClip "PLAY" in Symbol 1979 MovieClip Frame 1
onClipEvent (load) {
_root.mainButtons(this._name);
}
Instance of Symbol 1978 MovieClip "CREDITS" in Symbol 1979 MovieClip Frame 1
onClipEvent (load) {
_root.mainButtons(this._name);
}
Instance of Symbol 1978 MovieClip "PLAYTLS1" in Symbol 1979 MovieClip Frame 1
onClipEvent (load) {
_root.mainButtons(this._name);
}
Symbol 1989 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 1996 MovieClip Frame 2
menuMusic = new Sound(mainMenu);
menuMusic.attachSound("AG_beat");
menuMusic.setVolume(100);
menuMusic.start(0, 1);
Symbol 1996 MovieClip Frame 11
menuMusic = new Sound(mainMenu);
menuMusic.attachSound("AG_chorus");
menuMusic.setVolume(100);
menuMusic.start(0, 1);
Symbol 1996 MovieClip Frame 53
menuMusic = new Sound(mainMenu);
menuMusic.attachSound("AG_sword");
menuMusic.setVolume(100);
menuMusic.start(0, 1);
Symbol 1996 MovieClip Frame 82
stop();
Symbol 2030 MovieClip Frame 201
stop();
Symbol 2031 MovieClip Frame 110
conArtistSting = new Sound(mainMenu);
conArtistSting.attachSound("conArtistSting");
conArtistSting.setVolume(100);
conArtistSting.start(0, 1);
Instance of Symbol 2030 MovieClip in Symbol 2031 MovieClip Frame 110
onClipEvent (load) {
this.onRelease = function () {
getURL ("http://www.con-artists-productions.com", "_blank");
};
}
Symbol 2031 MovieClip Frame 335
stop();
_root.mainMenu.bloodSplatter._visible = true;
_root.mainMenu.noise._visible = true;
Instance of Symbol 1972 MovieClip "noise" in Symbol 2032 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 1979 MovieClip "mainMenuButtons" in Symbol 2032 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 1985 MovieClip "skipButton" in Symbol 2032 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
this.onRelease = function () {
_root.loadWholeMenuNow();
};
}
Instance of Symbol 1836 MovieClip [credits] "credits" in Symbol 2032 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 2032 MovieClip Frame 25
stop();
Symbol 2036 Button
on (release) {
_root.closeIntroJournal();
}
Instance of Symbol 1985 MovieClip "skipButton" in Symbol 2097 MovieClip Frame 13
onClipEvent (load) {
this.onRelease = function () {
_parent.gotoAndPlay("endThis");
};
}
Symbol 2097 MovieClip Frame 849
stop();
this._visible = false;
_root.introBlackOut.alphaTo(0, 10, "easeOutSine");
_root.openIntroJournal();
Symbol 2123 MovieClip Frame 1
stop();
Instance of Symbol 2102 MovieClip "dawn" in Symbol 2123 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 2105 MovieClip "dawn" in Symbol 2123 MovieClip Frame 12
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 2112 MovieClip "dawn" in Symbol 2123 MovieClip Frame 37
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 2117 MovieClip "dawn" in Symbol 2123 MovieClip Frame 48
onClipEvent (load) {
this.visible = false;
}
Instance of Symbol 2122 MovieClip "dawn" in Symbol 2123 MovieClip Frame 67
onClipEvent (load) {
this._visible = false;
}
Symbol 2149 MovieClip Frame 21
stop();
Symbol 2174 MovieClip Frame 1
stop();