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.gangofgamers.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.game_mc.gameFeed_mc.gotoAndStop(1);
_root.game_mc.gotoAndStop(1);
} else {
_root.game_mc.gameFeed_mc.gotoAndStop(1);
_root.gotoAndStop("lblgame");
_root.game_mc.playAgain();
}
}
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 = "the_mob_job";
obj_game._gameTitle = "The_Mob_Job";
obj_game._g2wGameId = "10062";
obj_game._partnerGameId = "themobjob";
obj_game._gstatus = "gameover";
obj_game._googleText = "The Mob Job";
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 = "d7rTQb65ifk";
obj_game.facebookURL = "http://apps.facebook.com/gangofgamers-games/playpage.php?game=10062";
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=the_mob_job&utm_campaign=gog_wrapper";
obj_game.gameoverstrip = "http://www.gangofgamers.com/?utm_source=gog_strip&utm_medium=post_rolls&utm_content=the_mob_job&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 with a Mafia Lord driving him around in GangOfGamers' The Mob Job! Gear up. 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 3
stop();
Frame 12
stop();
Instance of Symbol 298 MovieClip in Frame 12
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 20
stop();
Frame 28
stop();
mc_fbshare.onRelease = function () {
getURL ("http://www.facebook.com/sharer.php?u=http://apps.facebook.com/gangofgamers-games/play/10062", "_blank");
};
Symbol 966 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=10062";
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 11 Button
on (release) {
getURL (_root.obj_game.gameoverstrip, "_blank");
}
Symbol 122 MovieClip Frame 1
stop();
Symbol 123 Button
on (release) {
getURL (_root.obj_game.gameoverthumb, "_blank");
}
Symbol 124 MovieClip Frame 1
stop();
var i = 1;
while (i <= 28) {
this["thumb" + i].gotoAndStop(i);
i++;
}
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 2
stop();
Symbol 155 MovieClip [_g2w_gameover_mc] Frame 1
_root._initAssetsPanel(this);
_root._showAssetPanels(this);
Symbol 155 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 155 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 155 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 155 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 158 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 162 MovieClip [bla] Frame 10
stop();
Symbol 166 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 166 MovieClip [game_sound_ctrl] Frame 2
stop();
changeVol(100, 5);
Symbol 166 MovieClip [game_sound_ctrl] Frame 3
stop();
changeVol(0, -5);
Symbol 171 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 279 MovieClip Frame 1
var i = 1;
while (i <= 48) {
this["thumb" + i].gotoAndStop(i);
i++;
}
Symbol 279 MovieClip Frame 141
stop();
trace("reached here..");
_parent.gotoAndStop("lblloader");
Symbol 288 Button
on (release) {
getURL ("http://www.gangofgamers.com", "_blank");
}
Symbol 291 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 301 MovieClip Frame 1
image_01.forceSmoothing = true;
Symbol 305 MovieClip Frame 1
image_02.forceSmoothing = true;
Symbol 309 MovieClip Frame 1
image_03.forceSmoothing = true;
Symbol 313 MovieClip Frame 1
image_04.forceSmoothing = true;
Symbol 323 MovieClip Frame 181
stop();
_parent.gotoAndPlay("lblgame");
Symbol 346 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 1
dock_mc.stop();
Symbol 419 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 45
this.done = true;
stop();
Symbol 420 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 45
this.done = true;
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 45
this.done = true;
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 45
this.done = true;
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 45
this.done = true;
stop();
Symbol 466 MovieClip Frame 1
stop();
Symbol 466 MovieClip Frame 36
this.done = true;
stop();
Symbol 551 MovieClip Frame 1
Symbol 576 MovieClip Frame 1
Symbol 600 MovieClip Frame 1
Symbol 601 MovieClip Frame 1
clip_mc.gotoAndStop("center");
stop();
Symbol 601 MovieClip Frame 2
clip_mc.gotoAndStop("center");
stop();
Symbol 602 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 1
stop();
Symbol 723 MovieClip Frame 1
dock_mc.stop();
Symbol 724 MovieClip Frame 1
clip_mc.onEnterFrame = function () {
this._x = this._parent.dx;
this._y = this._parent.dy;
clip1_mc._x = this._parent.d1x;
clip1_mc._y = this._parent.d1y;
clip2_mc._x = this._parent.d2x;
clip2_mc._y = this._parent.d2y;
};
Symbol 743 MovieClip Frame 1
stop();
Symbol 743 MovieClip Frame 2
this.onEnterFrame = function () {
t_txt.text = this._text;
};
Symbol 743 MovieClip Frame 48
gotoAndStop (1);
Symbol 760 MovieClip Frame 1
stop();
Symbol 783 MovieClip Frame 1
stop();
Symbol 783 MovieClip Frame 2
stop();
Symbol 783 MovieClip Frame 3
stop();
Symbol 783 MovieClip Frame 4
stop();
Symbol 783 MovieClip Frame 5
stop();
Symbol 783 MovieClip Frame 6
stop();
Symbol 783 MovieClip Frame 7
stop();
Symbol 783 MovieClip Frame 8
stop();
Symbol 783 MovieClip Frame 9
stop();
Symbol 783 MovieClip Frame 10
stop();
Symbol 791 MovieClip Frame 2
popup_mc.gotoAndStop(this._parent.levelNo);
stop();
close_mc.tabEnabled = false;
close_mc.focusEnabled = false;
close_mc._focusrect = false;
close_mc.onPress = function () {
play();
};
Symbol 791 MovieClip Frame 12
this.b = true;
gotoAndStop (1);
Symbol 832 MovieClip Frame 1
stop();
Symbol 832 MovieClip Frame 2
stop();
Symbol 832 MovieClip Frame 3
stop();
Symbol 832 MovieClip Frame 4
stop();
Symbol 832 MovieClip Frame 5
stop();
Symbol 832 MovieClip Frame 6
stop();
Symbol 832 MovieClip Frame 7
stop();
Symbol 832 MovieClip Frame 8
stop();
Symbol 832 MovieClip Frame 9
stop();
Symbol 832 MovieClip Frame 10
stop();
_root._doGameOver(0, "gamecompleted", false, 3000);
Symbol 847 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 2
if (this._parent.levelNo == 10) {
feed_mc.gotoAndStop(1);
} else {
feed_mc.gotoAndStop(this.feed);
}
_root._doGameOver(0, "gameover", false, 3000);
playa_mc.onPress = function () {
this._parent._parent.playAgain();
gotoAndStop (1);
};
nextl_mc.onPress = function () {
this._parent._parent.nextLevel();
gotoAndStop (1);
};
Symbol 847 MovieClip Frame 3
score_txt.text = "Score " + this._parent.score;
level_mc.gotoAndStop(this._parent.levelNo);
if (this._parent.levelNo == 10) {
nextl_mc._visible = false;
playa_mc._visible = false;
}
playa_mc.onPress = function () {
this._parent._parent.gotoAndStop(1);
gotoAndStop (1);
trace("This error : ");
};
nextl_mc.onPress = function () {
this._parent._parent.nextLevel();
gotoAndStop (1);
};
Symbol 850 MovieClip Frame 1
stop();
Symbol 854 MovieClip Frame 1
stop();
Symbol 857 MovieClip Frame 1
stop();
Symbol 860 MovieClip Frame 1
stop();
Symbol 865 MovieClip Frame 1
stop();
Symbol 868 MovieClip Frame 1
stop();
Symbol 871 MovieClip Frame 1
stop();
Symbol 875 MovieClip Frame 1
stop();
Symbol 879 MovieClip Frame 1
stop();
Symbol 881 MovieClip Frame 1
stop();
Symbol 884 MovieClip Frame 1
function init() {
val = this._parent._text + 1;
if (clip_mc._totalframes >= val) {
clip_mc.gotoAndStop(val);
} else {
this._parent.gotoAndStop(1);
}
trace((("Val : " + val) + " val: ") + this._parent._text);
}
gotoAndStop(this._parent._parent.levelNo);
trace("this._parent._parent.levelNo : " + this._parent._parent.levelNo);
init();
Symbol 884 MovieClip Frame 2
init();
Symbol 884 MovieClip Frame 3
init();
Symbol 884 MovieClip Frame 4
init();
Symbol 884 MovieClip Frame 5
init();
Symbol 884 MovieClip Frame 6
init();
Symbol 884 MovieClip Frame 7
init();
Symbol 884 MovieClip Frame 8
init();
Symbol 884 MovieClip Frame 9
init();
Symbol 884 MovieClip Frame 10
init();
Symbol 891 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
t_txt.text = " : " + this._text;
clip_mc.gotoAndStop(this._parent.levelNo);
};
Symbol 891 MovieClip Frame 49
gotoAndStop (1);
Symbol 917 MovieClip Frame 1
stop();
Symbol 952 MovieClip Frame 10
stop();
Symbol 960 MovieClip Frame 134
_root.blast = true;
Symbol 960 MovieClip Frame 161
trace("gameState : " + _root.gameState);
this._parent.gameOver(_root.gameState);
gotoAndStop (1);
Symbol 961 MovieClip Frame 1
function setLevelObjects(level) {
var sound = new Sound();
sound.attachSound("go");
sound.start(0, 1);
levelDone = false;
this.play1 = false;
lastLevel = false;
lap = 0;
checkPointsVal = 0;
nitro_mc.b = true;
nitro_mc.val = 0;
damage_mc.gotoAndStop("0c");
timer_mc.gotoAndStop(timer_mc._totalframes);
aHitPoints = new Array();
aBoats = new Array();
aBeaches = new Array();
aObstacles = new Array();
amcBeach_hit = new Array();
oWind = new Object();
oWind.strength = 5;
oWind.direction = 20;
damage = 0;
dockin = 0;
timerintervar = 160;
ship_mc = level.ship_mc;
ship_mc.nitro_mc._visible = false;
mcObstacles = level.mcObstacles;
mcBeach = level.mcBeach;
mcBoats = level.mcBoats;
mcTrails = level.mcTrails;
mcBeach_hit = level.mcBeach_hit;
check_mc = level.check_mc;
setHitPointsArray();
setDockArray();
setObstaclesArray();
setmcBeach_hit();
setBeachesArray();
setBoatsArray();
acceleration = 0;
speedX = 10;
speedY = 10;
maxFrwdSpeed = 600;
maxRearSpeed = -30;
maxFrwdAcc = 60;
maxRearAcc = -30;
waterDrag = 0.8;
linSpeed = 0;
speedX = 0;
speedY = 0;
rotSpeed = 0;
maxRotSpeed = 1;
rotAcceleration = 0;
rudder = 0;
position.x = ship_mc._x;
position.y = ship_mc._y;
rotation = ship_mc._rotation;
level_mc = level;
levelDockAr = this[("level" + levelNo) + "Ar"];
dock_mc = eval (levelDockAr[dockin]);
dock_mc._alpha = 100;
var ar = this[("level" + levelNo) + "_text_Ar"];
var num = dockin;
showPopUp(num);
var str = dock_mc._name.toString();
showMc = eval ((minimap_mc + ".") + str);
showMc._alpha = 100;
trace(showMc + " : ");
initGame();
}
function setHitPointsArray(Void) {
for (var _local1 in ship_mc.mcHitPoints) {
if (typeof(ship_mc.mcHitPoints[_local1]) == "movieclip") {
aHitPoints.push(ship_mc.mcHitPoints[_local1]);
}
}
}
function setmcBeach_hit(Void) {
for (var _local1 in mcBeach_hit) {
if (typeof(mcBeach_hit[_local1]) == "movieclip") {
amcBeach_hit.push(mcBeach_hit[_local1]);
}
}
}
function setObstaclesArray(Void) {
for (var _local1 in mcObstacles) {
if (typeof(mcObstacles[_local1]) == "movieclip") {
aObstacles.push(mcObstacles[_local1]);
}
}
}
function setBeachesArray(Void) {
for (var _local1 in mcBeach) {
if (typeof(mcBeach[_local1]) == "movieclip") {
aBeaches.push(mcBeach[_local1]);
}
}
}
function setBoatsArray(Void) {
for (var _local2 in mcBoats) {
if (typeof(mcBoats[_local2]) == "movieclip") {
mcBoats[_local2].x = mcBoats[_local2]._x;
mcBoats[_local2].y = mcBoats[_local2]._y;
if ((mcBoats[_local2]._name.toString().substring(0, 4) == "swim") && (levelNo != 9)) {
mcBoats[_local2]._visible = false;
} else if ((mcBoats[_local2]._name.toString().substring(0, 3) == "cop") && (levelNo != 5)) {
mcBoats[_local2]._visible = false;
} else {
mcBoats[_local2]._visible = true;
aBoats.push(mcBoats[_local2]);
}
if ((mcBoats[_local2]._name.toString().substring(0, 4) == "swim") && (levelNo == 9)) {
var clip_mc = mcBoats[_local2];
clip_mc.onEnterFrame = function () {
killed = false;
this.dx = ship_mc._x - (this._x + this.clip_mc._x);
this.dy = ship_mc._y - (this._y + this.clip_mc._y);
this.dist = Math.sqrt((this.dx * this.dx) + (this.dy * this.dy));
this.perc = (this.dist * 100) / 10000;
this.reverse = ((this.perc >= 100) ? 100 : (this.perc));
if (this.reverse != 100) {
ship_mc.point = this;
point(ship_mc, ship_mc.point);
arrow_mc._rotation = ship_mc.rotation - 180;
}
point(this.point_mc, ship_mc);
};
}
}
}
}
function showPopUp(_text) {
if (_text != undefined) {
pop_mc._text = _text;
pop_mc.play();
}
}
function setDockArray(Void) {
var i = 1;
while (i <= 5) {
var mc = eval (("level1.dock" + i) + "_mc");
if (mc != undefined) {
aDock.push(mc);
mc.dock_mc.stop();
}
i++;
}
}
function GameStart() {
var point1 = (new flash.geom.Point(ship_mc._x, ship_mc._y));
var point2 = (new flash.geom.Point(dock_mc._x, dock_mc._y));
if (levelNo != 9) {
if (pointCenter(point2, point1, 190)) {
arrow_mc._visible = false;
} else {
arrow_mc._visible = true;
}
} else {
arrow_mc._visible = true;
}
for (all in mcBoats) {
mcBoats[all].point = new flash.geom.Point(mcBoats[all].clip_mc._x + mcBoats[all]._x, mcBoats[all]._y + mcBoats[all].clip_mc._y);
if (pointCenter(point1, mcBoats[all].point, 190)) {
if ((mcBoats[all]._name.toString().substring(0, 4) == "swim") || (mcBoats[all]._name.toString().substring(0, 3) == "cop")) {
} else {
mcBoats[all].stop();
mcBoats[all].t = true;
}
} else {
var temp = 0;
for (sachin in mcBoats) {
if (mcBoats[sachin].t) {
temp++;
}
}
if (temp < 1) {
if (!mcBoats[all].hit) {
mcBoats[all].play();
}
} else {
for (ajay in mcBoats) {
if (mcBoats[ajay]._name.toString().substring(0, 4) != "swim") {
mcBoats[ajay].stop();
}
}
}
mcBoats[all].t = false;
}
}
level_mc.ship1_mc.play();
level_mc.ship2_mc.play();
wDir_mc.dir_mc._rotation = oWind.direction + 180;
wDir_mc.dir_mc.gotoAndStop(oWind.strength);
if (!levelDone) {
checkKeys();
}
var obsHit = checkCollision(aObstacles);
if (obsHit.bHit) {
setPrevPos();
reactOnObstacle(obsHit.mcHP, obsHit.bFrontSide);
}
var beachHit_ = checkCollision(amcBeach_hit);
if (beachHit_.bHit) {
setPrevPos();
reactOnObstacle(beachHit_.mcHP, beachHit_.bFrontSide);
}
var beachHit = checkCollision(aBeaches);
if (beachHit.bHit) {
onBeach = true;
reactOnBeach(beachHit.mcHP, beachHit.bFrontSide);
} else {
onBeach = false;
}
var docHit = getDockingAccuracy(dock_mc);
if (docHit == 100) {
if ((Math.abs((speedX * speedX) + (speedY * speedY)) < 0.25) && (Math.abs(rotSpeed) < 0.2)) {
var ar = this[("level" + levelNo) + "_text_Ar"];
var num = (dockin + 1);
if (!ship_mc.stopMove) {
showPopUp(num);
var num1 = parseInt(dock_mc._name.toString().substr(4, 1));
if (((levelNo == 3) || (levelNo == 4)) || (levelNo == 8)) {
var clip = eval (((level_mc + ".anin") + num1) + "_mc");
clip.play();
} else {
var clip = eval (((level_mc + ".ani") + num1) + "_mc");
clip.play();
trace((("Trace : " + clip) + " : ") + num1);
}
}
ship_mc.stopMove = true;
dock_mc._alpha = 0;
var str = dock_mc._name.toString();
showMc = eval ((minimap_mc + ".") + str);
showMc._alpha = 0;
dock_mc.dock_mc.gotoAndStop(1);
}
}
var boatHit = checkCollision(aBoats);
if (boatHit.bHit) {
var rootVar = Math.sqrt((speedX * speedX) + (speedY * speedY));
var botAxcess = new Object({x:boatHit.mcHP._x, y:boatHit.mcHP._y});
ship_mc.mcHitPoints.localToGlobal(botAxcess);
setPrevPos();
reactOnObstacle(boatHit.mcHP, boatHit.bFrontSide);
sinkBoat(boatHit.mcObject, botAxcess, rootVar);
if (boatHit.mcObject._name.toString().substring(0, 4) == "swim") {
removeFromArray(aBoats, boatHit.mcObject);
} else {
getDamage();
}
slowDown();
}
saveCurrentPos();
moveBoat();
}
function pointCenter(circlePoint, circlePointTwo, radius, radiusTwo) {
var _local1 = flash.geom.Point.distance(circlePoint, circlePointTwo);
var _local2 = Number(radius);
if (Math.floor(_local1) <= _local2) {
return(true);
}
return(false);
}
function makeTrails(Void) {
var _local11 = 1 + Math.round(10 * (1 - (Math.abs(linSpeed) / 20)));
if ((trailStep++) < _local11) {
return(undefined);
}
trailStep = 0;
var _local5;
var _local10;
var _local4;
var _local3;
var _local6;
var _local12;
var _local13;
var _local9 = new Array(ship_mc.mcHitPoints.mcLF, ship_mc.mcHitPoints.mcLB, ship_mc.mcHitPoints.mcRF, ship_mc.mcHitPoints.mcRB);
var _local1 = 0;
while (_local1 < 4) {
_local3 = _local9[_local1];
_local5 = mcTrails.getNextHighestDepth();
_local10 = "foam " + _local5;
_local4 = new Object({x:_local3._x, y:_local3._y});
ship_mc.mcHitPoints.localToGlobal(_local4);
mcTrails.globalToLocal(_local4);
var _local2 = ((linSpeed < 0) ? -4 : 4);
if (_local1 < 2) {
_local6 = (rotation + 180) - (_local2 * (20 - Math.abs(linSpeed)));
} else {
_local6 = rotation + (_local2 * (20 - Math.abs(linSpeed)));
}
speedBoatVal = (100 * Math.abs(linSpeed)) / 20;
randomVal5 = 80 + (20 * Math.random());
_local1++;
}
}
function moveBoat(bWithoutWind) {
ship_mc.tail._rotation = rudder * 4;
hod_mc.wheel_mc._rotation = -(rudder * 4);
var num = Math.floor(rudder + 6);
ship_mc.clip_mc.clip_mc.gotoAndStop(num);
linSpeed = linSpeed + acceleration;
gare_mc.clip_mc = linSpeed;
var val = (Math.floor(linSpeed) + 20);
gare_mc.gotoAndStop(val);
speed_txt.text = Math.floor(linSpeed);
linSpeed = linSpeed * waterDrag;
rotSpeed = rotSpeed + rotAcceleration;
rotSpeed = rotSpeed * waterDrag;
if (rotSpeed > maxRotSpeed) {
rotSpeed = maxRotSpeed;
} else if (rotSpeed < (-maxRotSpeed)) {
rotSpeed = -maxRotSpeed;
}
rotation = rotation + (rotSpeed - (linSpeed * (rudder * 0.005)));
var movSpeed = 0.05;
if (acceleration != 0) {
speedX = speedX + (movSpeed * (Math.sin((rotation * Math.PI) / 180) * (linSpeed / 4)));
speedY = speedY + (movSpeed * (Math.cos((rotation * Math.PI) / 180) * (linSpeed / 4)));
}
var moveObj = new Object();
moveObj.x = Math.cos((rotation * Math.PI) / 180);
moveObj.y = -Math.sin((rotation * Math.PI) / 180);
var movObj = new Object();
var sqroot = Math.sqrt((speedX * speedX) + (speedY * speedY));
if (sqroot == 0) {
movObj.x = 0;
movObj.y = 0;
} else {
movObj.x = speedX / sqroot;
movObj.y = speedY / sqroot;
}
var rootVar = Math.abs((moveObj.x * movObj.x) + (moveObj.y * movObj.y));
var moveVal = 0.05;
speedX = speedX * (waterDrag - (rootVar * moveVal));
speedY = speedY * (waterDrag - (rootVar * moveVal));
mcTmp._rotation = oWind.direction;
var speedObj = new Object();
speedObj.x = speedX * 1000;
speedObj.y = speedY * 1000;
mcTmp.localToGlobal(speedObj);
speedObj.x = speedObj.x / 1000;
speedObj.y = speedObj.y / 1000;
if ((speedObj.y < (oWind.strength * 0.03)) && (!onBeach)) {
if (!bWithoutWind) {
speedX = speedX + ((0.001 * oWind.strength) * Math.sin((oWind.direction * Math.PI) / 180));
speedY = speedY + ((0.001 * oWind.strength) * Math.cos((oWind.direction * Math.PI) / 180));
} else {
speedX = speedX - ((0.002 * oWind.strength) * Math.sin((oWind.direction * Math.PI) / 180));
speedY = speedY - ((0.002 * oWind.strength) * Math.cos((oWind.direction * Math.PI) / 180));
}
}
if (Math.abs(speedY) <= 0.024) {
speedY = 0;
}
if (Math.abs(speedX) <= 0.024) {
speedX = 0;
}
position.x = position.x + speedX;
position.y = position.y - speedY;
ship_mc._x = position.x;
ship_mc._y = position.y;
minimap_mc.dx = position.x;
minimap_mc.dy = position.y;
minimap_mc.d1x = level_mc.ship1_mc.clip_mc._x;
minimap_mc.d1y = level_mc.ship1_mc.clip_mc._y;
minimap_mc.d2x = level_mc.ship2_mc.clip_mc._x;
minimap_mc.d2y = level_mc.ship2_mc.clip_mc._y;
level_mc._y = (-position.y) + (Stage.height / 2);
level_mc._x = (-position.x) + (Stage.width / 2);
ship_mc._rotation = rotation;
var num = parseInt(dock_mc._name.toString().substr(4, 1));
if (((levelNo == 3) || (levelNo == 4)) || (levelNo == 8)) {
var clip = eval (((level_mc + ".anin") + num) + "_mc");
} else {
var clip = eval (((level_mc + ".ani") + num) + "_mc");
}
if (clip != undefined) {
if (clip.done) {
ship_mc.stopMove = false;
clip.done = false;
clip.gotoAndStop(1);
dock_mc._alpha = 0;
var str = dock_mc._name.toString();
showMc = eval ((minimap_mc + ".") + str);
showMc._alpha = 0;
dockin++;
dock_mc = eval (levelDockAr[dockin]);
var str = dock_mc._name.toString();
showMc = eval ((minimap_mc + ".") + str);
showMc._alpha = 100;
dock_mc._alpha = 100;
if (dock_mc == undefined) {
gameOver("gameC");
}
}
}
if (((ship_mc.point == undefined) && (levelNo == 9)) && (killed)) {
var ar = this[("level" + levelNo) + "_text_Ar"];
var num = (dockin + 1);
showPopUp(num);
dockin++;
dock_mc = eval (levelDockAr[dockin]);
ship_mc.point = dock_mc;
dock_mc._alpha = 100;
point(ship_mc, ship_mc.point);
arrow_mc._rotation = ship_mc.rotation - 180;
} else {
ship_mc.point = dock_mc;
point(ship_mc, ship_mc.point);
arrow_mc._rotation = ship_mc.rotation - 180;
}
}
function checkKeys(Void) {
acceleration = 0;
rotAcceleration = 0;
ship_mc.nitro_mc._visible = false;
rudder = rudder * 0.8;
if (!ship_mc.stopMove) {
if (Key.isDown(38) && (!Key.isDown(32))) {
if (Key.isDown(37) || (Key.isDown(39))) {
maxFrwdAcc = 40;
} else {
maxFrwdAcc = 60;
}
acceleration = maxFrwdAcc;
}
if (Key.isDown(40) && (!Key.isDown(32))) {
acceleration = maxRearAcc;
}
if (Key.isDown(37)) {
if (rudder < 15) {
maxFrwdAcc = 30;
rudder = rudder + 0.9;
}
}
if (Key.isDown(39)) {
if (rudder > -15) {
maxFrwdAcc = 30;
rudder = rudder - 0.9;
}
}
if (Key.isDown(32)) {
if (nitro_mc.b) {
slowDown();
}
}
}
}
function checkBorders(Void) {
if (position.x < 80) {
slowDown();
position.x = 81;
} else if (position.x > 650) {
slowDown();
position.x = 649;
}
if (position.y < 80) {
slowDown();
position.y = 81;
} else if (position.y > 450) {
slowDown();
position.y = 449;
}
ship_mc._x = position.x;
ship_mc._y = position.y;
}
function slowDown(Void) {
var _local1 = 0.05;
speedX = speedX - (speedX * _local1);
speedY = speedY - (speedY * _local1);
linSpeed = linSpeed - (linSpeed * _local1);
}
function saveCurrentPos(Void) {
stack = new Object();
stack.posX = position.x;
stack.posY = position.y;
stack.linSpeed = linSpeed;
stack.speedX = speedX;
stack.speedY = speedY;
stack.rotation = rotation;
stack.rotSpeed = rotSpeed;
stack.rudder = rudder;
}
function setPrevPos(Void) {
position.x = stack.posX;
position.y = stack.posY;
linSpeed = stack.linSpeed;
speedX = stack.speedX;
speedY = stack.speedY;
rotation = stack.rotation;
rotSpeed = stack.rotSpeed;
}
function reactOnBeach(mcHP, bFrontSide) {
if ((bFrontSide && (linSpeed > 0)) || ((!bFrontSide) && (linSpeed < 0))) {
var _local1 = 0.1;
speedX = speedX - (speedX * _local1);
speedY = speedY - (speedY * _local1);
linSpeed = linSpeed - (linSpeed * _local1);
if (Math.abs(linSpeed) < 0.1) {
linSpeed = 0;
}
}
}
function checkCollision(aObjects, bHasHitArea) {
var _local5;
var _local6;
var _local14 = aObjects.length;
var _local7 = 0;
while (_local7 < _local14) {
_local5 = aObjects[_local7];
if (bHasHitArea) {
_local6 = _local5.mcHitArea;
} else {
_local6 = _local5;
}
if (ship_mc.hitTest(_local6)) {
var _local1;
var _local3;
var _local9 = aHitPoints.length;
var _local2 = 0;
while (_local2 < _local9) {
_local1 = aHitPoints[_local2];
_local3 = {x:_local1._x, y:_local1._y};
ship_mc.mcHitPoints.localToGlobal(_local3);
if (_local6.hitTest(_local3.x, _local3.y, true)) {
var _local4;
if (_local1._y < 0) {
_local4 = true;
} else {
_local4 = false;
}
return(new Object({bHit:true, mcObject:_local5, mcHP:_local1, bFrontSide:_local4}));
}
_local2++;
}
}
_local7++;
}
return(new Object({bHit:false}));
}
function reactOnObstacle(mcHP, bFrontSide) {
var _local7 = 300;
var _local9 = 37;
var _local2 = mcHP._x / _local9;
var _local1 = (-mcHP._y) / _local7;
var _local8 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
var _local3 = _local1 / _local8;
speedX = speedX * ((-_local2) * 0.3);
speedY = speedY * ((-Math.abs(_local1)) * 0.3);
var _local11 = 0.1 + (10 * Math.sqrt((speedX * speedX) + (speedY * speedY)));
if (Math.abs(_local1) > 0) {
var _local6 = (((_local2 * _local1) > 0) ? -1 : 1);
if ((_local2 * _local1) != 0) {
rotSpeed = (_local11 * (1 - Math.abs(_local1))) * _local6;
if (rotSpeed > 0.5) {
rotSpeed = 0.5;
} else if (rotSpeed < -0.5) {
rotSpeed = -0.5;
}
} else {
rotSpeed = 0;
}
}
var _local5;
var _local4;
if (Math.abs(_local2) > 0.7) {
_local5 = (0.4 * ((_local2 > 0) ? -1 : 1)) * Math.cos((rotation * Math.PI) / 180);
_local4 = (0.4 * ((_local2 > 0) ? 1 : -1)) * Math.sin((rotation * Math.PI) / 180);
} else {
_local5 = (-0.1 * _local3) * Math.sin((rotation * Math.PI) / 180);
_local4 = (-0.1 * _local3) * Math.cos((rotation * Math.PI) / 180);
}
speedX = speedX + _local5;
speedY = speedY + _local4;
linSpeed = 0;
acceleration = 0;
rotAcceleration = 0;
var _local10 = true;
moveBoat(_local10);
}
function removeFromArray(array, item) {
var _local1 = 0;
while (_local1 < array.length) {
if (array[_local1] == item) {
array.splice(_local1, 1);
break;
}
_local1++;
}
}
function getDockingAccuracy(mcDockingPlace) {
var _local7 = 0;
var _local3;
var _local6 = aHitPoints.length;
var _local2 = 0;
while (_local2 < _local6) {
_local3 = aHitPoints[_local2];
var _local1 = new Object({x:_local3._x, y:_local3._y});
ship_mc.mcHitPoints.localToGlobal(_local1);
if (mcDockingPlace.hitTest(_local1.x, _local1.y, true)) {
_local7++;
}
_local2++;
}
var _local9 = Math.round((100 * _local7) / _local6);
return(_local9);
}
function sinkBoat(mcBoatRef, point, speed) {
var _local7 = 100;
var _local4 = mcBoatRef._rotation;
var _local3 = mcBoatRef._xscale;
mcBoats.globalToLocal(point);
point.x = (mcBoatRef._x + mcBoatRef.clip_mc._x) - point.x;
point.y = (mcBoatRef._y + mcBoatRef.clip_mc._y) - point.y;
var angleRad = Math.atan2(point.x, -point.y);
mcBoatRef.hit = true;
mcBoatRef.onEnterFrame = function () {
this.stop();
if (speed > 2) {
speed = speed - (speed * 0.1);
mcBoatRef._x = mcBoatRef._x + (2 * Math.sin(angleRad));
mcBoatRef._y = mcBoatRef._y - (2 * Math.cos(angleRad));
}
if (this._name.toString().substring(0, 4) == "swim") {
this.clip_mc._alpha = this.clip_mc._alpha - ((this.clip_mc._alpha - this.clip_mc.alpha) / 2);
this.clip_mc.alpha = 0;
if (this.clip_mc._alpha < 20) {
numPl--;
this.attachMovie("bla", "blood", 1, {_x:this.clip_mc._x, _y:this.clip_mc._y});
ship_mc.point = level_mc.dock1_mc;
delete this.onEnterFrame;
killed = true;
error_mc._text = numPl + " left";
error_mc.play();
}
}
};
}
function putBubble(mcTarget, x, y, mc) {
var _local1 = mcTarget.getNextHighestDepth();
var _local3 = 360 * Math.random();
var _local2 = 50 + (70 * Math.random());
x = x + (16 * (0.5 - Math.random()));
y = y + (16 * (0.5 - Math.random()));
mcTarget.attachMovie(mc, mc + _local1, _local1, {_x:x, _y:y, _rotation:_local3, _xscale:_local2, _yscale:_local2});
}
function initGame() {
this.onEnterFrame = GameStart;
stopGameTimer();
startGameTimer();
}
function startGameTimer() {
GameTimer = setInterval(reduceGameTimer, 1000);
}
function stopGameTimer() {
clearInterval(GameTimer);
interval_txt.text = 160;
}
function reduceGameTimer() {
interval_txt.text = timerintervar;
if (timerintervar <= -1) {
stopGameTimer();
timer_mc.gotoAndStop(1);
delete _root.onEnterFrame;
gameOver("gameOver");
gameFeed_mc.feed = 2;
} else {
timer_mc.gotoAndStop(timerintervar);
timerintervar--;
}
}
function getDamage() {
var _local2 = new Sound();
_local2.attachSound("hit");
_local2.start(0, 1);
if (damage >= 2) {
stopGameTimer();
delete this.onEnterFrame;
gameOver("gameOver");
gameFeed_mc.feed = 1;
damage++;
hit_txt.text = "Damage : " + damage;
} else {
damage++;
hit_txt.text = "Damage : " + damage;
damage_mc.gotoAndStop(("" + damage) + "c");
}
}
function gameOver(str) {
sound_mc.gotoAndStop(1);
Key.removeListener(myListener1);
varlevel10 = 0;
_root.blast = false;
numPl = 10;
clearInterval(levelCompleteTimer);
delete this.onEnterFrame;
stopGameTimer();
score = score + timerintervar;
var _local3 = levelNo;
t_txt.text = ((" Game Over : " + levelNo) + " : ") + _local3;
gameFeed_mc.gotoAndStop(str);
}
function buttonOver() {
this.gotoAndPlay("over");
}
function buttonOut() {
this.gotoAndPlay("out");
}
function playAgain() {
_root.gameState = "";
damage = 0;
varlevel10 = 0;
_root.blast = false;
numPl = 10;
levelNo--;
timerintervar = 160;
var _local2 = levelNo;
damage_mc.gotoAndStop("0c");
timer_mc.gotoAndStop(timer_mc._totalframes);
gotoAndPlay (4);
}
function nextLevel() {
_root.gameState = "";
damage = 0;
varlevel10 = 0;
_root.blast = false;
numPl = 10;
timerintervar = 160;
var _local2 = levelNo;
damage_mc.gotoAndStop("0c");
timer_mc.gotoAndStop(timer_mc._totalframes);
levelStart(level1);
}
function checkForCollision(p_clip1, p_clip2, p_alphaTolerance, p_scope) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 255;
}
if (p_scope == undefined) {
p_scope = p_clip2._parent;
}
var _local3 = p_clip1.getBounds(p_scope);
var _local2 = p_clip2.getBounds(p_scope);
if (((_local3.xMax < _local2.xMin) || (_local2.xMax < _local3.xMin)) || ((_local3.yMax < _local2.yMin) || (_local2.yMax < _local3.yMin))) {
return(null);
}
var _local1 = {};
_local1.xMin = Math.max(_local3.xMin, _local2.xMin);
_local1.xMax = Math.min(_local3.xMax, _local2.xMax);
_local1.yMin = Math.max(_local3.yMin, _local2.yMin);
_local1.yMax = Math.min(_local3.yMax, _local2.yMax);
var _local8 = new flash.display.BitmapData(_local1.xMax - _local1.xMin, _local1.yMax - _local1.yMin, false);
var _local4 = p_clip1.transform.matrix;
_local4.tx = p_clip1._x - _local1.xMin;
_local4.ty = p_clip1._y - _local1.yMin;
_local8.draw(p_clip1, _local4, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
_local4 = p_clip2.transform.matrix;
_local4.tx = p_clip2._x - _local1.xMin;
_local4.ty = p_clip2._y - _local1.yMin;
_local8.draw(p_clip2, _local4, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), "difference");
var _local6 = _local8.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local1.xMin;
_local6.y = _local6.y + _local1.yMin;
return(_local6);
}
function checkPoints() {
check_mc.no = 0;
checklen = 0;
for (c in check_mc) {
checklen++;
}
var i = 1;
while (i < checklen) {
var mc = eval (((check_mc + ".check") + i) + "_mc");
mc.id = i;
mc.b = true;
i++;
}
check_mc.onEnterFrame = function () {
for (all in this) {
var _local3 = this[all];
locPoints = {x:_local3._x, y:_local3._y};
check_mc.localToGlobal(locPoints);
if (ship_mc.hitTest(this[all]) && (this[all].b)) {
if (this.no == undefined) {
this.no = this[all].id;
} else {
var _local2 = this.no;
if ((((this[all].id == 1) || (this[all].id == 4)) || (this[all].id == 7)) || (this[all].id == 10)) {
checkPointsVal++;
trace((this[all].id + " : doing : ") + checkPointsVal);
}
if (((_local2 == (checklen - 1)) && (this[all].id == 1)) && (checkPointsVal >= 3)) {
trace(checkPointsVal + " : checkPointsVal");
for (t in this) {
this[t].b = true;
}
this[all].b = false;
lap++;
lap_txt.text = (("lap : " + lap) + "/") + maxLap;
this.no = this[all].id;
} else {
if (_local2 < this[all].id) {
for (t in this) {
this[t].b = true;
}
this[all].b = false;
if (lap >= maxLap) {
gameComplete();
}
} else {
for (t in this) {
this[t].b = true;
}
this[all].b = false;
error_mc.play();
error_mc._text = "Wrong Way";
}
this.no = this[all].id;
}
}
}
}
};
}
function gameComplete() {
levelDone = true;
error_mc._text = "LevelComplete";
error_mc.play();
clearInterval(levelCompleteTimer);
levelCompleteTimer = setInterval(gameOver, 2000, "gameC");
trace("GameComplete");
}
function point(clip1, clip2) {
if (clip2 == _root) {
clip1.rotation = (Math.atan2(clip1._parent._y - _root._ymouse, clip1._parent._x - _root._xmouse) * 180) / Math.PI;
return(clip1.rotation);
}
clip1.rotation = (Math.atan2(clip1._y - clip2._y, clip1._x - clip2._x) * 180) / Math.PI;
return(clip1.rotation);
}
function levelStart(level) {
levelNo++;
var _local3 = levelNo + 1;
sound_mc.gotoAndStop(_local3);
if (((levelNo == 3) || (levelNo == 4)) || (levelNo == 8)) {
level.ship_mc.clip_mc.gotoAndStop(2);
} else {
level.ship_mc.clip_mc.gotoAndStop(1);
}
level.ship_mc.nitro_mc._visible = false;
level.ship1_mc.gotoAndStop(1);
level.ship2_mc.gotoAndStop(1);
levelStart_mc.levelmc = level;
levelStart_mc.b = false;
levelStart_mc.gotoAndPlay(2);
level._y = (-level.ship_mc._y) + (Stage.height / 2);
level._x = (-level.ship_mc._x) + (Stage.width / 2);
for (var _local2 in level.mcBoats) {
if (typeof(level.mcBoats[_local2]) == "movieclip") {
level.mcBoats[_local2].gotoAndStop(1);
level.mcBoats[_local2].hit = false;
level.mcBoats[_local2]._x = level.mcBoats[_local2].x;
level.mcBoats[_local2]._y = level.mcBoats[_local2].y;
}
}
levelStart_mc.onEnterFrame = function () {
if (this.b) {
Key.addListener(myListener1);
delete this.onEnterFrame;
for (var _local2 in level.mcBoats) {
if (typeof(level.mcBoats[_local2]) == "movieclip") {
level.mcBoats[_local2].play();
}
}
if (levelNo == 10) {
gotoAndStop ("level10");
level10Fun();
} else {
setLevelObjects(level);
}
}
};
}
function level10Fun() {
Key.addListener(myListener);
showPopUp(level10_text_Ar[0]);
this.onEnterFrame = function () {
if ((varlevel10 > 8) && (!_root.blast)) {
level10.jump_mc.play();
_root.gameState = "gameC";
delete this.onEnterFrame;
Key.removeListener(myListener);
}
if (_root.blast && (_root.gameState != "gameC")) {
_root.gameState = "gameOver";
delete this.onEnterFrame;
Key.removeListener(myListener);
}
};
}
startG_btn.tabEnabled = false;
var numPl = 10;
var gamePause = true;
var levelDockAr = new Array();
var ship_mc;
var mcObstacles;
var level_mc;
var mcBeach;
var mcBoats;
var dock_mc;
var killed = false;
var position = new Object();
var levelNo = 0;
var score = 0;
var lastLevel = false;
var checkPointsVal = 0;
var levelDone = false;
_root.blast = false;
var aHitPonts = new Array();
var aBoats = new Array();
var amcBeach_hit = new Array();
var aBeaches = new Array();
var aObstacles = new Array();
var aDock = new Array();
var damage = 0;
var acceleration = 0;
var maxFrwdSpeed = 2;
var maxRearSpeed = -2;
var maxFrwdAcc = 0.2;
var maxRearAcc = -0.2;
var waterDrag = 0.99;
var lap = 0;
var maxLap = 1;
var dockin = 0;
var linSpeed = 0;
var speedX = 0;
var speedY = 0;
var acceleration = 0;
var rotSpeed = 0;
var maxRotSpeed = 1;
var rotAcceleration = 0;
var rudder = 0;
var onBeach = false;
var onDock = false;
var isWorking = false;
var timerintervar = 300;
mcTmp = this.createEmptyMovieClip("mcTmp", 1);
var bWithoutWind = false;
var oWind = new Object();
var level1_text_Ar = new Array("Pick up Don Milano from the airport", "Drive him back to the house");
var level2_text_Ar = new Array("Pick up a delivery from the garage", "Drive back to the house");
var level3_text_Ar = new Array("Drive to the Milano's brothers' house.", "Head to the airport.", "Drive back to the house");
var level4_text_Ar = new Array("Head to Milano's brothers' first.", "Pick up the Big Brother now.", "Pick up Toni from his house", "Drop them to the house now.");
var level5_text_Ar = new Array("Pick up the delivery.........", "Drive back to the house. Do not crash into the cops.");
var level6_text_Ar = new Array("Pick up the container from Petro Stand.", "Drive back to the house. Inflammable material inside, do not crash.");
var level7_text_Ar = new Array("Drive to Toni's house.", "Pick up cash from the bank", "Drop the mafia back");
var level8_text_Ar = new Array("Drive to the Big Brother's house.", "Head to Milano's brothers' house.", "Pick up Toni from his house", "Drive to the other side of the city, to meet the enemy Mafioso");
var level9_text_Ar = new Array("Drive to the enemy territory. Run over 10 guys there.", "Drive back to the house");
var level10_text_Ar = new Array("Tap \u201CX\u201D to jump out of the car");
var level1Ar = new Array("level1.dock2_mc", "level1.dock1_mc");
var level2Ar = new Array("level1.dock3_mc", "level1.dock1_mc");
var level3Ar = new Array("level1.dock4_mc", "level1.dock2_mc", "level1.dock1_mc");
var level4Ar = new Array("level1.dock4_mc", "level1.dock5_mc", "level1.dock6_mc", "level1.dock1_mc");
var level5Ar = new Array("level1.dock6_mc", "level1.dock1_mc");
var level6Ar = new Array("level1.dock5_mc", "level1.dock1_mc");
var level7Ar = new Array("level1.dock6_mc", "level1.dock9_mc", "level1.dock1_mc");
var level8Ar = new Array("level1.dock4_mc", "level1.dock5_mc", "level1.dock6_mc", "level1.dock1_mc");
var level9Ar = new Array("level1.dock10_mc", "level1.dock1_mc");
var level10Ar = new Array("level1.dock11_mc", "level1.dock1_mc");
nitro_mc.onEnterFrame = function () {
this.bar_mc.gotoAndStop(Math.floor((this.bar_mc._totalframes * this.val) / 100));
if (this.val > 3000) {
this.b = false;
}
if (this.b) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
var varlevel10 = 0;
var myListener = new Object();
myListener.onKeyUp = function () {
if (Key.getCode() == 88) {
varlevel10++;
trace((((("click x : " + varlevel10) + " : ") + _root.blast) + " : ") + _root.gameState);
}
};
var myListener1 = new Object();
var KeyUp = true;
var KeySpace = true;
myListener1.onKeyDown = function () {
if ((Key.getCode() == 38) || ((Key.getCode() == 40) && (KeyUp))) {
clipSound_mc.gotoAndStop(2);
KeyUp = false;
}
};
myListener1.onKeyUp = function () {
if ((Key.getCode() == 38) || (Key.getCode() == 40)) {
clipSound_mc.gotoAndStop(1);
KeyUp = true;
}
};
stop();
startG_btn.onPress = function () {
this._parent.gotoAndStop("instruction");
};
insG_btn.onPress = function () {
this._parent.gotoAndStop("instruction");
};
Symbol 961 MovieClip Frame 3
stop();
startG_btn.onPress = function () {
this._parent.gotoAndStop("level1");
};
Symbol 961 MovieClip Frame 5
stop();
minivisi_mc.tabEnabled = false;
minivisi_mc.focusEnabled = false;
minivisi_mc._focusrect = false;
for (var all in level1.mcBoats) {
if (typeof(level1.mcBoats[all]) == "movieclip") {
level.mcBoats[all].x = level.mcBoats[all]._x;
level.mcBoats[all].y = level.mcBoats[all]._y;
}
}
levelStart(level1);
minimap_mc._visible = false;
minivisi_mc.onRollOver = function () {
minimap_mc._visible = true;
};
minivisi_mc.onRollOut = (minivisi_mc.onReleaseOutside = function () {
minimap_mc._visible = false;
});
Symbol 961 MovieClip Frame 6
stop();