Instance of Symbol 5 MovieClip in Frame 1
on (release) {
getURL ("http://www.freeonlinegames.com/?urbansniper", "_blank");
}
Frame 2
FOG.AS2.FogServices.Connect({id:130, fogid:13422, name:"urban-sniper", title:"Urban Sniper", category:"shooting-games"});
FOG.AS2.FogPreloader.Start();
Instance of Symbol 59 MovieClip in Frame 2
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Frame 3
stop();
mcLogo.swapDepths(99998);
Frame 4
prel.removeMovieClip();
btnFoggy.removeMovieClip();
mcTaglines.removeMovieClip();
mcLogo.removeMovieClip();
Frame 15
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("632e94a1", this, 10301, true);
Instance of Symbol 59 MovieClip in Frame 16
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Frame 30
var arrRank = new Array(["NEWBIE", 0], ["WANNABE", 2000], ["THE KID", 5000], ["THE FOX", 10000], ["HIRED GUN", 20000], ["THE JACKAL", 40000], ["THE URBAN SNIPER", 80000]);
var arrMail = new Array({id:0, status:"Unread"});
var historySuccess = new Array();
var historyFail = new Array();
var bullets = 50;
var completed = 0;
var failed = 0;
var accuracy = 0;
var kills = 0;
var points = 0;
var selectedMission;
var selectedMail;
var rank = arrRank[0][0];
var snipe = false;
var holeNo = 300;
var currentPage = "";
btnStart.onRelease = function () {
currentPage = "lobby";
fader.play();
};
btnView.onRelease = function () {
currentPage = "highscores";
fader.play();
};
btnFree.onRelease = function () {
FOG.AS2.FogServices.TrackClick("www.freegamesforyourwebsite.com");
};
btnPlay.onRelease = function () {
FOG.AS2.FogServices.TrackClick();
};
var arrMissions = new Array();
arrMissions.push({title:"THE INITIATION", label:"the_initiation", type:"mission", from:"Big Joe", subject:"For the new guy", message:"Hey, kinda heard you were new in town. Wanting to hit it with the big boys, eh? You got a long way ahead, threadin in dangerous waters here. But i like your spunk. That's why i'm gonna give you a job. There's this punk named Carlos and he's as bad as they can get. I got news that he's meeting someone in the park. Carlos will probably be wearing a cap like he always does. No news on the other guy though, except that he will be waiting in a car. Waste them both! I don't care how you do it... just do it. If you do this for me, then there will be more money rolling into your acount... I can tell you that much. And oh, I see you only have 50 bullets... better conserve it while you can coz there's been a lockdown on ammo sales following last weeks job.", objectives:["KILL CARLOS", "KILL THE GUY CARLOS WILL BE MEETING WITH"], objNo:2, points:2000, fail:[1], success:[2]});
arrMissions.push({title:"THE MEETING", label:"the_meeting", type:"mission", from:"Big Joe", subject:"re: For the new guy", message:"I'm disappointed in you. A simple job and you couldn't even get it right! What is it with you? If you want to make it big time you better start cleaning up your act. But i'll tell you what... i'm giving you this one last chance. The Big Five Brothers are meeting at the Ritz Building on the corner of 5th and 23rd, Bay Area. They must be put to sleep. You know what to do. But remember, if you think you're gonna fail this one... don't.", objectives:["KILL ALL FIVE BROTHERS"], objNo:5, points:1500, fail:[3], success:[4]});
arrMissions.push({title:"THE MEETING", label:"the_meeting", type:"mission", from:"Big Joe", subject:"Another Job", message:"Nice going kid! You keep up that kind of attitude and you'll be going places. Now listen up... we got another porblem. With Carlos out the way, the Big Five Brothers have decided to hold a meeting at the Ritz Building on the corner of 5th and 23rd, Bay Area. They must be put to sleep. You know what to do.", objectives:["KILL ALL FIVE BROTHERS"], objNo:5, points:3000, fail:[5], success:[4]});
arrMissions.push({title:"GAME OVER", label:"", type:"message", from:"Big Joe", subject:"<none>", message:"Pack your stuff and get the hell out of town! I don't want you and your sh** anywhere near here! You better pray my boys don't catch you still in that rat hole of yours! You're DEAD!", objectives:[], points:0, fail:[], success:[]});
arrMissions.push({title:"THE PUPPY", label:"the_puppy", type:"mission", from:"Big Joe", subject:"Nice work", message:"For someone new you certainly know how to get the job done. I'm beginning to like you... but don't get too comfortable yet. You still got a lot to prove. One job don't prove anything. Get down to 30 Oak Street on Old Meyer's Drive in the 3rd downtown District. I want you to whack the dog that lives there! The thing is, my wife's cat Mr. Mugsy, is always being harassed by that no-good pooch! By the way, make it clean! No witnesses. But don't hurt the other dogs!", objectives:["KILL THE POOCH ON 30 OAK STREET", "DO NOT HURT THE OTHER DOGS", "KILL ALL WITNESSES"], objNo:1, points:5000, fail:[6, 7], success:[8, 7]});
arrMissions.push({title:"DEATH ON THE DOCKS", label:"the_docks", type:"mission", from:"Big Joe", subject:"re: Another Job", message:"Man oh man... that was one job you shouldn't have botched up! They now know that i'm the one who signed their death warrants.. and that will not stop them from coming after me! A reliable source told me that one of them brothers will be meeting with a hired gun down by the docks. This is your last chance kid. Either you take care of them or i take care of you! Understand!?!", objectives:["KILL THE BROTHER", "KILL THE HIRED GUN"], objNo:2, points:2000, fail:[3], success:[8, 7]});
arrMissions.push({title:"", label:"", type:"message", from:"Big Joe", subject:"re: Nice Work", message:"Friggin' HOPELESS!! All you gotta do is make a clean kill on this mutt and what??? HOPELESS!! You'll never get another job from me!", objectives:[], objNo:0, points:0, fail:[], success:[]});
arrMissions.push({title:"DEATH TO THE COOK", label:"cook", type:"mission", from:"Don Pedrito", subject:"Interested in a job?", message:"Hey, word on the street say that you've been working for old Joe. Haven't seen the skunk in ages but he is a good friend of mine. Since you been doing him jobs i would appreciate it if you did something for me. Head on to 'THE MANSION' on top of Beverly Hill. Don Caniole is an old rival of mine. I want you to take care of him. He loves to cook so you'll probably find him cooking in the kitchen. You better get the job done while he is alone in the house.", objectives:["KILL DON CANIOLE"], objNo:1, points:10000, fail:[9], success:[10]});
arrMissions.push({title:"", label:"", type:"message", from:"Big Joe", subject:"One of a kind", message:"I gotta tell you kid, you're really one of a kind! I can see great things going for you in this stinkhole. In the meantime, i got no jobs for you. Just keep your time open in case i need you... bigger bucks are comin' your way.", objectives:[], objNo:0, points:0, fail:[], success:[]});
arrMissions.push({title:"", label:"", type:"message", from:"Don Pedrito", subject:"Bad News", message:"I thought you were different kid. I thought that you were this one hotshot hitman dude 'coz Big Joe was giving you jobs. As it turns out, you're no better than my mother-in-law! What was i thinking! You're through!", objectives:[], objNo:0, points:0, fail:[], success:[]});
arrMissions.push({title:"THE CORPORATION", label:"corporation", type:"mission", from:"Don Pedrito", subject:"A Big One", message:"Nice.... very nice. You handled that perfectly well. No wonder Joe gave you jobs. Listen, i got one more thing to ask. A business partner of mine has been playing me behind my back, and i don't like to play. I been hearing that he's planning a business meet with a few crooked businessmen. They say that a plane is waiting for them at the airport ready to take them to the Philippines. Take 'em all down.", objectives:["Kill All 5 businessmen"], objNo:5, points:20000, fail:[9], success:[11]});
arrMissions.push({title:"", label:"final", type:"next", from:"Don Pedrito", subject:"All Right!", message:"You did it! Haha Never thought you could kill one of your own! Ooops, did i spill the beans? haha You're worthless... not even recognizing your own father! hahaha That's right! My so-called partner-in-crime IS your father... and YOU KILLED HIM!! hahaha Go home to your momma and cry boy! You'll never make it to the ranks of the bigboys. You're worthless just like your father!", objectives:[], objNo:0, points:0, fail:[], success:[]});
stop();
Frame 40
stopAllSounds();
var savedData = SharedObject.getLocal("savedData");
if (savedData.data.slots != undefined) {
arrSlots = (savedData.data.slots = [{label:"< EMPTY >", empty:true, email:[{id:0, status:"Unread"}], rank:"NEWBIE", bullets:_root.bullets, completed:0, failed:0, accuracy:100, kills:0, points:0}, {label:"< EMPTY >", empty:true, email:[{id:0, status:"Unread"}], rank:"NEWBIE", bullets:_root.bullets, completed:0, failed:0, accuracy:100, kills:0, points:0}, {label:"< EMPTY >", empty:true, email:[{id:0, status:"Unread"}], rank:"NEWBIE", bullets:_root.bullets, completed:0, failed:0, accuracy:100, kills:0, points:0}, {label:"< EMPTY >", empty:true, email:[{id:0, status:"Unread"}], rank:"NEWBIE", bullets:_root.bullets, completed:0, failed:0, accuracy:100, kills:0, points:0}, {label:"< EMPTY >", empty:true, email:[{id:0, status:"Unread"}], rank:"NEWBIE", bullets:_root.bullets, completed:0, failed:0, accuracy:100, kills:0, points:0}]);
} else {
arrSlots = savedData.data.slots;
}
ctr = 1;
while (ctr <= 5) {
this["txtSlot" + ctr].text = arrSlots[ctr - 1].label;
this["btnSlot" + ctr].onRelease = function () {
if (!arrSlots[Number(this._name.substr(7)) - 1].empty) {
rank = arrSlots[Number(this._name.substr(7)) - 1].rank;
arrMail = arrSlots[Number(this._name.substr(7)) - 1].email;
bullets = arrSlots[Number(this._name.substr(7)) - 1].bullets;
completed = arrSlots[Number(this._name.substr(7)) - 1].completed;
failed = arrSlots[Number(this._name.substr(7)) - 1].failed;
accuracy = arrSlots[Number(this._name.substr(7)) - 1].accuracy;
kiils = arrSlots[Number(this._name.substr(7)) - 1].kills;
points = arrSlots[Number(this._name.substr(7)) - 1].points;
}
};
ctr++;
}
btnCancel.onRelease = function () {
currentPage = "premain";
fader.play();
};
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() {
mainObjectives = arrMissions[selectedMission].objNo;
objectivesCompleted = 0;
holeNo = 300;
levelKills = 0;
bulletsFired = 0;
acc = 0;
arrMail[selectedMail].status = "Failed";
txtBullets.text = bullets;
var _local3 = 0;
while (_local3 < arrMissions[_root.selectedMission].objectives.length) {
_root["txtO" + (_local3 + 1)].text = arrMissions[_root.selectedMission].objectives[_local3];
_local3++;
}
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)) {
snipe = !snipe;
if (snipe) {
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) {
if (bullets > 0) {
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);
}
}
};
Key.addListener(myListener);
}
function checkObjectives() {
trace("objectives : " + objectivesCompleted);
if (objectivesCompleted >= mainObjectives) {
trace("misson sucessful");
arrMail[selectedMail].status = "Success";
} else {
arrMail[selectedMail].status = "Failed";
}
}
function checkRank() {
ctr = 0;
while (ctr < arrRank.length) {
if (points >= arrRank[ctr][1]) {
rank = arrRank[ctr][0];
}
ctr++;
}
}
function exitMission() {
mg._visible = true;
mg.removeMovieClip();
Key.removeListener(myListener);
delete this.onMouseDown;
delete this.onEnterFrame;
kills = kills + levelKills;
if (arrMail[selectedMail].status == "Success") {
completed++;
points = points + arrMissions[_root.selectedMission].points;
checkRank();
_root.selectedEmail = _root.selectedEmail + arrMissions[_root.selectedMission].success.length;
var _local3 = 0;
while (_local3 < arrMissions[_root.selectedMission].success.length) {
arrMail.unshift({id:arrMissions[_root.selectedMission].success[_local3], status:"Unread"});
_local3++;
}
} else {
failed++;
_root.selectedEmail = _root.selectedEmail + arrMissions[_root.selectedMission].fail.length;
var _local3 = 0;
while (_local3 < arrMissions[_root.selectedMission].fail.length) {
arrMail.unshift({id:arrMissions[_root.selectedMission].fail[_local3], status:"Unread"});
_local3++;
}
}
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);
}
currentPage = "lobby";
fader.play();
}
stopAllSounds();
var mainObjectives = 0;
var objectivesCompleted = 0;
var levelKills = 0;
var bulletsFired = 0;
var acc = 0;
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.onRelease = function () {
currentPage = "emails";
fader.play();
};
btnMain.onRelease = function () {
currentPage = "premain";
fader.play();
};
btnSave.onRelease = function () {
currentPage = "saveGame";
fader.play();
};
Frame 70
stopAllSounds();
btnAccept._visible = false;
buttonText.text = "";
btnBack.onRelease = function () {
currentPage = "lobby";
fader.play();
};
myMail = mcEmail.mcScroller;
myMail.mcMail._visible = false;
trace("Email: " + arrMail.length);
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 () {
trace(arrMissions[_root.selectedMission].label);
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 () {
trace(arrMissions[_root.selectedMission].label);
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 80
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 _local3 = 0;
while (_local3 < 21) {
if (who != who._parent["mcMan" + _local3]) {
if (who._parent["mcMan" + _local3].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local3]) < dist.die) {
if (_local3 == 20) {
objectivesCompleted++;
checkObjectives();
}
levelKills++;
t = random(3) + 1;
delete who._parent["mcMan" + _local3].onEnterFrame;
delete Level["mcMan" + _local3].onEnterFrame;
who._parent["mcMan" + _local3].gotoAndStop("die" + t);
Level["mcMan" + _local3].gotoAndStop("die" + t);
} else if ((who._parent["mcMan" + _local3].status != "run") && (who._parent["mcMan" + _local3].status != "alert")) {
if (getDistance(who, who._parent["mcMan" + _local3]) < dist.run) {
who._parent["mcMan" + _local3].gotoAndStop("alert");
Level["mcMan" + _local3].gotoAndStop("alert");
} else if (getDistance(who, who._parent["mcMan" + _local3]) < dist.talk) {
t = random(4) + 1;
who._parent["mcMan" + _local3].gotoAndStop("talk" + t);
Level["mcMan" + _local3].gotoAndStop("talk" + t);
}
}
}
}
_local3++;
}
if ((type != "normal") && (type != "car")) {
ctr = 0;
while (ctr <= 16) {
if (who != who._parent["car" + ctr]) {
trace("checking... " + ctr);
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
if (ctr == who._parent.mcMan20.car) {
objectivesCompleted++;
checkObjectives();
}
trace(("car: " + ctr) + " BOOM ");
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++;
}
}
if ((who._parent["car" + who._parent.mcMan20.car].status != "dead") && (who._parent["car" + who._parent.mcMan20.car].status != "running")) {
trace(getDistance(who, who._parent["car" + who._parent.mcMan20.car]));
if (getDistance(who, who._parent["car" + who._parent.mcMan20.car]) < dist.talk) {
myCar = who._parent["car" + who._parent.mcMan20.car];
myCar2 = Level["car" + who._parent.mcMan20.car];
myCar.status = "running";
myCar2.status = "running";
if (myCar._y < 245) {
myCar.dir = "left";
myCar2.dir = "left";
} else {
myCar.dir = "right";
myCar2.dir = "right";
}
myCar.onEnterFrame = (myCar2.onEnterFrame = function () {
if (this.dir == "left") {
if (this._y < 245) {
this._y = this._y + 2;
}
this._x = this._x - 2;
if (this._x < -10) {
delete this.onEnterFrame;
this.removeMovieClip();
}
} else {
if (this._y > 245) {
this._y = this._y - 2;
}
this._x = this._x + 2;
if (this._x > 610) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
}
}
stopAllSounds();
gameSetup();
var people = 0;
while (people < 21) {
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) {
if (people == 20) {
person._y = 234;
w = random(10);
if (w < 5) {
person2.car = (person.car = 4);
} else {
person2.car = (person.car = 6);
}
} else {
person._y = 224 + random(10);
}
person2._y = person._y;
} else {
person.swapDepths(people + 200);
person2.swapDepths(people + 200);
if (people != 20) {
person._y = 262 + random(15);
} else {
person._y = 262;
w = random(10);
if (w < 5) {
person2.car = (person.car = 12);
} else {
person2.car = (person.car = 14);
}
}
person2._y = person._y;
}
dir = random(2);
person2.onMouseDown = function () {
if (bullets > 0) {
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);
if (Number(this._name.substr(5)) == 20) {
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 (people == 20) {
person[this.status].head.gotoAndStop("cap");
person2[this.status].head.gotoAndStop("cap");
person.boss = true;
person2.boss = true;
person2.headType = (person.headType = "cap");
action = 1;
} else {
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) {
if (people == 20) {
person._x = -50;
person2._x = -50;
}
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
person2.onEnterFrame = (person.onEnterFrame = function () {
if (getDistance(this, this._parent["car" + this.car]) < 30) {
if (this._parent["car" + this.car].status != "dead") {
if (getDistance(this, this._parent["car" + this.car]) < 6) {
this.gotoAndStop("talk1");
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
});
}
} else if (((this.status != "alert") && (this.status != "run")) && (this.status != "dead")) {
this.gotoAndStop("alert");
}
} else if (this._x > 605) {
if (this.status == "walk") {
this._x = -5;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
} else {
if (people == 20) {
person._x = 655;
person2._x = 655;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (getDistance(this, this._parent["car" + this.car]) < 30) {
if (this._parent["car" + this.car].status != "dead") {
if (getDistance(this, this._parent["car" + this.car]) < 6) {
this.gotoAndStop("talk1");
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
if (this._x < -50) {
delete this.onEnterFrame;
}
});
}
} else if (((this.status != "alert") && (this.status != "run")) && (this.status != "dead")) {
this.gotoAndStop("alert");
}
} else if (this._x < -5) {
if (this.status == "walk") {
this._x = 605;
} 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);
if ((((ctr != 4) && (ctr != 6)) && (ctr != 12)) && (ctr != 14)) {
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) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._parent._parent._name.substr(3) == mg.image.mcMan20.car) {
objectivesCompleted++;
checkObjectives();
}
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) {
if (this._visible) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
if (this._parent._parent._name.substr(3) == mg.image.mcMan20.car) {
objectivesCompleted++;
checkObjectives();
}
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;
if ((Number(this._parent._parent._name.substr(3)) == mg.image.mcMan20.car) && (mg.image.mcMan20.status == "talk")) {
mg.image.mcMan20.status = (Level.mcMan20.status = "alert");
mg.image.mcMan20.gotoAndStop("alert");
Level.mcMan20.gotoAndStop("alert");
}
}
}
}
};
ctr++;
}
Level.mcTanker.swapDepths(150);
mg.image.mcTanker.swapDepths(150);
mg.image.mcTanker.head.onMouseDown = function () {
if (bullets > 0) {
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;
}
}
};
Instance of Symbol 59 MovieClip in Frame 80
on (release) {
FOG.AS2.FogServices.TrackClick();
}
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 = -Math.abs(who._xscale);
if (who.where == "building") {
if (Number(who._name.substr(5)) >= 25) {
if (Number(who._name.substr(5)) < 27) {
if (who.status != "hide") {
who.gotoAndStop(1);
who.status = "hide";
who.yAdj = 0;
who.onEnterFrame = function () {
this._y = this._y + 1;
this.yAdj++;
if (this.yAdj >= 4) {
delete this.onEnterFrame;
}
};
}
} else {
who.status = "run";
who.gotoAndStop("run");
who.onEnterFrame = function () {
if (this._x > 346) {
this.run.stop();
delete this.onEnterFrame;
if (this._parent._name != "Level") {
this.time = (random(5) + 5) * 1000;
this.OutID = setInterval(runOut, this.time, this);
}
}
};
}
} else if (who._xscale > 0) {
who.gotoAndStop(1);
who.status = "hide";
who.yAdj = 0;
who.onEnterFrame = function () {
this._y = this._y + 1;
this.yAdj++;
if (this.yAdj >= 4) {
delete this.onEnterFrame;
}
};
} else {
who.gotoAndStop("run");
who.onEnterFrame = function () {
if (this._x > 346) {
this.run.stop();
delete this.onEnterFrame;
if (this._parent._name != "Level") {
this.time = (random(5) + 5) * 1000;
this.OutID = setInterval(this.runOut, this.time, this);
}
}
};
}
} else {
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 (who.where == "building") {
if ((who._y == who._parent["mcMan" + _local2]._y) && (who._parent["mcMan" + _local2].status == "talk")) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
}
} else if (getDistance(who, who._parent["mcMan" + _local2]) < dist.die) {
if (who._parent["mcMan" + _local2].headType == "shades") {
objectivesCompleted++;
checkObjectives();
}
t = random(3) + 1;
delete who._parent["mcMan" + _local2].onEnterFrame;
delete Level["mcMan" + _local2].onEnterFrame;
levelKills++;
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].where != "building")) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
} else if ((getDistance(who, who._parent["mcMan" + _local2]) < dist.talk) && (who._parent["mcMan" + _local2].where != "building")) {
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]) {
trace("checking... " + ctr);
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
trace(("car: " + ctr) + " BOOM ");
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.mcBuilding.swapDepths(49);
Level.mcBuilding.swapDepths(49);
runOut = function (who) {
mg.image["mcMan" + who._name.substr(5)]._xscale = mg.image["mcMan" + who._name.substr(5)].oDir;
Level["mcMan" + who._name.substr(5)]._xscale = Level["mcMan" + who._name.substr(5)].oDir;
clearInterval(who.OutID);
delete mg.image["mcMan" + who._name.substr(5)].where;
delete Level["mcMan" + who._name.substr(5)].where;
trace("runningOut: " + who);
mg.image["mcMan" + who._name.substr(5)].swapDepths(Number(who._name.substr(5)) + 50);
Level["mcMan" + who._name.substr(5)].swapDepths(Number(who._name.substr(5)) + 50);
mg.image["mcMan" + who._name.substr(5)]._x = 320;
mg.image["mcMan" + who._name.substr(5)]._y = 224;
Level["mcMan" + who._name.substr(5)]._x = 320;
Level["mcMan" + who._name.substr(5)]._y = 224;
if (mg.image["mcMan" + who._name.substr(5)]._xscale > 0) {
mg.image["mcMan" + who._name.substr(5)].onEnterFrame = (Level["mcMan" + who._name.substr(5)].onEnterFrame = function () {
if (this._x < -5) {
delete this.onEnterFrame;
this.removeMovieClip();
}
});
} else {
mg.image["mcMan" + who._name.substr(5)].onEnterFrame = (Level["mcMan" + who._name.substr(5)].onEnterFrame = function () {
if (this._x > 605) {
delete this.onEnterFrame;
this.removeMovieClip();
}
});
}
mg.image["mcMan" + who._name.substr(5)].gotoAndStop("run");
mg.image["mcMan" + who._name.substr(5)].run.play();
Level["mcMan" + who._name.substr(5)].gotoAndStop("run");
Level["mcMan" + who._name.substr(5)].run.play();
};
var people = 0;
while (people < 20) {
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)));
person2._x = (person._x = random(Stage.width));
person2._y = (person._y = 224 + random(10));
person2.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
this.mod = this[this.status].head._x;
levelKills++;
_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);
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if (this.status == "talk") {
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);
}
dir = random(2);
if (dir == 1) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 605) {
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 = 605;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
});
}
people++;
}
var arrFloor = [197, 174, 152, 129, 107];
var badFloor = ((floorTemp = random(arrFloor.length)));
badFloor = arrFloor[badFloor];
arrFloor.splice(floorTemp, 1);
var people = 20;
while (people < 25) {
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;
person.where = (person2.where = "building");
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person._x = (person2._x = random(54) + 248);
person._y = (person2._y = arrFloor[random(arrFloor.length)]);
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
dir = random(2);
if (dir == 0) {
person._xscale = (person2._xscale = -person2._xscale);
}
person.oDir = (person2.oDir = person._xscale);
person2.onMouseDown = function () {
if (bullets > 0) {
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);
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if (this.status == "talk") {
_root.Level["mcMan" + this._name.substr(5)].status = "alert";
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
people++;
}
var people = 25;
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;
person.where = (person2.where = "building");
person2.headType = (person.headType = "shades");
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person._x = (person2._x = random(54) + 248);
person._y = (person2._y = badFloor);
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
dir = random(2);
if (dir == 0) {
person._xscale = (person2._xscale = -person2._xscale);
}
person.oDir = (person2.oDir = person._xscale);
person2.onMouseDown = function () {
if (bullets > 0) {
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);
objectivesCompleted++;
checkObjectives();
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if (this.status == "talk") {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
people++;
}
ctr = 0;
while (ctr <= 4) {
Level["car" + ctr].swapDepths(100 + ctr);
mg.image["car" + ctr].swapDepths(100 + ctr);
r = random(3) + 1;
Level["car" + ctr].gotoAndStop(r);
mg.image["car" + ctr].gotoAndStop(r);
Level["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.mcTank.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this._parent._parent._name.substr(3) == mg.image.mcMan30.car) {
objectivesCompleted++;
checkObjectives();
}
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");
}
}
};
ctr++;
}
mg.image.mcTanker.head.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse) && (!this.isDead)) {
levelKills++;
this.gotoAndPlay(2);
this._parent.blood._visible = true;
Level.mcTanker.head.gotoAndPlay(3);
Level.mcTanker.blood._visible = true;
delete this._parent.onEnterFrame;
delete Level.mcTanker.onEnterFrame;
}
}
};
Level.mcTanker.swapDepths(400);
mg.image.mcTanker.swapDepths(400);
w = random(1000);
mg.image.mcTanker._x = (Level.mcTanker._x = Level.mcTanker._x + (500 + w));
mg.image.mcTanker.onEnterFrame = (Level.mcTanker.onEnterFrame = function () {
this._x = this._x - 0.5;
if (this._x < -50) {
delete this.onEnterFrame;
}
});
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");
}
}
stopAllSounds();
gameSetup();
person = Level.mcMan;
person2 = mg.image.mcMan;
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2.headType = (person.headType = "shades");
person2.onMouseDown = function () {
if (bullets > 0) {
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.mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level.mcMan.gotoAndStop(dieFrame);
objectivesCompleted++;
checkObjectives();
if (Level.boat.boat.mcMan.status == "talk") {
Level.boat.boat.mcMan.gotoAndStop("alert");
mg.image.boat.boat.mcMan.gotoAndStop("alert");
}
} else if (((this.status != "alert") && (this.status != "run")) && (this.status != "dead")) {
this.gotoAndStop("alert");
_root.Level.mcMan.gotoAndStop("alert");
if (Level.boat.boat.mcMan.status != "dead") {
Level.boat.boat.mcMan.gotoAndStop("alert");
mg.image.boat.boat.mcMan.gotoAndStop("alert");
}
}
}
}
};
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x > 605) {
delete this.onEnterFrame;
this.removeMovieClip();
}
});
person = Level.boat.boat.mcMan;
person2 = mg.image.boat.boat.mcMan;
person.cacheAsBitmap = true;
person2.cacheAsBitmap = true;
person2._xscale = (person2._yscale = (person._xscale = (person._yscale = 10)));
person2._xscale = (person._xscale = -10);
person2.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
levelKills++;
delete this.onEnterFrame;
delete Level.boat.boat.mcMan.onEnterFrame;
this.mod = this[this.status].head._x;
_root.Level.boat.boat.mcMan.mod = this[this.status].head._x;
dieFrame = "die" + (random(3) + 1);
this.gotoAndStop(dieFrame);
_root.Level.boat.boat.mcMan.gotoAndStop(dieFrame);
objectivesCompleted++;
checkObjectives();
delete Level.boat.onEnterFrame;
delete mg.image.boat.onEnterFrame;
if (Level.mcMan.status == "talk") {
Level.mcMan.gotoAndStop("alert");
mg.image.mcMan.gotoAndStop("alert");
}
} else if (((this.status != "alert") && (this.status != "run")) && (this.status != "dead")) {
this.gotoAndStop("alert");
_root.Level.boat.boat.mcMan.gotoAndStop("alert");
if (Level.mcMan.status != "dead") {
Level.mcMan.gotoAndStop("alert");
mg.image.mcMan.gotoAndStop("alert");
}
}
}
}
};
person.gotoAndStop("talk" + (random(4) + 1));
person2.gotoAndStop("talk" + (random(4) + 1));
person2.moved = (person.moved = false);
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._x < 23) {
if (!this.moved) {
this.moved = true;
this._y = this._y - 4;
}
if (this._x < -5) {
Level.boat.onEnterFrame = (mg.image.boat.onEnterFrame = function () {
this._x = this._x - 1;
if (this._x < -50) {
this.removeMovieClip();
}
});
this.gotoAndStop(1);
}
}
});
Frame 110
function makeHoles() {
if (mg.image.haus.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.haus.haus.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.haus.haus.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 _local1 = 0;
while (_local1 <= 11) {
if (who != who._parent["mcMan" + _local1]) {
if (who._parent["mcMan" + _local1].status != "dead") {
if (getDistance(who, who._parent["mcMan" + _local1]) < dist.die) {
t = random(3) + 1;
delete who._parent["mcMan" + _local1].onEnterFrame;
delete Level["mcMan" + _local1].onEnterFrame;
levelKills++;
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++;
}
}
stopAllSounds();
gameSetup();
Level.mcDog0._xscale = -Level.mcDog0._xscale;
mg.image.mcDog0._xscale = -mg.image.mcDog0._xscale;
Level.mcDog0.gotoAndPlay("sit");
mg.image.mcDog0.gotoAndPlay("sit");
Level.mcDog2._xscale = -Level.mcDog2._xscale;
mg.image.mcDog2._xscale = -mg.image.mcDog2._xscale;
Level.mcDog2.gotoAndPlay("wag");
mg.image.mcDog2.gotoAndPlay("wag");
Level.mcDog1.gotoAndPlay("walk");
mg.image.mcDog1.gotoAndPlay("walk");
Level.mcDog1.onEnterFrame = (mg.image.mcDog1.onEnterFrame = function () {
if (this._x < 165) {
this._x = 165;
this._xscale = -this._xscale;
} else if (this._x > 225) {
this._x = 225;
this._xscale = -this._xscale;
}
});
dogs = 0;
while (dogs < 3) {
myDog = mg.image["mcDog" + dogs];
myDog.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this.head.hitTest(_root._xmouse, _root._ymouse)) {
levelKills++;
delete this.onMouseDown;
delete this.onEnterFrame;
delete Level["mcDog" + this._name.substr(5)].onEnterFrame;
this.gotoAndPlay("die1");
Level["mcDog" + this._name.substr(5)].gotoAndPlay("die1");
if (this._name.substr(5) == "2") {
objectivesCompleted++;
} else {
objectivesCompleted--;
}
checkObjectives();
checkAlerts(this, {die:0, run:20, talk:30}, "normal");
} else if (this.status == undefined) {
this.status = "alert";
this._xscale = -100;
Level["mcDog" + this._name.substr(5)]._xscale = -100;
checkAlerts(this, {die:0, run:10, talk:0}, "normal");
Level["mcDog" + this._name.substr(5)].gotoAndPlay("run");
this.gotoAndPlay("run");
this.onEnterFrame = (Level["mcDog" + this._name.substr(5)].onEnterFrame = function () {
if (this._x > 605) {
delete this.onEnterFrame;
}
});
}
}
}
};
dogs++;
}
Level.mcMan11.gotoAndStop("talk1");
mg.image.mcMan11.gotoAndStop("talk1");
mg.image.mcMan11.onMouseDown = function () {
if (bullets > 0) {
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);
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if (this.status == "talk") {
this.gotoAndStop("alert");
_root.Level["mcMan b" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
mg.image.mcMan11.onEnterFrame = (Level.mcMan11.onEnterFrame = function () {
if (this._x > 605) {
objectivesCompleted--;
checkObjectives();
delete this.onEnterFrame;
this.removeMovieClip();
}
});
var people = 0;
while (people <= 10) {
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)));
person2._x = (person._x = random(Stage.width));
person2._y = (person._y = 226 + random(9));
person2.onMouseDown = function () {
if (bullets > 0) {
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);
checkAlerts(this, {die:0, run:30, talk:50}, "normal");
} else if (this.status == "talk") {
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);
}
w = random(5);
if (w < 5) {
person._xscale = -person._xscale;
person2._xscale = -person2._xscale;
}
person2.onEnterFrame = (person.onEnterFrame = function () {
if (this._xscale > 0) {
if (this.status == "walk") {
if (this._x < -5) {
this._x = 605;
}
} else if (this.status == "run") {
if (this._x < -5) {
delete this.onEnterFrame;
objectivesCompleted--;
checkObjectives();
this.removeMovieClip();
}
}
} else if (this.status == "walk") {
if (this._x > 605) {
this._x = -5;
}
} else if (this.status == "run") {
if (this._x > 605) {
delete this.onEnterFrame;
objectivesCompleted--;
checkObjectives();
this.removeMovieClip();
}
}
});
people++;
}
ctr = 0;
while (ctr < 9) {
Level["car" + ctr].swapDepths(100 + ctr);
mg.image["car" + ctr].swapDepths(100 + ctr);
r = random(3) + 1;
Level["car" + ctr].gotoAndStop(r);
mg.image["car" + ctr].gotoAndStop(r);
Level["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.head._visible = false;
mg.image["car" + ctr].car.mcTank.onMouseDown = function () {
if (bullets > 0) {
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;
mcMusic.gotoAndPlay("boom");
}
}
};
ctr++;
}
Frame 120
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");
} else if (who.status == "ouch") {
who.gotoAndStop("run");
who.onEnterFrame = function () {
if (this._x < 285) {
delete this.onEnterFrame;
delete this.onMouseDown;
this.gotoAndStop("talk1");
}
};
}
}
function makeHoles() {
if (mg.image.haus.hitTest(_root._xmouse, _root._ymouse)) {
b1 = Level.haus.haus.attachMovie("bullet_hole", "hole" + holeNo, holeNo);
b2 = mg.image.haus.haus.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;
if (mg.image.haus.haus.glass.kitchen.hitTest(_root._xmouse, _root._ymouse) && (mg.image.mcMan0.status == "talk")) {
mg.image.mcMan0._xscale = -mg.image.mcMan0._xscale;
Level.mcMan0._xscale = -Level.mcMan0._xscale;
mg.image.mcMan0.gotoAndStop("alert");
Level.mcMan0.gotoAndStop("alert");
Level.mcMan0.onEnterFrame = (mg.image.mcMan0.onEnterFrame = function () {
if (this._x <= 350) {
this.mod = this[this.status].head._x;
this.gotoAndStop("hide");
delete this.onEnterFrame;
}
});
}
}
}
stopAllSounds();
gameSetup();
holeNo = 0;
Level.mcMan0.gotoAndStop("talk1");
mg.image.mcMan0.gotoAndStop("talk1");
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 startPlane() {
Level.plane.onEnterFrame = (mg.image.plane.onEnterFrame = function () {
if (mg.image.plane.status != "dead") {
this._x = this._x - this.destx;
if (this._x < -100) {
this._x = -80;
this._xscale = -this._xscale;
this.destx = -5;
this.flyup = true;
}
if (this.flyup) {
this._y = this._y - 0.5;
this._rotation = -10;
}
if (this._x > (Stage.width + 200)) {
this.removeMovieClip();
}
}
});
}
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 (who.where == "building") {
if ((who._y == who._parent["mcMan" + _local2]._y) && (who._parent["mcMan" + _local2].status == "talk")) {
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
}
} else if (getDistance(who, who._parent["mcMan" + _local2]) < dist.die) {
if (who._parent["mcMan" + _local2].headType == "shades") {
objectivesCompleted++;
checkObjectives();
}
t = random(3) + 1;
delete who._parent["mcMan" + _local2].onEnterFrame;
delete Level["mcMan" + _local2].onEnterFrame;
levelKills++;
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].where != "building")) {
w = random(10);
if (w < 5) {
who._parent["mcMan" + _local2]._xscale = -who._parent["mcMan" + _local2]._xscale;
Level["mcMan" + _local2]._xscale = -Level["mcMan" + _local2]._xscale;
}
who._parent["mcMan" + _local2].gotoAndStop("alert");
Level["mcMan" + _local2].gotoAndStop("alert");
} else if ((getDistance(who, who._parent["mcMan" + _local2]) < dist.talk) && (who._parent["mcMan" + _local2].where != "building")) {
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]) {
trace("checking... " + ctr);
if ((getDistance(who, who._parent["car" + ctr]) < 80) && (who._parent["car" + ctr].status != "dead")) {
trace(("car: " + ctr) + " BOOM ");
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();
holeNo = 0;
Level.plane.destx = 1;
mg.image.plane.destx = 1;
Level.plane.goto = -200;
mg.image.plane.goto = -200;
Level.plane.body.window.blood._visible = false;
mg.image.plane.body.window.blood._visible = false;
mg.image.plane.body.window.head.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.play();
this._parent.blood._visible = true;
Level.plane.body["w" + this._name.substr(5)].head.play();
Level.plane.body["w" + this._name.substr(5)].blood._visible = true;
levelKills++;
mg.image.plane.status = "dead";
}
}
};
Level.mcMan0.headType = (mg.image.mcMan0.headType = "cigar");
ctr = 0;
while (ctr < 5) {
Level.plane.body["w" + ctr].head._visible = false;
mg.image.plane.body["w" + ctr].head._visible = false;
Level.plane.body["w" + ctr].blood._visible = false;
mg.image.plane.body["w" + ctr].blood._visible = false;
man1 = Level["mcMan" + ctr];
man2 = mg.image["mcMan" + ctr];
man1.gotoAndStop("walk");
man2.gotoAndStop("walk");
man1.walk.gotoAndPlay(random(15) + 1);
man2.walk.gotoAndPlay(random(15) + 1);
man2.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
this.mod = this[this.status].head._x;
objectivesCompleted++;
checkObjectives();
levelKills++;
_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);
checkAlerts(this, {die:0, run:80, talk:100}, "normal");
} else if (this.status == "talk") {
this.gotoAndStop("alert");
_root.Level["mcMan" + this._name.substr(5)].gotoAndStop("alert");
}
}
}
};
man1.onEnterFrame = (man2.onEnterFrame = function () {
if (this._x < 380) {
if (this._name.substr(5) == "4") {
startPlane();
}
this.swapDepths(1000);
delete this.onEnterFrame;
delete this.onMouseDown;
this._parent.plane.body["w" + this._name.substr(5)].head._visible = true;
mg.image.plane.body["w" + this._name.substr(5)].head.onMouseDown = function () {
if (bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.play();
this._parent.blood._visible = true;
Level.plane.body["w" + this._name.substr(5)].head.play();
Level.plane.body["w" + this._name.substr(5)].blood._visible = true;
levelKills++;
objectivesCompleted++;
checkObjectives();
}
}
};
this.removeMovieClip();
}
});
ctr++;
}
Frame 140
stopAllSounds();
txtRank.text = rank;
txtAccuracy.text = accuracy + "%";
btnMain.onRelease = function () {
currentPage = "premain";
fader.play();
};
pmg.onRelease = function () {
FOG.AS2.FogServices.TrackClick();
};
btnSubmit.onRelease = function () {
btnSubmit.enabled = false;
var _local1 = new LoadVars();
_local1.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local1.score = Math.ceil(points + (points * (1 / accuracy)));
_local1.gamer = 33;
_local1.id = random(9999999);
_local1.toString();
_local1.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", _local1, "POST");
};
Frame 150
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")) {
trace("up");
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
trace((this._parent.mcBlock._height + " - ") + (this.mcScore._height * this.item));
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
trace("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://" + _root.Dsource) + ".freeonlinegames.com/scoreboard/getTopPlayer.php?id=") + _root.gameID) + "&rand=") + random(999999));
} else if (sNum == 2) {
xmlPlayer.load(((((("http://" + _root.Dsource) + ".freeonlinegames.com/scoreboard/getTopPlayer.php?id=") + _root.gameID) + "&rand=") + random(999999)) + "&filt=1");
}
}
stop();
var gameID = 33;
Dsource = "www";
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 = "main";
fader.play();
};
Symbol 2 MovieClip [LogoFly] Frame 1
stop();
Symbol 2 MovieClip [LogoFly] Frame 10
stop();
Symbol 10 MovieClip Frame 1
stop();
Symbol 10 MovieClip Frame 16
if (_root.currentPage == "premain") {
_root.gotoAndPlay(_root.currentPage);
} else {
_root.gotoAndStop(_root.currentPage);
}
Symbol 17 MovieClip Frame 1
stop();
Symbol 64 Button
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Symbol 1097 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 1098 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) {
trace(" ");
}
trace(S);
}
}
Symbol 1099 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 1100 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 66 MovieClip "mcNotice" in Symbol 108 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 108 MovieClip Frame 120
_root.play();
Symbol 110 MovieClip Frame 60
stop();
Symbol 118 MovieClip Frame 1
stop();
Symbol 136 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 153 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 166 MovieClip Frame 15
stop();
Symbol 208 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);
}
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 208 MovieClip Frame 131
stop();
Symbol 276 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);
}
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 276 MovieClip Frame 176
stop();
Symbol 324 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);
}
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 324 MovieClip Frame 96
stop();
Symbol 326 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 326 MovieClip Frame 11
stop();
_root.finishedAction(_parent);
Symbol 336 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 336 MovieClip Frame 36
stop();
_root.finishedAction(_parent);
Symbol 346 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 346 MovieClip Frame 31
stop();
_root.finishedAction(_parent);
Symbol 348 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 348 MovieClip Frame 41
stop();
_root.finishedAction(_parent);
Symbol 371 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 371 MovieClip Frame 21
stop();
_root.finishedAction(_parent);
Symbol 381 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);
}
delete _parent.onEnterFrame;
delete _parent.onMouseDown;
Symbol 381 MovieClip Frame 16
stop();
Symbol 402 MovieClip Frame 1
head.gotoAndStop(_parent.headType);
Symbol 402 MovieClip Frame 55
stop();
_root.finishedAction(_parent);
Symbol 403 MovieClip [mcMan] Frame 1
head.gotoAndStop(headType);
status = "hide";
Symbol 403 MovieClip [mcMan] Frame 10
status = "walk";
Symbol 403 MovieClip [mcMan] Frame 20
loops = 0;
status = "run";
Symbol 403 MovieClip [mcMan] Frame 30
status = "dead";
Symbol 403 MovieClip [mcMan] Frame 40
status = "dead";
Symbol 403 MovieClip [mcMan] Frame 50
status = "dead";
Symbol 403 MovieClip [mcMan] Frame 60
status = "talk";
Symbol 403 MovieClip [mcMan] Frame 70
status = "talk";
Symbol 403 MovieClip [mcMan] Frame 80
status = "talk";
Symbol 403 MovieClip [mcMan] Frame 90
status = "talk";
Symbol 403 MovieClip [mcMan] Frame 100
status = "alert";
Symbol 403 MovieClip [mcMan] Frame 110
status = "hide";
Symbol 403 MovieClip [mcMan] Frame 120
status = "ouch";
Symbol 407 MovieClip Frame 10
stop();
Symbol 426 MovieClip Frame 1
ctr = 0;
while (ctr < 20) {
mybar = bar.duplicateMovieClip("bar" + ctr, ctr);
mybar._alpha = (random(25) + random(25)) + 10;
mybar._xscale = random(200) + 10;
mybar.destx = (mybar._x = random(Stage.width));
mybar.speedx = 0;
mybar.speed = random(20) + 20;
mybar.onEnterFrame = function () {
this.speedx = ((this.destx - this._x) / this.speed) + (this.speedx * 0.5);
this._x = this._x + this.speedx;
if (Math.abs(this.destx - this._x) < 1) {
this.speedx = 0;
this.destx = random(Stage.width);
}
};
ctr++;
}
Symbol 438 Button
on (release) {
FOG.AS2.FogServices.TrackClick();
}
Symbol 478 Button
on (release) {
trace("hit");
}
Symbol 498 MovieClip Frame 10
stop();
Symbol 500 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 2
stop();
Symbol 512 MovieClip Frame 10
stop();
Symbol 529 MovieClip Frame 1
stop();
this.onMouseDown = function () {
if (_root.bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
delete this.onMouseDown;
_root.Level.foreground["light" + this._name.substr(5)].play();
this.play();
}
}
};
Symbol 529 MovieClip Frame 10
stop();
Symbol 533 MovieClip Frame 1
stop();
isDead = false;
Symbol 533 MovieClip Frame 20
stop();
isDead = true;
Symbol 722 MovieClip Frame 70
_parent.play();
Symbol 722 MovieClip Frame 95
stop();
Symbol 867 MovieClip Frame 1
stop();
Instance of Symbol 543 MovieClip "blood" in Symbol 867 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 867 MovieClip Frame 2
stop();
Symbol 867 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 872 MovieClip Frame 1
stop();
Instance of Symbol 543 MovieClip "blood" in Symbol 872 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 872 MovieClip Frame 2
stop();
Symbol 872 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 876 MovieClip Frame 1
stop();
Symbol 878 MovieClip Frame 1
stop();
Instance of Symbol 543 MovieClip "blood" in Symbol 878 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 878 MovieClip Frame 2
stop();
Symbol 878 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 879 MovieClip Frame 1
stop();
Symbol 891 MovieClip Frame 1
stop();
mcTank.onMouseDown = function () {
if (_root.bullets > 0) {
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 543 MovieClip "blood" in Symbol 891 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 891 MovieClip Frame 2
stop();
Symbol 891 MovieClip Frame 3
stop();
flame.gotoAndPlay(random(70));
Symbol 892 MovieClip [Level1] Frame 1
foreground.swapDepths(300);
Symbol 898 MovieClip Frame 1
stop();
Symbol 898 MovieClip Frame 10
gotoAndStop (1);
Symbol 898 MovieClip Frame 20
gotoAndStop (1);
Symbol 898 MovieClip Frame 30
gotoAndStop (1);
Symbol 905 MovieClip Frame 1
stop();
Symbol 912 MovieClip Frame 1
btnExit.onRelease = function () {
if (!_root.mg._visible) {
_root.exitMission();
}
};
Symbol 934 MovieClip Frame 1
stop();
Symbol 943 MovieClip Frame 1
stop();
Symbol 1005 MovieClip Frame 6
gotoAndPlay ("wag");
Symbol 1005 MovieClip Frame 15
gotoAndPlay ("sit");
Symbol 1005 MovieClip Frame 23
if (_xscale > 0) {
_x = (_x - ((1.1 * _yscale) / 100));
} else {
_x = (_x + ((1.1 * _yscale) / 100));
}
gotoAndPlay ("walk");
Symbol 1005 MovieClip Frame 42
if (_xscale > 0) {
_x = (_x - ((4.5 * _yscale) / 100));
} else {
_x = (_x + ((4.5 * _yscale) / 100));
}
gotoAndPlay ("run");
Symbol 1005 MovieClip Frame 67
stop();
Symbol 1009 MovieClip Frame 1
stop();
this.onMouseDown = function () {
if (_root.bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
delete this.onMouseDown;
_root.Level.haus.haus["light" + this._name.substr(5)].play();
this.play();
}
}
};
Symbol 1009 MovieClip Frame 10
stop();
Symbol 1014 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1015 MovieClip Frame 1
stop();
Symbol 1019 MovieClip Frame 1
stop();
this.onMouseDown = function () {
if (_root.bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
delete this.onMouseDown;
_root.Level.light.light["light" + this._name.substr(5)].play();
this.play();
}
}
};
Symbol 1019 MovieClip Frame 10
stop();
Symbol 1022 MovieClip Frame 1
stop();
box.onMouseDown = function () {
if (_root.bullets > 0) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
delete this.onMouseDown;
_root.Level.light.play();
_parent.play();
}
}
};
Symbol 1024 MovieClip Frame 1
stop();
Symbol 1024 MovieClip Frame 34
if (light.hitTest(this._parent.mcMan0)) {
this._parent.mcMan0.gotoAndStop("ouch");
_root.mg.image.mcMan0.onMouseDown = function () {
if (_root.bullets > 0) {
if (this[this.status].head.hitTest(_root._xmouse, _root._ymouse) && (this.status != "dead")) {
_root.levelKills++;
_root.objectivesCompleted++;
_root.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);
delete this.onMouseDown;
delete this.onEnterFrame;
delete _root.Level["mcMan" + this._name.substr(5)].onEnterFrame;
}
}
};
}
stop();
Symbol 1036 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1037 MovieClip Frame 1
stop();
Symbol 1055 MovieClip Frame 1
foreground.swapDepths(300);
Symbol 1056 MovieClip Frame 1
stop();
Symbol 1067 Button
on (release) {
getURL ("http://www.freeonlinegames.com/shooting-games/urban-sniper-2.html");
}
Symbol 1079 MovieClip Frame 1
stop();
Symbol 1079 MovieClip Frame 2
stop();
Symbol 1090 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 1091 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}