Frame 2
function _shareScoreHandler(mc, scoreText) {
_root._alienShareScoreFB(scoreText);
}
function _homeShareScoreFB(scoreText) {
var _local1 = flash.external.ExternalInterface.available;
if (_local1) {
flash.external.ExternalInterface.call("g2wShareScore", scoreText);
} else {
getURL (("javascript:g2wShareScore('" + scoreText) + "')");
}
}
function _alienShareScoreFB() {
getURL (_root.obj_game.facebookURL, "_blank");
}
function _shareScoreFB(scoreText) {
var _local3 = new LocalConnection();
var _local2 = _root.fb_local_connection;
_local3.send(_local2, "callFBJS", "g2wShareScore", [scoreText]);
}
function _playAgainHandler(mc) {
Stage.scaleMode = "showAll";
_root.g2w_playagain(true);
}
function _showGameVideo() {
getURL ((("http://www.games2win.com/videotutorial.html?url=" + _root.obj_game.videoID) + "&name=") + _root.obj_game._gameTitle, "_blank");
}
function _calculateScore(limits, score) {
var _local4 = false;
var _local1 = 0;
while (_local1 < (limits.length - 1)) {
if (score <= limits[_local1]) {
return(_local1);
}
_local1++;
}
return(limits.length - 1);
}
function _doGameOver(score, gamestate, showskip, delay) {
trace((((("CALLED : _doGameOver : score:" + score) + " gamestate:") + gamestate) + " showskip: ") + showskip);
clearInterval(_gameoverinterval);
if (delay == undefined) {
delay = 3000;
}
if ((score != undefined) and (gamestate != undefined)) {
_root.partner_score = score;
_root.obj_game._gstatus = gamestate;
_gameoverinterval = setInterval(attachGameOverMc, delay, showskip);
} else {
trace("Could Not Load GAMEOVER!!!");
}
}
function attachGameOverMc(showskip) {
stopAllSounds();
clearInterval(_gameoverinterval);
_root.__gameover_mc = _root.attachMovie("_g2w_gameover_mc", "mc_gameover", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 2});
_root.__gameover_mc.showSkip = showskip;
}
function _showAssetPanels(mc) {
if (mc.gameState == "gameover") {
trace("gameState");
_root._initGameOver(mc);
} else {
_root._initGameCompleted(mc);
}
}
function g2w_playagain(resetlevel) {
_root.__gameover_mc.removeMovieClip();
if (resetlevel) {
trace("starting the game again");
_root.gotoAndStop("lblgame");
_root.game_mc.gotoAndStop("init");
} else {
_root.gotoAndStop("lblgame");
_root.game_mc.gotoAndStop("game");
}
}
function g2w_skiplevel() {
_root.__gameover_mc.removeMovieClip();
_root.score = 0;
_root.gameFeed_mc.gotoAndStop(1);
_root.nextLevel();
}
var obj_game = new Array();
obj_game._host = "gog";
obj_game._gameName = "assassin_jane_doe";
obj_game._gameTitle = "Assassin Jane Doe";
obj_game._g2wGameId = "10046";
obj_game._partnerGameId = "assassin_jane_doe";
obj_game._gstatus = "gameover";
obj_game._googleText = "Assassin Jane Doe";
obj_game._gameStageW = 650;
obj_game._gameStageH = 530;
obj_game._gameScoreOrder = "desc";
obj_game._gameResolution = (Stage.width + "x") + Stage.height;
obj_game.g2wBot = "";
obj_game.g2wBotId = 10301;
obj_game.videoID = "ezivZ1QkhLA";
obj_game.facebookURL = "http://apps.facebook.com/gangofgamers-games/playpage.php?game=10046";
obj_game.FBShareurl = ("http://www.facebook.com/sharer.php?u=http://apps.facebook.com/gangofgamers-games/play/" + obj_game._g2wGameId) + "";
obj_game.gameoverthumb = "http://www.gangofgamers.com/?utm_source=gog_wrapper&utm_medium=post_rolls&utm_content=assassin_jane_doe&utm_campaign=gog_wrapper";
obj_game.gameoverstrip = "http://www.gangofgamers.com/?utm_source=gog_strip&utm_medium=post_rolls&utm_content=assassin_jane_doe&utm_campaign=gog_strip";
obj_game.inviziads = (((("http://s1.inviziads.com/lookup.html?g=" + obj_game._g2wGameId) + "&h=") + obj_game._host) + "&l=") + obj_game._gameLanguage;
obj_game.FBMsg = "is working as a hired gun on Gangofgamers\u2019 Assassin Jane Doe.Pick up your rifle. Play the game.";
var obj_partner = new Array();
obj_partner.partner_name = "gog";
obj_partner.partner_id = 1;
obj_partner.invalid_txt = "Invalid Nickname!";
obj_partner.show_submit = false;
obj_partner.submitURL = "http://www.gangofgamers.com/submit_score.asp";
obj_partner.top10URL = "http://www.gangofgamers.com//get_top_scorer.asp";
obj_partner.lblsubmit = "Enter your GangofGamers Nickname below";
obj_partner.show_g2w_slate = true;
obj_partner.show_register = true;
obj_partner.text_register = "Create Nickname";
obj_partner.url_register = "http://www.gangofgamers.com//register.asp";
obj_partner.clickthru = "http://www.gangofgamers.com/";
obj_partner._allowclick = true;
_initAssetsPanel = function (mcpath) {
Stage.scaleMode = "noScale";
Stage.align = "";
var _local2 = mcpath;
_local2.onEnterFrame = function () {
Stage.scaleMode = "noScale";
Stage.align = "";
};
_local2.overlay_btn.useHandCursor = false;
_local2.gameState = _root.obj_game._gstatus;
};
_initGameOver = function (mcpath) {
var _local2 = mcpath;
if (!_root.checkhost()) {
_local2.gotoAndStop("g2w_spil_gameover");
} else {
_local2.gotoAndStop("g2w_gameover");
}
if (_local2.showSkip) {
_local2.g2w_skipPanel.gotoAndStop("skip");
_local2.g2w_skipPanel.btn_nextLevel.onRelease = function () {
Stage.scaleMode = "showAll";
_root.g2w_skiplevel();
};
}
_local2.g2w_skipPanel.btn_playAgain.onRelease = function () {
Stage.scaleMode = "showAll";
_root.g2w_playagain();
};
};
_initGameCompleted = function (mcpath) {
var _local2 = mcpath;
if (!_root.checkhost()) {
_local2.gotoAndStop("g2w_spil_gamecompleted");
} else {
_local2.gotoAndStop("g2w_gamecompleted");
}
};
var g2w_menu = new ContextMenu();
g2w_menu.hideBuiltInItems();
this.menu = g2w_menu;
checkhost = function () {
trace("CALL CHECKHOST");
swfurl = this._url;
if ((swfurl.indexOf("games2win.com") == -1) && (swfurl.indexOf("gangofgamers.com") == -1)) {
return(false);
}
return(true);
};
_trackClickThru = function (mc) {
if (obj_partner._allowclick) {
mc.hit_area.onRelease = function () {
getURL (obj_partner.clickthru, "_blank");
};
} else {
mc.hit_area.useHandCursor = false;
}
};
String.prototype.trim = function () {
var _local3 = 0;
var _local2 = this.length;
white = new Object();
white._32 = 1;
_local2--;
while (white["_" + ord(this.charAt(_local2))]) {
}
while (white["_" + ord(this.charAt(_local3++))]) {
}
return(this.slice(_local3 - 1, _local2 + 1));
};
MovieClip.prototype._focusrect = false;
MovieClip.prototype.tabEnabled = false;
Button.prototype.tabEnabled = false;
Frame 10
stop();
Frame 19
stop();
Instance of Symbol 497 MovieClip in Frame 19
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
load_txt.text = ("Loaded " + percent) + "%";
gotoAndStop(percent);
if (loaded == total) {
_parent.play();
}
}
Frame 27
stop();
Frame 35
stop();
trace("game_mc loaded");
mc_fbshare.onRelease = function () {
getURL ("http://www.facebook.com/sharer.php?u=http://apps.facebook.com/gangofgamers-games/play/10046", "_blank");
};
Symbol 1153 MovieClip Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
clearInterval(tint1);
Stage.scaleMode = "showAll";
_root.play();
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
if (success) {
parse_iads(lv_result);
} else {
Stage.scaleMode = "showAll";
_root.play();
}
};
lv_iads.sendAndLoad(adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function time_delay() {
var _local1 = 0;
tint1 = setInterval(timespam, 1000);
}
function timespam() {
tim++;
trace(((tim + " tim Tim") + " show_time") + show_time);
if (isNaN(tim)) {
clearInterval(tint1);
Stage.scaleMode = "showAll";
trace(Stage.scaleMode);
} else if (tim == show_time) {
clearInterval(tint1);
Stage.scaleMode = "showAll";
_root.play();
trace(Stage.scaleMode);
}
}
function create_assets(mc, _type) {
mc.createEmptyMovieClip("whitebg", 0);
whitebg.beginFill(16777215);
whitebg.moveTo(0, 0);
whitebg.lineTo(0, 0);
whitebg.lineTo(stageWidth, 0);
whitebg.lineTo(stageWidth, stageHeight + 20);
whitebg.lineTo(0, stageHeight + 20);
whitebg.endFill();
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Verdana";
_local3.size = 10;
var _local2 = new TextFormat();
_local2.align = "right";
_local2.font = "Verdana";
_local2.size = 10;
_local2.underline = true;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("m_txt", mc.getNextHighestDepth(), 0, 0, 120, 22);
b_txt.autoSize = true;
m_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
m_txt.selectable = false;
m_txt.html = true;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local3);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local3);
m_txt.setNewTextFormat(_local2);
h_txt.text = "";
mc.createEmptyMovieClip("progressBar", 500);
}
}
function onLoadInit(mc) {
time_delay();
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
h_txt.text = "Advertisement";
loadMessages();
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start = function () {
game_fps = getFps();
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.start();
progressBar.onEnterFrame = function () {
this.start();
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
b_txt.text = "Note\rClicking on the above Ad won't interrupt your game.\rAd link opens in a new window.";
myself._y = b_txt._y - 10;
x = (stageWidth / 2) - (ad_width / 2);
y = (stageHeight / 2) - (ad_height / 2);
mc._x = x;
mc._y = y;
h_txt._x = (x + (ad_width / 2)) - (h_txt._width / 2);
h_txt._y = y - 20;
progressBar._x = (x + (ad_width / 2)) - (progressBar._width / 2);
progressBar._y = (y + 5) + ad_height;
myself.invizi_logo._alpha = 100;
myself.invizi_logo.swapDepths(myself.getNextHighestDepth());
myself.invizi_logo._x = int(progressBar._x);
myself.invizi_logo._y = int(progressBar._y + progressBar._height) + 5;
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 3;
myself.invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com/index.html?utm_source=4_1&utm_medium=logo&utm_content=default&utm_campaign=invizi", "_blank");
};
b_txt._x = (x + (ad_width / 2)) - (b_txt._width / 2);
b_txt._y = progressBar._y + 38;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function loadMessages() {
lv_messages = new XML();
lv_messages.ignoreWhite = true;
lv_messages.onLoad = function (success) {
if (success) {
totalNodes = lv_messages.firstChild.childNodes.length;
ran = Math.floor(Math.random() * totalNodes);
if (lv_messages.firstChild.childNodes[ran].firstChild == undefined) {
m_txt.htmlText = "<font color='#0066CC'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
} else {
m_txt.htmlText = ((("<font color='#0066CC'><a href='" + lv_messages.firstChild.childNodes[ran].attributes.link) + "' target='_blank'>") + lv_messages.firstChild.childNodes[ran].firstChild) + "</a></font>";
}
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
} else {
m_txt.htmlText = "<font color='#0066CC'><a href='http://inviziads.com' target='_blank'>Advertisers, try us out for US$250</a></font>";
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
}
};
lv_messages.load(messageURL);
}
function pushdata() {
holder.obj_iads = _global.obj_iads;
}
function startdatapush(mc) {
var _local2;
_local2 = setInterval(this, "pushdata", 10);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
myself.createEmptyMovieClip("holder", 100);
var _local5 = _global.obj_iads.url;
obj_iads = _global.obj_iads;
var _local3 = new Object();
_local3.onLoadComplete = function (target_mc) {
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local3);
_local4.loadClip(_global.obj_iads.url, holder);
} else {
brain();
}
clearInterval(this._parent._parent.int1);
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
function measureComScore() {
var _local1 = new LoadVars();
var _local2 = new LoadVars();
_local1.C1 = 7;
_local1.C2 = 5799339 /* 0x587DAB */;
_local1.C3 = 1;
var _local3 = "http://beacon.scorecardresearch.com/scripts/beacon.dll";
_local1.sendAndLoad(_local3, _local2, "GET");
_local2.onLoad = function (ok) {
if (ok) {
trace("Comscore Success");
} else {
trace("Comscore failed");
}
};
}
Stage.showMenu = false;
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
var time = 0;
var tim = 0;
var show_time = 0;
var tempo = 0;
var tint1;
var stageWidth = 0;
var stageHeight = 0;
getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps != 0) && (game_fps != undefined)) {
if (Stage.width > 0) {
stageWidth = Stage.width;
stageHeight = Stage.height;
get_iads();
this.onEnterFrame = null;
}
}
};
myself = this;
signal = true;
var purl = flash.external.ExternalInterface.call("document.URL.toString");
var hurl = escape(_root._url);
var adurl = "http://s1.inviziads.com/lookup.html?";
adurl = adurl + "g=10046";
adurl = adurl + "&h=gog";
adurl = adurl + "&type=pre";
adurl = adurl + "&v=5_0";
adurl = adurl + ("&purl=" + escape(purl));
adurl = adurl + ("&hurl=" + hurl);
adurl = adurl + "&l=en";
var my_date = new Date();
adurl = adurl + ("&ts=" + my_date.getSeconds());
var messageURL = "http://s1.inviziads.com/template/invizi_messages.xml";
stop();
Stage.scaleMode = "noScale";
Stage.align = "TL";
if ((purl.indexOf(".gangofgamers.com") == -1) && (hurl.indexOf(".gangofgamers.com") == -1)) {
measureComScore();
}
_root.stop();
Symbol 9 Button
on (release) {
getURL (_root.obj_game.gameoverstrip, "_blank");
}
Symbol 120 MovieClip Frame 1
stop();
Symbol 121 Button
on (release) {
getURL (_root.obj_game.gameoverthumb, "_blank");
}
Symbol 122 MovieClip Frame 1
stop();
var i = 1;
while (i <= 28) {
this["thumb" + i].gotoAndStop(i);
i++;
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
stop();
Symbol 153 MovieClip [_g2w_gameover_mc] Frame 1
_root._initAssetsPanel(this);
_root._showAssetPanels(this);
Symbol 153 MovieClip [_g2w_gameover_mc] Frame 2
stop();
btn_shareScore.onRelease = function () {
_root._shareScoreHandler(this, _root.obj_game.FBMsg);
};
btn_videoTutorial.onRelease = function () {
_root._showGameVideo();
};
mc_fbshare.onRelease = function () {
getURL (_root.obj_game.FBShareurl, "_blank");
};
Symbol 153 MovieClip [_g2w_gameover_mc] Frame 3
stop();
btn_shareScore.onRelease = function () {
_root._shareScoreHandler(this, _root.obj_game.FBMsg);
};
btn_videoTutorial.onRelease = function () {
_root._showGameVideo();
};
mc_fbshare.onRelease = function () {
getURL (_root.obj_game.FBShareurl, "_blank");
};
Symbol 153 MovieClip [_g2w_gameover_mc] Frame 4
stop();
btn_shareScore.onRelease = function () {
_root._shareScoreHandler(this, _root.obj_game.FBMsg);
};
btn_videoTutorial.onRelease = function () {
_root._showGameVideo();
};
btn_playAgain.onRelease = function () {
_root._playAgainHandler(this);
};
mc_fbshare.onRelease = function () {
getURL (_root.obj_game.FBShareurl, "_blank");
};
Symbol 153 MovieClip [_g2w_gameover_mc] Frame 5
stop();
btn_shareScore.onRelease = function () {
_root._shareScoreHandler(this, _root.obj_game.FBMsg);
};
btn_videoTutorial.onRelease = function () {
_root._showGameVideo();
};
btn_playAgain.onRelease = function () {
_root._playAgainHandler(this);
};
mc_fbshare.onRelease = function () {
getURL (_root.obj_game.FBShareurl, "_blank");
};
Symbol 156 MovieClip [brain_inviziads] Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
clearInterval(int1);
_root.play();
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
if (success) {
parse_iads(lv_result);
} else {
_root.play();
}
};
lv_iads.g = game_id;
lv_iads.h = "as";
lv_iads.sendAndLoad(_root.adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function time_delay() {
tim = 0;
int1 = setInterval(timespam, 1000);
}
function timespam() {
tim++;
if (tim == show_time) {
clearInterval(int1);
_root.play();
}
}
function create_assets(mc, _type) {
mc.createEmptyMovieClip("whitebg", 0);
whitebg.beginFill(16777215);
whitebg.moveTo(0, 0);
whitebg.lineTo(0, 0);
whitebg.lineTo(Stage.width, 0);
whitebg.lineTo(Stage.width, Stage.height + 20);
whitebg.lineTo(0, Stage.height + 20);
whitebg.endFill();
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Verdana";
_local3.size = 10;
var _local2 = new TextFormat();
_local2.align = "right";
_local2.font = "Verdana";
_local2.size = 10;
_local2.underline = true;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("m_txt", mc.getNextHighestDepth(), 0, 0, 120, 22);
b_txt.autoSize = true;
m_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
m_txt.selectable = false;
m_txt.html = true;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local3);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local3);
m_txt.setNewTextFormat(_local2);
loadMessages();
h_txt.text = "";
mc.createEmptyMovieClip("progressBar", 500);
}
}
function onLoadInit(mc) {
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
h_txt.text = "Advertisement";
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar.start = function () {
game_fps = getFps();
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.onEnterFrame = function () {
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start();
b_txt.text = "Note\rClicking on the above Ad won't interrupt your game.\rAd link opens in a new window.\rThanks to our sponsors, we provide you free games to play.";
myself._y = b_txt._y - 10;
x = (Stage.width / 2) - (ad_width / 2);
y = (Stage.height / 2) - (ad_height / 2);
mc._x = x;
mc._y = y;
h_txt._x = (x + (ad_width / 2)) - (h_txt._width / 2);
h_txt._y = y - 20;
progressBar._x = (x + (ad_width / 2)) - (progressBar._width / 2);
progressBar._y = (y + 5) + ad_height;
myself.attachMovie("invizi_logo", "invizi_logo", this.getNextHighestDepth() + 100);
myself.invizi_logo.swapDepths(myself.getNextHighestDepth());
myself.invizi_logo._x = int(progressBar._x);
myself.invizi_logo._y = int(progressBar._y + progressBar._height) + 5;
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 3;
myself.invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com", "_blank");
};
b_txt._x = (x + (ad_width / 2)) - (b_txt._width / 2);
b_txt._y = progressBar._y + 38;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function loadMessages() {
lv_messages = new XML();
lv_messages.onLoad = function (success) {
if (success) {
totalNodes = lv_messages.firstChild.childNodes.length;
ran = Math.floor(Math.random() * totalNodes);
trace(lv_messages.firstChild);
if (lv_messages.firstChild.childNodes[ran].firstChild == undefined) {
m_txt.htmlText = "<font color='#ff0000'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
} else {
m_txt.htmlText = ((("<font color='#ff0000'><a href='" + lv_messages.firstChild.childNodes[ran].attributes.link) + "' target='_blank'>") + lv_messages.firstChild.childNodes[ran].firstChild) + "</a></font>";
}
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
} else {
m_txt.htmlText = "<font color='#ff0000'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
}
};
lv_messages.load(_root.messageURL);
}
function pushdata() {
holder.obj_iads = _global.obj_iads;
}
function startdatapush(mc) {
var _local2;
_local2 = setInterval(this, "pushdata", 10);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
myself.createEmptyMovieClip("holder", 100);
var _local4 = _global.obj_iads.url;
show_time = 15;
obj_iads = _global.obj_iads;
var _local2 = new Object();
_local2.onLoadComplete = function (target_mc) {
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local3.loadClip(_global.obj_iads.url, holder);
} else {
brain();
}
time_delay();
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
System.security.allowDomain("*");
getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps != 0) && (game_fps != undefined)) {
this.onEnterFrame = null;
}
};
myself = this;
signal = true;
if (_root.checkhost() == false) {
_root.stop();
var my_date = new Date();
_root.adurl = (_root.obj_game.inviziads + "&type=pre&ts=") + my_date.getSeconds();
_root.messageURL = "http://s1.inviziads.com/template/invizi_messages.xml";
get_iads();
} else {
_root.play();
}
Symbol 226 MovieClip Frame 1
stop();
Symbol 238 MovieClip [mini_empty] Frame 1
function initialise() {
firstmove = true;
Mouse.show();
done = false;
trace("minigame level " + _parent.level);
player.ismoving = false;
player.stop();
minigame_counter = 50;
player_arr.push(player);
enemy_me = enemy_me[_parent.level];
trace(enemy_me);
all_nodes = eval ("all_nodes" + _parent.level);
trace("all_nodes " + all_nodes);
k = 1;
while (k <= (all_nodes.length - 1)) {
var tempm = eval ("e" + k);
tempm.nodevalue = k;
if (k == 1) {
player._x = tempm._x;
player._y = tempm._y;
player.node = k;
}
tempm.onRelease = function () {
if (chkMove(this)) {
trace("valid move..");
if ((_parent.level == 0) && (firstmove)) {
firstmove = false;
start_mc._visible = false;
arr1_mc._visible = false;
arr2_mc._visible = false;
} else if (firstmove) {
firstmove = false;
start_mc._visible = false;
}
playerMoveTo(this);
}
};
k++;
}
i = 0;
while (i < enemy_me.length) {
var enos = parseInt(enemy_me[i][0].substr(5));
var en = eval (enemy_me[i][0]);
allenemy_arr.push(en);
en.nature = "forward";
var loc = enemy_me[i][1];
var nodearr = eval ("enemyarr" + enos);
var node = eval (nodearr[loc]);
en._x = node._x;
en._y = node._y;
en.lastx = node._x;
en.lasty = node._y;
moveToNextNode(en, nodearr, loc);
i++;
}
minigame_timer = setInterval(chkMiniGame, 1000);
minitimer_txt.text = minigame_counter;
}
function chkMiniGame() {
minigame_counter--;
minitimer_txt.text = minigame_counter;
if (minigame_counter == 0) {
clearInterval(minigame_timer);
_parent.reason = "caught";
_parent.gotoAndStop("gameover");
}
}
function moveToNextNode(en, nodearr, loc) {
if (loc == 0) {
loc++;
moveTo(en, nodearr, loc);
} else if (loc == (nodearr.length - 1)) {
loc--;
moveTo(en, nodearr, loc);
} else {
var _local4 = randRange(0, 1);
if (_local4 == 0) {
loc--;
moveTo(en, nodearr, loc);
} else {
loc++;
moveTo(en, nodearr, loc);
}
}
}
function chkMove(node_mc) {
var p = player.node;
var n = node_mc.nodevalue;
i = 0;
while (i < all_nodes[p].length) {
var tp = eval (all_nodes[p][i]);
if ((tp == node_mc) && (!player.ismoving)) {
return(true);
}
i++;
}
}
function moveTo(en, nodearr, loc) {
var nextnode = eval (nodearr[loc]);
var xpos = Math.abs(en._x - nextnode._x);
var ypos = Math.abs(en._y - nextnode._y);
var tmp = Math.sqrt((xpos * xpos) + (ypos * ypos));
var time = (speed * tmp);
enemy_tweenx = new mx.transitions.Tween(en, "_x", mx.transitions.easing.None.easeNone, en._x, nextnode._x, time, true);
enemy_tweeny = new mx.transitions.Tween(en, "_y", mx.transitions.easing.None.easeNone, en._y, nextnode._y, time, true);
enemy_tweenx.onMotionChanged = function () {
radians = Math.atan2(nextnode._y - en._y, nextnode._x - en._x);
degrees = (radians / Math.PI) * 180;
en._rotation = degrees + 90;
var _local4 = Math.abs(en._x - player._x);
var _local3 = Math.abs(en._y - player._y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= 5) {
delete this.onMotionChanged;
clearInterval(minigame_timer);
miniReset();
if ((!done) && (en._x != undefined)) {
_parent.reason = "caught";
_parent.gotoAndStop("gameover");
}
}
};
enemy_tweenx.onMotionFinished = function () {
moveToNextNode(en, nodearr, loc);
};
}
function playerMoveTo(node_mc) {
player.node = node_mc.nodevalue;
player.ismoving = true;
var nextnode = eval (nodearr[loc]);
var xpos = Math.abs(player._x - node_mc._x);
var ypos = Math.abs(player._y - node_mc._y);
var tmp = Math.sqrt((xpos * xpos) + (ypos * ypos));
var time = (pspeed * tmp);
player.play();
player_tweenx = new mx.transitions.Tween(player, "_x", mx.transitions.easing.None.easeNone, player._x, node_mc._x, time, true);
player_tweeny = new mx.transitions.Tween(player, "_y", mx.transitions.easing.None.easeNone, player._y, node_mc._y, time, true);
player_tweenx.onMotionChanged = function () {
radians = Math.atan2(node_mc._y - player._y, node_mc._x - player._x);
degrees = (radians / Math.PI) * 180;
player._rotation = degrees + 90;
};
player_tweenx.onMotionFinished = function () {
player.stop();
player.ismoving = false;
if (all_nodes[player.node].length == 0) {
clearInterval(minigame_timer);
miniReset();
done = true;
trace("player escaped................" + level);
if (_parent.level == 5) {
_parent.gotoAndStop("gamecomplete");
} else {
_parent.gotoAndStop("levelcomplete");
}
}
};
}
function miniReset() {
delete enemy_tweenx.onMotionChanged;
enemy_tweenx = null;
enemy0.removeMovieClip();
enemy1.removeMovieClip();
player.removeMovieClip();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
stop();
var allenemy_arr;
var player_arr;
var player_tweenx;
var player_tweeny;
var enemy_tweenx;
var enemy_tweeny;
var enemy_me = [[["enemy0", 4], ["enemy1", 1]], [["enemy2", 7], ["enemy3", 4]], [["enemy4", 9], ["enemy5", 4], ["enemy12", 2]], [["enemy6", 4], ["enemy7", 3], ["enemy13", 4]], [["enemy8", 9], ["enemy9", 7], ["enemy14", 2], ["enemy15", 2]], [["enemy10", 3], ["enemy11", 7], ["enemy16", 4], ["enemy17", 2]]];
var enemyarr0 = new Array("e1", "e2", "e3", "e4", "e5", "e15", "e6", "e7", "e8");
var enemyarr1 = new Array("e9", "e10", "e15", "e11", "e12", "e7");
var enemyarr2 = new Array("e1", "e11", "e3", "e7", "e9", "e13", "e14", "e10");
var enemyarr3 = new Array("e1", "e2", "e3", "e4", "e5", "e10");
var enemyarr4 = new Array("e1", "e16", "e15", "e11", "e12", "e3", "e10", "e14", "e6", "e7", "e9", "e8");
var enemyarr5 = new Array("e1", "e2", "e4", "e5", "e6");
var enemyarr12 = new Array("e19", "e18", "e17", "e16", "e15", "e11", "e12");
var enemyarr6 = new Array("e1", "e2", "e3", "e4", "e5", "e6", "e7", "e15", "e8");
var enemyarr7 = new Array("e1", "e9", "e13", "e14", "e15");
var enemyarr13 = new Array("e14", "e15", "e7", "e12", "e11");
var enemyarr8 = new Array("e1", "e24", "e9", "e16", "e15", "e14", "e13", "e3", "e23", "e4", "e5", "e25", "e6", "e7", "e8");
var enemyarr9 = new Array("e1", "e2", "e23", "e22", "e10", "e25", "e14", "e17", "e16", "e19", "e18", "e6");
var enemyarr14 = new Array("e18", "e19", "e16", "e9", "e24", "e13");
var enemyarr15 = new Array("e6", "e7", "e11", "e12");
var enemyarr10 = new Array("e1", "e2", "e3", "e4", "e5", "e23", "e7", "e22", "e13", "e15", "e16", "e8");
var enemyarr11 = new Array("e1", "e14", "e7", "e12", "e13", "e17", "e20", "e19", "e21", "e11", "e10", "e8");
var enemyarr16 = new Array("e16", "e17", "e18", "e19", "e21", "e11", "e9", "e14", "e7");
var enemyarr17 = new Array("e7", "e12", "e13", "e15", "e16", "e17");
var all_nodes0 = [[], ["e2", "e9"], ["e1", "e3"], ["e2", "e4"], ["e3", "e5"], ["e4", "e15", "e13"], ["e15", "e7"], ["e6", "e8", "e12"], [], ["e1", "e10", "e14"], ["e9", "e15"], ["e15", "e12"], ["e7", "e11"], ["e5", "e14"], ["e9", "e13"], ["e5", "e6", "e10", "e11"]];
var all_nodes1 = [[], ["e2", "e11"], ["e1", "e6", "e3"], ["e4", "e11", "e7", "e2"], ["e3", "e5"], ["e4", "e12", "e10"], ["e2", "e13"], ["e3", "e9"], ["e10", "e12"], ["e7", "e13"], [], ["e1", "e3"], ["e5", "e8"], ["e5", "e6", "e9", "e14"], ["e10", "e13"]];
var all_nodes2 = [[], ["e2", "e16"], ["e1", "e3"], ["e2", "e4", "e10", "e12"], ["e3", "e5", "e11"], ["e4", "e6"], ["e5", "e7", "e14"], ["e6", "e9", "e13", "e19"], [], ["e7", "e8"], ["e3", "e14"], ["e4", "e15", "e12"], ["e3", "e11"], ["e7", "e8"], ["e6", "e10"], ["e11", "e16"], ["e1", "e15", "e17"], ["e16", "e18"], ["e17", "e19"], ["e7", "e18"]];
var all_nodes3 = [[], ["e2", "e9"], ["e1", "e3"], ["e2", "e4", "e9", "e13"], ["e3", "e5"], ["e4", "e6"], ["e5", "e7"], ["e6", "e12", "e15"], [], ["e1", "e10", "e3"], ["e9", "e11"], ["e10", "e12"], ["e7", "e11"], ["e3", "e14"], ["e13", "e15"], ["e7", "e8"]];
var all_nodes4 = [[], ["e2", "e24"], ["e1", "e23"], ["e23", "e13"], ["e23", "e5"], ["e4", "e21", "e22", "e25"], ["e7", "e18", "e25"], ["e6", "e8", "e11"], [], ["e16", "e24"], ["e14", "e22", "e25"], ["e7", "e12"], ["e11", "e20"], ["e3", "e14", "e22", "e24"], ["e13", "e15", "e10", "e17"], ["e14", "e16"], ["e9", "e15", "e17", "e19"], ["e14", "e16"], ["e8", "e6", "e19"], ["e18", "e16"], ["e12", "e21"], ["e5", "e20"], ["e5", "e10", "e13", "e23"], ["e3", "e4", "e2", "e22"], ["e1", "e13", "e9", "e25"], ["e5", "e6", "e10"]];
var all_nodes5 = [[], ["e2", "e14"], ["e1", "e3"], ["e2", "e4"], ["e3", "e5"], ["e4", "e13"], ["e11", "e19"], ["e12", "e13", "e14", "e22"], [], ["e11", "e14"], ["e8", "e11"], ["e6", "e9", "e10", "e21"], ["e7", "e13"], ["e12", "e15", "e17", "e22"], ["e1", "e7", "e9"], ["e13", "e16"], ["e8", "e15", "e17"], ["e13", "e16", "e18", "e20"], ["e17", "e19"], ["e6", "e18", "e20", "e21"], ["e19", "e17"], ["e11", "e19"], ["e7", "e13"]];
var speed = 0.02;
var pspeed = 0.01;
var minigame_timer;
var minigame_counter = 50;
var firstmove = true;
var done;
Symbol 238 MovieClip [mini_empty] Frame 2
var panelx1;
var panely1;
start_mc._visible = false;
arr1_mc._visible = false;
arr2_mc._visible = false;
end_mc._visible = false;
panelx1 = new mx.transitions.Tween(minigame_inst, "_x", mx.transitions.easing.None.easeNone, minigame_inst._x, _parent.stagewidth / 2, 0.5, true);
panelx1.onMotionFinished = function () {
minigame_inst.close_btn.onRelease = function () {
panelx1 = new mx.transitions.Tween(minigame_inst, "_x", mx.transitions.easing.None.easeNone, minigame_inst._x, _parent.stagewidth * 2, 0.4, true);
panelx1.onMotionFinished = function () {
start_mc._visible = true;
arr1_mc._visible = true;
arr2_mc._visible = true;
end_mc._visible = true;
initialise();
};
};
};
stopAllSounds();
_parent.sound_mc.gotoAndStop(6);
Symbol 238 MovieClip [mini_empty] Frame 3
stopAllSounds();
_parent.sound_mc.gotoAndStop(6);
initialise();
Symbol 238 MovieClip [mini_empty] Frame 4
stopAllSounds();
_parent.sound_mc.gotoAndStop(6);
initialise();
Symbol 238 MovieClip [mini_empty] Frame 5
stopAllSounds();
_parent.sound_mc.gotoAndStop(6);
initialise();
Symbol 238 MovieClip [mini_empty] Frame 6
stopAllSounds();
_parent.sound_mc.gotoAndStop(6);
initialise();
Symbol 238 MovieClip [mini_empty] Frame 7
stopAllSounds();
_parent.sound_mc.gotoAndStop(6);
initialise();
Symbol 363 MovieClip [people_mc] Frame 1
stop();
var max_x = 655;
var min_x = -5;
var dir = -1;
var myspeed = -1;
var changeme = true;
Symbol 367 MovieClip [game_sound_ctrl] Frame 1
_gameSounds = new Sound();
var frame = "on";
changeVol = function (targetvol, step) {
this.onEnterFrame = function () {
var _local3 = _gameSounds.getVolume();
if ((step < 0) and (_local3 <= targetvol)) {
_local3 = targetvol;
delete this.onEnterFrame;
_root.so_sound = 1;
} else if ((step > 0) and (_local3 >= targetvol)) {
_local3 = targetvol;
delete this.onEnterFrame;
_root.so_sound = 0;
} else {
_gameSounds.setVolume(_local3 + step);
}
};
};
if (_root.so_sound == 1) {
frame = "off";
this.gotoAndPlay(frame);
}
this.onRelease = function () {
if (frame == "on") {
frame = "off";
} else {
frame = "on";
}
this.gotoAndPlay(frame);
};
Symbol 367 MovieClip [game_sound_ctrl] Frame 2
stop();
changeVol(100, 5);
Symbol 367 MovieClip [game_sound_ctrl] Frame 3
stop();
changeVol(0, -5);
Symbol 370 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 1146 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1147 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1148 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1149 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 1150 MovieClip [__Packages.mx.transitions.easing.Back] Frame 0
class mx.transitions.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 479 MovieClip Frame 1
var i = 1;
while (i <= 48) {
this["thumb" + i].gotoAndStop(i);
i++;
}
Symbol 479 MovieClip Frame 120
stop();
trace("reached here..");
_parent.gotoAndStop("lblloader");
Symbol 488 Button
on (release) {
getURL ("http://www.gangofgamers.com", "_blank");
}
Symbol 491 MovieClip Frame 1
stop();
System.security.allowDomain("*");
var GameURL = _root._url;
if ((GameURL.indexOf(".gangofgamers.com") != -1) || (GameURL.indexOf(".games2win.com") != -1)) {
mc_common._visible = false;
} else {
mc_common._visible = true;
var str = ((((("http://s1.inviziads.com/lookup.html?type=strip&g=" + _root.obj_game._g2wGameId) + "&h=") + _root.obj_game._host) + "&hurl=") + _root._url);
loadMovie (str, this.loaderClip);
}
Symbol 502 MovieClip Frame 1
image_01.forceSmoothing = true;
Symbol 506 MovieClip Frame 1
image_02.forceSmoothing = true;
Symbol 510 MovieClip Frame 1
image_03.forceSmoothing = true;
Symbol 514 MovieClip Frame 1
image_04.forceSmoothing = true;
Symbol 518 MovieClip Frame 1
image_05.forceSmoothing = true;
Symbol 522 MovieClip Frame 1
image_05.forceSmoothing = true;
Symbol 529 MovieClip Frame 102
stop();
_parent.gotoAndPlay("lblgame");
Symbol 553 MovieClip Frame 1
stop();
Symbol 602 MovieClip Frame 19
trace("last frame " + _parent._parent._parent._parent.level);
stop();
_parent._parent._parent._parent.resetAll();
_parent._parent._parent._parent.minimap_mc.gotoAndStop(_parent._parent._parent._parent.level + 2);
Symbol 603 MovieClip Frame 1
stop();
Symbol 639 MovieClip Frame 19
stop();
_parent._parent._parent._parent.resetAll();
_parent._parent._parent._parent.minimap_mc.gotoAndStop(_parent._parent._parent._parent.level + 2);
Symbol 640 MovieClip Frame 1
stop();
Symbol 676 MovieClip Frame 19
stop();
Symbol 696 MovieClip Frame 19
stop();
Symbol 707 MovieClip Frame 10
stop();
Symbol 708 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 19
stop();
_parent._parent._parent._parent.resetAll();
_parent._parent._parent._parent.minimap_mc.gotoAndStop(_parent._parent._parent._parent.level + 2);
Symbol 745 MovieClip Frame 1
stop();
Symbol 782 MovieClip Frame 19
stop();
_parent._parent._parent._parent.resetAll();
_parent._parent._parent._parent.minimap_mc.gotoAndStop(_parent._parent._parent._parent.level + 2);
Symbol 783 MovieClip Frame 1
stop();
Symbol 817 MovieClip Frame 19
stop();
Symbol 833 MovieClip Frame 15
stop();
Symbol 834 MovieClip Frame 1
stop();
Symbol 835 MovieClip Frame 1
stop();
var max_x = 650;
var min_x = 0;
var dir = 0;
var myspeed = 1;
Symbol 835 MovieClip Frame 2
max_x = 242;
min_x = 106;
dir = 0;
myspeed = 1;
Symbol 835 MovieClip Frame 3
max_x = 404;
min_x = 10;
dir = 0;
myspeed = 1;
Symbol 835 MovieClip Frame 4
max_x = 650;
min_x = 0;
dir = 0;
myspeed = 1;
Symbol 835 MovieClip Frame 5
max_x = 650;
min_x = 0;
dir = 0;
myspeed = 1;
Symbol 835 MovieClip Frame 6
max_x = 500;
min_x = 240;
dir = 0;
myspeed = 1;
Symbol 846 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 4
this._visible = false;
Symbol 849 MovieClip Frame 1
stop();
var max_x = 300;
var min_x = 125;
var dir = -1;
var myspeed = 0.7;
var changeme = false;
Symbol 855 MovieClip Frame 1
stop();
var max_x = 335;
var min_x = 142;
var dir = -1;
var myspeed = 1.8;
var changeme = false;
Symbol 856 MovieClip Frame 1
stop();
var max_x = 270;
var min_x = 45;
var dir = -1;
var myspeed = 2;
var changeme = false;
Symbol 884 MovieClip Frame 1
stop();
Symbol 884 MovieClip Frame 30
stop();
Symbol 891 MovieClip Frame 1
stop();
var max_x = 293;
var min_x = 32;
var dir = -1;
var myspeed = 0.7;
var changeme = true;
Symbol 922 MovieClip Frame 20
stop();
Symbol 929 MovieClip Frame 24
stop();
Symbol 982 MovieClip [explode] Frame 1
Symbol 997 MovieClip Frame 1
stop();
Symbol 997 MovieClip Frame 20
stop();
Symbol 1001 MovieClip Frame 1
stop();
var max_x = 504;
var min_x = -10;
var dir = -1;
var myspeed = 0.8;
var changeme = true;
Symbol 1017 MovieClip Frame 1
stop();
Symbol 1018 MovieClip Frame 1
stop();
Symbol 1018 MovieClip Frame 34
car.mc.t1.gotoAndStop(1);
car.mc.t2.gotoAndStop(1);
Symbol 1018 MovieClip Frame 52
car.mc.t1.gotoAndPlay(2);
car.mc.t2.gotoAndPlay(2);
Symbol 1043 MovieClip Frame 18
stop();
Symbol 1055 MovieClip Frame 13
stop();
Symbol 1056 MovieClip Frame 1
stop();
Symbol 1056 MovieClip Frame 2
stop();
Symbol 1056 MovieClip Frame 3
stop();
Symbol 1057 MovieClip Frame 1
stop();
var max_x = 550;
var min_x = 180;
var dir = -1;
var myspeed = -1;
var changeme = true;
Symbol 1058 MovieClip Frame 1
stop();
var max_x = 550;
var min_x = 180;
var dir = -1;
var myspeed = -1;
var changeme = true;
Symbol 1071 MovieClip Frame 1
stop();
Symbol 1071 MovieClip Frame 9
stop();
Symbol 1072 MovieClip Frame 1
stop();
Symbol 1104 MovieClip Frame 1
stop();
Symbol 1116 MovieClip Frame 1
stop();
Symbol 1116 MovieClip Frame 48
_parent.resume();
Symbol 1127 MovieClip Frame 1
stop();
Symbol 1144 MovieClip Frame 1
stop();
Symbol 1145 MovieClip Frame 1
function resetAll() {
Key.removeListener(key_listener);
trace("resetting alllllllllllllllllllllllllll");
i = 1;
while (i <= people_max_count[level]) {
var temp = eval ("bg_mc.p" + i);
var r = randRange(2, 9);
temp.gotoAndStop(1);
temp._visible = false;
delete temp.onEnterFrame;
i++;
}
while (public_arr.length != 0) {
public_arr.pop();
}
delete mouse_obj.onMouseDown;
clearInterval(car_timer1);
clearInterval(car_timer2);
clearInterval(gameOver);
clearInterval(chkbulltimer);
clearInterval(showit);
}
function clickedPhoto() {
clickAt(bg_mc, bmpData, crosshair_mc);
}
function clickAt(bmp_mc, bmp, circle_mc) {
vx = circle_mc._x - (bmp_mc._x + (circle_mc._width / 2));
vy = circle_mc._y - (bmp_mc._y + (circle_mc._height / 2));
bmp = new flash.display.BitmapData(circle_mc._width, circle_mc._height, false, 13684944);
var _local2 = new flash.geom.Matrix();
if (scale > 100) {
vx = vx + dx;
vy = vy + dy;
}
_local2.translate(-vx, -vy);
bmp.draw(bmp_mc, _local2, new flash.geom.ColorTransform(), "normal", new flash.geom.Rectangle(0, 0, circle_mc._width, circle_mc._height));
dest.draw_mc.attachBitmap(bmp, 1, "auto", true);
dest.draw_mc._xscale = size_arr[currentzoom];
dest.draw_mc._yscale = dest.draw_mc._xscale;
var _local5 = xdec_arr[currentzoom];
dest.draw_mc._x = ((-dest.draw_mc._width) / 2) + 80;
dest.draw_mc._y = ((-dest.draw_mc._height) / 2) + 80;
}
function resetBitmap() {
crosshair_mc._xscale = scale;
crosshair_mc._yscale = crosshair_mc._xscale;
target_mc._xscale = scale;
target_mc._yscale = target_mc._xscale;
dest._xscale = crosshair_mc._xscale;
dest._yscale = crosshair_mc._yscale;
checkCrossHairPosition(crosshair_mc);
clickedPhoto();
}
function checkCrossHairPosition(mc) {
if (mc._x < (-mc._width)) {
mc._x = -mc._width;
} else if (mc._x >= (sw + mc._width)) {
mc._x = sw + mc._width;
}
if (mc._y < (-mc._height)) {
mc._y = mc._height;
} else if (mc._y >= (sh + mc._height)) {
mc._y = sh + mc._height;
}
target_mc._x = crosshair_mc._x;
target_mc._y = crosshair_mc._y;
dest._x = crosshair_mc._x - (crosshair_mc._width / 2);
dest._y = crosshair_mc._y - (crosshair_mc._height / 2);
}
function startGame() {
stopAllSounds();
if ((level == 0) || (level == 3)) {
sound_mc.gotoAndStop(3);
} else if ((level == 1) || (level == 4)) {
sound_mc.gotoAndStop(4);
} else if ((level == 2) || (level == 5)) {
sound_mc.gotoAndStop(5);
}
trace((("start game level " + level) + " ") + bulletnos);
my_fmt = new TextFormat();
flag = 0;
depth = 1;
people_count = 1;
bulletnos = 6;
ismygameover = false;
alert_mc._visible = false;
people_count = 0;
bg_mc.gotoAndStop(level + 1);
enemypanel_mc.gotoAndStop(level + 1);
Mouse.addListener(mouse_obj);
timer = timer_arr[level];
timer_txt.text = timer;
bg_mc.enemy._visible = false;
if (level == 0) {
bg_mc.jhula.useHandCursor = false;
bg_mc.jali.useHandCursor = false;
} else if (level == 1) {
bg_mc.piller1.useHandCursor = false;
bg_mc.piller2.useHandCursor = false;
bg_mc.piller3.useHandCursor = false;
bg_mc.piller4.useHandCursor = false;
bg_mc.piller5.useHandCursor = false;
bg_mc.piller6.useHandCursor = false;
} else if (level == 2) {
bg_mc.back_mc.gril_mc.useHandCursor = false;
bg_mc.gas_mc.useHandCursor = false;
bg_mc.p1.setMask(bg_mc.bar_left);
bg_mc.p2.setMask(bg_mc.bar_middle);
bg_mc.p3.setMask(bg_mc.bar_front);
bg_mc.blast_mc._visible = false;
} else if (level == 3) {
bg_mc.enemy_mc.useHandCursor = false;
bg_mc.enemy_mc.gotoAndStop(level + 1);
bg_mc.enemy_mc._visible = false;
} else if (level == 5) {
bg_mc.p1.setMask(bg_mc.bar_middle);
bg_mc.p2.setMask(bg_mc.bar_front);
bg_mc.blast_mc._visible = false;
}
i = 0;
while (i < bulletnos) {
var bt = eval ("bullet" + i);
bt._visible = true;
i++;
}
panelx = new mx.transitions.Tween(enemypanel_mc, "_x", mx.transitions.easing.None.easeNone, enemypanel_mc._x, stagewidth / 2, 0.5, true);
panelx.onMotionFinished = function () {
enemypanel_mc.close_btn.onRelease = function () {
panelx = new mx.transitions.Tween(enemypanel_mc, "_x", mx.transitions.easing.None.easeNone, enemypanel_mc._x, stagewidth * 2, 0.4, true);
panelx.onMotionFinished = function () {
Key.addListener(key_listener);
sniper = true;
Mouse.hide();
crosshair_mc._visible = true;
target_mc._visible = true;
dest._visible = true;
crosshair_mc.onEnterFrame = moveCrossHair;
resetBitmap();
moveEverybody();
bg_mc.enemy._visible = true;
maintimer = setInterval(chkLevel, 1000);
mouse_obj.onMouseDown = moveEffect;
};
};
};
}
function chkLevel() {
timer--;
timer_txt.text = timer;
if (alert_mc._visible) {
timer_txt.setTextFormat(my_fmt);
}
trace("timer ::" + timer);
if (timer == 0) {
trace("timer is 0" + timer);
clearInterval(maintimer);
if (alert_mc._visible == true) {
reason = "peoplekill";
} else {
reason = "timeout";
}
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
}
function moveEverybody() {
spawnPeople();
spawnEnemy();
}
function decreaseBullet() {
trace("d before Bullet " + bulletnos);
if (bulletnos != -1) {
bulletnos--;
trace("d after Bullet" + bulletnos);
var bt = eval ("bullet" + bulletnos);
bt._visible = false;
clearInterval(chkbulltimer);
if (bulletnos == 0) {
delete mouse_obj.onMouseDown;
mouse_obj.onMouseDown = decreaseBullet;
}
chkbulltimer = setInterval(chkBullet, 2000);
}
}
function chkBullet() {
clearInterval(chkbulltimer);
if (bulletnos <= 0) {
delete mouse_obj.onMouseDown;
clearInterval(maintimer);
reason = "nobullet";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 500);
}
}
function spawnEnemy() {
if (level == 2) {
bg_mc.gas_mc.onPress = function () {
if (sniper && (!ismygameover)) {
trace("gas bulletnos :" + bulletnos);
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
bg_mc.gas_mc._visible = false;
bg_mc.furnace_mc.gotoAndPlay(2);
bg_mc.furnace_mc.onEnterFrame = function () {
if (bg_mc.furnace_mc._currentframe == 20) {
delete this.onEnterFrame;
showit = setInterval(showsniper, 700);
}
if (bg_mc.furnace_mc._currentframe == 5) {
bg_mc.blast_mc._visible = true;
i = 1;
while (i <= people_max_count[level]) {
var temp = eval ("bg_mc.p" + i);
if ((temp._x < 170) && (temp._x > 0)) {
temp._visible = false;
delete temp.onEnterFrame;
}
i++;
}
if ((bg_mc.enemy._x < 170) && (bg_mc.enemy._x > 0)) {
delete this.onEnterFrame;
bg_mc.enemy.char_mc.gotoAndStop(3);
bg_mc.enemy.shadow_mc._visible = false;
bg_mc.enemy.char_mc.onEnterFrame = function () {
if (bg_mc.enemy.char_mc.die_mc._currentframe == 19) {
delete this.onEnterFrame;
clearInterval(maintimer);
resetAll();
minimap_mc.gotoAndStop(level + 2);
}
};
} else if (bg_mc.back_mc._currentframe == 30) {
delete this.onEnterFrame;
clearInterval(maintimer);
reason = "cantkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
}
};
}
};
bg_mc.back_mc.gril_mc.onPress = function () {
if (sniper && (!ismygameover)) {
trace("gril_mc bulletnos :" + bulletnos);
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
delete bg_mc.back_mc.gril_mc.onPress;
bg_mc.back_mc.gotoAndPlay(2);
bg_mc.back_mc.onEnterFrame = function () {
i = 1;
while (i <= people_max_count[level]) {
var temp = eval ("bg_mc.p" + i);
if (bg_mc.back_mc.billboard.hitTest(temp)) {
temp._visible = false;
delete temp.onEnterFrame;
}
i++;
}
if (bg_mc.back_mc.billboard.hitTest(bg_mc.enemy)) {
bg_mc.back_mc.gril_mc.barde_mc.gotoAndStop(1);
delete this.onEnterFrame;
bg_mc.enemy.char_mc.gotoAndStop(4);
bg_mc.enemy.shadow_mc._visible = false;
bg_mc.enemy.char_mc.onEnterFrame = function () {
if (bg_mc.enemy.char_mc.die_mc._currentframe == 10) {
delete this.onEnterFrame;
clearInterval(maintimer);
resetAll();
minimap_mc.gotoAndStop(level + 2);
}
};
} else if (bg_mc.back_mc._currentframe == 30) {
bg_mc.back_mc.gril_mc.barde_mc.gotoAndStop(1);
delete this.onEnterFrame;
if (bg_mc.furnace_mc._currentframe == 20) {
clearInterval(maintimer);
reason = "cantkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
} else {
showit = setInterval(showsniper, 700);
}
}
};
}
};
} else if (level == 3) {
bg_mc.enemy_mc._visible = true;
bg_mc.enemy_mc.gotoAndStop(level + 1);
enemy.useHandCursor = false;
bg_mc.enemy_mc.char_mc.man_mc.gotoAndStop(1);
bg_mc.enemy_mc.onPress = function () {
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
clearInterval(maintimer);
delete this.onEnterFrame;
this.char_mc.gotoAndStop(2);
bg_mc.enemy.char_mc.onEnterFrame = function () {
trace("enemy clicked");
if (bg_mc.enemy.char_mc.die_mc._currentframe == 19) {
delete this.onEnterFrame;
resetAll();
}
};
}
};
} else if (level == 4) {
var tom = randRange(5000, 9000);
car_timer1 = setInterval(moveCar1, tom);
var tom = randRange(5000, 9000);
car_timer2 = setInterval(moveCar2, tom);
} else if (level == 5) {
bg_mc.poster1.dori_1.useHandCursor = false;
bg_mc.poster1.dori_2.useHandCursor = false;
bg_mc.poster2.dori_1.useHandCursor = false;
bg_mc.poster2.dori_2.useHandCursor = false;
bg_mc.dustbin.useHandCursor = false;
bg_mc.banner_mc.banner_static.shoot1.useHandCursor = false;
bg_mc.banner_mc.banner_static.shoot2.useHandCursor = false;
bg_mc.poster1.dori_1.onPress = (bg_mc.poster1.dori_2.onPress = (bg_mc.poster2.dori_1.onPress = (bg_mc.poster2.dori_2.onPress = function () {
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
this._parent.gotoAndPlay(2);
delete this.onEnterFrame;
this._parent.onEnterFrame = function () {
if (this._currentframe == 8) {
i = 1;
while (i <= people_max_count[level]) {
var temp = eval ("bg_mc.p" + i);
temp._visible = false;
delete temp.onEnterFrame;
i++;
}
}
if (this._currentframe == 9) {
delete this.onEnterFrame;
clearInterval(maintimer);
reason = "cantkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
};
}
})));
bg_mc.dustbin.onPress = function () {
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
this._visible = false;
bg_mc.furnace_mc.gotoAndPlay(2);
bg_mc.furnace_mc.onEnterFrame = function () {
bg_mc.people_mc._alpha = bg_mc.people_mc._alpha - 5;
bg_mc.stall_mc._alpha = bg_mc.stall_mc._alpha - 5;
if (bg_mc.furnace_mc._currentframe == 5) {
bg_mc.blast_mc._visible = true;
bg_mc.people_mc._visible = false;
bg_mc.stall_mc._visible = false;
i = 1;
while (i <= people_max_count[level]) {
var temp = eval ("bg_mc.p" + i);
if ((temp._x < 323) && (temp._x > 223)) {
temp._visible = false;
delete temp.onEnterFrame;
}
i++;
}
}
if (bg_mc.furnace_mc._currentframe == 20) {
delete this.onEnterFrame;
clearInterval(maintimer);
reason = "cantkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
};
}
};
bg_mc.banner_mc.banner_static.shoot1.onPress = function () {
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
bg_mc.banner_mc.gotoAndStop(3);
bg_mc.banner_mc.banner.onEnterFrame = function () {
if (bg_mc.banner_mc.banner.board_mc.hitTest(bg_mc.enemy)) {
delete this.onEnterFrame;
bg_mc.enemy.char_mc.gotoAndStop(3);
bg_mc.enemy.char_mc.onEnterFrame = function () {
if (bg_mc.enemy.char_mc.die_mc._currentframe == 15) {
delete this.onEnterFrame;
clearInterval(maintimer);
resetAll();
minimap_mc.gotoAndStop(level + 2);
}
};
} else if (bg_mc.banner_mc.banner._currentframe == 13) {
delete this.onEnterFrame;
clearInterval(maintimer);
reason = "cantkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
};
}
};
bg_mc.banner_mc.banner_static.shoot2.onPress = function () {
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
bg_mc.banner_mc.gotoAndStop(2);
bg_mc.banner_mc.banner.onEnterFrame = function () {
if (bg_mc.banner_mc.banner.board_mc.hitTest(bg_mc.enemy)) {
delete this.onEnterFrame;
bg_mc.enemy.char_mc.gotoAndStop(2);
bg_mc.enemy.char_mc.onEnterFrame = function () {
if (bg_mc.enemy.char_mc.die_mc._currentframe == 19) {
delete this.onEnterFrame;
clearInterval(maintimer);
resetAll();
minimap_mc.gotoAndStop(level + 2);
}
};
} else if (bg_mc.banner_mc.banner._currentframe == 13) {
delete this.onEnterFrame;
clearInterval(maintimer);
reason = "cantkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
};
}
};
}
enemy = eval (bg_mc.enemy);
enemy.gotoAndStop(level + 1);
enemy.useHandCursor = false;
if (dir == 1) {
enemy._xscale = enemy._xscale * -1;
}
enemy.onEnterFrame = function () {
if (this.dir == 0) {
if (this._x > this.max_x) {
this.dir = 1;
this._xscale = this._xscale * -1;
} else {
this._x = this._x + this.myspeed;
}
} else if (this.dir == 1) {
if (this._x < this.min_x) {
this.dir = 0;
this._xscale = this._xscale * -1;
} else {
this._x = this._x - this.myspeed;
}
}
};
enemy.onPress = function () {
trace("enemy shoot" + ismygameover);
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
hidesniper();
trace("enemy shoot");
clearInterval(maintimer);
delete this.onEnterFrame;
this.char_mc.gotoAndStop(2);
if ((level == 2) || (level == 5)) {
bg_mc.enemy.char_mc.onEnterFrame = function () {
trace("enemy clicked");
if (bg_mc.enemy.char_mc.die_mc._currentframe == 19) {
delete this.onEnterFrame;
reason = "wrongkill";
ismygameover = true;
clearInterval(gameOver);
gameOver = setInterval(myGameOver, 2000);
}
};
}
}
};
}
function spawnPeople() {
public_arr = [];
i = 1;
while (i <= people_max_count[level]) {
var r = randRange(2, 9);
var kt = 1;
do {
if (!isIn(r)) {
break;
}
r = randRange(2, 9);
kt++;
} while (kt != 7);
public_arr.push(r);
var s = (Math.random() + level_inc[level]);
var dire = randRange(0, 1);
var temp = eval ("bg_mc.p" + i);
temp.gotoAndStop(r);
if (temp.myspeed == -1) {
temp.myspeed = s;
}
if (temp.dir == -1) {
temp.dir = dire;
}
temp.useHandCursor = false;
if (temp.dir == 1) {
temp._xscale = temp._xscale * -1;
}
temp.onEnterFrame = function () {
if (this.dir == 0) {
if (this._x > this.max_x) {
if (this.changeme) {
trace("my frame " + this._currentframe);
removeFrm(this._currentframe);
var _local2 = randRange(2, 9);
var _local3 = 1;
do {
if (!isIn(_local2)) {
break;
}
_local2 = randRange(2, 9);
_local3++;
} while (_local3 != 7);
public_arr.push(_local2);
this.gotoAndStop(_local2);
var _local4 = Math.random() + level_inc[level];
if (this.myspeed == -1) {
this.myspeed = _local4;
}
}
this.dir = 1;
this._xscale = this._xscale * -1;
} else {
this._x = this._x + this.myspeed;
}
} else if (this.dir == 1) {
if (this._x < this.min_x) {
if (this.changeme) {
trace("my frame " + this._currentframe);
removeFrm(this._currentframe);
var _local2 = randRange(2, 9);
var _local3 = 1;
do {
if (!isIn(_local2)) {
break;
}
_local2 = randRange(2, 9);
_local3++;
} while (_local3 != 7);
public_arr.push(_local2);
this.gotoAndStop(_local2);
var _local4 = Math.random() + level_inc[level];
if (this.myspeed == -1) {
this.myspeed = _local4;
}
}
this.dir = 0;
this._xscale = this._xscale * -1;
} else {
this._x = this._x - this.myspeed;
}
}
};
temp.onRelease = function () {
trace("people ka id :" + this);
if (sniper && (!ismygameover)) {
if (bulletnos == -1) {
return(undefined);
}
bg_mc.blood_mc._visible = true;
bg_mc.blood_mc._x = this._x;
bg_mc.blood_mc._y = this._y;
bg_mc.blood_mc.gotoAndPlay(2);
this._visible = false;
delete this.onRelease;
delete this.onEnterFrame;
if (!alert_mc._visible) {
timer = 10;
timer_txt.text = timer;
my_fmt.color = 16711680 /* 0xFF0000 */;
timer_txt.setTextFormat(my_fmt);
clearInterval(maintimer);
hidesniper();
alert_mc._visible = true;
alert_panel.gotoAndPlay(2);
showit = setInterval(showsniper, 2000);
}
}
};
i++;
}
}
function resume() {
maintimer = setInterval(chkLevel, 1000);
}
function isIn(num) {
var _local1 = false;
i = 0;
while (i < public_arr.length) {
if (public_arr[i] == num) {
_local1 = true;
}
i++;
}
if (_local1) {
return(true);
}
return(false);
}
function removeFrm(num) {
var _local2 = false;
i = 0;
while (i < public_arr.length) {
if (public_arr[i] == num) {
public_arr.splice(i, 1);
}
i++;
}
}
function hidesniper() {
trace("hiding sniper.........");
sniper = false;
Mouse.show();
crosshair_mc._visible = false;
target_mc._visible = false;
dest._visible = false;
}
function showsniper() {
trace("showong sniper.........");
clearInterval(showit);
sniper = true;
Mouse.hide();
crosshair_mc._visible = true;
target_mc._visible = true;
dest._visible = true;
}
function moveEffect() {
if (sniper && (!ismygameover)) {
decreaseBullet();
sound_mc.gotoAndStop(1);
sound_mc.gotoAndStop(9);
delete crosshair_mc.onEnterFrame;
crosshair_mc.onEnterFrame = resetBitmap;
locy1 = crosshair_mc._y;
locy2 = dest._y;
locy3 = target_mc._y;
var _local2 = 0.05;
var _local3 = 20;
panely = new mx.transitions.Tween(crosshair_mc, "_y", mx.transitions.easing.Back.easeOut, crosshair_mc._y, crosshair_mc._y - _local3, _local2, true);
panely = new mx.transitions.Tween(dest, "_y", mx.transitions.easing.Back.easeOut, dest._y, dest._y - _local3, _local2, true);
panely = new mx.transitions.Tween(target_mc, "_y", mx.transitions.easing.Back.easeOut, target_mc._y, target_mc._y - _local3, _local2, true);
var _local4 = 10;
panely.onMotionFinished = function () {
delete panely.onMotionFinished;
var _local1 = 0.9;
panely = new mx.transitions.Tween(crosshair_mc, "_y", mx.transitions.easing.None.easeNone, crosshair_mc._y, locy1, _local1, true);
panely = new mx.transitions.Tween(dest, "_y", mx.transitions.easing.None.easeNone, dest._y, locy2, _local1, true);
panely = new mx.transitions.Tween(target_mc, "_y", mx.transitions.easing.None.easeNone, target_mc._y, locy3, _local1, true);
var _local2 = 5;
panely.onMotionFinished = function () {
crosshair_mc.onEnterFrame = moveCrossHair;
};
};
}
}
function moveCrossHair() {
crosshair_mc._x = _xmouse;
crosshair_mc._y = _ymouse;
resetBitmap();
}
function blinkStars() {
var star = randRange(1, 7);
var star_mc = eval (("star" + star) + "_mc");
if (star_mc._currentframe == 1) {
star_mc.gotoAndPlay(2);
}
}
function moveCar1() {
clearInterval(car_timer1);
bg_mc.car_mc1.car.gotoAndStop(randRange(1, 2));
bg_mc.car_mc1.gotoAndPlay(2);
var _local1 = randRange(10000, 15000);
car_timer1 = setInterval(moveCar1, _local1);
}
function moveCar2() {
clearInterval(car_timer2);
bg_mc.car_mc2.car.gotoAndStop(randRange(1, 2));
bg_mc.car_mc2.gotoAndPlay(2);
var _local1 = randRange(10000, 15000);
car_timer2 = setInterval(moveCar2, _local1);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function myGameOver() {
resetAll();
clearInterval(gameOver);
gotoAndStop ("gameover");
}
stop();
stopAllSounds();
play_btn.onRelease = function () {
gotoAndStop ("start");
};
var mouse_obj = new Object();
var bmpData = ["bmpData1"];
var sw = 650;
var sh = 490;
var scale = 100;
x = 0;
y = 0;
speed = 2;
bounce = 0.6;
var turn = 0;
var shake = 0;
var ycam = ((turn / 90) * -200);
var xcam = ((turn / 90) * 2);
var level = 0;
var stagewidth = 650;
var stageheight = 490;
var dx = 40;
var dy = 40;
var size_arr = ["", 100, 150, 200, 250, 300];
var xdec_arr = ["", 0, 30, 75, 105, 150];
var public_arr = new Array();
var currentzoom = 3;
var minzoom = 2;
var maxzoom = 4;
var ismygameover = false;
var depth = 1;
var enemy;
var people_timer;
var car_timer1;
var car_timer2;
var gameover;
var people_count = 1;
var timer;
var timer_arr = new Array(60, 60, 60, 60, 60, 60, 60);
var people_max_count = new Array(7, 7, 7, 7, 9, 2);
var level_inc = new Array(0.7, 0.4, 0.7, 1.2, 0.8, 0.7);
var maintimer;
var panelx;
var panely;
var key_listener = new Object();
var flag = 0;
var sniper = true;
var reason = "";
var bulletnos = 6;
var my_fmt = new TextFormat();
var chkbulltimer;
var showit;
key_listener.onKeyDown = function () {
if (Key.isDown(87) && (flag == 0)) {
flag = 1;
if (currentzoom != maxzoom) {
currentzoom++;
}
}
if (Key.isDown(83) && (flag == 0)) {
flag = 1;
if (currentzoom != minzoom) {
currentzoom--;
}
}
if (!(Key.getCode() === 32)) {
} else if (sniper) {
sniper = false;
Mouse.show();
crosshair_mc._visible = false;
target_mc._visible = false;
dest._visible = false;
} else {
sniper = true;
Mouse.hide();
crosshair_mc._visible = true;
target_mc._visible = true;
dest._visible = true;
}
};
key_listener.onKeyUp = function () {
flag = 0;
};
var cx;
var cy;
var sx;
var sy;
var stimer;
var doShake = false;
var locx;
var locy;
var mscalex;
var mscaley;
mouse_obj.onMouseUp = function () {
resetBitmap();
};
mouse_obj.onMouseMove = function () {
};
sound_mc.gotoAndStop(2);
Symbol 1145 MovieClip Frame 5
stop();
me_btn.onRelease = function () {
gotoAndStop ("game");
};
Symbol 1145 MovieClip Frame 10
stop();
startGame();
Symbol 1145 MovieClip Frame 14
stop();
stopAllSounds();
sound_mc.gotoAndStop(7);
_root._doGameOver(0, "gamecompleted", true, 3000);
Symbol 1145 MovieClip Frame 25
stop();
trace("level ....................... " + level);
nxt_screen.gotoAndStop(level + 1);
stopAllSounds();
sound_mc.gotoAndStop(7);
nextlevel_mc.onRelease = function () {
if (level < 6) {
level++;
gotoAndStop ("game");
} else {
level = 0;
gotoAndPlay ("init");
}
};
Symbol 1145 MovieClip Frame 37
stop();
Symbol 1145 MovieClip Frame 44
stop();
stopAllSounds();
sound_mc.gotoAndStop(8);
Mouse.show();
over_mc.gotoAndStop(reason);
_root._doGameOver(0, "gameover", false, 3000);