Instance of Symbol 52 MovieClip in Frame 1
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Frame 2
FOG.AS2.FogServices.Connect({id:134, fogid:14855, name:"urban-sniper-2", title:"Urban Sniper 2", category:"shooting-games"});
FOG.AS2.FogPreloader.Start();
Frame 3
stop();
mcLogo.swapDepths(99998);
Frame 4
prel.removeMovieClip();
btnFoggy.removeMovieClip();
mcTaglines.removeMovieClip();
mcLogo.removeMovieClip();
Frame 31
_quality = "medium";
Instance of Symbol 52 MovieClip in Frame 31
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Frame 32
mcMusic.gotoAndPlay("menu");
Frame 33
var arrRank = new Array(["NEWBIE", 0], ["WANNABE", 2000], ["THE KID", 5000], ["THE FOX", 10000], ["HIRED GUN", 20000], ["THE JACKAL", 40000], ["THE URBAN SNIPER", 500000]);
var arrMail = new Array({id:0, status:"Unread"}, {id:1, status:"Unread"});
var historySuccess = new Array();
var historyFail = new Array();
var bullets = 99;
var completed = 0;
var failed = 0;
var accuracy = 0;
var kills = 0;
var points = 0;
var selectedMission;
var selectedMail;
var rank = arrRank[5][0];
var snipe = false;
var holeNo = 300;
var currentPage = "";
var bounty = false;
var arrMissions = new Array();
arrMissions.push({title:"", label:"", type:"message", from:"Hugo", subject:"Sorry", message:"Yo bro. Sorry to hear about your old man. I can't imagine how hard it could be for you. I know you guys are like strangers and all... I mean, you haven't seen the guy since you were born. But still, he's your dad. And i know you've been searching for him all your life... never imagined it could come to this. Anyways, if you need my help bro, you know where to reach me. Let's get that <language filter> who put you up to this.", objectives:[], objNo:0, points:0, fail:[0], success:[0]});
arrMissions.push({title:"YOUR ATTENTION PLEASE", label:"payback", type:"mission", from:"The Tipster", subject:"Information", message:"I'm sure you're planning a hit on Don Pedrito, but believe me he is not that easy guy to find. You will need to force him out in the open by hitting on his business. Your best starting point is with Big Joe; since the two of them are close buds, Big Joe will definitely rant when he is compromised. Big Joe will be in his turf at 7th and 23rd Avenue Eastside, and of course his men will be within the area. Send Big Joe your message by getting rid of his men.", objectives:["KILL ALL FIFTEEN (15) OF BIGJOE'S HOODLUMS IN THE AREA"], objNo:15, points:5000, fail:[3, 2], success:[5, 4]});
arrMissions.push({title:"BOUNTY", label:"", type:"message", from:"BIG JOE", subject:"WHAT THE F***!!!", message:"Are you outta your f***** mind?! You no good Sonova b****! You got STUPID or something!? I trusted you, you motha f****** s***! I give you jobs and this is the thanks you give me, you lousy stinkin piece-o-s***!? If that's how you want it, then it's your funeral c***-s*****! All the top assassins will be on your back once they here about the $2Million i have on your head!", objectives:[], objNo:5, points:0, fail:[0], success:[0]});
arrMissions.push({title:"ALL IN THE BANK", label:"bank", type:"mission", from:"The Tipster", subject:"Last chance", message:"That didn't go as planned. You certainly got Big Joe's attention... but in a very bad way. I heard he's put a bounty on your head; better watch yourself. Be aware of the people around you or you might get a bullet in your head. Anyway, Big Joe's accountant is scheduled to make a major transaction today at Concepcion Bank in Marquina City. Kill him and Big Joe will know you mean business. The accountant will be keeping a low profile so it may be a bit difficult to identify him. Just keep an eye on the bank; i'm still sure you'll be able to spot him from a mile away. Be careful.", objectives:["KILL THE ACCOUNTANT"], objNo:1, points:10000, fail:[7], success:[9, 4]});
arrMissions.push({title:"", label:"", type:"message", from:"BIG JOE", subject:"PLEASE READ", message:"I swear i have no part in the killing of your father! It was all Don Pedrito's doing! Please don't kill me.. i'll do anything you want, anything! If you want Don Pedrito, i can help you! You gotta bring him out in the open by hitting him where it matters! I'll have my men do some snoopin and get back to you with what we find.", objectives:[], objNo:0, points:0, fail:[0], success:[0]});
arrMissions.push({title:"THE PARKING TICKET OFFICER", label:"parking", type:"mission", from:"The Tipster", subject:"re: Information", message:"You did it! That got his attention perfectly well. Now all you have to do it wait. Hang out for a while, you may receive news when you get back. Hang out around the local mall parking lot. I know how you hate it whenever you get find a parking ticket each and every time you leave your car for a job, so here's your chance to get back at 'em.", objectives:["KILL ALL PARKING TICKET OFFICERS"], objNo:0, points:5000, fail:[6], success:[6]});
arrMissions.push({title:"Last Chance", label:"lastchance", type:"mission", from:"Big Joe", subject:"News", message:"Okay, listen up. Don Pedrito is being careful... intended targets won't be easy to spot. His number 2 guy is in a meeting with the leaders of the El Bangaw gang.. you gotta take him out. Head over to Hotel Wandah on Rodriguez Road and keep an eye out for him. Don't mess this up!", objectives:["TAKE OUT DON PEDRITO'S NUMBER TWO GUY"], objNo:1, points:10000, fail:[12], success:[8]});
arrMissions.push({title:"", label:"", type:"message", from:"The Tipster", subject:"re: Last chance", message:"Did i forget to mention that was your last chance? Sorry dude, you're on your own now. Better shape up or you'll never have your revenge. You probably wouldn't get anymore jobs either... but who cares?", objectives:[""], objNo:0, points:0, fail:[], success:[]});
arrMissions.push({title:"AMMO DEPOT", label:"ammo", type:"mission", from:"Big Joe", subject:"The Shipment", message:"Ok here's what my boys came up with. Don Pedrito just received a huge ammo shipment lastnight which is being stored in warehouse 222 to 224 at the old shipyard. If you want to cripple him, you got to destroy everything. Be sure no one escapes. Also heard that the Don knows you're after him so he's hired some of the best hitmen to take you down.", objectives:["DESTROY ALL AMMUNITION CREATE", "KILL ALL OF DON PREDRITO'S MEN"], objNo:20, points:20000, fail:[10], success:[11]});
arrMissions.push({title:"THE PARKING TICKET OFFICER", label:"parking", type:"mission", from:"The Tipster", subject:"re: Information", message:"You did it! That got his attention perfectly well. Now all you have to do it wait. Hang out for a while, you may receive news when you get back. Hang out around the local mall parking lot. I know how you hate it whenever you get find a parking ticket each and every time you leave your car for a job, so here's your chance to get back at 'em. And you don't have to worry about those assassins anymore... Big Joe called them off.", objectives:["KILL ALL PARKING TICKET OFFICERS"], objNo:0, points:5000, fail:[6], success:[6]});
arrMissions.push({title:"MARATHON", label:"marathon", type:"mission", from:"Big Joe", subject:"2006 Charity Marathon ", message:"I can't believe you blew that. Better make good on this one; otherwise the Don will figure everything out and it'll be my head on the line! It's time to get personal. Don's brother will be running in the 2006 Charity Marathon later today.. he's keeping a low profile, so no bodyguards here. Just keep an eye out for him... he likes to wear shades.", objectives:["KILL DON PEDRITO'S BROTHER"], objNo:1, points:15000, fail:[12], success:[13]});
arrMissions.push({title:"MARATHON", label:"marathon", type:"mission", from:"Big Joe", subject:"2006 Charity Marathon ", message:"Good work. His business will be greatly affected by the loss of supplies. It's time to hit him hard, and it's time to get personal. Don's brother will be running in the 2006 Charity Marathon later today.. he's keeping a low profile, so no bodyguards here. Just keep an eye out for him... he likes to wear shades.", objectives:["KILL DON PEDRITO'S BROTHER"], objNo:1, points:20000, fail:[12], success:[13]});
arrMissions.push({title:"", label:"", type:"message", from:"The Tipster", subject:"Big Joe is dead", message:"Hey man, got word that Don Pedrito found out about you and Big Joe. The runt signed his own death warrant the minute he agreed to supply you with info. Now you're trapped in the dark; Big Joe was the only guy who had the resources to spy on Don Pedrito. With him gone, you got nowhere else to go. Sorry man. At this point, my only advice is to move on. Don't waste your time looking for the Don 'coz it's gonna pull you down to the pits. You did your best, but i guess it wasn't good enough.", objectives:[""], objNo:0, points:0, fail:[], success:[]});
arrMissions.push({title:"ORIENTAL COCKROACH", label:"oriental", type:"mission", from:"Big Joe", subject:"Trouble", message:"Nice. The Don is in grief and has so much hatred for you it's a surprise you're still alive. He only has one thing in his mind right now.. and you wouldn't want to know what that is. He's set up a meeting between his Number 3 and the Oriental Cockroach gang down at Foggy Park. You know that ain't good 'coz you're the agenda. Head on down there and kill the lot of them.", objectives:["KILL ALL OF DON PEDRITO'S MEN", "ELIMINATE THE ORIENTAL COCKROACH GANG"], objNo:30, points:30000, fail:[12], success:[14]});
arrMissions.push({title:"", label:"final", type:"next", from:"Don Pedrito", subject:"[none]", message:"Listen... this is as far as i go. The Don is getting smarter and smarter. I suspect he's been watching my every move. Sources say that he's removed all constraints. He's calling in the big boys to take you down. This is my last email. But before i finish this, i just got one piece of advice for you... PRAY.", objectives:[], objNo:0, points:0, fail:[], success:[]});
stop();
btnNew.onRelease = function () {
currentPage = "howtoplay";
fader.play();
};
btnHigh.onRelease = function () {
currentPage = "highscore";
fader.play();
};
btnFree.onRelease = function () {
FOG.AS2.FogServices.TrackClick("www.freegamesforyourwebsite.com");
};
btnPlay.onRelease = function () {
FOG.AS2.FogServices.TrackClick();
};
Frame 39
prevFrame();
Frame 40
function updateScoreboard(sNum) {
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
_root["mcScoreboard" + sNum].mcLoading._visible = false;
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = _root["mcScoreboard" + sNum].sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.item = myPlayer.length;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.speedy = 0;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.desty = 0;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
if (sNum == 1) {
updateScoreboard(2);
}
};
if (sNum == 1) {
xmlPlayer.load((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999));
} else if (sNum == 2) {
xmlPlayer.load(((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999)) + "&filt=1");
}
}
stop();
mcScoreboard1.sboard.dir = "stop";
mcScoreboard2.sboard.dir = "stop";
mcScoreboard1.sboard.mcScoreHolder.mcScore._visible = false;
mcScoreboard2.sboard.mcScoreHolder.mcScore._visible = false;
updateScoreboard(1);
btnMain.onRelease = function () {
currentPage = "menu";
fader.play();
};
Frame 49
prevFrame();
Frame 50
btnMain.onRelease = function () {
currentPage = "lobby";
fader.play();
};
Frame 59
prevFrame();
Frame 60
function getDistance(p1, p2) {
return(Math.sqrt(Math.pow(p1._x - p2._x, 2) + Math.pow(p1._y - p2._y, 2)));
}
function getCoordDist(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)));
}
function gameSetup() {
okToShoot = true;
mainObjectives = arrMissions[selectedMission].objNo;
objectivesCompleted = 0;
holeNo = 300;
levelKills = 0;
bulletsFired = 0;
acc = 0;
arrMail[selectedMail].status = "Failed";
txtBullets.text = bullets;
var _local2 = 0;
while (_local2 < arrMissions[_root.selectedMission].objectives.length) {
_root["txtO" + (_local2 + 1)].text = arrMissions[_root.selectedMission].objectives[_local2];
_local2++;
}
mg.swapDepths(99999);
black._visible = false;
mg._visible = false;
mg.stopDrag();
mg._x = (mg._y = 5000);
Level._visible = true;
Level._x = (Level._y = 0);
mg.image._xscale = (mg.image._yscale = 500);
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.isDown(32)) {
if (!gameEnd) {
mcMusic.gotoAndPlay("zoom");
snipe = !snipe;
if (snipe) {
snipeMode(true);
} else {
snipeMode(false);
}
}
}
};
Key.addListener(myListener);
}
function snipeMode(modes) {
if (modes) {
black._visible = true;
cursor._visible = false;
mg._visible = true;
mg.image._xscale = (mg.image._yscale = 500);
Mouse.hide();
mg.startDrag(true, 0, 0, Stage.width, 300);
mg.onEnterFrame = function () {
this.image._x = (-_root._xmouse) * 5;
this.image._y = (-_root._ymouse) * 5;
};
_root.onMouseDown = function () {
if ((mg._currentframe == 1) && (okToShoot)) {
if (bullets > 0) {
okToShoot = false;
makeHoles();
bulletsFired++;
txtBullets.text = --bullets;
mcMusic.gotoAndPlay("bang");
mg.play();
} else {
mcMusic.gotoAndPlay("empty");
}
}
};
Level._x = (Level._y = 5000);
Level._visible = false;
} else {
black._visible = false;
mg.stopDrag();
mg._x = (mg._y = 1000);
delete mg.onEnterFrame;
delete _root.onMouseDown;
mg.image._x = (mg.image._y = 0);
mg.image._xscale = (mg.image._yscale = 10);
mg._visible = false;
Mouse.show();
Level._visible = true;
Level._x = (Level._y = 0);
}
}
function checkObjectives() {
if (objectivesCompleted >= mainObjectives) {
arrMail[selectedMail].status = "Success";
} else {
arrMail[selectedMail].status = "Failed";
}
}
function checkRank() {
ctr = arrRank.length - 1;
while (ctr >= 0) {
if ((points + 40000) >= arrRank[ctr][1]) {
rank = arrRank[ctr][0];
return;
}
ctr--;
}
}
function computeScore() {
kills = kills + levelKills;
if (arrMail[selectedMail].status == "Success") {
completed++;
points = points + ((arrMissions[_root.selectedMission].points + (levelKills * 100)) + (bullets * 10));
checkRank();
_root.selectedEmail = _root.selectedEmail + arrMissions[_root.selectedMission].success.length;
var _local2 = 0;
while (_local2 < arrMissions[_root.selectedMission].success.length) {
arrMail.unshift({id:arrMissions[_root.selectedMission].success[_local2], status:"Unread"});
_local2++;
}
} else {
if (_root.selectedMission == 1) {
bounty = true;
}
failed++;
if (levelKills > 0) {
points = points + ((levelKills * 100) + (bullets * 10));
}
checkRank();
_root.selectedEmail = _root.selectedEmail + arrMissions[_root.selectedMission].fail.length;
var _local2 = 0;
while (_local2 < arrMissions[_root.selectedMission].fail.length) {
arrMail.unshift({id:arrMissions[_root.selectedMission].fail[_local2], status:"Unread"});
_local2++;
}
}
if ((levelKills > 0) && (bulletsFired > 0)) {
acc = Math.ceil((levelKills / bulletsFired) * 100);
} else {
acc = 0;
}
if (acc > 100) {
acc = 100;
}
if (accuracy == 0) {
accuracy = acc;
} else if ((levelKills != 0) && (bulletsFired != 0)) {
accuracy = Math.ceil((accuracy + acc) / 2);
}
}
function clearLevel() {
clearInterval(snipered);
delete snipered;
mg._visible = true;
mg.removeMovieClip();
Key.removeListener(myListener);
delete this.onMouseDown;
delete this.onEnterFrame;
}
function exitMission() {
clearLevel();
computeScore();
currentPage = "lobby";
fader.play();
}
stopAllSounds();
var mainObjectives = 0;
var objectivesCompleted = 0;
var levelKills = 0;
var bulletsFired = 0;
var acc = 0;
var okToShoot = true;
var gameEnd = false;
txtRank.text = rank;
txtBullets.text = bullets;
txtMissionCompleted.text = completed;
txtMissionFailed.text = failed;
txtKills.text = kills;
txtAccuracy.text = accuracy + "%";
txtPoints.text = points;
mcMail.mcAlert._visible = false;
ctr = 0;
while (ctr < arrMail.length) {
if (arrMail[ctr].status == "Unread") {
mcMail.mcAlert._visible = true;
}
ctr++;
}
mcMail.btnComputer.onRelease = function () {
currentPage = "emails";
fader.play();
};
btnSave.onRelease = function () {
currentPage = "saveGame";
fader.play();
};
btnMain.onRelease = function () {
currentPage = "premenu";
fader.play();
};
Frame 69
prevFrame();
Frame 70
stopAllSounds();
btnAccept._visible = false;
buttonText.text = "";
btnBack.onRelease = function () {
currentPage = "lobby";
fader.play();
};
myMail = mcEmail.mcScroller;
myMail.mcMail._visible = false;
var ctr = 0;
while (ctr < arrMail.length) {
newMail = myMail.mcMail.duplicateMovieClip("mcMail" + ctr, ctr);
newMail._visible = true;
newMail.id = arrMail[ctr].id;
newMail.txtSender.text = arrMissions[arrMail[ctr].id].from;
newMail.txtSubject.text = arrMissions[arrMail[ctr].id].subject;
newMail.txtStatus.text = arrMail[ctr].status;
newMail._y = ctr * (myMail.mcMail._height + 2);
if ((ctr % 2) != 0) {
newMail.gotoAndStop(2);
}
newMail.ctr = ctr;
newMail.btnButton.onRelease = function () {
_root.selectedMission = this._parent.id;
_root.selectedMail = this._parent.ctr;
txtSender.text = this._parent.txtSender.text;
txtSubject.text = this._parent.txtSubject.text;
txtMessage.text = arrMissions[this._parent.id].message;
if ((this._parent.txtStatus.text == "Unread") || (this._parent.txtStatus.text == "Pending")) {
if (arrMissions[this._parent.id].type == "mission") {
this._parent.txtStatus.text = "Pending";
btnAccept._visible = true;
buttonText.text = "accept mission";
btnAccept.onRelease = function () {
currentPage = arrMissions[_root.selectedMission].label;
fader.play();
};
} else if (arrMissions[this._parent.id].type == "next") {
this._parent.txtStatus.text = "Read";
btnAccept._visible = true;
buttonText.text = "what's next?";
btnAccept.onRelease = function () {
currentPage = arrMissions[_root.selectedMission].label;
fader.play();
};
} else {
btnAccept._visible = false;
buttonText.text = "";
this._parent.txtStatus.text = "Read";
}
} else {
btnAccept._visible = false;
buttonText.text = "";
}
arrMail[this._parent.ctr].status = this._parent.txtStatus.text;
};
ctr++;
}
Frame 79
prevFrame();
Frame 80
function makeHoles() {
if (mg.image.mcBuilding.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo++);
b1._xscale = (b1._yscale = 50);
b2._xscale = (b2._yscale = 50);
b1._rotation = random(360);
b2._rotation = random(360);
b1._x = _root._xmouse;
b1._y = _root._ymouse;
b2._x = _root._xmouse;
b2._y = _root._ymouse;
}
}
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function checkAlerts(who, dist, type) {
var _local2 = 0;
while (_local2 <= 30) {
if (who != who._parent["mcMan" + _local2]) {
if (who._parent["mcMan" + _local2].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.die) {
who._parent["mcMan" + _local2].status = "dead";
if (_local2 > 15) {
objectivesCompleted++;
checkObjectives();
}
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local2].onEnterFrame;
delete Level["mcMan" + _local2].onEnterFrame;
who._parent["mcMan" + _local2].gotoAndStop("die" + t);
Level["mcMan" + _local2].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local2].status != "run") && (who._parent["mcMan" + _local2].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.run) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local2]) < dist.talk) {
t = random(4) + 1;
who._parent["mcMan" + _local2].gotoAndStop("talk" + t);
Level["mcMan" + _local2].gotoAndStop("talk" + t);
}
}
}
}
_local2++;
}
if ((type != "normal") && (type != "car")) {
ctr = 0;
while (ctr <= 16) {
if (who != who._parent["car" + ctr]) {
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
Level["car" + ctr].status = (who._parent["car" + ctr].status = "dead");
delete who._parent["car" + ctr].onEnterFrame;
delete Level["car" + ctr].onEnterFrame;
who._parent["car" + ctr].car.gotoAndPlay(2);
Level["car" + ctr].car.gotoAndPlay(2);
checkAlerts(who._parent["car" + ctr], {die:30, run:60, talk:80}, "car");
}
}
ctr++;
}
}
}
stopAllSounds();
gameSetup();
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
});
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
var people = 0;
while (people < 16) {
person = Level.attachMovie("mcMan", "mcMan" + people, people);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2._x = (person._x = random(Stage.width));
ypos = random(2);
if (ypos == 0) {
person2._y = (person._y = 224 + random(10));
} else {
person.swapDepths(people + 200);
person2.swapDepths(people + 200);
person2._y = (person._y = 262 + random(15));
}
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
action = random(5);
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var rWalk = (random(14) + 1);
person.walk.gotoAndPlay(rWalk);
person2.walk.gotoAndPlay(rWalk);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
people++;
}
var people = 16;
while (people <= 30) {
person = Level.attachMovie("mcMan", "mcMan" + people, people);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2._x = (person._x = random(Stage.width));
ypos = random(2);
if (ypos == 0) {
person2._y = (person._y = 224 + random(10));
} else {
person.swapDepths(people + 200);
person2.swapDepths(people + 200);
person2._y = (person._y = 262 + random(15));
}
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
objectivesCompleted++;
checkObjectives();
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
person[this.status].head.gotoAndStop("shades");
person2[this.status].head.gotoAndStop("shades");
person2.headType = (person.headType = "shades");
action = random(5);
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var rWalk = (random(14) + 1);
person.walk.gotoAndPlay(rWalk);
person2.walk.gotoAndPlay(rWalk);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
people++;
}
ctr = 0;
while (ctr <= 16) {
if (ctr < 9) {
Level["car" + ctr].swapDepths(100 + ctr);
mg.image["car" + ctr].swapDepths(100 + ctr);
} else {
Level["car" + ctr].swapDepths(180 + ctr);
mg.image["car" + ctr].swapDepths(180 + ctr);
}
r = random(3) + 1;
Level["car" + ctr].gotoAndStop(r);
mg.image["car" + ctr].gotoAndStop(r);
r1 = random(10) + 1;
if (r1 <= 7) {
Level["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.head._visible = false;
} else {
Level["car" + ctr].car.head._visible = true;
mg.image["car" + ctr].car.head._visible = true;
}
mg.image["car" + ctr].car.mcTank.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this._parent._parent.status = "dead";
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete this._parent._parent.onEnterFrame;
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
Level["car" + this._parent._parent._name.substr(3)].car.play();
this._parent.play();
checkAlerts(this._parent._parent, {die:30, run:60, talk:80}, "car");
delete this.onMouseDown;
delete mg.image.mcTanker.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
mg.image["car" + ctr].car.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this._visible) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
levelKills++;
delete this._parent._parent.onEnterFrame;
this._parent._parent.status = "dead";
this.gotoAndPlay(2);
this._parent.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].car.head.gotoAndPlay(3);
Level["car" + this._parent._parent._name.substr(3)].car.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
}
}
}
};
ctr++;
}
Frame 89
prevFrame();
Frame 90
function makeHoles() {
if (mg.image.mcBuilding.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo++);
b1._xscale = (b1._yscale = 50);
b2._xscale = (b2._yscale = 50);
b1._rotation = random(360);
b2._rotation = random(360);
b1._x = _root._xmouse;
b1._y = _root._ymouse;
b2._x = _root._xmouse;
b2._y = _root._ymouse;
}
}
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function makePerson(people) {
person = Level.attachMovie("mcMan", "mcMan" + people, people + 2);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people + 2);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
if (people != 31) {
person2._x = (person._x = random(Stage.width));
ypos = random(2);
if (ypos == 0) {
person2._y = (person._y = 224 + random(10));
} else {
person.swapDepths(people + 200);
person2.swapDepths(people + 200);
person2._y = (person._y = 262 + random(15));
}
action = random(5);
} else {
person2._x = (person._x = 270);
person2._y = (person._y = 224);
person[this.status].head.gotoAndStop("cigar");
person2[this.status].head.gotoAndStop("cigar");
person.boss = true;
person2.boss = true;
person2.headType = (person.headType = "cigar");
action = 1;
}
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
if (Number(this._name.substr(5)) == 31) {
objectivesCompleted++;
checkObjectives();
}
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var _local4 = random(14) + 1;
person.walk.gotoAndPlay(_local4);
person2.walk.gotoAndPlay(_local4);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if ((this.status == "walk") && (this.id != 21)) {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if ((this.status == "walk") && (this.id != 21)) {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
function checkAlerts(who, dist, type) {
var _local2 = 0;
while (_local2 <= 31) {
if (who != who._parent["mcMan" + _local2]) {
if (who._parent["mcMan" + _local2].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.die) {
who._parent["mcMan" + _local2].status = "dead";
if (_local2 == 31) {
objectivesCompleted++;
checkObjectives();
}
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local2].onEnterFrame;
delete Level["mcMan" + _local2].onEnterFrame;
who._parent["mcMan" + _local2].gotoAndStop("die" + t);
Level["mcMan" + _local2].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local2].status != "run") && (who._parent["mcMan" + _local2].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.run) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local2]) < dist.talk) {
if (_local2 != 21) {
t = random(4) + 1;
who._parent["mcMan" + _local2].gotoAndStop("talk" + t);
Level["mcMan" + _local2].gotoAndStop("talk" + t);
} else {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
}
}
}
}
}
_local2++;
}
if ((type != "normal") && (type != "car")) {
ctr = 0;
while (ctr <= 16) {
if (who != who._parent["car" + ctr]) {
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
Level["car" + ctr].status = (who._parent["car" + ctr].status = "dead");
delete who._parent["car" + ctr].onEnterFrame;
delete Level["car" + ctr].onEnterFrame;
who._parent["car" + ctr].car.gotoAndPlay(2);
Level["car" + ctr].car.gotoAndPlay(2);
checkAlerts(who._parent["car" + ctr], {die:30, run:60, talk:80}, "car");
mcMusic.gotoAndPlay("boom");
}
}
ctr++;
}
}
}
function makeSniper() {
person = Level.attachMovie("mcMan", "mcMan32", 0);
person2 = mg.image.attachMovie("mcMan", "mcMan32", 0);
person2.id = (person.id = 32);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person.where = (person2.where = "sniper");
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
bldg = random(10);
if (bldg < 5) {
bldg = 0;
} else {
bldg = 1;
}
person._x = (person2._x = random(45) + arrFloor[bldg].min);
person._y = (person2._y = arrFloor[bldg].floors[random(arrFloor[bldg].floors.length)]);
person.gotoAndStop("snipe");
person2.gotoAndStop("snipe");
clearInterval(snipeID);
delete snipeID;
snipeID = setInterval(this, "snipeMe", 80);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
}
}
}
};
}
function snipeMe() {
Level.mcMan32.snipe.nextFrame();
mg.image.mcMan32.snipe.nextFrame();
}
function checkSniper() {
w = random(1000);
if (w < 200) {
if (!hasSniper) {
hasSniper = true;
makeSniper();
}
}
if (w < 50) {
if (!hasAccount) {
hasAccount = true;
makePerson(31);
}
}
}
var snipeID;
var hasSniper = false;
var hasAccount = false;
stopAllSounds();
gameSetup();
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
});
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
var people = 0;
while (people < 31) {
makePerson(people);
people++;
}
ctr = 0;
while (ctr <= 16) {
if (ctr < 9) {
Level["car" + ctr].swapDepths(100 + ctr);
mg.image["car" + ctr].swapDepths(100 + ctr);
} else {
Level["car" + ctr].swapDepths(180 + ctr);
mg.image["car" + ctr].swapDepths(180 + ctr);
}
r = random(3) + 1;
Level["car" + ctr].gotoAndStop(r);
mg.image["car" + ctr].gotoAndStop(r);
r1 = random(10) + 1;
if (r1 <= 7) {
Level["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.head._visible = false;
} else {
Level["car" + ctr].car.head._visible = true;
mg.image["car" + ctr].car.head._visible = true;
}
mg.image["car" + ctr].car.mcTank.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this._parent._parent.status = "dead";
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete this._parent._parent.onEnterFrame;
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
Level["car" + this._parent._parent._name.substr(3)].car.play();
this._parent.play();
checkAlerts(this._parent._parent, {die:30, run:60, talk:80}, "car");
delete this.onMouseDown;
delete mg.image.mcTanker.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
mcMusic.gotoAndPlay("boom");
}
}
};
mg.image["car" + ctr].car.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this._visible) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
levelKills++;
delete this._parent._parent.onEnterFrame;
this._parent._parent.status = "dead";
this.gotoAndPlay(2);
this._parent.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].car.head.gotoAndPlay(3);
Level["car" + this._parent._parent._name.substr(3)].car.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
}
}
}
};
ctr++;
}
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
var arrFloor = [{min:480, floors:[197, 174, 152, 129, 107]}, {min:50, floors:[197, 174, 152, 129]}];
Level.mcBuilding.swapDepths(1);
mg.image.mcBuilding.swapDepths(1);
if (bounty) {
snipered = setInterval(this, "checkSniper", 2000);
}
Frame 99
prevFrame();
Frame 100
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function makePerson(people) {
person = Level.attachMovie("mcMan", "mcMan" + people, people + 2);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people + 2);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2._x = (person._x = random(Stage.width));
ypos = random(2);
if (ypos == 0) {
person2._y = (person._y = 224 + random(10));
} else {
person.swapDepths(people + 210);
person2.swapDepths(people + 210);
person2._y = (person._y = 284 + random(20));
}
action = random(5);
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var _local4 = random(14) + 1;
person.walk.gotoAndPlay(_local4);
person2.walk.gotoAndPlay(_local4);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
function checkAlerts(who, dist, type) {
var _local2 = 0;
while (_local2 < 21) {
if (who != who._parent["mcMan" + _local2]) {
if (who._parent["mcMan" + _local2].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.die) {
who._parent["mcMan" + _local2].status = "dead";
if (_local2 > 15) {
objectivesCompleted++;
checkObjectives();
}
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local2].onEnterFrame;
delete Level["mcMan" + _local2].onEnterFrame;
who._parent["mcMan" + _local2].gotoAndStop("die" + t);
Level["mcMan" + _local2].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local2].status != "run") && (who._parent["mcMan" + _local2].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.run) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local2]) < dist.talk) {
t = random(4) + 1;
who._parent["mcMan" + _local2].gotoAndStop("talk" + t);
Level["mcMan" + _local2].gotoAndStop("talk" + t);
}
}
}
}
_local2++;
}
if ((type != "normal") && (type != "car")) {
ctr = 0;
while (ctr <= 27) {
if (who != who._parent["car" + ctr]) {
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
Level["car" + ctr].status = (who._parent["car" + ctr].status = "dead");
delete who._parent["car" + ctr].onEnterFrame;
delete Level["car" + ctr].onEnterFrame;
who._parent["car" + ctr].car.gotoAndPlay(2);
Level["car" + ctr].car.gotoAndPlay(2);
checkAlerts(who._parent["car" + ctr], {die:30, run:60, talk:80}, "car");
}
}
ctr++;
}
}
}
stopAllSounds();
gameSetup();
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
});
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
var people = 0;
while (people < 16) {
makePerson(people);
people++;
}
var people = 16;
while (people <= 20) {
person = Level.attachMovie("mcMan", "mcMan" + people, people);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2._x = (person._x = random(Stage.width));
ypos = random(2);
if (ypos == 0) {
person2._y = (person._y = 224 + random(10));
} else {
person.swapDepths(people + 210);
person2.swapDepths(people + 210);
person2._y = (person._y = 284 + random(20));
}
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
objectivesCompleted++;
checkObjectives();
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
person[this.status].head.gotoAndStop("cap");
person2[this.status].head.gotoAndStop("cap");
person2.headType = (person.headType = "cap");
action = random(5);
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var rWalk = (random(14) + 1);
person.walk.gotoAndPlay(rWalk);
person2.walk.gotoAndPlay(rWalk);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
} else {
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x < -5) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
people++;
}
ctr = 0;
while (ctr <= 27) {
if (ctr < 9) {
Level["car" + ctr].swapDepths(100 + ctr);
mg.image["car" + ctr].swapDepths(100 + ctr);
} else {
Level["car" + ctr].swapDepths(180 + ctr);
mg.image["car" + ctr].swapDepths(180 + ctr);
}
r = random(3) + 1;
Level["car" + ctr].gotoAndStop(r);
mg.image["car" + ctr].gotoAndStop(r);
r1 = random(10) + 1;
if (r1 <= 7) {
Level["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.head._visible = false;
} else {
Level["car" + ctr].car.head._visible = true;
mg.image["car" + ctr].car.head._visible = true;
}
mg.image["car" + ctr].car.mcTank.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this._parent._parent.status = "dead";
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete this._parent._parent.onEnterFrame;
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
Level["car" + this._parent._parent._name.substr(3)].car.play();
this._parent.play();
checkAlerts(this._parent._parent, {die:30, run:60, talk:80}, "car");
delete this.onMouseDown;
delete mg.image.mcTanker.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
mg.image["car" + ctr].car.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this._visible) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
levelKills++;
delete this._parent._parent.onEnterFrame;
this._parent._parent.status = "dead";
this.gotoAndPlay(2);
this._parent.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].car.head.gotoAndPlay(3);
Level["car" + this._parent._parent._name.substr(3)].car.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
}
}
}
};
ctr++;
}
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
Frame 109
prevFrame();
Frame 110
function makeHoles() {
if (mg.image.mcBuilding.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo++);
b1._xscale = (b1._yscale = 50);
b2._xscale = (b2._yscale = 50);
b1._rotation = random(360);
b2._rotation = random(360);
b1._x = _root._xmouse;
b1._y = _root._ymouse;
b2._x = _root._xmouse;
b2._y = _root._ymouse;
}
}
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function makePerson(people) {
person = Level.attachMovie("mcMan", "mcMan" + people, people + 2);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people + 2);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
if (people < 31) {
person2._x = (person._x = random(Stage.width));
ypos = random(2);
if (ypos == 0) {
person2._y = (person._y = 224 + random(10));
} else {
person.swapDepths(people + 200);
person2.swapDepths(people + 200);
person2._y = (person._y = 262 + random(15));
}
action = random(5);
} else {
person2._x = (person._x = 358);
person2._y = (person._y = 224);
if (hasTarget) {
person[this.status].head.gotoAndStop("cigar");
person2[this.status].head.gotoAndStop("cigar");
person2.headType = (person.headType = "cigar");
} else {
person[this.status].head.gotoAndStop("cap");
person2[this.status].head.gotoAndStop("cap");
person2.headType = (person.headType = "cap");
}
person.boss = true;
person2.boss = true;
action = 1;
}
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
if (Number(this._name.substr(5)) == 32) {
objectivesCompleted++;
checkObjectives();
}
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var _local4 = random(14) + 1;
person.walk.gotoAndPlay(_local4);
person2.walk.gotoAndPlay(_local4);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if ((this.status == "walk") && (this.id < 31)) {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if ((this.status == "walk") && (this.id < 31)) {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
function checkAlerts(who, dist, type) {
var _local2 = 0;
while (_local2 <= 32) {
if (who != who._parent["mcMan" + _local2]) {
if (who._parent["mcMan" + _local2].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.die) {
who._parent["mcMan" + _local2].status = "dead";
if (_local2 == 32) {
objectivesCompleted++;
checkObjectives();
}
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local2].onEnterFrame;
delete Level["mcMan" + _local2].onEnterFrame;
who._parent["mcMan" + _local2].gotoAndStop("die" + t);
Level["mcMan" + _local2].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local2].status != "run") && (who._parent["mcMan" + _local2].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local2]) < dist.run) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local2]) < dist.talk) {
if (_local2 < 31) {
t = random(4) + 1;
who._parent["mcMan" + _local2].gotoAndStop("talk" + t);
Level["mcMan" + _local2].gotoAndStop("talk" + t);
} else {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
}
}
}
}
}
_local2++;
}
if ((type != "normal") && (type != "car")) {
ctr = 0;
while (ctr <= 16) {
if (who != who._parent["car" + ctr]) {
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
Level["car" + ctr].status = (who._parent["car" + ctr].status = "dead");
mcMusic.gotoAndPlay("boom");
delete who._parent["car" + ctr].onEnterFrame;
delete Level["car" + ctr].onEnterFrame;
who._parent["car" + ctr].car.gotoAndPlay(2);
Level["car" + ctr].car.gotoAndPlay(2);
checkAlerts(who._parent["car" + ctr], {die:30, run:60, talk:80}, "car");
}
}
ctr++;
}
}
}
function makeSniper() {
person = Level.attachMovie("mcMan", "mcMan33", 0);
person2 = mg.image.attachMovie("mcMan", "mcMan33", 0);
person2.id = (person.id = 23);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person.where = (person2.where = "sniper");
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
bldg = random(15);
if (bldg < 5) {
bldg = 0;
} else if (bldg < 10) {
bldg = 1;
} else {
bldg = 2;
}
person._x = (person2._x = random(45) + arrFloor[bldg].min);
person._y = (person2._y = arrFloor[bldg].floors[random(arrFloor[bldg].floors.length)]);
person.gotoAndStop("snipe");
person2.gotoAndStop("snipe");
clearInterval(snipeID);
delete snipeID;
snipeID = setInterval(this, "snipeMe", 80);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
}
}
}
};
}
function snipeMe() {
Level.mcMan33.snipe.nextFrame();
mg.image.mcMan33.snipe.nextFrame();
}
function checkSniper() {
w = random(1000);
if (w < 200) {
if (!hasSniper) {
hasSniper = true;
makeSniper();
}
}
if (w < 50) {
if (!hasAccount) {
hasAccount = true;
makePerson(31);
} else if (!hasTarget) {
hasTarget = true;
makePerson(32);
}
}
}
var snipeID;
var hasSniper = false;
var hasAccount = false;
var hasTarget = false;
bounty = true;
stopAllSounds();
gameSetup();
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
});
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
var people = 0;
while (people < 31) {
makePerson(people);
people++;
}
ctr = 0;
while (ctr <= 16) {
if (ctr < 9) {
Level["car" + ctr].swapDepths(100 + ctr);
mg.image["car" + ctr].swapDepths(100 + ctr);
} else {
Level["car" + ctr].swapDepths(180 + ctr);
mg.image["car" + ctr].swapDepths(180 + ctr);
}
r = random(3) + 1;
Level["car" + ctr].gotoAndStop(r);
mg.image["car" + ctr].gotoAndStop(r);
r1 = random(10) + 1;
if (r1 <= 7) {
Level["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.head._visible = false;
} else {
Level["car" + ctr].car.head._visible = true;
mg.image["car" + ctr].car.head._visible = true;
}
mg.image["car" + ctr].car.mcTank.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this._parent._parent.status = "dead";
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete this._parent._parent.onEnterFrame;
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
Level["car" + this._parent._parent._name.substr(3)].car.play();
this._parent.play();
checkAlerts(this._parent._parent, {die:30, run:60, talk:80}, "car");
delete this.onMouseDown;
delete mg.image.mcTanker.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
mcMusic.gotoAndPlay("boom");
}
}
};
mg.image["car" + ctr].car.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this._visible) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
levelKills++;
delete this._parent._parent.onEnterFrame;
this._parent._parent.status = "dead";
this.gotoAndPlay(2);
this._parent.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].car.head.gotoAndPlay(3);
Level["car" + this._parent._parent._name.substr(3)].car.blood._visible = true;
Level["car" + this._parent._parent._name.substr(3)].status = "dead";
delete Level["car" + this._parent._parent._name.substr(3)].onEnterFrame;
}
}
}
};
ctr++;
}
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
var arrFloor = [{min:480, floors:[197, 174, 152, 129, 107]}, {min:384, floors:[197, 174, 152, 129, 107]}, {min:50, floors:[197, 174, 152, 129]}];
Level.mcBuilding.swapDepths(1);
mg.image.mcBuilding.swapDepths(1);
if (bounty) {
snipered = setInterval(this, "checkSniper", 2000);
}
Frame 119
prevFrame();
Frame 120
function makeHoles() {
if (mg.image.mcBuilding.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo++);
b1._xscale = (b1._yscale = 50);
b2._xscale = (b2._yscale = 50);
b1._rotation = random(360);
b2._rotation = random(360);
b1._x = _root._xmouse;
b1._y = _root._ymouse;
b2._x = _root._xmouse;
b2._y = _root._ymouse;
}
}
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function makePerson(people) {
person = Level.attachMovie("mcMan", "mcMan" + people, people + 50);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people + 50);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
if (people < 16) {
person2._x = (person._x = random(Stage.width));
person2._y = (person._y = 224 + random(10));
action = random(5);
} else {
person2._x = (person._x = 358);
person2._y = (person._y = 224);
if (hasTarget) {
person[this.status].head.gotoAndStop("cigar");
person2[this.status].head.gotoAndStop("cigar");
person2.headType = (person.headType = "cigar");
} else {
person[this.status].head.gotoAndStop("cap");
person2[this.status].head.gotoAndStop("cap");
person2.headType = (person.headType = "cap");
}
person.boss = true;
person2.boss = true;
action = 1;
}
dir = random(2);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var _local4 = random(14) + 1;
person.walk.gotoAndPlay(_local4);
person2.walk.gotoAndPlay(_local4);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 665) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
function makePerson2(people) {
if (people < 30) {
person = Level.attachMovie("mcMan", "mcMan" + people, people + 2);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people + 2);
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2.id = (person.id = people);
dir = random(2);
} else {
person = Level.mcMan30;
person2 = mg.image.mcMan30;
person2.id = (person.id = 30);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
dir = 1;
}
if (people < 30) {
person2.bldg = (person.bldg = random(3));
person2.flr = (person.flr = random(2));
if (this.flr == 0) {
person2._y = (person._y = 221);
} else {
person2._y = (person._y = 173);
}
person2._x = (person._x = random(arrb[person.bldg].hi - arrb[person.bldg].lo) + arrb[person.bldg].lo);
action = random(5);
} else {
action = 0;
}
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
delete this.onMouseDown;
this.status = "dead";
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
objectivesCompleted++;
checkObjectives();
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var _local4 = random(14) + 1;
person.walk.gotoAndPlay(_local4);
person2.walk.gotoAndPlay(_local4);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person[this.status].head.gotoAndStop("shades");
person2[this.status].head.gotoAndStop("shades");
person2.headType = (person.headType = "shades");
if (person.id == 30) {
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x <= 440) {
this.gotoAndStop("hide");
mcMusic.gotoAndPlay("alarm");
checkAlerts(this, {die:0, run:500}, "normal");
delete this.onEnterFrame;
}
});
} else {
person2.onEnterFrame = (person.onEnterFrame = function () {
if ((this._parent.mcBuilding["door" + this.bldg].hitTest(this._x, this._y) && (this._parent.mcBuilding["switch" + this.bldg]._currentframe == 1)) && (this.status == "run")) {
this.swapDepths(this.id + 100);
this.onEnterFrame = function () {
if (this._x > 665) {
delete this.onEnterFrame;
this.removeMovieClip();
} else if (this._x < -5) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
} else if (this._x > arrb[this.bldg].hi) {
this._x = arrb[this.bldg].hi;
this._xscale = -this._xscale;
if (this._y > 200) {
this._y = 173;
} else {
this._y = 221;
}
} else if (this._x < arrb[this.bldg].lo) {
this._x = arrb[this.bldg].lo;
this._xscale = -this._xscale;
if (this._y > 200) {
this._y = 173;
} else {
this._y = 221;
}
}
});
}
}
function checkAlerts(who, dist, type) {
var _local1 = 0;
while (_local1 <= 30) {
if (_local1 == 30) {
if (who != who._parent["mcMan" + _local1]) {
if (((who._parent["mcMan" + _local1].status != "dead") && (who._parent["mcMan" + _local1].status != "hide")) && (who._parent["mcMan" + _local1].status != "alert")) {
if ((getDistance(who, who._parent["mcMan" + _local1]) < dist.run) && (_local1 >= 16)) {
who._parent["mcMan" + _local1].gotoAndStop("alert");
Level["mcMan" + _local1].gotoAndStop("alert");
}
}
}
} else if (who != who._parent["mcMan" + _local1]) {
if (who._parent["mcMan" + _local1].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.die) {
who._parent["mcMan" + _local1].status = "dead";
if (who.id >= 16) {
objectivesCompleted++;
checkObjectives();
}
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local1].onEnterFrame;
delete Level["mcMan" + _local1].onEnterFrame;
who._parent["mcMan" + _local1].gotoAndStop("die" + t);
Level["mcMan" + _local1].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local1].status != "run") && (who._parent["mcMan" + _local1].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.run) {
who._parent["mcMan" + _local1].gotoAndStop("alert");
Level["mcMan" + _local1].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local1]) < dist.talk) {
if (_local1 < 21) {
t = random(4) + 1;
who._parent["mcMan" + _local1].gotoAndStop("talk" + t);
Level["mcMan" + _local1].gotoAndStop("talk" + t);
} else {
who._parent["mcMan" + _local1].gotoAndStop("alert");
Level["mcMan" + _local1].gotoAndStop("alert");
}
}
}
}
}
_local1++;
}
}
function makeSniper() {
person = Level.attachMovie("mcMan", "mcMan35", 0);
person2 = mg.image.attachMovie("mcMan", "mcMan35", 0);
person2.id = (person.id = 35);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person.where = (person2.where = "sniper");
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
bldg = random(10);
if (bldg < 5) {
bldg = 0;
} else {
bldg = 1;
}
person._x = (person2._x = random(36) + arrFloor[bldg].min);
person._y = (person2._y = arrFloor[bldg].floors[random(arrFloor[bldg].floors.length)]);
person.gotoAndStop("snipe");
person2.gotoAndStop("snipe");
clearInterval(snipeID);
delete snipeID;
snipeID = setInterval(this, "snipeMe", 80);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
}
}
}
};
}
function snipeMe() {
Level.mcMan35.snipe.nextFrame();
mg.image.mcMan35.snipe.nextFrame();
}
function checkSniper() {
w = random(1000);
if (w < 200) {
if (!hasSniper) {
hasSniper = true;
makeSniper();
}
}
}
var snipeID;
var hasSniper = false;
bounty = true;
stopAllSounds();
gameSetup();
var arrb = new Array({lo:-20, hi:85}, {lo:210, hi:400}, {lo:520, hi:670});
sw = 0;
while (sw < 4) {
Level.mcBuilding["switch" + sw].id = sw;
mg.image.mcBuilding["switch" + sw].id = sw;
mg.image.mcBuilding["switch" + sw].onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._currentframe == 1) {
this.gotoAndStop(2);
Level.mcBuilding["switch" + this.id].gotoAndStop(2);
if (this.id == 3) {
if (this._parent._parent.mcMan30.status != "dead") {
this._parent._parent.mcMan30.gotoAndStop("hide");
Level.mcMan30.gotoAndStop("hide");
delete this._parent._parent.mcMan30.onEnterFrame;
delete Level.mcMan30.onEnterFrame;
checkAlerts(this._parent._parent.mcMan30, {die:0, run:500}, "normal");
}
mcMusic.gotoAndPlay("alarm");
}
delete this.onMouseDown;
}
}
}
};
sw++;
}
var people = 0;
while (people < 16) {
makePerson(people);
people++;
}
people = 16;
while (people <= 30) {
makePerson2(people);
people++;
}
ctr = 0;
while (ctr <= 5) {
mg.image["ammo" + ctr].onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
mcMusic.gotoAndPlay("boom");
this._parent._parent.status = "dead";
Level["ammo" + this._name.substr(4)].status = "dead";
Level["ammo" + this._name.substr(4)].play();
this.play();
objectivesCompleted++;
checkObjectives();
if (((mg.image.mcMan30.status != "hide") && (mg.image.mcMan30.status != "dead")) && (mg.image.mcMan30.status != "alert")) {
mg.image.mcMan30.status = "alert";
Level.mcMan30.status = "alert";
mg.image.mcMan30.gotoAndStop("alert");
Level.mcMan30.gotoAndStop("alert");
}
checkAlerts(this, {die:40, run:125}, "car");
delete this.onMouseDown;
}
}
};
ctr++;
}
var arrFloor = [{min:102, floors:[156, 135, 112, 90]}, {min:464, floors:[179, 157, 135, 112, 90]}];
Level.mcBuilding.swapDepths(49);
mg.image.mcBuilding.swapDepths(49);
if (bounty) {
snipered = setInterval(this, "checkSniper", 2000);
}
Frame 129
prevFrame();
Frame 130
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function makePerson(people) {
person = Level.attachMovie("mcMan", "mcMan" + people, people + 2);
person2 = mg.image.attachMovie("mcMan", "mcMan" + people, people + 2);
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
if (people >= 50) {
person2._x = (person._x = 670);
person2._y = (person._y = 238 + random(43));
action = 1;
dir = 0;
w = random(2);
if (w == 0) {
person.run.head.gotoAndStop("cap");
person2.run.head.gotoAndStop("cap");
person2.headType = (person.headType = "cap");
}
if (people == (50 + runnerNo)) {
person.run.head.gotoAndStop("shades");
person2.run.head.gotoAndStop("shades");
person2.headType = (person.headType = "shades");
}
} else {
person2._x = (person._x = random(Stage.width));
person2._y = (person._y = 224 + random(10));
action = 0;
dir = random(2);
}
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
if (this.id == (50 + runnerNo)) {
objectivesCompleted++;
checkObjectives();
}
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
if (action == 0) {
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
} else {
person.gotoAndStop("run");
person2.gotoAndStop("run");
var _local4 = random(10) + 1;
person.run.gotoAndPlay(_local4);
person2.run.gotoAndPlay(_local4);
}
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 680) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -5) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
function checkAlerts(who, dist, type) {
var _local1 = 0;
while (_local1 <= 20) {
if (who != who._parent["mcMan" + _local1]) {
if (who._parent["mcMan" + _local1].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.die) {
who._parent["mcMan" + _local1].status = "dead";
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local1].onEnterFrame;
delete Level["mcMan" + _local1].onEnterFrame;
who._parent["mcMan" + _local1].gotoAndStop("die" + t);
Level["mcMan" + _local1].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local1].status != "run") && (who._parent["mcMan" + _local1].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.run) {
who._parent["mcMan" + _local1].gotoAndStop("alert");
Level["mcMan" + _local1].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local1]) < dist.talk) {
t = random(4) + 1;
who._parent["mcMan" + _local1].gotoAndStop("talk" + t);
Level["mcMan" + _local1].gotoAndStop("talk" + t);
}
}
}
}
_local1++;
}
}
function checkTime() {
clearInterval(myTimer);
myTimer2 = setInterval(this, "checkTime2", 100);
}
function checkTime2() {
w = random(100);
if (w < 20) {
makePerson(runner);
runner++;
}
if (runner > 150) {
clearInterval(myTimer2);
}
}
var runnerNo = random(100);
stopAllSounds();
gameSetup();
var people = 0;
while (people < 20) {
makePerson(people);
people++;
}
myTimer = setInterval(this, "checkTime", 4000);
var runner = 50;
Frame 139
prevFrame();
Frame 140
function chopperDrop() {
mg.image.chopper.swapDepths(100);
Level.chopper.swapDepths(100);
mg.image.chopper.onEnterFrame = (Level.chopper.onEnterFrame = function () {
if (this._y < 250) {
this._y = this._y + 15;
} else {
delete this.onEnterFrame;
mcMusic.gotoAndPlay("boom");
this.play();
if (this._parent._name == "image") {
checkAlerts(mg.image.chopper, {die:75, run:300});
}
}
});
}
function makeHoles() {
if (mg.image.mcBuilding.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.mcBuilding.mcGlass.attachMovie("bullet_hole", "hole" + holeNo, holeNo++);
b1._xscale = (b1._yscale = 50);
b2._xscale = (b2._yscale = 50);
b1._rotation = random(360);
b2._rotation = random(360);
b1._x = _root._xmouse;
b1._y = _root._ymouse;
b2._x = _root._xmouse;
b2._y = _root._ymouse;
}
}
function finishedAction(who) {
if (who.status == "talk") {
w = random(5);
if (w < 3) {
who.gotoAndStop("talk" + (w + 1));
} else {
who.gotoAndStop("talk4");
}
} else if (who.status == "alert") {
who._xscale = -who._xscale;
who.gotoAndStop("run");
}
}
function makePerson(people) {
person = Level["mcMan" + people];
person2 = mg.image["mcMan" + people];
person2.id = (person.id = people);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
if (people < 20) {
if (people == 0) {
person.walk.head.gotoAndStop("cigar");
person2.walk.head.gotoAndStop("cigar");
person2.headType = (person.headType = "cigar");
}
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
} else {
person.run.head.gotoAndStop("shades");
person2.run.head.gotoAndStop("shades");
person2.headType = (person.headType = "shades");
}
person.gotoAndStop("walk");
person2.gotoAndStop("walk");
var _local4 = random(15) + 1;
person.walk.gotoAndPlay(_local4);
person2.walk.gotoAndPlay(_local4);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
objectivesCompleted++;
checkObjectives();
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)]._x = _root._xmouse;
this._x = _root._xmouse;
checkAlerts(this, {die:0, run:20}, "normal");
delete this.onMouseDown;
} else if ((this.status != "alert") && (this.status != "run")) {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
person2.onEnterFrame = (person.onEnterFrame = function () {
if (!stopMoving) {
if (this._x > 750) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else if (this._x < -100) {
if (this.status == "walk") {
this._x = 665;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
} else if (this.status == "walk") {
this.gotoAndStop("talk" + (random(4) + 1));
}
if (this._parent._name == "image") {
if ((((this.status != "walk") && (this.status != "talk")) && (this._x > 0)) && (this._x < 660)) {
stopMoving = false;
if (this.status == "run") {
checkAlerts(this, {die:0, run:20}, "normal");
}
}
}
});
}
function checkAlerts(who, dist, type) {
var _local1 = 0;
while (_local1 < 30) {
if (who._parent["mcMan" + _local1].status != "run") {
if (who != who._parent["mcMan" + _local1]) {
if (who._parent["mcMan" + _local1].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.die) {
who._parent["mcMan" + _local1].status = "dead";
levelKills++;
objectivesCompleted++;
checkObjectives();
t = random(3) + 1;
delete who._parent["mcMan" + _local1].onEnterFrame;
delete Level["mcMan" + _local1].onEnterFrame;
who._parent["mcMan" + _local1].gotoAndStop("die" + t);
Level["mcMan" + _local1].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local1].status != "run") && (who._parent["mcMan" + _local1].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.run) {
chk = random(2);
if (chk == 0) {
who._parent["mcMan" + _local1]._xscale = -who._parent["mcMan" + _local1]._xscale;
Level["mcMan" + _local1]._xscale = -Level["mcMan" + _local1]._xscale;
}
who._parent["mcMan" + _local1].gotoAndStop("alert");
Level["mcMan" + _local1].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local1]) < dist.talk) {
t = random(4) + 1;
who._parent["mcMan" + _local1].gotoAndStop("talk" + t);
Level["mcMan" + _local1].gotoAndStop("talk" + t);
}
}
}
}
}
_local1++;
}
}
function makeSniper() {
person = Level.attachMovie("mcMan", "mcMan35", 0);
person2 = mg.image.attachMovie("mcMan", "mcMan35", 0);
person2.id = (person.id = 35);
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person.where = (person2.where = "sniper");
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
bldg = random(15);
if (bldg < 5) {
bldg = 0;
} else if (bldg < 10) {
bldg = 1;
} else {
bldg = 2;
}
person._x = (person2._x = random(45) + arrFloor[bldg].min);
person._y = (person2._y = arrFloor[bldg].floors[random(arrFloor[bldg].floors.length)]);
person.gotoAndStop("snipe");
person2.gotoAndStop("snipe");
clearInterval(snipeID);
delete snipeID;
snipeID = setInterval(this, "snipeMe", 80);
person2.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
this.mod = this[this.status].head._x;
_root.Level["mcMan" + this._name.substr(5)].mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop(dieFrame);
}
}
}
};
}
function snipeMe() {
Level.mcMan35.snipe.nextFrame();
mg.image.mcMan35.snipe.nextFrame();
}
function checkSniper() {
w = random(1000);
if (w < 200) {
if (!hasSniper) {
hasSniper = true;
makeSniper();
}
}
}
stop();
var snipeID;
var hasSniper = false;
bounty = true;
stopAllSounds();
gameSetup();
var stopMoving = false;
mg.image.chopper.onEnterFrame = (Level.chopper.onEnterFrame = function () {
this._x = this._x - 0.3;
});
mg.image.chopper.chopper.head.onMouseDown = function () {
if ((bullets > 0) && (okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
this.gotoAndPlay(2);
levelKills++;
this._parent.blood._visible = true;
Level.chopper.chopper.head.gotoAndPlay(3);
Level.chopper.chopper.blood._visible = true;
delete this._parent._parent.onEnterFrame;
delete Level.chopper.onEnterFrame;
this.isDead = true;
Level.chopper.play();
this._parent._parent.play();
delete this.onMouseDown;
}
}
};
peoples = 0;
while (peoples < 30) {
makePerson(peoples);
peoples++;
}
_root.onEnterFrame = function () {
if (((getDistance(Level.mcMan0, Level.mcMan20) < 10) && (Level.mcMan0.status == "walk")) && (Level.mcMan20.status == "walk")) {
stopMoving = true;
delete _root.onEnterFrame;
}
};
var arrFloor = [{min:45, floors:[197, 174, 152, 129]}, {min:250, floors:[197, 174, 152, 129, 107, 84, 62]}, {min:477, floors:[197, 174, 152, 129, 107]}];
Level.mcBuilding.swapDepths(1);
mg.image.mcBuilding.swapDepths(1);
if (bounty) {
snipered = setInterval(this, "checkSniper", 2000);
}
Frame 150
txtRank.text = rank;
txtKills.text = kills;
txtAccuracy.text = accuracy + "%";
txtPoints.text = points;
stopAllSounds();
mcMusic.gotoAndPlay("deads");
btnMain.onRelease = function () {
stopAllSounds();
currentPage = "premenu";
fader.play();
};
if (points > 0) {
btnSubmit.onRelease = function () {
var _local1 = new LoadVars();
_local1.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local1.score = txtPoints.text;
_local1.score2 = earl223(txtPoints.text);
_local1.gamer = gameID;
_local1.id = random(9999999);
_local1.toString();
_local1.sendAndLoad("http://www0.freeonlinegames.com/scoreboard/score_c.php", _local1, "POST");
delete btnSubmit.onRelease;
btnSubmit.enabled = false;
};
} else {
btnSubmit.enabled = false;
}
Frame 160
prevFrame();
Frame 161
txtRank.text = rank;
txtKills.text = kills;
txtAccuracy.text = accuracy + "%";
txtPoints.text = points;
stopAllSounds();
mcMusic.gotoAndPlay("menu");
btnMain.onRelease = function () {
stopAllSounds();
currentPage = "menu";
fader.play();
};
if (points > 0) {
btnSubmit.onRelease = function () {
var _local1 = new LoadVars();
_local1.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local1.score = txtPoints.text;
_local1.score2 = earl223(txtPoints.text);
_local1.gamer = gameID;
_local1.id = random(9999999);
_local1.toString();
_local1.sendAndLoad("http://www0.freeonlinegames.com/scoreboard/score_c.php", _local1, "POST");
delete btnSubmit.onRelease;
btnSubmit.enabled = false;
};
} else {
btnSubmit.enabled = false;
}
Frame 170
prevFrame();
Symbol 2 MovieClip [LogoFly] Frame 1
stop();
Symbol 2 MovieClip [LogoFly] Frame 10
stop();
Symbol 10 MovieClip Frame 1
stop();
Symbol 56 Button
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Symbol 1107 MovieClip [__Packages.FOG.AS2.FogServices] Frame 0
class FOG.AS2.FogServices
{
function FogServices () {
}
static function Connect(D) {
Data = D;
Data.domain = GetHostedDomain();
FOG.AS2.FogUtils.Debug(D, "Game Data");
}
static function TrackClick(Url) {
if (!Url) {
Url = "www.freeonlinegames.com";
}
var _local1 = ((("?utm_source=" + Data.domain) + "&utm_medium=api-game") + "&utm_campaign=") + Data.name;
FOG.AS2.FogUtils.Debug("Tracking: " + _local1);
getURL ((("http://" + Url) + "/") + _local1, "_blank");
}
static function TrackPlay() {
FOG.AS2.FogUtils.Debug("Track Play Using FogDev");
FOG.AS2.FogDev.TrackPlay();
}
static function GetHostedDomain() {
var _local2 = _url.indexOf("://") + 3;
var _local4 = _url.indexOf("/", _local2);
var _local1 = _url.substring(_local2, _local4);
var _local3 = _local1.lastIndexOf(".") - 1;
var _local5 = _local1.lastIndexOf(".", _local3) + 1;
if (!_local1) {
_local1 = "local";
}
return(_local1);
}
static var Version = "1.3";
static var Data = new Object();
}
Symbol 1108 MovieClip [__Packages.FOG.AS2.FogUtils] Frame 0
class FOG.AS2.FogUtils
{
function FogUtils () {
}
static function Debug(S, N) {
if (typeof(S) == "object") {
if (N) {
Debug(N);
} else {
Debug("Object");
}
for (var _local2 in S) {
Debug((("> " + _local2) + ": ") + S[_local2]);
}
return(undefined);
}
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("fog.debug", S);
}
if (S.indexOf(">") != 0) {
}
}
}
Symbol 1109 MovieClip [__Packages.FOG.AS2.FogDev] Frame 0
class FOG.AS2.FogDev
{
function FogDev () {
}
static function Connect() {
System.security.allowDomain("*");
FOG.AS2.FogUtils.Debug("> Connecting");
FOG.AS2.FogUtils.Debug((((("> http://" + Server) + "/") + LibFile) + "?as=2&v=") + FOG.AS2.FogServices.Version);
var _local2 = new Object();
_local2.onLoadInit = function (Clip) {
FOG.AS2.FogDev.Remote = Clip;
if (!FOG.AS2.FogDev.Remote.CanAccess) {
FOG.AS2.FogUtils.Debug("> Corrupt Library");
return(undefined);
}
FOG.AS2.FogDev.Remote.Connect(FOG.AS2.FogServices.Data.name, FOG.AS2.FogServices.Data.domain);
};
_local2.onLoadError = function (c, e) {
FOG.AS2.FogUtils.Debug("> Can't Load Library");
};
_root.createEmptyMovieClip("conn_remote", _root.getNextHighestDepth());
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local3.loadClip((((((("http://" + Server) + "/") + LibFile) + "?as=2&v=") + FOG.AS2.FogServices.Version) + "&c=") + Math.random(), _root.conn_remote);
}
static function TrackPlay() {
FOG.AS2.FogUtils.Debug("> Tracking");
Connect();
}
static var Server = "x.fogdev.com";
static var LibFile = "api/library-as2.swf";
static var LibPath = "";
}
Symbol 1110 MovieClip [__Packages.FOG.AS2.FogPreloader] Frame 0
class FOG.AS2.FogPreloader
{
function FogPreloader () {
}
static function Start() {
FOG.AS2.FogUtils.Debug("Preloader Initialized");
_root.stop();
var _local5 = _root.mcTaglines;
var _local4 = _root.btnFoggy;
var mcLogo = _root.mcLogo;
var prel = _root.prel;
var fogNo = 0;
var GameDura = 3000;
var percent = 0;
var percentGame = 0;
var percentDura = 0;
var stagewidth = Stage.width;
var stageheight = Stage.height;
var startTimer = getTimer();
_local4._width = stagewidth;
_local4._height = stageheight;
_local5.swapDepths(99996);
prel.swapDepths(99997);
mcLogo.swapDepths(99998);
_local4.swapDepths(99999);
prel.onEnterFrame = function () {
var _local4 = Math.random();
if (_local4 < ((_root.getBytesLoaded() / _root.getBytesTotal()) / 5)) {
if (fogNo > 999) {
fogNo = 0;
}
var _local5 = random(2) + 1;
var _local3 = _root.attachMovie("LogoFly", "fog" + (fogNo++), fogNo);
_local3.cacheAsBitmap = true;
_local3._x = stagewidth / 2;
_local3._y = stageheight / 2;
_local3._xscale = (_local3._yscale = 0);
_local3.gotoAndStop(random(10) + 1);
_local3.speed = 100;
_local3._alpha = 0;
_local3.grow = Math.random();
_local3.fade = false;
_local3.targetX = random(10);
if (_local3.targetX < 5) {
_local3.targetX = random(10);
if (_local3.targetX < 5) {
_local3.targetX = -100;
} else {
_local3.targetX = stagewidth + 100;
}
_local3.targetY = random(stageheight);
} else {
_local3.targetY = random(10);
if (_local3.targetY < 5) {
_local3.targetY = -100;
} else {
_local3.targetY = stageheight + 100;
}
_local3.targetX = random(stagewidth);
}
_local3.onEnterFrame = function () {
this._x = this._x + (((this.targetX - this._x) / this.speed) * 0.5);
this._y = this._y + (((this.targetY - this._y) / this.speed) * 0.5);
this.speed = this.speed * 0.99;
this._xscale = (this._yscale = this._yscale + (this.grow * 2));
if ((this._alpha < 100) && (!this.fade)) {
this._alpha = this._alpha + 2;
}
if (((((this._x < -50) || (this._y < -50)) || (this._x > (stagewidth + 50))) || (this._y > (stageheight + 50))) || (this._xscale > 200)) {
this.fade = true;
}
if (this.fade) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
percentGame = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
percentDura = ((getTimer() - startTimer) / GameDura) * 100;
percent = Math.round(Math.min(percentGame, percentDura, 100));
prel.gotoAndStop(percent);
prel.procent.text = percent;
if (percent > 99) {
FOG.AS2.FogPreloader.onLoaded();
mcLogo.removeMovieClip();
delete this.onEnterFrame;
play();
}
};
}
static var onLoaded = FOG.AS2.FogServices.TrackPlay;
function onComplete() {
}
}
Instance of Symbol 61 MovieClip "mcNotice" in Symbol 103 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 103 MovieClip Frame 120
_root.play();
Symbol 105 MovieClip Frame 60
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
if (_parent._xscale > 0) {
_parent._x = _parent._x - ((27 * _parent._yscale) / 100);
} else {
_parent._x = _parent._x + ((27 * _parent._yscale) / 100);
}
Symbol 146 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
if (_parent.loops > 0) {
if (_parent._xscale > 0) {
_parent._x = _parent._x - ((90 * _parent._yscale) / 100);
} else {
_parent._x = _parent._x + ((90 * _parent._yscale) / 100);
}
} else {
_parent.loops++;
}
Symbol 159 MovieClip Frame 15
stop();
Symbol 201 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 201 MovieClip Frame 131
if (_parent.where == "sniper") {
_root.hasSniper = false;
_parent.removeMovieClip();
}
stop();
Symbol 269 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 269 MovieClip Frame 176
if (_parent.where == "sniper") {
_root.hasSniper = false;
_parent.removeMovieClip();
}
stop();
Symbol 317 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 317 MovieClip Frame 96
if (_parent.where == "sniper") {
_root.hasSniper = false;
_parent.removeMovieClip();
}
stop();
Symbol 319 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 319 MovieClip Frame 11
stop();
_root.finishedAction(_parent);
Symbol 329 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 329 MovieClip Frame 36
stop();
_root.finishedAction(_parent);
Symbol 339 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 339 MovieClip Frame 31
stop();
_root.finishedAction(_parent);
Symbol 341 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 341 MovieClip Frame 41
stop();
_root.finishedAction(_parent);
Symbol 364 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 364 MovieClip Frame 21
stop();
_root.finishedAction(_parent);
Symbol 374 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
if (_parent._xscale > 0) {
_parent._x = _parent._x + ((_parent.mod * _parent._yscale) / 100);
} else {
_parent._x = _parent._x - ((_parent.mod * _parent._yscale) / 100);
}
Symbol 374 MovieClip Frame 16
stop();
Symbol 395 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 395 MovieClip Frame 55
stop();
_root.finishedAction(_parent);
Symbol 413 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
stop();
Symbol 413 MovieClip Frame 13
txtCount.text = Number(txtCount.text) - 1;
if (txtCount.text == "0") {
clearInterval(_root.snipeID);
_root.mcMusic.sniped = true;
_root.mcMusic.gotoAndPlay("bang");
_root.snipeMode(false);
_root.gameEnd = true;
_root.clearLevel();
_root.computeScore();
delete _root.mcInterface.btnExit.onRelease;
_root.bloody.play();
stop();
} else {
gotoAndStop (1);
}
Symbol 414 MovieClip [mcMan] Frame 1
head.gotoAndStop(headType);
status = "hide";
stop();
Symbol 414 MovieClip [mcMan] Frame 10
status = "walk";
Symbol 414 MovieClip [mcMan] Frame 20
loops = 0;
status = "run";
Symbol 414 MovieClip [mcMan] Frame 30
status = "dead";
Symbol 414 MovieClip [mcMan] Frame 40
status = "dead";
Symbol 414 MovieClip [mcMan] Frame 50
status = "dead";
Symbol 414 MovieClip [mcMan] Frame 60
status = "talk";
Symbol 414 MovieClip [mcMan] Frame 70
status = "talk";
Symbol 414 MovieClip [mcMan] Frame 80
status = "talk";
Symbol 414 MovieClip [mcMan] Frame 90
status = "talk";
Symbol 414 MovieClip [mcMan] Frame 100
status = "alert";
Symbol 414 MovieClip [mcMan] Frame 110
status = "hide";
Symbol 414 MovieClip [mcMan] Frame 120
status = "ouch";
Symbol 414 MovieClip [mcMan] Frame 130
status = "snipe";
Symbol 434 Button
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Symbol 455 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 6
gotoAndStop (1);
Symbol 456 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 15
if (_root.currentPage == "premenu") {
_root.gotoAndPlay(_root.currentPage);
} else {
_root.gotoAndStop(_root.currentPage);
}
Symbol 459 MovieClip Frame 10
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 2
stop();
Symbol 488 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 489 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 539 MovieClip Frame 10
stop();
Symbol 541 MovieClip Frame 1
stop();
Symbol 541 MovieClip Frame 2
stop();
Symbol 553 MovieClip Frame 10
stop();
Symbol 572 MovieClip Frame 1
stop();
this.onMouseDown = function () {
if ((_root.bullets > 0) && (_root.okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
delete this.onMouseDown;
_root.Level.foreground["light" + this._name.substr(5)].play();
this.play();
}
}
};
Symbol 572 MovieClip Frame 10
stop();
Symbol 581 MovieClip Frame 1
stop();
this.onMouseDown = function () {
if ((_root.bullets > 0) && (_root.okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
delete this.onMouseDown;
_root.Level.haus.haus["light" + this._name.substr(5)].play();
this.play();
}
}
};
Symbol 581 MovieClip Frame 10
stop();
Symbol 588 MovieClip Frame 1
stop();
isDead = false;
Symbol 588 MovieClip Frame 20
stop();
isDead = true;
Symbol 777 MovieClip Frame 70
_parent.play();
Symbol 777 MovieClip Frame 95
stop();
Symbol 922 MovieClip Frame 1
stop();
Instance of Symbol 598 MovieClip "blood" in Symbol 922 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 922 MovieClip Frame 2
stop();
Symbol 922 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 927 MovieClip Frame 1
stop();
Instance of Symbol 598 MovieClip "blood" in Symbol 927 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 927 MovieClip Frame 2
stop();
Symbol 927 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 931 MovieClip Frame 1
stop();
Symbol 933 MovieClip Frame 1
stop();
Instance of Symbol 598 MovieClip "blood" in Symbol 933 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 933 MovieClip Frame 2
stop();
Symbol 933 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 934 MovieClip Frame 1
stop();
Symbol 946 MovieClip Frame 1
stop();
mcTank.onMouseDown = function () {
if ((_root.bullets > 0) && (_root.okToShoot)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.checkAlerts(this._parent, {die:100, run:150, talk:200});
delete this.onMouseDown;
_root.Level.mcTanker.play();
delete this._parent.onEnterFrame;
delete _root.Level.mcTanker.onEnterFrame;
_root.mcMusic.gotoAndPlay("boom");
play();
}
}
};
Instance of Symbol 598 MovieClip "blood" in Symbol 946 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 946 MovieClip Frame 2
stop();
Symbol 946 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 947 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 957 MovieClip Frame 1
stop();
Symbol 957 MovieClip Frame 25
if (sniped) {
sniped = false;
gotoAndStop (1);
}
Symbol 957 MovieClip Frame 40
_root.okToShoot = true;
gotoAndStop (1);
Symbol 957 MovieClip Frame 60
gotoAndStop (1);
Symbol 957 MovieClip Frame 70
gotoAndStop (1);
Symbol 957 MovieClip Frame 80
_root.okToShoot = true;
gotoAndStop (1);
Symbol 957 MovieClip Frame 90
gotoAndStop (1);
Symbol 957 MovieClip Frame 100
gotoAndStop (1);
Symbol 964 MovieClip Frame 1
stop();
Symbol 968 MovieClip Frame 1
btnExit.onRelease = function () {
if (!_root.mg._visible) {
_root.exitMission();
delete this.onRelease;
}
};
Symbol 992 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 993 MovieClip Frame 1
stop();
Symbol 1000 MovieClip Frame 1
stop();
Symbol 1000 MovieClip Frame 55
_root.currentPage = "dead";
_root.fader.play();
stop();
Symbol 1004 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1005 MovieClip Frame 1
stop();
Symbol 1012 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1013 MovieClip Frame 1
stop();
Symbol 1025 MovieClip Frame 1
stop();
Symbol 1025 MovieClip Frame 2
stop();
Symbol 1025 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 2
stop();
Symbol 1049 MovieClip Frame 1
stop();
Symbol 1053 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1054 MovieClip Frame 1
stop();
Instance of Symbol 598 MovieClip "blood" in Symbol 1068 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1070 MovieClip Frame 1
stop();
Symbol 1070 MovieClip Frame 190
this._y = -500;
Symbol 1070 MovieClip Frame 191
stop();
_root.chopperDrop();
Symbol 1070 MovieClip Frame 192
stop();
Symbol 1070 MovieClip Frame 193
stop();
Symbol 1075 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1076 MovieClip Frame 1
stop();
Symbol 1089 Button
on (release) {
FOG.AS2.FogServices.TrackClick("www.freegamesforyourwebsite.com");
}
Symbol 1090 Button
on (release) {
FOG.AS2.FogServices.TrackClick();
}