Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
_root.playIntro = true;
_root.allSounds = new Sound();
_root.score = 0;
_root.timeScore = 0;
_root.levelScore = 0;
_root.isPause = false;
_root.gameOver = false;
_root.levelArray = ["lblgame", "level2", "level3", "level4", "level5", "win"];
_root.level = 1;
_root.isEasy = false;
_root.playIntroSound = true;
_root.playerId = 1;
_root.isOver = false;
Frame 2
Frame 3
function g2w_playagin() {
trace("G2w playagin");
_root.score = 0;
if (_complete) {
_playAgain(_root, "lblgameintro");
} else {
_playAgain(_root, _root.levelArray[int(_root.level - 1)]);
}
}
function getphstatus(phno) {
swfurl = this._url;
if ((swfurl.split("games2win.com").length == 1) or ((gurl.split("/").length < 2) or (gurl eq undefined))) {
obj_game.ph1_status = true;
}
var _local2 = obj_game[("ph" + phno) + "_status"];
if (!_local2) {
play();
}
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
trace(u + " Mochi tracker");
return(res);
}
function load_rgames(trgt) {
var rel_games = new XML();
rel_games.ignoreWhite = true;
rel_games.onLoad = function () {
game_details = new Object();
var _local1 = 0;
while (_local1 < trgt.rel_games.firstChild.childNodes.length) {
game_details[rel_games.firstChild.childNodes[_local1].nodeName] = rel_games.firstChild.childNodes[_local1].firstChild.nodeValue;
_local1++;
}
};
rel_games.load((curl + "game_details.xml?") + getTimer());
}
function getScore(_loc) {
_loc.gotoAndStop("lbl_top_scores");
_root.g_trg = _loc;
int_gscore = setInterval(_root, "getTop10", 150);
}
function getTop10() {
trace("getTop10");
clearInterval(int_gscore);
_root.send_lv = new XML();
_root.rst_lv = new XML();
_root.rst_lv.onLoad = function (success) {
if (success) {
var _local3 = new it.sephiroth.XML2Object();
_root.lst_top_scorer = _local3.parseXML(this);
_root.g_trg.gotoAndStop("top10");
} else {
_root.c_fail++;
if (_root.c_fail >= 3) {
_root.g_trg.gotoAndStop("error_screen");
} else {
_root.send_lv.sendAndLoad(url, _root.rst_lv, "POST");
}
}
};
var url = ((((((obj_partner.top10URL + "?game_id=") + _root.obj_game._gid) + "&order=") + obj_game._score_ord) + "&timspam") + getTimer());
trace(url + " Url");
_root.send_lv.sendAndLoad(url, _root.rst_lv, "POST");
}
function itemHandler(obj, item) {
getURL ("http://www.games2win.com/", "_blank");
}
function _newUser() {
getURL (_registerurl, "_blank");
}
function _trackClickThru(mc) {
trace(obj_partner._allowclick + " _allowclick");
if (obj_partner._allowclick) {
mc.hit_area.onRelease = function () {
getURL (obj_partner.clickthru, "_blank");
};
} else {
mc.hit_area.useHandCursor = false;
}
}
function _readSharedData() {
so_uname = ((_sostatus.data.so_uname == undefined) ? "" : (_sostatus.data.so_uname));
so_jumpframe = ((_sostatus.data.so_jumpframe == undefined) ? "" : (_sostatus.data.so_jumpframe));
so_sound = ((_sostatus.data.so_sound == undefined) ? 0 : (_sostatus.data.so_sound));
_resetString = _sostatus.data.so_resetString;
trace("==========================");
trace((("so_jumpframe : " + _sostatus.data.so_jumpframe) + " : ") + so_uname);
if (so_jumpframe != "") {
_assignValue(_resetString);
createEmptyMovieClip("eye", getNextHighestDepth());
eye.onEnterFrame = function () {
if ((getBytesTotal() == getBytesLoaded()) and (getBytesLoaded() > 50000)) {
intro = 0;
_sostatus.data.so_jumpframe = "";
_sostatus.flush();
this.onEnterFrame = null;
gotoAndStop(so_jumpframe);
}
};
} else {
intro = 1;
play();
}
uname = so_uname;
gamesound = so_sound;
}
function _writeSharedData(jumpframe, jumpurl, _resetString) {
_sostatus.data.so_uname = ((so_uname == undefined) ? "" : (so_uname));
_sostatus.data.so_sound = so_sound;
_sostatus.data.so_resetString = _resetString;
_sostatus.data.so_jumpframe = jumpframe;
_sostatus.flush();
if (jumpurl != "") {
getURL (jumpurl);
} else {
gotoAndPlay (1);
}
}
function _assignValue(_val) {
_arr = new Array();
_arr = _val.split("|");
i = 0;
while (i < (_arr.length / 2)) {
_var2 = ((i * 2) + 1) - 1;
_var3 = _var2 + 1;
_val = _arr[_var3];
_rst = isNaN(_val);
if (_rst) {
_root[_arr[_var2]] = _arr[_var3];
} else {
_root[_arr[_var2]] = int(_arr[_var3]);
}
i++;
}
}
function _playAgain(mc, jumpframe, _resetString) {
so_uname = uname;
if ((gurl != undefined) and (gurl != "")) {
_writeSharedData(jumpframe, gurl, _resetString);
} else {
intro = 0;
_assignValue(_resetString);
mc.gotoAndStop(jumpframe);
}
}
var obj_game = new Array();
obj_game._gid = "1066";
obj_game._gtitle = "Train Traffic Control";
obj_game._google_text = "Game Searchable Text";
obj_game.StageW = 700;
obj_game.StageH = 400;
obj_game._res = (Stage.width + "x") + Stage.height;
obj_game._score_ord = "desc";
obj_game.mochi_tag = "";
obj_game.g2wbot = "9a16dd85";
obj_game.g2wbotid = 10301;
obj_game.ph1_status = false;
obj_game.ph2_status = false;
obj_game.adv_zedo = true;
obj_game.adv_mochi = false;
obj_game._zedourl = "http://ads.inviziads.com/g=1066/h=g2w";
zedo_tim = 15;
__com_mochibot__(obj_game.g2wbot, this, obj_game.g2wbotid, true);
var obj_partner = new Array();
obj_partner.partner_name = "g2w";
obj_partner.partner_id = 1;
obj_partner.invalid_txt = "Invalid Nickname!";
obj_partner.show_submit = false;
obj_partner.submitURL = "/submit_score.asp";
obj_partner.top10URL = "/get_top_scorer.asp";
obj_partner.lblsubmit = "Enter your Games2win 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.games2win.com/register.asp";
obj_partner.clickthru = "http://www.games2win.com";
obj_partner._allowclick = true;
_root.uname = "";
scoreSubmit = function (_loc) {
trace(_loc + " _loc");
myname = _root.partner_uname;
myscore = _root.partner_score;
mygameid = _root.obj_game._gid;
myname = myname.trim();
if ((((myname.length == 0) or (myname == obj_partner.invalid_txt)) or (myname == "Connecting Error!")) or (myname == undefined)) {
trace(obj_partner.invalid_txt);
_root.partner_uname = obj_partner.invalid_txt;
} else {
_root.send_lv = new LoadVars();
_root.send_lv.onLoad = function (success) {
if (success) {
if (_root.send_lv.isreg == 0) {
_root.uname = obj_partner.invalid_txt;
_loc.gotoAndStop("invalid_user_screen");
} else if (_root.send_lv.isreg == 1) {
Key.removeListener(_loc.keyListener);
_root.getScore(_loc);
}
} else {
_loc.gotoAndStop("error_screen");
}
};
_root.send_lv.nickname = myname;
_root.send_lv.points = myscore;
_root.send_lv.gameid = mygameid;
_root.send_lv.sendAndLoad(obj_partner.submitURL, _root.send_lv, "POST");
trace(_root.send_lv);
_loc.gotoAndStop("lbl_submit_screen");
}
};
c_fail = 0;
var g2w_menu = new ContextMenu();
g2w_menu.hideBuiltInItems();
g2w_menu.customItems.push(new ContextMenuItem("Games2win.com", itemHandler));
this.menu = g2w_menu;
var _sostatus = SharedObject.getLocal("gamestatus", "/");
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));
};
_readSharedData();
Frame 4
stop();
getphstatus(1);
Frame 5
Frame 6
stop();
Frame 7
stop();
stopAllSounds();
Frame 8
stopAllSounds();
Frame 9
stop();
Frame 10
stop();
Frame 11
stop();
Frame 12
stop();
Frame 13
stop();
stopAllSounds();
_root.TrnName = "";
_root.level = 1;
_root.hud_mc._visible = true;
_root.nInfo = "";
_root.aInfo = "";
_root.dInfo = "";
_root.gInfo = "";
_root.tInfo = "";
Instance of Symbol 529 MovieClip "Lvl1" in Frame 13
/* no clip actions */
Frame 14
stop();
_root.TrnName = "";
stopAllSounds();
_root.level = 2;
_root.hud_mc._visible = true;
_root.nInfo = "";
_root.aInfo = "";
_root.dInfo = "";
_root.gInfo = "";
_root.tInfo = "";
Instance of Symbol 554 MovieClip "Lvl2" in Frame 14
/* no clip actions */
Frame 15
stop();
_root.TrnName = null;
stopAllSounds();
_root.level = 3;
_root.hud_mc._visible = true;
_root.nInfo = "";
_root.aInfo = "";
_root.dInfo = "";
_root.gInfo = "";
_root.tInfo = "";
Instance of Symbol 558 MovieClip "Lvl3" in Frame 15
/* no clip actions */
Frame 16
stop();
stopAllSounds();
_root.level = 4;
_root.hud_mc._visible = true;
_root.nInfo = "";
_root.aInfo = "";
_root.dInfo = "";
_root.gInfo = "";
_root.tInfo = "";
Instance of Symbol 568 MovieClip "Lvl4" in Frame 16
/* no clip actions */
Frame 17
stop();
stopAllSounds();
_root.level = 5;
_root.hud_mc._visible = true;
_root.nInfo = "";
_root.aInfo = "";
_root.dInfo = "";
_root.gInfo = "";
_root.tInfo = "";
Instance of Symbol 588 MovieClip "Lvl5" in Frame 17
/* no clip actions */
Frame 18
stop();
_complete = true;
partner_score = _root.score;
_root.obj_game._gstatus = "gamecompleted";
Frame 19
stop();
stopAllSounds();
_complete = false;
partner_score = _root.score;
_root.obj_game._gstatus = "gameover";
Frame 20
stop();
nextFrame();
Frame 21
stop();
Frame 22
stop();
Symbol 14 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 40 MovieClip Frame 1
stop();
gotoAndStop(_root.obj_game._gstatus);
Symbol 46 Button
on (release) {
tryAgain();
}
Symbol 72 MovieClip [mc_topscore_box] Frame 2
function tryAgain() {
gotoAndStop ("login_screen");
}
function filltopscore(destmc) {
trace(_root.lst_top_scorer.top_score.status.data);
if ((_root.lst_top_scorer.top_score.status.data == 0) or (_root.lst_top_scorer.top_score.user[0].score.data == 0)) {
_top10_lbl._visible = false;
var _local2 = 0;
while (_local2 < 10) {
destmc["row" + _local2]._visible = false;
_local2++;
}
} else {
_noscore_mc._visible = false;
var _local2 = 0;
while (_local2 < 10) {
if ((_root.lst_top_scorer.top_score.user[_local2] == undefined) or (_root.lst_top_scorer.top_score.user[_local2].score.data == 0)) {
destmc["row" + _local2].txtrollno.text = "";
destmc["row" + _local2].txtusername.text = "";
destmc["row" + _local2].txtscore.text = "";
} else {
destmc["row" + _local2].txtrollno.text = _local2 + 1;
destmc["row" + _local2].txtusername.text = _root.lst_top_scorer.top_score.user[_local2].nick_name.data;
destmc["row" + _local2].txtscore.text = _root.lst_top_scorer.top_score.user[_local2].score.data;
}
_local2++;
}
}
}
stop();
playAgain_btn.onRelease = function () {
trace("Login");
_root.g2w_playagin();
};
username_txt.onSetFocus = function () {
trace((this.text + " ") + _root.obj_partner.invalid_txt);
if ((this.text == _root.obj_partner.invalid_txt) or (this.text == "Connecting Error!")) {
this.text = "";
}
};
Selection.setFocus("username_txt");
btn_scoresubmit.onRelease = function () {
_root.scoreSubmit(this._parent);
};
_trg_loc = this;
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 13)) {
} else {
Selection.setFocus("btn_scoresubmit");
_root.scoreSubmit(_trg_loc);
}
};
Key.addListener(keyListener);
btn_create_nickname.onRelease = function () {
getURL (_root.obj_partner.url_register, "_blank");
};
if (_root.obj_partner.show_submit) {
btn_scoresubmit._visible = false;
}
stop();
_btn_g2w.useHandCursor = false;
Symbol 72 MovieClip [mc_topscore_box] Frame 31
stop();
Symbol 72 MovieClip [mc_topscore_box] Frame 45
stop();
Symbol 72 MovieClip [mc_topscore_box] Frame 60
stop();
Symbol 72 MovieClip [mc_topscore_box] Frame 74
stop();
filltopscore(this);
playAgain_btn.onRelease = function () {
_root._playAgain(_root, "lblgameintro");
};
Symbol 76 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 82 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 82 MovieClip [game_sound_ctrl] Frame 2
stop();
changeVol(100, 5);
Symbol 82 MovieClip [game_sound_ctrl] Frame 3
stop();
changeVol(0, -5);
Symbol 642 MovieClip [__Packages.it.sephiroth.XML2Object] Frame 0
class it.sephiroth.XML2Object
{
var oXML;
function XML2Object () {
}
function get xml() {
return(oXML);
}
function parseXML(sFile) {
oResult = new Object();
oXML = sFile;
oResult = translateXML();
return(oResult);
}
function translateXML(from, path, name, position) {
var _local2;
var _local9;
var _local4;
var _local10;
if (path == undefined) {
path = this;
name = "oResult";
}
path = path[name];
if (from == undefined) {
from = new XML(xml.toString());
from.ignoreWhite = true;
}
if (from.hasChildNodes()) {
_local9 = from.childNodes;
if (position != undefined) {
_local10 = path;
path = path[position];
}
while (_local9.length > 0) {
_local4 = _local9.shift();
_local2 = _local4.nodeName;
if (_local2 != undefined) {
var _local5 = new Object();
_local5.attributes = _local4.attributes;
_local5.data = _local4.firstChild.nodeValue;
if (position != undefined) {
_local10 = path;
}
if (path[_local2] != undefined) {
if (path[_local2].__proto__ == Array.prototype) {
path[_local2].push(_local5);
name = _local4.nodeName;
position = path[_local2].length - 1;
} else {
var _local8 = path[_local2];
path[_local2] = new Array();
path[_local2].push(_local8);
path[_local2].push(_local5);
name = _local2;
position = path[_local2].length - 1;
}
} else {
path[_local2] = _local5;
name = _local2;
position = undefined;
}
}
if (_local4.hasChildNodes()) {
translateXML(_local4, path, name, position);
}
}
}
return(oResult);
}
var oResult = new Object();
}
Symbol 91 MovieClip Frame 345
stop();
Symbol 94 MovieClip Frame 100
this._visible = false;
Symbol 97 MovieClip Frame 2
trace(_parent.obj_game.adv_zedo);
if (_parent.obj_game.adv_zedo) {
gotoAndStop ("zedo");
} else {
gotoAndStop ("mochi");
}
Symbol 97 MovieClip Frame 3
stop();
tim = 0;
loadMovie (_root.obj_game._zedourl, zedo_movie);
rst_txt.text = ("The game will load in " + _parent.zedo_tim) + " seconds";
num = 1;
no = 0;
this.onEnterFrame = function () {
num++;
if (num == 24) {
num = 1;
no++;
rst = _parent.zedo_tim - no;
if (rst == 0) {
this.onEnterFrame = null;
_parent.play();
}
rst_txt.text = ("The game will load in " + rst) + " seconds";
}
};
Instance of Symbol 91 MovieClip in Symbol 97 MovieClip Frame 3
/* no clip actions */
Instance of Symbol 94 MovieClip in Symbol 97 MovieClip Frame 3
onClipEvent (enterFrame) {
total = _parent.zedo_movie.getBytesTotal();
loaded = _parent.zedo_movie.getBytesLoaded();
percent = int((loaded / total) * 100);
text = ("Loaded " + percent) + "%";
gotoAndStop(percent);
if (loaded == total) {
this._visible = false;
}
}
Symbol 97 MovieClip Frame 7
stop();
trace("MochiAd");
MochiAd.showPreloaderAd({id:_root.mochi_tag, res:_root.res_game, background:16777215, color:39219, outline:0, no_bg:true});
Symbol 102 MovieClip Frame 120
stop();
_root.gotoAndStop("lblloader");
Symbol 137 MovieClip Frame 1
var total = _root.getBytesTotal();
var loaded = 0;
var percent = 0;
var percent99;
onEnterFrame = function () {
loaded = _root.getBytesLoaded();
percent = Math.ceil((loaded / total) * 100);
percent99 = percent + "%";
if (loaded == total) {
_root.gotoAndStop("lblgameintro");
}
};
Symbol 166 MovieClip Frame 1
gotoAndStop(_root.randomRange(1, 2));
stop();
Symbol 166 MovieClip Frame 2
stop();
Symbol 167 MovieClip Frame 1
Symbol 171 MovieClip [compartment] Frame 1
var ypos = this._y;
var xpos = this._x;
var angle = 0;
var track;
var Sr = _root.level;
var z = _parent._parent[("trainSpawn" + Sr) + "_mc"].num;
_root.compDisapr = false;
var removCompt = 0;
onEnterFrame = function () {
if (_root.isPause == false) {
this._x = this._x + ((this.engine.speed * _root.speed) * Math.cos((angle * Math.PI) / 180));
this._y = this._y + ((this.engine.speed * _root.speed) * Math.sin((angle * Math.PI) / 180));
this._rotation = angle;
c = 1;
while (c <= _parent._parent.shaftsOnTrk) {
if (_parent._parent[(("shaft" + track) + c) + "_mc"].dir == dir) {
if ((_parent._parent[(("shaft" + track) + c) + "_mc"].myShaft == 2) && (_parent._parent[(("shaft" + track) + c) + "_mc"].lockTurn == true)) {
if (this.hitTest(_parent._parent[(("shaft" + track) + c) + "_mc"].curve01_mc)) {
this.angle = 15 * _parent._parent[(("shaft" + track) + c) + "_mc"].trackTurn;
}
if (this.hitTest(_parent._parent[(("shaft" + track) + c) + "_mc"].curve02_mc)) {
this.angle = 20 * _parent._parent[(("shaft" + track) + c) + "_mc"].trackTurn;
}
if (this.hitTest(_parent._parent[(("shaft" + track) + c) + "_mc"].curve03_mc)) {
this.angle = 0;
if (lastComp) {
_parent._parent[(("shaft" + track) + c) + "_mc"].lockTurn = false;
}
track = this.engine.track;
this._y = _parent._parent["track" + track]._y;
}
}
}
c++;
}
if (this.engine.Dirc == 1) {
if (_parent._parent.hitP_mc.hitTest(this)) {
this.minT.miniTappr = false;
this.engnRemove = true;
if (lastComp) {
i = 0;
while (i <= (_parent.train.length - 1)) {
if (_parent.train[i][0] == this.engine._name) {
j = i;
while (j <= (_parent.train.length - 1)) {
_parent.train[j] = _parent.train[j + 1];
j++;
}
}
i++;
}
var _local4 = this.engine.track;
if (_parent._parent[("trainSpawn" + Sr) + "_mc"].trainSrcDest[_local4 - 1][1] == _parent._parent[("trainSpawn" + Sr) + "_mc"].trainArray[z - 1][2]) {
_root.userAmount = _root.userAmount + 500;
}
_parent.train.pop();
this.txtDest.removeMovieClip();
this.engine.removeMovieClip();
this.minT.removeMovieClip();
}
this.removeMovieClip();
}
} else if (_parent._parent.hitM_mc.hitTest(this)) {
this.minT.miniTappr = false;
this.engnRemove = true;
if (lastComp) {
i = 0;
while (i <= (_parent.train.length - 1)) {
if (_parent.train[i][0] == this.engine._name) {
j = i;
while (j <= (_parent.train.length - 1)) {
_parent.train[j] = _parent.train[j + 1];
j++;
}
}
i++;
}
var _local4 = this.engine.track;
if (_parent._parent[("trainSpawn" + Sr) + "_mc"].trainSrcDest[_local4 - 1][0] == _parent._parent[("trainSpawn" + Sr) + "_mc"].trainArray[z - 1][2]) {
_root.userAmount = _root.userAmount + 500;
}
_parent.train.pop();
this.txtDest.removeMovieClip();
this.engine.removeMovieClip();
this.minT.removeMovieClip();
}
this.removeMovieClip();
}
}
};
stop();
Symbol 171 MovieClip [compartment] Frame 2
stop();
Symbol 171 MovieClip [compartment] Frame 3
stop();
Symbol 171 MovieClip [compartment] Frame 4
stop();
Symbol 171 MovieClip [compartment] Frame 5
stop();
Symbol 171 MovieClip [compartment] Frame 6
stop();
Symbol 171 MovieClip [compartment] Frame 7
stop();
Symbol 171 MovieClip [compartment] Frame 8
stop();
Symbol 171 MovieClip [compartment] Frame 9
stop();
Symbol 171 MovieClip [compartment] Frame 10
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 215 MovieClip [Engine] Frame 1
var xpos = this._x;
var ypos = this._y;
var angle = 0;
var track;
var signalStop = false;
var shaftOn = false;
var mySignal;
var shaft;
var mnybar;
var percent;
var Sr = _root.level;
var showBar = true;
var stnEnd = false;
var newNum = 0;
var uMoney = 0;
var moneyTransfer = false;
var ttlMny = trainMoney;
var crashTrnName;
onEnterFrame = function () {
trace((_root.isPause + " isPause speed ") + speed);
if (_root.isPause == false) {
if (speed == 0) {
engine_snd.gotoAndStop(1);
} else {
engine_snd.gotoAndStop(2);
}
var _local5 = _parent._parent[("trainSpawn" + Sr) + "_mc"].num;
this._x = this._x + ((speed * _root.speed) * Math.cos((angle * Math.PI) / 180));
this._y = this._y + ((speed * _root.speed) * Math.sin((angle * Math.PI) / 180));
this._rotation = angle;
j = 1;
while (j <= _parent._parent.signalsOnTrk) {
if (_parent._parent[(("track" + track) + j) + "_mc"].dir == Dirc) {
if (Dirc == 1) {
this.txtDest._x = this._x;
this.txtDest._y = this._y - 50;
if ((((((_parent._parent[(("track" + track) + j) + "_mc"]._x - this._x) - 0.2) < 200) && (((_parent._parent[(("track" + track) + j) + "_mc"]._x - this._x) - 0.2) > -50)) && (_parent._parent[(("track" + track) + j) + "_mc"].signal_mc._currentframe == 1)) && (!signalStop)) {
if ((speed * 0.8) > 1) {
speed = speed * 0.8;
this.miniT.Tspeed = speed * 0.081440649867374;
this.txtDest.txtSpeed = speed * 0.081440649867374;
} else {
speed = speed - 0.2;
this.miniT.Tspeed = speed * 0.081440649867374;
this.txtDest.txtSpeed = speed * 0.081440649867374;
}
if (speed <= 0) {
speed = 0;
this.miniT.Tspeed = 0;
this.txtDest.txtSpeed = 0;
mySignal = _parent._parent[(("track" + track) + j) + "_mc"];
signalStop = true;
}
}
if (signalStop && (mySignal.signal_mc._currentframe == 2)) {
speed = speed + 0.2;
this.miniT.Tspeed = speed * 0.081440649867374;
this.txtDest.txtSpeed = speed * 0.081440649867374;
if (this.miniT.Tspeed >= this.miniT.Mspeed) {
this.miniT.Tspeed = this.miniT.Mspeed;
this.txtDest.txtSpeed = this.txtDest.maxTxtSpeed;
}
if (speed >= maxSpeed) {
speed = maxSpeed;
mySignal = undefine;
signalStop = false;
}
}
if (_parent._parent[(("track" + track) + j) + "_mc"].signal_mc._currentframe == 1) {
if (((_parent._parent[(("track" + track) + j) + "_mc"]._x - this._x) - 0.2) < 200) {
if ((_parent._parent[(("track" + track) + j) + "_mc"].isStation == true) && (speed == 0)) {
if (showBar) {
this["mnybar" + j] = _parent._parent.trainName_mc.attachMovie("moneyBar", "moneyBar" + j, 3005 + j);
this["mnybar" + j]._x = (this._x + this._width) + 20;
this["mnybar" + j]._y = this._y - 10;
this["mnybar" + j]._xscale = 212;
this["mnybar" + j]._yscale = 212;
this["mnybar" + j].engName = this;
}
if (trainMoney >= 1) {
trainMoney = trainMoney - 4;
uMoney = uMoney + 4;
_root.userAmount = _root.userAmount + 4;
moneyTransfer = true;
if (percent >= 1) {
percent = 100 - Math.ceil((uMoney / ttlMny) * 100);
this["mnybar" + j].moneyFill_mc._yscale = percent;
if (percent <= 0) {
showBar = false;
this["mnybar" + j].removeMovieClip();
}
}
}
}
}
} else {
this["mnybar" + j].removeMovieClip();
}
} else {
this.txtDest._x = this._x - 75;
this.txtDest._y = this._y - 50;
if ((((((_parent._parent[(("track" + track) + j) + "_mc"]._x - this._x) - 0.2) > -200) && (((_parent._parent[(("track" + track) + j) + "_mc"]._x - this._x) - 0.2) < -100)) && (_parent._parent[(("track" + track) + j) + "_mc"].signal_mc._currentframe == 1)) && (!signalStop)) {
if ((speed * 0.8) > 1) {
speed = speed * 0.8;
this.miniT.Tspeed = speed * 0.081440649867374;
this.txtDest.txtSpeed = speed * 0.081440649867374;
} else {
speed = speed - 0.2;
this.miniT.Tspeed = speed * 0.081440649867374;
this.txtDest.txtSpeed = speed * 0.081440649867374;
}
if (speed <= 0) {
speed = 0;
this.miniT.Tspeed = 0;
this.txtDest.txtSpeed = 0;
trace("speed zero");
mySignal = _parent._parent[(("track" + track) + j) + "_mc"];
signalStop = true;
}
}
if (signalStop && (mySignal.signal_mc._currentframe == 2)) {
speed = speed + 0.2;
this.miniT.Tspeed = speed * 0.081440649867374;
this.txtDest.txtSpeed = speed * 0.081440649867374;
if (this.miniT.Tspeed >= this.miniT.Mspeed) {
this.miniT.Tspeed = this.miniT.Mspeed;
this.txtDest.txtSpeed = this.txtDest.maxTxtSpeed;
}
if (speed >= maxSpeed) {
speed = maxSpeed;
mySignal = undefine;
signalStop = false;
}
}
if (_parent._parent[(("track" + track) + j) + "_mc"].signal_mc._currentframe == 1) {
if (((_parent._parent[(("track" + track) + j) + "_mc"]._x - this._x) - 0.2) > -200) {
if ((_parent._parent[(("track" + track) + j) + "_mc"].isStation == true) && (speed == 0)) {
if (showBar) {
this["mnybar" + j] = _parent._parent.trainName_mc.attachMovie("moneyBar", "moneyBar" + j, 4000 + j);
this["mnybar" + j]._x = (this._x - this._width) - 20;
this["mnybar" + j]._y = this._y - 20;
this["mnybar" + j]._xscale = 212;
this["mnybar" + j]._yscale = 212;
this["mnybar" + j].engName = this;
}
if (trainMoney >= 1) {
trainMoney = trainMoney - 4;
uMoney = uMoney + 4;
_root.userAmount = _root.userAmount + 4;
moneyTransfer = true;
if (percent >= 1) {
percent = 100 - Math.ceil((uMoney / ttlMny) * 100);
this["mnybar" + j].moneyFill_mc._yscale = percent;
if (percent <= 0) {
showBar = false;
this["mnybar" + j].removeMovieClip();
}
}
}
}
}
} else {
this["mnybar" + j].removeMovieClip();
}
}
}
j++;
}
a = 1;
while (a <= _parent._parent.shaftsOnTrk) {
if (_parent._parent[(("shaft" + track) + a) + "_mc"].dir == Dirc) {
if (_parent._parent[(("shaft" + track) + a) + "_mc"].myShaft == 2) {
if (this.hitTest(_parent._parent[(("shaft" + track) + a) + "_mc"].curve01_mc)) {
_parent._parent[(("shaft" + track) + a) + "_mc"].lockTurn = true;
this.angle = 15 * _parent._parent[(("shaft" + track) + a) + "_mc"].trackTurn;
}
if (this.hitTest(_parent._parent[(("shaft" + track) + a) + "_mc"].curve02_mc)) {
_parent._parent[(("shaft" + track) + a) + "_mc"].lockTurn = true;
this.angle = 20 * _parent._parent[(("shaft" + track) + a) + "_mc"].trackTurn;
}
if (this.hitTest(_parent._parent[(("shaft" + track) + a) + "_mc"].curve03_mc)) {
this.angle = 0;
_parent._parent[(("shaft" + track) + a) + "_mc"].lockTurn = true;
this.track = this.track - (_parent._parent[(("shaft" + track) + a) + "_mc"].trackTurn * Dirc);
this._y = _parent._parent["track" + this.track]._y;
this.miniT.minTrack = this.track;
this.miniT._y = _parent._parent.minMap["track" + this.track]._y;
}
}
}
a++;
}
i = 1;
while (i <= 2) {
if (this.hitTest(_parent._parent[("stoppr" + i) + "_mc"])) {
var _local4 = _parent._parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
if (i == 2) {
_local4._x = _parent._parent[("stoppr" + i) + "_mc"]._x + 25;
_local4._y = _parent._parent[("stoppr" + i) + "_mc"]._y;
} else {
_local4._x = _parent._parent[("stoppr" + i) + "_mc"]._x + 50;
_local4._y = _parent._parent[("stoppr" + i) + "_mc"]._y;
}
_root.TrnName = _parent._parent[("stoppr" + i) + "_mc"];
_root.gameOver = true;
_root.trnCrash = true;
_root.isPause = true;
}
i++;
}
}
};
stop();
Symbol 215 MovieClip [Engine] Frame 2
stop();
Symbol 215 MovieClip [Engine] Frame 3
stop();
Symbol 215 MovieClip [Engine] Frame 4
stop();
Symbol 215 MovieClip [Engine] Frame 5
stop();
Symbol 215 MovieClip [Engine] Frame 6
stop();
Symbol 215 MovieClip [Engine] Frame 7
stop();
Symbol 215 MovieClip [Engine] Frame 8
stop();
Symbol 215 MovieClip [Engine] Frame 9
stop();
Symbol 215 MovieClip [Engine] Frame 10
stop();
Symbol 219 MovieClip Frame 1
Symbol 251 MovieClip [fullmapmain4] Frame 1
Symbol 261 MovieClip [fullmapmain] Frame 1
gotoAndStop(_root.level);
stop();
Symbol 261 MovieClip [fullmapmain] Frame 2
stop();
Symbol 261 MovieClip [fullmapmain] Frame 3
stop();
Symbol 261 MovieClip [fullmapmain] Frame 4
stop();
Symbol 261 MovieClip [fullmapmain] Frame 5
stop();
Symbol 271 MovieClip Frame 1
miniTrackHit.useHandCursor = false;
var trkName = this._name;
var Sr = this._name.charAt(5);
miniTrackHit.onRollOver = function () {
if (_root.isPause == false) {
gotoAndPlay(_currentframe + 1);
var _local2 = _root["Lvl" + Sr][("trainSpawn" + Sr) + "_mc"].num;
var _local3 = _root["Lvl" + Sr][("trainSpawn" + Sr) + "_mc"].trainArray[_local2][8];
if (trkName == ("track" + _local3)) {
_root.nInfo = _root["Lvl" + Sr][("trainSpawn" + Sr) + "_mc"].trainArray[_local2][0];
_root.aInfo = _root["Lvl" + Sr][("trainSpawn" + Sr) + "_mc"].trainArray[_local2][1];
_root.dInfo = _root["Lvl" + Sr][("trainSpawn" + Sr) + "_mc"].trainArray[_local2][2];
_root.gInfo = _root["Lvl" + Sr][("trainSpawn" + Sr) + "_mc"].trainArray[_local2][9];
_root.tInfo = _root.clock_mc.ETA;
if (_root.tInfo <= 1) {
_root.tInfo = 0;
}
}
}
};
miniTrackHit.onRollOut = function () {
if (_root.isPause == false) {
gotoAndPlay(_currentframe);
}
};
stop();
Symbol 271 MovieClip Frame 2
stop();
Symbol 275 MovieClip Frame 1
var myName = this._name;
var frm = _root.Lvl1[myName].mySignal;
stop();
Symbol 275 MovieClip Frame 2
stop();
Symbol 280 MovieClip [minimapmain1] Frame 1
var Sr = _root.level;
miniMap_bg_mc.onRelease = function () {
if ((-97 < _xmouse) && (_xmouse < -35)) {
_root["Lvl" + Sr].xpos = 800;
}
if ((-35 < _xmouse) && (_xmouse < 25)) {
_root["Lvl" + Sr].xpos = 400;
}
if ((25 < _xmouse) && (_xmouse < 97)) {
_root["Lvl" + Sr].xpos = -250;
}
};
mask_mc.swapDepths(10000);
Symbol 282 MovieClip [minimapmain2] Frame 1
var Sr = _root.level;
miniMap2_bg_mc.onRelease = function () {
if ((-97 < _xmouse) && (_xmouse < -35)) {
_root["Lvl" + Sr].xpos = 800;
}
if ((-35 < _xmouse) && (_xmouse < 25)) {
_root["Lvl" + Sr].xpos = 400;
}
if ((25 < _xmouse) && (_xmouse < 97)) {
_root["Lvl" + Sr].xpos = -250;
}
};
mask_mc.swapDepths(10000);
Symbol 284 MovieClip [minimapmain3] Frame 1
mask_mc.swapDepths(10000);
var Sr = _root.level;
miniMap3_bg_mc.onRelease = function () {
if ((-97 < _xmouse) && (_xmouse < -35)) {
_root["Lvl" + Sr].xpos = 800;
}
if ((-35 < _xmouse) && (_xmouse < 25)) {
_root["Lvl" + Sr].xpos = 400;
}
if ((25 < _xmouse) && (_xmouse < 97)) {
_root["Lvl" + Sr].xpos = -250;
}
};
Symbol 287 MovieClip [minimapmain4] Frame 1
mask_mc.swapDepths(10000);
var Sr = _root.level;
miniMap4_bg_mc.onRelease = function () {
if ((-97 < _xmouse) && (_xmouse < -35)) {
_root["Lvl" + Sr].xpos = 900;
}
if ((-35 < _xmouse) && (_xmouse < 25)) {
_root["Lvl" + Sr].xpos = 400;
}
if ((25 < _xmouse) && (_xmouse < 97)) {
_root["Lvl" + Sr].xpos = -350;
}
};
Symbol 289 MovieClip [minimapmain5] Frame 1
mask_mc.swapDepths(10000);
var Sr = _root.level;
miniMap5_bg_mc.onRelease = function () {
if ((-97 < _xmouse) && (_xmouse < -35)) {
_root["Lvl" + Sr].xpos = 950;
}
if ((-35 < _xmouse) && (_xmouse < 25)) {
_root["Lvl" + Sr].xpos = 400;
}
if ((25 < _xmouse) && (_xmouse < 97)) {
_root["Lvl" + Sr].xpos = -335;
}
};
Symbol 290 MovieClip [miniMap] Frame 1
gotoAndStop(_root.level);
stop();
Symbol 290 MovieClip [miniMap] Frame 2
stop();
Instance of Symbol 282 MovieClip [minimapmain2] "miniMap_mc" in Symbol 290 MovieClip [miniMap] Frame 2
/* no clip actions */
Symbol 290 MovieClip [miniMap] Frame 3
stop();
Instance of Symbol 284 MovieClip [minimapmain3] "miniMap_mc" in Symbol 290 MovieClip [miniMap] Frame 3
/* no clip actions */
Symbol 290 MovieClip [miniMap] Frame 4
stop();
Symbol 290 MovieClip [miniMap] Frame 5
stop();
Instance of Symbol 289 MovieClip [minimapmain5] "miniMap_mc" in Symbol 290 MovieClip [miniMap] Frame 5
/* no clip actions */
Symbol 294 MovieClip [minimapTrain] Frame 1
var xpos = this._x;
var ypos = this._y;
var angle = 0;
var track;
onEnterFrame = function () {
if (_root.isPause == false) {
_parent._parent.minimap.theMask_mc.setMask(miniTrn_mc);
this._x = this._x + ((Tspeed * _root.speed) * Math.cos((angle * Math.PI) / 180));
this._y = this._y + ((Tspeed * _root.speed) * Math.sin((angle * Math.PI) / 180));
this._rotation = angle;
}
};
Symbol 300 MovieClip [moneyBar] Frame 1
var trnMny;
var uMny;
var Sr = _root.level;
var engName;
var count = _parent._parent[("trainSpawn" + Sr) + "_mc"].engCount;
var aryElmnt = _parent._parent[("trainSpawn" + Sr) + "_mc"].num;
var mPercent = 100;
Symbol 304 MovieClip [text_Destination] Frame 1
var xpos = this._x;
var ypos = this._y;
var angle = 0;
var destn;
var txtSpeed;
var Sr = _root.level;
onEnterFrame = function () {
if (_root.isPause == false) {
this._rotation = angle;
}
};
Symbol 308 MovieClip Frame 1
stop();
Symbol 309 MovieClip [Crash_Smoke] Frame 1
if (count == undefined) {
_crashsound.gotoAndPlay(2);
var count = 0;
}
Symbol 309 MovieClip [Crash_Smoke] Frame 24
count++;
if (count == 5) {
stop();
_root.minimap.removeMovieClip();
_root.isPause = false;
_root.gameOver = false;
_root.gotoAndStop("gameOver");
}
Symbol 310 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 2
stop();
Symbol 350 MovieClip Frame 1
if (!_root.playIntro) {
gotoAndStop(_totalframes);
}
if (_root.playIntroSound) {
stopAllSounds();
sound_mc.gotoAndStop(2);
}
_root.playIntroSound = false;
_root.playIntro = false;
Symbol 350 MovieClip Frame 30
stop();
story_btn.onRelease = function () {
_root.gotoAndStop("story");
};
instructions_btn.onRelease = function () {
_root.gotoAndStop("instructions");
};
start_btn.onRelease = function () {
_root.gotoAndStop("select");
};
Symbol 371 MovieClip Frame 29
stop();
start_btn.onRelease = function () {
_root.gotoAndStop("select");
};
back_btn.onRelease = function () {
_root.gotoAndStop("lblgameintro");
};
Symbol 375 MovieClip Frame 29
stop();
start_btn.onRelease = function () {
_root.gotoAndStop("select");
};
back_btn.onRelease = function () {
_root.gotoAndStop("lblgameintro");
};
Symbol 390 MovieClip Frame 1
stop();
Symbol 390 MovieClip Frame 2
stop();
Symbol 393 MovieClip Frame 1
var newName = this._name;
var mySignal = _parent.randomRange(1, 2);
signal_mc.gotoAndStop(mySignal);
_root.minimap[newName].gotoAndStop(mySignal);
this.onRelease = function () {
if (_root.isPause == false) {
signal_mc.gotoAndPlay(this._currentframe + 1);
_root.minimap[newName].gotoAndPlay(_root.minimap[newName]._currentframe + 1);
}
};
Symbol 407 MovieClip Frame 1
this.getNextHighestDepth();
Symbol 418 MovieClip Frame 1
var totlTime = 9000;
var time = 1;
var percent = 0;
_root.speed = 1;
arrow_mc._x = 0;
onEnterFrame = function () {
if (_root.isPause == false) {
if (percent <= 100) {
time = time + _root.speed;
percent = (time / totlTime) * 100;
arrow_mc._x = percent * 1.991;
}
_root.trainTime = (totlTime * 1) / ((_root.speed * 10) * 10);
}
};
Symbol 439 MovieClip Frame 1
Symbol 505 MovieClip Frame 1
stop();
var count = 1;
next_btn.onRelease = function () {
count++;
nextFrame();
};
skip_btn.onRelease = function () {
_root.gotoAndStop("lblgame");
};
Symbol 505 MovieClip Frame 2
stop();
Symbol 505 MovieClip Frame 3
stop();
Symbol 505 MovieClip Frame 4
stop();
Symbol 505 MovieClip Frame 5
stop();
Symbol 505 MovieClip Frame 6
stop();
Symbol 505 MovieClip Frame 7
stop();
Symbol 505 MovieClip Frame 8
stop();
play_btn.onRelease = function () {
_root.gotoAndStop("lblgame");
};
Symbol 509 MovieClip Frame 1
var trackName = this._name;
this.useHandCursor = false;
var Sr = _root.level;
this.onRollOver = function () {
if (_root.isPause == false) {
_parent.minMap[trackName].gotoAndPlay(_currentframe + 1);
var _local3 = _parent[("trainSpawn" + Sr) + "_mc"].num;
var _local4 = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][8];
if (trackName == ("track" + _local4)) {
_root.nInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][0];
_root.aInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][1];
_root.dInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][2];
_root.gInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][9];
_root.tInfo = _root.clock_mc.ETA;
if (_root.tInfo <= 1) {
_root.tInfo = 0;
}
}
}
};
this.onRollOut = function () {
_parent.minMap[trackName].gotoAndStop(1);
};
_root.mInfo = 0;
onEnterFrame = function () {
if (_root.isPause == false) {
var _local3 = _parent[("trainSpawn" + Sr) + "_mc"].depthCount;
_root.mInfo = _root.userAmount;
}
};
Symbol 510 MovieClip Frame 1
var trackName = this._name;
this.useHandCursor = false;
var Sr = _root.level;
this.onRollOver = function () {
_parent.minMap[trackName].gotoAndPlay(_currentframe + 1);
var _local3 = _parent[("trainSpawn" + Sr) + "_mc"].num;
var _local4 = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][8];
if (trackName == ("track" + _local4)) {
_root.nInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][0];
_root.aInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][1];
_root.dInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][2];
_root.gInfo = _parent[("trainSpawn" + Sr) + "_mc"].trainArray[_local3][9];
_root.tInfo = _root.clock_mc.ETA;
if (_root.tInfo <= 1) {
_root.tInfo = 0;
}
}
};
this.onRollOut = function () {
_parent.minMap[trackName].gotoAndStop(1);
};
_root.mInfo = 0;
onEnterFrame = function () {
var _local3 = _parent[("trainSpawn" + Sr) + "_mc"].depthCount;
_root.mInfo = _root.userAmount;
};
Symbol 511 MovieClip Frame 1
var name = "Amsden";
var bonus = true;
onEnterFrame = function () {
if (_root.isPause == false) {
var _local4 = _root.level;
var _local5 = _parent[("trainSpawn" + _local4) + "_mc"].num;
if (this.hitTest(_parent.trainName_mc)) {
if (bonus == true) {
bonus = false;
if (_parent[("trainSpawn" + _local4) + "_mc"].trainArray[_local5 - 1][2] == name) {
_root.userAmount = _root.userAmount + 500;
}
}
}
}
};
Symbol 518 MovieClip Frame 1
Symbol 519 MovieClip Frame 1
var lockTurn = false;
var myShaft = 1;
shaftHit_mc.onRelease = function () {
if (_root.isPause == false) {
if (_currentframe == 1) {
myShaft = 2;
gotoAndStop (2);
} else if ((_currentframe == 2) && (lockTurn == false)) {
myShaft = 1;
gotoAndStop (1);
}
}
};
stop();
Symbol 519 MovieClip Frame 2
stop();
Instance of Symbol 518 MovieClip "curve01_mc" in Symbol 519 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
Instance of Symbol 518 MovieClip "curve03_mc" in Symbol 519 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
Instance of Symbol 518 MovieClip "curve02_mc" in Symbol 519 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
Symbol 521 MovieClip Frame 1
function CreateTrain(Tname, Aname, Dname, speedN, dir, xpos, totalLength, frameNo, trackName, money) {
var _local10 = [];
var _local5 = this.attachMovie("Engine", "Engine" + depthCount, 1000 + depthCount);
engCount = depthCount;
_local5.engNo = depthCount;
_local10.push(_local5._name);
depthCount++;
_root.comptLength = totalLength;
_local5.track = trackName;
_local5.destination = Dname;
_local5.maxSpeed = (speedN * _root.speed) * dir;
_local5.speed = (speedN * _root.speed) * dir;
_local5.name = Tname;
_local5.arvFrm = Aname;
_local5.dest = Dname;
_local5.trainMoney = money;
_local5.uMoney = 0;
_local5.Dirc = dir;
_local5._xscale = 91.2 * dir;
_local5._yscale = 91.2 * dir;
_local5._x = xpos;
_local5._y = _parent["track" + trackName]._y;
_local5.miniMap = _parent.minMap;
var _local9 = _parent.trainName_mc.attachMovie("text_Destination", "text_Destination" + depthCount, 1010 + depthCount);
_local9._x = _local5._x;
_local9._y = _local5._y - 50;
_local9.destName = Dname;
_local9.txtSpeed = (speedN * _root.speed) * dir;
_local9.maxTxtSpeed = (speedN * _root.speed) * dir;
_local5.txtDest = _local9;
var _local7 = _parent.minMap.mTrain_mc.attachMovie("minimapTrain", "minimapTrain", 1000 + depthCount);
_parent.minMap.mask_mc.setMask(_parent.minMap.mTrain_mc);
_local7.miniTappr = true;
_local7.Tspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7.Mspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7._xscale = 91.2 * dir;
_local7._yscale = 91.2 * dir;
_local7._x = (xpos * 0.081440649867374) - 5;
_local7._y = _parent.minMap["track" + trackName]._y;
_local7.minTrack = trackName;
_local5.miniT = _local7;
_local5.gotoAndStop(frameNo);
_local5.length = totalLength;
i = 1;
while (i <= totalLength) {
var _local4 = this.attachMovie("compartment", "compartment" + depthCount, 1000 + depthCount);
_local10.push(_local4._name);
if (i == totalLength) {
_local4.lastComp = true;
}
depthCount++;
_local4.minT = _local7;
_local4.engine = _local5;
_local4.txtDest = _local9;
_local4.dir = dir;
_local4.track = trackName;
_local4.gotoAndStop(frameNo);
_local4._xscale = 100 * dir;
_local4._yscale = 100 * dir;
_local4._x = _local5._x - ((_local4._width * i) * dir);
_local4._y = _local5._y;
_local5.comp = _local4;
i++;
}
_local5.index = train.length;
train.push(_local10);
var _local16 = _local5.track;
}
function arrivalTime(d) {
if (_root.clock_mc.ETA <= 5) {
logoTrk = trainArray[d][8];
if (trainArray[d][4] == -1) {
_root[("trackR" + logoTrk) + "_mc"].gotoAndPlay(2);
} else {
_root[("trackL" + logoTrk) + "_mc"].gotoAndPlay(2);
trace(logoTrk + "1");
}
}
if (_root.clock_mc.ETA >= 11) {
_root.arvinTimeNw_mc._visible = false;
}
}
var depth = 100;
var depthCount = 1;
var uMoney = 0;
var train = [];
var engCount;
var crashTrnName;
var position;
var logoTrk;
var count = 0;
var no;
var num;
var z;
var trainArray = [["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "6", "1", "-1300", "4", "6", "1", "1000"], ["Waterloo-Liverpool Street Exp.", "Waterloo", "Liverpool Street", "7", "-1", "1300", "4", "5", "1", "1100"], ["Waterloo-Liverpool Street Exp.", "Waterloo", "Liverpool Street", "8", "-1", "1300", "4", "9", "1", "1200"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "7", "1", "-1300", "4", "3", "1", "1100"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "6", "1", "-1300", "4", "1", "1", "1000"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "8", "1", "-1300", "4", "5", "1", "1300"], ["Waterloo-Liverpool Street Exp.", "Waterloo", "Liverpool Street", "7", "-1", "1300", "5", "6", "1", "1200"], ["Waterloo-Liverpool Street Exp.", "Waterloo", "Liverpool Street", "8", "-1", "1300", "4", "1", "1", "1300"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "6", "1", "-1300", "4", "9", "1", "1000"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "7", "1", "-1300", "4", "9", "1", "1200"], ["Waterloo-Liverpool Street Exp.", "Waterloo", "Liverpool Street", "6", "-1", "1300", "4", "3", "1", "1000"], ["Waterloo-Liverpool Street Exp.", "Waterloo", "Liverpool Street", "8", "-1", "1300", "4", "1", "1", "1400"], ["Waterloo-Newcastle Exp.", "Waterloo", "Newcastle", "7", "-1", "1300", "4", "5", "1", "1200"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "6", "1", "-1300", "4", "6", "1", "1400"], ["Liverpool Street-Waterloo Exp.", "Liverpool Street", "Waterloo", "8", "1", "-1300", "4", "5", "1", "1000"]];
var trainSrcDest = [["Liverpool Street", "Waterloo"]];
onEnterFrame = function () {
if (_root.isPause == false) {
var _local5 = _parent._parent.clock_mc.count;
if (_root.arrivinTime == true) {
arrivalTime(_local5);
trace(_local5 + "num");
_root.arrivinTime = false;
}
k = 0;
while (k <= train.length) {
l = k + 1;
while (l <= train.length) {
if (this[train[k][0]].track == this[train[l][0]].track) {
if (this[train[k][0]].Dirc == this[train[l][0]].Dirc) {
if (this[train[l][0]].hitTest(this[train[k][0]])) {
trace("hit whn sm dir");
crashTrnName = this[train[l][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba1");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
if (this[train[k][0]].hitTest(this[train[l][0]])) {
trace("hit whn sm dir whn speed grtr");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba2");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
} else if (this[train[k][0]].Dirc != this[train[k + l][0]].Dirc) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit whn dft dir");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
if (this[train[k][0]].speed <= this[train[k + l][0]].speed) {
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba dir dif");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
} else {
if (this[train[k][0]].speed >= this[train[k + l][0]].speed) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit dft dir & speed less");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
}
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba3");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
}
}
}
l++;
}
k++;
}
num = _parent._parent.clock_mc.count;
count = count + _root.speed;
z = 0;
while (z <= trainArray.length) {
if (z == (num - 1)) {
if (_root.trainCreate == true) {
CreateTrain(trainArray[z][0], trainArray[z][1], trainArray[z][2], trainArray[z][3], trainArray[z][4], trainArray[z][5], trainArray[z][6], trainArray[z][7], trainArray[z][8], trainArray[z][9]);
_root.trainCreate = false;
}
}
z++;
}
}
};
Symbol 525 MovieClip Frame 1
this.getNextHighestDepth();
Symbol 528 MovieClip Frame 1
onEnterFrame = function () {
};
Symbol 529 MovieClip Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var scrollSpeed = 3;
var speed = 2;
var xpos = 400;
var tracks = 2;
var count = 3;
var signalsOnTrk = 3;
var shaftsOnTrk = 2;
var Sr = _root.level;
_root.userAmount = 0;
var minMap = _root.attachMovie("minimapmain1", "minimap", 1000);
minMap._x = 125;
minMap._y = 545;
onEnterFrame = function () {
this._x = this._x - ((this._x - xpos) / 6);
if ((_root.isPause == false) || (_root.gameOver == true)) {
var _local3 = [("trainSpawn" + Sr) + "_mc"].depthCount;
if (_root.clock_mc.intialTime >= _root.clock_mc.maxTime) {
_root.minimap.removeMovieClip();
}
if ((_root._xmouse <= 50) && (this._x <= 1010)) {
this.xpos = this.xpos + 22;
}
if ((_root._xmouse >= 750) && (this._x >= -250)) {
this.xpos = this.xpos - 22;
}
if (_root.gameOver == true) {
this.xpos = (-trainSpawn1_mc.crashTrnName._x) + 400;
if (_root.trnCrash == true) {
this.xpos = (-_root.TrnName._x) + 400;
}
if (this.xpos > 800) {
this.xpos = 800;
}
if (this.xpos < -250) {
this.xpos = -250;
}
}
}
};
Instance of Symbol 519 MovieClip "shaft12_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft11_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft21_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft22_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 393 MovieClip "track12_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track13_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track21_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track11_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track22_mc" in Symbol 529 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Symbol 531 MovieClip Frame 1
stop();
Symbol 533 MovieClip Frame 1
stop();
Symbol 535 MovieClip Frame 1
engine_alert = 1;
wisl_s = 0;
stop();
Symbol 535 MovieClip Frame 2
play();
if (engine_alert == 1) {
engine_alert = 2;
alert.gotoAndPlay(2);
}
Symbol 535 MovieClip Frame 31
gotoAndPlay (2);
var logoCount = 0;
var logoTimer = 0;
onEnterFrame = function () {
logoCount++;
logoTimer = Math.round(logoCount / 25);
if ((logoTimer == 2) and (wisl_s == 0)) {
wisl_s = 1;
wisl.gotoAndPlay(2);
} else if (logoTimer <= 6) {
gotoAndPlay (2);
} else {
wisl.gotoAndPlay(2);
logoCount = 0;
onEnterFrame = null;
gotoAndStop (1);
}
};
Symbol 543 MovieClip Frame 1
_root.arrivinTime = false;
var prevCount = -1;
var intialTime = 0;
var maxTime = 9000;
var clkAngle;
var count = 0;
var a = 1;
var ETA;
var globltArry = [10, 40, 60, 80, 95, 125, 140, 165, 185, 205, 230, 245, 275, 295, 320, 335];
onEnterFrame = function () {
if (_root.isPause == false) {
if (intialTime <= maxTime) {
intialTime = intialTime + _root.speed;
arrow_mc._rotation = (Math.round(intialTime / 25) * 360) / 60;
clkAngle = (Math.round(intialTime / 25) * 30) / 60;
arrow2_mc._rotation = -180 + clkAngle;
_root.globalTime = Math.round(intialTime / 25);
_root.myTime = maxTime - _root.globalTime;
ETA = globltArry[count] - _root.globalTime;
}
if (globltArry[count] <= _root.globalTime) {
if (intialTime == (_root.globalTime * 25)) {
_root.trainCreate = true;
count++;
}
} else {
_root.trainCreate = false;
}
if ((globltArry[count] - 3) == _root.globalTime) {
if (prevCount != count) {
_root.arrivinTime = true;
prevCount = count;
}
} else {
_root.arrivinTime = false;
}
if (_root.globalTime >= 335) {
_root.minimap.removeMovieClip();
_root.levelScore = _root.userAmount;
_root.score = _root.score + _root.levelScore;
_root.gotoAndStop("levelComplete");
}
}
};
Symbol 544 MovieClip Frame 1
var cityMap;
map_btn.onRelease = function () {
if (_root.gameOver == false) {
if (!_root.isPause) {
_root.isPause = true;
cityMap = _parent.Hud_mc.attachMovie("fullmapmain", "fullmapmain" + this.getNextHighestDepth(), this.getNextHighestDepth());
cityMap._x = _parent.Hud_mc._x - 400;
cityMap._y = _parent.Hud_mc._y - 840;
} else {
_root.isPause = false;
cityMap.removeMovieClip();
}
}
};
map_btn.onRelease();
Symbol 549 MovieClip Frame 1
Symbol 549 MovieClip Frame 2
stop();
Symbol 552 MovieClip Frame 1
var name = "Cayene";
var bonus = true;
onEnterFrame = function () {
if (_root.isPause == false) {
var _local4 = _root.level;
var _local5 = _parent[("trainSpawn" + _local4) + "_mc"].num;
if (this.hitTest(_parent.trainName_mc)) {
if (bonus == true) {
bonus = false;
if (_parent[("trainSpawn" + _local4) + "_mc"].trainArray[_local5 - 1][2] == name) {
_root.userAmount = _root.userAmount + 500;
}
}
}
}
};
Symbol 553 MovieClip Frame 1
function CreateTrain(Tname, Aname, Dname, speedN, dir, xpos, totalLength, frameNo, trackName, money) {
var _local10 = [];
var _local5 = this.attachMovie("Engine", "Engine" + depthCount, 1000 + depthCount);
engCount = depthCount;
_local10.push(_local5._name);
depthCount++;
_root.comptLength = totalLength;
_local5.track = trackName;
_local5.maxSpeed = (speedN * _root.speed) * dir;
_local5.speed = (speedN * _root.speed) * dir;
_local5.name = Tname;
_local5.arvFrm = Aname;
_local5.dest = Dname;
_local5.trainMoney = money;
_local5.userAmount = 0;
_local5.Dirc = dir;
_local5._xscale = 91.2 * dir;
_local5._yscale = 91.2 * dir;
_local5._x = xpos;
_local5._y = _parent["track" + trackName]._y;
var _local9 = _parent.trainName_mc.attachMovie("text_Destination", "text_Destination" + depthCount, 1010 + depthCount);
_local9._x = _local5._x;
_local9._y = _local5._y - 50;
_local9.destName = Dname;
_local9.txtSpeed = (speedN * _root.speed) * dir;
_local9.maxTxtSpeed = (speedN * _root.speed) * dir;
_local5.txtDest = _local9;
var _local7 = _parent.minMap.mTrain_mc.attachMovie("minimapTrain", "minimapTrain", 1000 + depthCount);
_parent.minMap.mask_mc.setMask(_parent.minMap.mTrain_mc);
_local7.miniTappr = true;
_local7.Tspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7.Mspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7._xscale = 91.2 * dir;
_local7._yscale = 91.2 * dir;
_local7._x = (xpos * 0.081440649867374) - 5;
_local7._y = _parent.minMap["track" + trackName]._y;
_local7.minTrack = trackName;
_local5.miniT = _local7;
_local5.gotoAndStop(frameNo);
_local5.length = totalLength;
i = 1;
while (i <= totalLength) {
var _local4 = this.attachMovie("compartment", "compartment" + depthCount, 1000 + depthCount);
_local10.push(_local4._name);
if (i == totalLength) {
_local4.lastComp = true;
}
depthCount++;
_local4.minT = _local7;
_local4.engine = _local5;
_local4.txtDest = _local9;
_local4.dir = dir;
_local4.track = trackName;
_local4.gotoAndStop(frameNo);
_local4._xscale = 100 * dir;
_local4._yscale = 100 * dir;
_local4._x = _local5._x - ((_local4._width * i) * dir);
_local4._y = _local5._y;
i++;
}
_local5.index = train.length;
train.push(_local10);
var _local16 = _local5.track;
}
function arrivalTime(d) {
if (_root.clock_mc.ETA <= 5) {
logoTrk = trainArray[d][8];
if (trainArray[d][4] == -1) {
_root[("trackR" + logoTrk) + "_mc"].gotoAndPlay(2);
} else {
_root[("trackL" + logoTrk) + "_mc"].gotoAndPlay(2);
trace(logoTrk + "1");
}
}
if (_root.clock_mc.ETA >= 11) {
_root.arvinTimeNw_mc._visible = false;
}
}
var depth = 100;
var depthCount = 1;
var uMoney = 0;
var train = [];
var engCount;
var crashTrnName;
var logoTrk;
var count = 0;
var no;
var num;
var z;
var trainArray = [["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "7", "1", "-1300", "4", "2", "1", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "7", "-1", "1300", "4", "8", "2", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "6", "-1", "1300", "4", "10", "2", "1000"], ["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "8", "1", "-1300", "4", "2", "2", "1400"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "7", "-1", "1300", "4", "3", "3", "1000"], ["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "8", "1", "-1300", "4", "7", "1", "1300"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "8", "-1", "1300", "4", "8", "3", "1500"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "6", "-1", "1300", "4", "5", "2", "1000"], ["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "8", "1", "-1300", "4", "3", "1", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "6", "-1", "1300", "4", "10", "2", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "7", "-1", "1300", "4", "5", "1", "1400"], ["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "8", "1", "-1300", "4", "7", "1", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "7", "-1", "1300", "4", "3", "1", "1100"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "6", "-1", "1300", "4", "5", "2", "1000"], ["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "7", "1", "-1300", "4", "7", "2", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "7", "-1", "1300", "4", "8", "3", "1200"], ["Lancun Road-Fujin Road Exp.", "Lancun Road", "Fujin Road", "6", "1", "-1300", "4", "2", "2", "1000"], ["Fujin Road-Beijing Exp.", "Fujin Road", "Beijing", "7", "-1", "1300", "4", "5", "2", "1200"], ["Fujin Road-Lancun Road Exp.", "Fujin Road", "Lancun Road", "8", "-1", "1300", "4", "10", "1", "1400"]];
var trainSrcDest = [["Lancun Road", "Fujin Road"], ["Lancun Road", "Fujin Road"], ["Fujin Road", "Beijing"]];
onEnterFrame = function () {
if (_root.isPause == false) {
var _local5 = _parent._parent.clock_mc.count;
if (_root.arrivinTime == true) {
arrivalTime(_local5);
trace(_local5 + "num");
_root.arrivinTime = false;
}
k = 0;
while (k <= train.length) {
l = k + 1;
while (l <= train.length) {
if (this[train[k][0]].track == this[train[l][0]].track) {
if (this[train[k][0]].Dirc == this[train[l][0]].Dirc) {
if (this[train[l][0]].hitTest(this[train[k][0]])) {
trace("hit whn sm dir");
crashTrnName = this[train[l][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba1");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
if (this[train[k][0]].hitTest(this[train[l][0]])) {
trace("hit whn sm dir whn speed grtr");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba2");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
} else if (this[train[k][0]].Dirc != this[train[k + l][0]].Dirc) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace(this[train[k][0]] + " fst");
trace("hit whn dft dir");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
if (this[train[k][0]].speed <= this[train[k + l][0]].speed) {
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba dir dif");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
} else {
if (this[train[k][0]].speed >= this[train[k + l][0]].speed) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit dft dir & speed less");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
trace(crashTrnName);
_root.gameOver = true;
_root.isPause = true;
}
}
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba3");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
}
}
}
l++;
}
k++;
}
num = _parent._parent.clock_mc.count;
count = count + _root.speed;
z = 0;
while (z <= trainArray.length) {
if (z == (num - 1)) {
if (_root.trainCreate == true) {
CreateTrain(trainArray[z][0], trainArray[z][1], trainArray[z][2], trainArray[z][3], trainArray[z][4], trainArray[z][5], trainArray[z][6], trainArray[z][7], trainArray[z][8], trainArray[z][9]);
_root.trainCreate = false;
}
}
z++;
}
}
};
Symbol 554 MovieClip Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var scrollSpeed = 3;
var xspeed = 1;
var xspeed2 = 1;
var speed = 2;
var xpos = 400;
var tracks = 3;
var signalsOnTrk = 4;
var shaftsOnTrk = 4;
var count = trainSpawn2_mc.depthCount;
_root.userAmount = 0;
var minMap = _root.attachMovie("minimapmain2", "minimap", this.getNextHighestDepth());
minMap._x = 125;
minMap._y = 545;
onEnterFrame = function () {
this._x = this._x - ((this._x - xpos) / 6);
if ((_root.isPause == false) || (_root.gameOver == true)) {
if (_root.clock_mc.intialTime >= _root.clock_mc.maxTime) {
_root.minimap.removeMovieClip();
}
if (_root.isPause == false) {
if ((_root._xmouse <= 50) && (this._x <= 1010)) {
this.xpos = this.xpos + 15;
}
if ((_root._xmouse >= 750) && (this._x >= -350)) {
this.xpos = this.xpos - 15;
}
}
if (_root.gameOver == true) {
this.xpos = (-trainSpawn2_mc.crashTrnName._x) + 300;
if (_root.trnCrash == true) {
this.xpos = (-_root.TrnName._x) + 400;
}
if (this.xpos > 800) {
this.xpos = 800;
}
if (this.xpos < -250) {
this.xpos = -250;
}
}
}
};
Instance of Symbol 519 MovieClip "shaft21_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft11_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft22_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft12_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft24_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft31_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft32_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft23_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 393 MovieClip "track31_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track23_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track22_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track32_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track21_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track11_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track13_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track12_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track14_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track24_mc" in Symbol 554 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Symbol 555 MovieClip Frame 1
_root.arrivinTime = false;
var prevCount = -1;
var intialTime = 0;
var maxTime = 9000;
var clkAngle;
var count = 0;
var a = 1;
var ETA;
var globltArry = [5, 35, 60, 70, 95, 110, 130, 145, 175, 195, 200, 230, 235, 250, 255, 285, 300, 315, 320, 335];
onEnterFrame = function () {
if (_root.isPause == false) {
if (intialTime <= maxTime) {
intialTime = intialTime + _root.speed;
arrow_mc._rotation = (Math.round(intialTime / 25) * 360) / 60;
clkAngle = (Math.round(intialTime / 25) * 30) / 60;
arrow2_mc._rotation = -180 + clkAngle;
_root.globalTime = Math.round(intialTime / 25);
_root.myTime = maxTime - _root.globalTime;
ETA = globltArry[count] - _root.globalTime;
}
if (globltArry[count] <= _root.globalTime) {
if (intialTime == (_root.globalTime * 25)) {
trace(intialTime + " int");
_root.trainCreate = true;
count++;
}
} else {
_root.trainCreate = false;
}
if ((globltArry[count] - 3) == _root.globalTime) {
if (prevCount != count) {
_root.arrivinTime = true;
prevCount = count;
}
} else {
_root.arrivinTime = false;
}
if (_root.globalTime >= 335) {
_root.levelScore = _root.userAmount;
_root.score = _root.score + _root.levelScore;
_root.minimap.removeMovieClip();
_root.gotoAndStop("levelComplete");
}
}
};
Symbol 556 MovieClip Frame 1
Symbol 556 MovieClip Frame 2
stop();
Symbol 557 MovieClip Frame 1
function CreateTrain(Tname, Aname, Dname, speedN, dir, xpos, totalLength, frameNo, trackName, money) {
var _local10 = [];
var _local5 = this.attachMovie("Engine", "Engine" + depthCount, 1000 + depthCount);
engCount = depthCount;
_local10.push(_local5._name);
depthCount++;
_root.comptLength = totalLength;
_local5.track = trackName;
_local5.maxSpeed = (speedN * _root.speed) * dir;
_local5.speed = (speedN * _root.speed) * dir;
_local5.name = Tname;
_local5.arvFrm = Aname;
_local5.dest = Dname;
_local5.trainMoney = money;
_local5.userAmount = 0;
_local5.Dirc = dir;
_local5._xscale = 91.2 * dir;
_local5._yscale = 91.2 * dir;
_local5._x = xpos;
_local5._y = _parent["track" + trackName]._y;
var _local9 = _parent.trainName_mc.attachMovie("text_Destination", "text_Destination" + depthCount, 1010 + depthCount);
_local9._x = _local5._x;
_local9._y = _local5._y - 50;
_local9.destName = Dname;
_local9.txtSpeed = (speedN * _root.speed) * dir;
_local9.maxTxtSpeed = (speedN * _root.speed) * dir;
_local5.txtDest = _local9;
var _local7 = _parent.minMap.mTrain_mc.attachMovie("minimapTrain", "minimapTrain", 1000 + depthCount);
_parent.minMap.mask_mc.setMask(_parent.minMap.mTrain_mc);
_local7.miniTappr = true;
_local7.Tspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7.Mspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7._xscale = 91.2 * dir;
_local7._yscale = 91.2 * dir;
_local7._x = (xpos * 0.081440649867374) - 5;
_local7._y = _parent.minMap["track" + trackName]._y;
_local7.minTrack = trackName;
_local5.miniT = _local7;
_local5.gotoAndStop(frameNo);
_local5.length = totalLength;
i = 1;
while (i <= totalLength) {
var _local4 = this.attachMovie("compartment", "compartment" + depthCount, 1000 + depthCount);
_local10.push(_local4._name);
if (i == totalLength) {
_local4.lastComp = true;
}
depthCount++;
_local4.minT = _local7;
_local4.engine = _local5;
_local4.txtDest = _local9;
_local4.dir = dir;
_local4.track = trackName;
_local4.gotoAndStop(frameNo);
_local4._xscale = 100 * dir;
_local4._yscale = 100 * dir;
_local4._x = _local5._x - ((_local4._width * i) * dir);
_local4._y = _local5._y;
i++;
}
_local5.index = train.length;
train.push(_local10);
var _local16 = _local5.track;
}
function arrivalTime(d) {
if (_root.clock_mc.ETA <= 5) {
logoTrk = trainArray[d][8];
if (trainArray[d][4] == -1) {
_root[("trackR" + logoTrk) + "_mc"].gotoAndPlay(2);
} else {
_root[("trackL" + logoTrk) + "_mc"].gotoAndPlay(2);
}
}
if (_root.clock_mc.ETA >= 11) {
_root.arvinTimeNw_mc._visible = false;
}
}
var depth = 100;
var depthCount = 1;
var uMoney = 0;
var train = [];
var engCount;
var crashTrnName;
var logoTrk;
var count = 0;
var no;
var num;
var trainArray = [["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "7", "1", "-1300", "4", "4", "1", "1300"], ["Millennium -Pennsylvania Exp.", "Millennium ", "Pennsylvania ", "6", "1", "-1300", "4", "5", "3", "1000"], ["Pennsylvania -Millennium Exp.", "Pennsylvania ", "Millennium ", "7", "-1", "1300", "4", "7", "2", "1200"], ["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "6", "1", "-1300", "4", "10", "1", "1000"], ["Pennsylvania -Union Station Exp.", "Pennsylvania ", "Union Station ", "8", "-1", "1300", "4", "5", "3", "1400"], ["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "7", "1", "-1300", "4", "4", "1", "1200"], ["Pennsylvania -Union Station Exp.", "Pennsylvania ", "Union Station ", "7", "-1", "1300", "4", "9", "2", "1300"], ["Millennium -Pennsylvania Exp.", "Millennium ", "Pennsylvania ", "7", "1", "-1300", "5", "7", "3", "1200"], ["Pennsylvania -Millennium Exp.", "Pennsylvania ", "Millennium ", "8", "-1", "1300", "4", "10", "3", "1400"], ["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "6", "1", "-1300", "4", "5", "1", "1000"], ["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "8", "1", "-1300", "4", "7", "2", "1300"], ["Millennium -Pennsylvania Exp.", "Millennium ", "Pennsylvania ", "6", "1", "-1300", "4", "2", "3", "1100"], ["Pennsylvania -Union Station Exp.", "Pennsylvania ", "Union Station ", "7", "-1", "1300", "5", "7", "3", "1100"], ["Pennsylvania -Millennium Exp.", "Pennsylvania ", "Millennium ", "8", "-1", "1300", "4", "3", "1", "1200"], ["Pennsylvania -Millennium Exp.", "Pennsylvania ", "Millennium ", "7", "-1", "1300", "4", "4", "2", "1200"], ["Pennsylvania -Union Station Exp.", "Pennsylvania ", "Union Station ", "8", "-1", "1300", "4", "5", "3", "1500"], ["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "6", "1", "-1300", "4", "9", "2", "1100"], ["Millennium -Pennsylvania Exp.", "Millennium ", "Pennsylvania ", "7", "1", "-1300", "5", "7", "3", "1000"], ["Pennsylvania -Millennium Exp.", "Pennsylvania ", "Millennium ", "8", "-1", "1300", "4", "5", "3", "1400"], ["Pennsylvania -Union Station Exp.", "Pennsylvania ", "Union Station ", "6", "-1", "1300", "4", "7", "2", "1100"], ["Union Station -Pennsylvania Exp.", "Union Station ", "Pennsylvania ", "7", "1", "-1300", "4", "4", "2", "1300"], ["Pennsylvania -Union Station Exp.", "Pennsylvania ", "Union Station ", "8", "-1", "1300", "4", "10", "3", "1500"]];
var trainSrcDest = [["Union Station ", "Pennsylvania "], ["Union Station ", "Pennsylvania "], ["Millennium ", "Pennsylvania "]];
onEnterFrame = function () {
if (_root.isPause == false) {
var _local5 = _parent._parent.clock_mc.count;
if (_root.arrivinTime == true) {
arrivalTime(_local5);
trace(_local5 + "num");
_root.arrivinTime = false;
}
k = 0;
while (k <= train.length) {
l = k + 1;
while (l <= train.length) {
if (this[train[k][0]].track == this[train[l][0]].track) {
if (this[train[k][0]].Dirc == this[train[l][0]].Dirc) {
if (this[train[l][0]].hitTest(this[train[k][0]])) {
trace("hit whn sm dir");
crashTrnName = this[train[l][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][0]].hitTest(this[train[k + 1][n]])) {
trace("hit train any Dabba1");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
if (this[train[k][0]].hitTest(this[train[l][0]])) {
trace("hit whn sm dir whn speed grtr");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba2");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
} else if (this[train[k][0]].Dirc != this[train[k + l][0]].Dirc) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit whn dft dir");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
if (this[train[k][0]].speed <= this[train[k + l][0]].speed) {
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba dir dif");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
} else {
if (this[train[k][0]].speed >= this[train[k + l][0]].speed) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit dft dir & speed less");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
}
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba3");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
}
}
}
l++;
}
k++;
}
num = _parent._parent.clock_mc.count;
count = count + _root.speed;
z = 0;
while (z <= trainArray.length) {
if (z == (num - 1)) {
if (_root.trainCreate == true) {
CreateTrain(trainArray[z][0], trainArray[z][1], trainArray[z][2], trainArray[z][3], trainArray[z][4], trainArray[z][5], trainArray[z][6], trainArray[z][7], trainArray[z][8], trainArray[z][9]);
_root.trainCreate = false;
}
}
z++;
}
}
};
Symbol 558 MovieClip Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var scrollSpeed = 3;
var xspeed = 1;
var xspeed2 = 1;
var speed = 2;
var xpos = 400;
var tracks = 3;
var signalsOnTrk = 4;
var shaftsOnTrk = 5;
_root.userAmount = 0;
var minMap = _root.attachMovie("minimapmain3", "minimap", this.getNextHighestDepth());
minMap._x = 125;
minMap._y = 545;
onEnterFrame = function () {
this._x = this._x - ((this._x - xpos) / 6);
if ((_root.isPause == false) || (_root.gameOver == true)) {
if (_root.clock_mc.intialTime >= _root.clock_mc.maxTime) {
_root.minimap.removeMovieClip();
}
if ((_root._xmouse <= 50) && (this._x <= 1100)) {
this.xpos = this.xpos + 15;
}
if ((_root._xmouse >= 750) && (this._x >= -250)) {
this.xpos = this.xpos - 15;
}
if (_root.gameOver == true) {
this.xpos = (-trainSpawn3_mc.crashTrnName._x) + 400;
if (this.xpos > 800) {
this.xpos = 800;
}
if (this.xpos < -250) {
this.xpos = -250;
}
}
}
};
Instance of Symbol 519 MovieClip "shaft12_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft24_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft23_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft22_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft31_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft11_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft21_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft32_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft33_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft25_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 393 MovieClip "track32_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track31_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track33_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track23_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var ntStation = true;
}
Instance of Symbol 393 MovieClip "track14_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track12_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track24_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track22_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track11_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track13_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track21_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track34_mc" in Symbol 558 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Symbol 559 MovieClip Frame 1
_root.arrivinTime = false;
var prevCount = -1;
var intialTime = 0;
var maxTime = 9000;
var clkAngle;
var count = 0;
var a = 1;
var ETA;
var globltArry = [5, 20, 35, 50, 65, 90, 90, 110, 115, 140, 145, 165, 180, 200, 215, 235, 250, 270, 285, 300, 315, 330, 345];
onEnterFrame = function () {
if (_root.isPause == false) {
if (intialTime <= maxTime) {
intialTime = intialTime + _root.speed;
arrow_mc._rotation = (Math.round(intialTime / 25) * 360) / 60;
clkAngle = (Math.round(intialTime / 25) * 30) / 60;
arrow2_mc._rotation = -180 + clkAngle;
_root.globalTime = Math.round(intialTime / 25);
_root.myTime = maxTime - _root.globalTime;
ETA = globltArry[count] - _root.globalTime;
}
if (globltArry[count] <= _root.globalTime) {
if (intialTime == (_root.globalTime * 25)) {
_root.trainCreate = true;
count++;
}
} else {
_root.trainCreate = false;
}
if ((globltArry[count] - 3) == _root.globalTime) {
if (prevCount != count) {
_root.arrivinTime = true;
prevCount = count;
}
} else {
_root.arrivinTime = false;
}
if (_root.globalTime >= 345) {
_root.levelScore = _root.userAmount;
_root.score = _root.score + _root.levelScore;
_root.minimap.removeMovieClip();
_root.gotoAndStop("levelComplete");
}
}
};
Symbol 560 MovieClip Frame 1
Symbol 560 MovieClip Frame 2
stop();
Symbol 567 MovieClip Frame 1
function CreateTrain(Tname, Aname, Dname, speedN, dir, xpos, totalLength, frameNo, trackName, money) {
var _local10 = [];
var _local5 = this.attachMovie("Engine", "Engine" + depthCount, 1000 + depthCount);
engCount = depthCount;
_local5.engNo = depthCount;
_local10.push(_local5._name);
depthCount++;
_root.comptLength = totalLength;
_local5.track = trackName;
_local5.destination = Dname;
_local5.maxSpeed = (speedN * _root.speed) * dir;
_local5.speed = (speedN * _root.speed) * dir;
_local5.name = Tname;
_local5.arvFrm = Aname;
_local5.dest = Dname;
_local5.trainMoney = money;
_local5.uMoney = 0;
_local5.Dirc = dir;
_local5._xscale = 91.2 * dir;
_local5._yscale = 91.2 * dir;
_local5._x = xpos;
_local5._y = _parent["track" + trackName]._y;
_local5.miniMap = _parent.minMap;
var _local9 = _parent.trainName_mc.attachMovie("text_Destination", "text_Destination" + depthCount, 1010 + depthCount);
_local9._x = _local5._x;
_local9._y = _local5._y - 50;
_local9.destName = Dname;
_local9.txtSpeed = (speedN * _root.speed) * dir;
_local9.maxTxtSpeed = (speedN * _root.speed) * dir;
_local5.txtDest = _local9;
var _local7 = _parent.minMap.mTrain_mc.attachMovie("minimapTrain", "minimapTrain", 1000 + depthCount);
_parent.minMap.mask_mc.setMask(_parent.minMap.mTrain_mc);
_local7.miniTappr = true;
_local7.Tspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7.Mspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7._xscale = 91.2 * dir;
_local7._yscale = 91.2 * dir;
_local7._x = (xpos * 0.081440649867374) - 5;
_local7._y = _parent.minMap["track" + trackName]._y;
_local7.minTrack = trackName;
_local5.miniT = _local7;
_local5.gotoAndStop(frameNo);
_local5.length = totalLength;
i = 1;
while (i <= totalLength) {
var _local4 = this.attachMovie("compartment", "compartment" + depthCount, 1000 + depthCount);
_local10.push(_local4._name);
if (i == totalLength) {
_local4.lastComp = true;
}
depthCount++;
_local4.minT = _local7;
_local4.engine = _local5;
_local4.txtDest = _local9;
_local4.dir = dir;
_local4.track = trackName;
_local4.gotoAndStop(frameNo);
_local4._xscale = 100 * dir;
_local4._yscale = 100 * dir;
_local4._x = _local5._x - ((_local4._width * i) * dir);
_local4._y = _local5._y;
_local5.comp = _local4;
i++;
}
_local5.index = train.length;
train.push(_local10);
var _local16 = _local5.track;
}
function arrivalTime(d) {
if (_root.clock_mc.ETA <= 5) {
logoTrk = trainArray[d][8];
if (trainArray[d][4] == -1) {
_root[("trackR" + logoTrk) + "_mc"].gotoAndPlay(2);
} else {
_root[("trackL" + logoTrk) + "_mc"].gotoAndPlay(2);
}
}
if (_root.clock_mc.ETA >= 11) {
_root.arvinTimeNw_mc._visible = false;
}
}
var depth = 100;
var depthCount = 1;
var uMoney = 0;
var train = [];
var engCount;
var crashTrnName;
var position;
var logoTrk;
var count = 0;
var no;
var num;
var z;
var trainArray = [["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "7", "1", "-1300", "4", "4", "1", "1300"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "6", "-1", "1300", "4", "2", "4", "1200"], ["Marine Lines-Grant Road Exp.", "Marine Lines", "Grant Road", "8", "1", "-1300", "4", "3", "3", "1500"], ["Bombay Central-Churchgate Exp.", "Bombay Central", "Churchgate", "6", "-1", "1300", "4", "4", "2", "1100"], ["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "8", "1", "-1300", "4", "5", "2", "1500"], ["Grant Road-Churchgate Exp.", "Grant Road", "Churchgate", "7", "-1", "1200", "4", "6", "3", "1300"], ["Marine Lines-Bombay Central Exp.", "Marine Lines", "Bombay Central ", "8", "1", "-1300", "4", "7", "3", "1400"], ["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "6", "1", "-1300", "4", "8", "2", "1000"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "6", "-1", "1300", "4", "9", "4", "1200"], ["Churchgate-Grant Road Exp.", "Churchgate", "Grant Road", "7", "1", "-1300", "4", "10", "1", "1300"], ["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "7", "1", "-1300", "4", "1", "1", "1500"], ["Bombay Central-Churchgate Exp.", "Bombay Central", "Churchgate", "7", "-1", "1200", "4", "2", "1", "1300"], ["Marine Lines-Grant Road Exp.", "Marine Lines", "Grant Road", "7", "1", "-1300", "4", "3", "3", "1400"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "6", "-1", "1100", "4", "4", "3", "1100"], ["Churchgate-Grant Road Exp.", "Churchgate", "Grant Road", "6", "1", "-1300", "4", "5", "2", "1200"], ["Marine Lines-Grant Road Exp.", "Marine Lines", "Grant Road", "8", "1", "-1300", "4", "6", "4", "1600"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "8", "-1", "1100", "4", "7", "4", "1400"], ["Bombay Central-Marine Lines Exp.", "Bombay Central ", "Marine Lines", "7", "-1", "1200", "4", "8", "1", "1300"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "6", "-1", "1300", "4", "9", "3", "1100"], ["Grant Road-Churchgate Exp.", "Grant Road", "Churchgate", "7", "-1", "1200", "4", "10", "3", "1200"], ["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "8", "1", "-1300", "4", "1", "1", "1600"], ["Bombay Central-Marine Lines Exp.", "Bombay Central ", "Marine Lines", "7", "-1", "1200", "4", "2", "3", "1300"], ["Bombay Central-Marine Lines Exp.", "Bombay Central ", "Marine Lines", "7", "-1", "1200", "4", "3", "1", "1400"], ["Marine Lines-Grant Road Exp.", "Marine Lines", "Grant Road", "8", "1", "-1300", "4", "4", "4", "1500"], ["Grant Road-Churchgate Exp.", "Grant Road", "Churchgate", "7", "-1", "1200", "4", "5", "3", "1300"], ["Churchgate-Grant Road Exp.", "Churchgate", "Grant Road", "7", "1", "-1300", "4", "6", "2", "1100"], ["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "7", "1", "-1300", "4", "7", "2", "1300"], ["Marine Lines-Bombay Central Exp.", "Marine Lines", "Bombay Central ", "8", "1", "-1300", "4", "8", "3", "1600"], ["Marine Lines-Bombay Central Exp.", "Marine Lines", "Bombay Central ", "7", "1", "-1300", "4", "9", "4", "1400"], ["Churchgate-Bombay Central Exp.", "Churchgate", "Bombay Central", "6", "1", "-1300", "4", "10", "1", "1200"], ["Marine Lines-Grant Road Exp.", "Marine Lines", "Grant Road", "8", "1", "-1300", "4", "1", "3", "1500"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "7", "-1", "1300", "4", "4", "3", "1300"], ["Grant Road-Marine Lines Exp.", "Grant Road", "Marine Lines", "7", "-1", "1300", "4", "6", "4", "1200"]];
var trainSrcDest = [["Churchgate", "Bombay Central"], ["Churchgate", "Bombay Central"], ["Marine Lines", "Grant Road"], ["Marine Lines", "Grant Road"]];
onEnterFrame = function () {
if (_root.isPause == false) {
var _local5 = _parent._parent.clock_mc.count;
if (_root.arrivinTime == true) {
arrivalTime(_local5);
trace(_local5 + "num");
_root.arrivinTime = false;
}
k = 0;
while (k <= train.length) {
l = k + 1;
while (l <= train.length) {
if (this[train[k][0]].track == this[train[l][0]].track) {
if (this[train[k][0]].Dirc == this[train[l][0]].Dirc) {
if (this[train[l][0]].hitTest(this[train[k][0]])) {
trace("hit whn sm dir");
crashTrnName = this[train[l][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba1");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
if (this[train[k][0]].hitTest(this[train[l][0]])) {
trace("hit whn sm dir whn speed grtr");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba2");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
} else if (this[train[k][0]].Dirc != this[train[k + l][0]].Dirc) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit whn dft dir");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
if (this[train[k][0]].speed <= this[train[k + l][0]].speed) {
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba dir dif");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
} else {
if (this[train[k][0]].speed >= this[train[k + l][0]].speed) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit dft dir & speed less");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
}
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba3");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
}
}
}
l++;
}
k++;
}
num = _parent._parent.clock_mc.count;
count = count + _root.speed;
z = 0;
while (z <= trainArray.length) {
if (z == (num - 1)) {
if (_root.trainCreate == true) {
CreateTrain(trainArray[z][0], trainArray[z][1], trainArray[z][2], trainArray[z][3], trainArray[z][4], trainArray[z][5], trainArray[z][6], trainArray[z][7], trainArray[z][8], trainArray[z][9]);
_root.trainCreate = false;
}
}
z++;
}
}
};
Symbol 568 MovieClip Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var scrollSpeed = 3;
var xspeed = 1;
var xspeed2 = 1;
var speed = 2;
var xpos = 400;
var tracks = 4;
var signalsOnTrk = 5;
var shaftsOnTrk = 4;
_root.userAmount = 0;
var minMap = _root.attachMovie("minimapmain4", "minimap", this.getNextHighestDepth());
minMap._x = 125;
minMap._y = 545;
onEnterFrame = function () {
this._x = this._x - ((this._x - xpos) / 6);
if ((_root.isPause == false) || (_root.gameOver == true)) {
if (_root.clock_mc.intialTime >= _root.clock_mc.maxTime) {
_root.minimap.removeMovieClip();
}
if ((_root._xmouse <= 50) && (this._x <= 1070)) {
this.xpos = this.xpos + 15;
}
if ((_root._xmouse >= 750) && (this._x >= -350)) {
this.xpos = this.xpos - 15;
}
if (_root.gameOver == true) {
this.xpos = (-trainSpawn4_mc.crashTrnName._x) + 400;
if (this.xpos > 850) {
this.xpos = 900;
}
if (this.xpos < -350) {
this.xpos = -350;
}
}
}
};
Instance of Symbol 519 MovieClip "shaft22_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft32_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft31_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft41_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft11_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft21_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft23_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft33_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft34_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft42_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft12_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft24_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 393 MovieClip "track31_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track33_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track43_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track42_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var name = 3;
}
Instance of Symbol 393 MovieClip "track12_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track23_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track21_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track11_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track13_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track14_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track22_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track24_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track25_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track35_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track44_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track41_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track34_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track32_mc" in Symbol 568 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Symbol 569 MovieClip Frame 1
_root.arrivinTime = false;
var prevCount = -1;
var intialTime = 0;
var maxTime = 9000;
var clkAngle;
var count = 0;
var a = 1;
var ETA;
var globltArry = [5, 10, 20, 25, 40, 60, 75, 90, 95, 105, 125, 130, 135, 140, 150, 165, 170, 180, 190, 200, 220, 230, 245, 245, 255, 270, 290, 295, 300, 315, 330, 335, 335, 350];
onEnterFrame = function () {
if (_root.isPause == false) {
if (intialTime <= maxTime) {
intialTime = intialTime + _root.speed;
arrow_mc._rotation = (Math.round(intialTime / 25) * 360) / 60;
clkAngle = (Math.round(intialTime / 25) * 30) / 60;
arrow2_mc._rotation = -180 + clkAngle;
_root.globalTime = Math.round(intialTime / 25);
_root.myTime = maxTime - _root.globalTime;
ETA = globltArry[count] - _root.globalTime;
}
if (globltArry[count] <= _root.globalTime) {
if (intialTime == (_root.globalTime * 25)) {
_root.trainCreate = true;
count++;
}
} else {
_root.trainCreate = false;
}
if ((globltArry[count] - 3) == _root.globalTime) {
if (prevCount != count) {
_root.arrivinTime = true;
prevCount = count;
}
} else {
_root.arrivinTime = false;
}
if (_root.globalTime >= 350) {
_root.levelScore = _root.userAmount;
_root.score = _root.score + _root.levelScore;
_root.minimap.removeMovieClip();
_root.gotoAndStop("levelComplete");
}
}
};
Symbol 570 MovieClip Frame 1
Symbol 570 MovieClip Frame 2
stop();
Symbol 582 MovieClip Frame 1
function CreateTrain(Tname, Aname, Dname, speedN, dir, xpos, totalLength, frameNo, trackName, money) {
var _local10 = [];
var _local5 = this.attachMovie("Engine", "Engine" + depthCount, 1000 + depthCount);
engCount = depthCount;
_local10.push(_local5._name);
depthCount++;
_root.comptLength = totalLength;
_local5.track = trackName;
_local5.maxSpeed = (speedN * _root.speed) * dir;
_local5.speed = (speedN * _root.speed) * dir;
_local5.name = Tname;
_local5.arvFrm = Aname;
_local5.dest = Dname;
_local5.trainMoney = money;
_local5.userAmount = 0;
_local5.Dirc = dir;
_local5._xscale = 91.2 * dir;
_local5._yscale = 91.2 * dir;
_local5._x = xpos;
_local5._y = _parent["track" + trackName]._y;
var _local9 = _parent.trainName_mc.attachMovie("text_Destination", "text_Destination" + depthCount, 1010 + depthCount);
_local9._x = _local5._x;
_local9._y = _local5._y - 50;
_local9.destName_Last = Dname;
_local9.txtSpeed = (speedN * _root.speed) * dir;
_local9.maxTxtSpeed = (speedN * _root.speed) * dir;
_local5.txtDest = _local9;
var _local7 = _parent.minMap.mTrain_mc.attachMovie("minimapTrain", "minimapTrain", 1000 + depthCount);
_parent.minMap.mask_mc.setMask(_parent.minMap.mTrain_mc);
_local7.miniTappr = true;
_local7.Tspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7.Mspeed = ((speedN * _root.speed) * dir) * 0.081440649867374;
_local7._xscale = 91.2 * dir;
_local7._yscale = 91.2 * dir;
_local7._x = (xpos * 0.081440649867374) - 5;
_local7._y = _parent.minMap["track" + trackName]._y;
_local7.minTrack = trackName;
_local5.miniT = _local7;
_local5.gotoAndStop(frameNo);
_local5.length = totalLength;
i = 1;
while (i <= totalLength) {
var _local4 = this.attachMovie("compartment", "compartment" + depthCount, 1000 + depthCount);
_local10.push(_local4._name);
if (i == totalLength) {
_local4.lastComp = true;
}
depthCount++;
_local4.minT = _local7;
_local4.engine = _local5;
_local4.txtDest = _local9;
_local4.dir = dir;
_local4.track = trackName;
_local4.gotoAndStop(frameNo);
_local4._xscale = 100 * dir;
_local4._yscale = 100 * dir;
_local4._x = _local5._x - ((_local4._width * i) * dir);
_local4._y = _local5._y;
i++;
}
_local5.index = train.length;
train.push(_local10);
var _local16 = _local5.track;
}
function arrivalTime(d) {
if (_root.clock_mc.ETA <= 5) {
logoTrk = trainArray[d][8];
if (trainArray[d][4] == -1) {
_root[("trackR" + logoTrk) + "_mc"].gotoAndPlay(2);
} else {
_root[("trackL" + logoTrk) + "_mc"].gotoAndPlay(2);
}
}
if (_root.clock_mc.ETA >= 11) {
_root.arvinTimeNw_mc._visible = false;
}
}
var depth = 100;
var depthCount = 1;
var uMoney = 0;
var train = [];
var engCount;
var crashTrnName;
var logoTrk;
var count = 0;
var no;
var num;
var trainArray = [["Estacion Once-San Pedro Exp.", "Estacion Once", "San Pedro", "7", "1", "-1300", "4", "4", "2", "1400"], ["Vila Madalena-San Pedro Exp.", "Vila Madalena", "San Pedro", "8", "1", "-1300", "4", "7", "5", "1400"], ["Estacion Once-Las Adjuntas Exp.", "Estacion Once", "Las Adjuntas ", "8", "1", "-1300", "4", "1", "1", "1500"], ["Estacion Retiro-San Pedro Exp.", "Estacion Retiro", "San Pedro", "7", "1", "-1300", "5", "6", "3", "1300"], ["San Pedro-Vila Madalena Exp.", "San Pedro\t", "Vila Madalena", "8", "-1", "1300", "4", "10", "4", "1300"], ["Estacion Once-San Pedro Exp.", "Estacion Once", "San Pedro", "7", "1", "-1300", "4", "8", "1", "1300"], ["Estacion Once-San Pedro Exp.", "Estacion Once", "San Pedro", "8", "1", "-1300", "4", "9", "2", "1400"], ["Estacion Retiro-Eldorado Exp.", "Estacion Retiro", "Eldorado", "7", "1", "-1300", "4", "4", "4", "1200"], ["San Pedro-Estacion Retiro Exp.", "San Pedro", "Estacion Retiro", "8", "-1", "1300", "4", "7", "4", "1500"], ["Las Adjuntas -Estacion Once Exp.", "Las Adjuntas ", "Estacion Once", "7", "-1", "1300", "4", "1", "2", "1300"], ["Estacion Once-Donapaula Exp.", "Estacion Once\t", "Donapaula", "7", "1", "-1300", "4", "6", "2", "1200"], ["Estacion Once-Las Adjuntas Exp.", "Estacion Once", "Las Adjuntas ", "7", "1", "-1300", "4", "10", "1", "1600"], ["Eldorado-Estacion Retiro Exp.", "Eldorado", "Estacion Retiro", "8", "-1", "1300", "4", "3", "4", "1400"], ["San Pedro-Estacion Once Exp.", "San Pedro", "Estacion Once", "7", "-1", "1300", "4", "2", "3", "1200"], ["Las Adjuntas -Estacion Once Exp.", "Las Adjuntas ", "Estacion Once", "8", "-1", "1300", "4", "8", "2", "1400"], ["Vila Madalena-San Pedro Exp.", "Vila Madalena", "San Pedro", "6", "1", "-1300", "4", "9", "4", "1100"], ["Estacion Retiro-Las Adjuntas Exp.", "Estacion Retiro", "Las Adjuntas ", "7", "1", "-1300", "4", "7", "3", "1300"], ["Eldorado-Estacion Retiro Exp.", "Eldorado", "Estacion Retiro", "8", "-1", "1300", "4", "6", "5", "1300"], ["Las Adjuntas -Estacion Once Exp.", "Las Adjuntas ", "Estacion Once", "7", "-1", "1300", "4", "1", "1", "1300"], ["Estacion Once-Las Adjuntas Exp.", "Estacion Once", "Las Adjuntas ", "7", "1", "-1300", "4", "5", "1", "1200"], ["Estacion Retiro-San Pedro Exp.", "Estacion Retiro", "San Pedro", "8", "1", "-1300", "4", "4", "4", "1300"], ["Estacion Retiro-Eldorado Exp.", "Estacion Retiro", "Eldorado", "6", "1", "-1300", "5", "9", "4", "1100"], ["Las Adjuntas -Estacion Retiro Exp.", "Las Adjuntas ", "Estacion Retiro", "7", "-1", "1300", "5", "10", "2", "1400"], ["Estacion Retiro-Las Adjuntas Exp.", "Estacion Retiro", "Las Adjuntas ", "8", "1", "-1300", "4", "3", "3", "1500"], ["Eldorado-Vila Madalena Exp.", "Eldorado", "Vila Madalena", "7", "-1", "1300", "4", "1", "5", "1400"], ["Vila Madalena-Eldorado Exp.", "Vila Madalena", "Eldorado", "8", "1", "-1300", "4", "6", "5", "1300"], ["San Pedro-Estacion Once Exp.", "San Pedro", "Estacion Once", "7", "-1", "1300", "4", "7", "3", "1300"], ["San Pedro-Estacion Once Exp.", "San Pedro", "Estacion Once", "7", "-1", "1300", "4", "8", "4", "1400"], ["Las Adjuntas -Estacion Once Exp.", "Las Adjuntas ", "Estacion Once", "7", "-1", "1300", "5", "9", "1", "1200"], ["Estacion Retiro-San Pedro Exp.", "Estacion Retiro", "San Pedro", "8", "1", "-1300", "4", "1", "4", "1700"], ["San Pedro-Estacion Once Exp.", "San Pedro", "Estacion Once", "8", "-1", "1300", "4", "2", "4", "1300"], ["Eldorado-Estacion Retiro Exp.", "Eldorado", "Estacion Retiro", "8", "-1", "1300", "4", "4", "5", "1400"], ["Estacion Once-Las Adjuntas Exp.", "Estacion Once", "Las Adjuntas ", "8", "1", "-1300", "4", "5", "1", "1300"], ["Estacion Once-San Pedro Exp.", "Estacion Once", "San Pedro", "7", "1", "-1300", "5", "7", "2", "1300"], ["San Pedro-Estacion Once Exp.", "San Pedro", "Estacion Once", "7", "-1", "1300", "4", "8", "3", "1200"], ["Eldorado-Vila Madalena Exp.", "Eldorado", "Vila Madalena", "7", "-1", "1300", "4", "3", "5", "1400"], ["San Pedro-Estacion Retiro Exp.", "San Pedro", "Estacion Retiro", "8", "-1", "1300", "4", "6", "3", "1000"]];
var trainSrcDest = [["Estacion Once", "Las Adjuntas "], ["Estacion Once", "Las Adjuntas "], ["Estacion Retiro", "San Pedro"], ["Estacion Retiro", "San Pedro"], ["Vila Madalena", "Eldorado"]];
onEnterFrame = function () {
if (_root.isPause == false) {
var _local5 = _parent._parent.clock_mc.count;
if (_root.arrivinTime == true) {
arrivalTime(_local5);
trace(_local5 + "num");
_root.arrivinTime = false;
}
k = 0;
while (k <= train.length) {
l = k + 1;
while (l <= train.length) {
if (this[train[k][0]].track == this[train[l][0]].track) {
if (this[train[k][0]].Dirc == this[train[l][0]].Dirc) {
if (this[train[l][0]].hitTest(this[train[k][0]])) {
trace("hit whn sm dir");
crashTrnName = this[train[l][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba1");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
if (this[train[k][0]].hitTest(this[train[l][0]])) {
trace("hit whn sm dir whn speed grtr");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
m = k;
while (m <= train.length) {
n = train[k].length - 1;
while (n >= 2) {
if (this[train[m][n]].hitTest(this[train[k + 1][0]])) {
trace("hit train any Dabba2");
crashTrnName = this[train[m][n]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n--;
}
m++;
}
} else if (this[train[k][0]].Dirc != this[train[k + l][0]].Dirc) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit whn dft dir");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
if (this[train[k][0]].speed <= this[train[k + l][0]].speed) {
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba dir dif");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
} else {
if (this[train[k][0]].speed >= this[train[k + l][0]].speed) {
if (this[train[k][0]].hitTest(this[train[k + l][0]])) {
trace("hit dft dir & speed less");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
}
m = k;
while (m <= train.length) {
n = 2;
while (n <= (train[k].length - 1)) {
if (this[train[k][0]].hitTest(this[train[m][n]])) {
trace("hit train any Dabba3");
crashTrnName = this[train[k][0]];
var _local4 = _parent.attachMovie("Crash_Smoke", "Crash_Smoke", 2000);
_local4._xscale = (_local4._yscale = 50);
_local4._x = crashTrnName._x + (crashTrnName._width / 2);
_local4._y = crashTrnName._y;
_root.gameOver = true;
_root.isPause = true;
}
n++;
}
m++;
}
}
}
}
l++;
}
k++;
}
num = _parent._parent.clock_mc.count;
count = count + _root.speed;
z = 0;
while (z <= trainArray.length) {
if (z == (num - 1)) {
if (_root.trainCreate == true) {
CreateTrain(trainArray[z][0], trainArray[z][1], trainArray[z][2], trainArray[z][3], trainArray[z][4], trainArray[z][5], trainArray[z][6], trainArray[z][7], trainArray[z][8], trainArray[z][9]);
_root.trainCreate = false;
}
}
z++;
}
}
};
Symbol 588 MovieClip Frame 1
function randomRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var scrollSpeed = 3;
var xspeed = 1;
var xspeed2 = 1;
var speed = 2;
var xpos = 400;
var tracks = 5;
var signalsOnTrk = 4;
var shaftsOnTrk = 7;
_root.userAmount = 0;
var minMap = _root.attachMovie("minimapmain5", "minimap", this.getNextHighestDepth());
minMap._x = 125;
minMap._y = 545;
onEnterFrame = function () {
this._x = this._x - ((this._x - xpos) / 6);
if ((_root.isPause == false) || (_root.gameOver == true)) {
if (_root.clock_mc.intialTime >= _root.clock_mc.maxTime) {
_root.minimap.removeMovieClip();
}
if ((_root._xmouse <= 50) && (this._x <= 1100)) {
this.xpos = this.xpos + 15;
}
if ((_root._xmouse >= 750) && (this._x >= -300)) {
this.xpos = this.xpos - 15;
}
if (_root.gameOver == true) {
this.xpos = (-trainSpawn5_mc.crashTrnName._x) + 300;
if (this.xpos > 950) {
this.xpos = 900;
}
if (this.xpos < -350) {
this.xpos = -350;
}
}
}
};
Instance of Symbol 519 MovieClip "shaft11_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft21_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft31_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft41_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft12_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft27_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft34_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft45_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft44_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft53_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft42_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft51_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft22_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft32_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft43_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft52_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft23_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft33_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft24_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft35_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft25_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = -1;
var myClip = "shaft12_mc";
}
Instance of Symbol 519 MovieClip "shaft35_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = -1;
}
Instance of Symbol 519 MovieClip "shaft26_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
trackTurn = 1;
}
Instance of Symbol 519 MovieClip "shaft13_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var trackTurn = 1;
}
Instance of Symbol 393 MovieClip "track12_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track22_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track41_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track11_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track21_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track51_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track31_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track32_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track42_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track52_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track33_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track13_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track23_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track24_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track14_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Instance of Symbol 393 MovieClip "track34_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track43_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
var isStation = true;
}
Instance of Symbol 393 MovieClip "track44_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = 1;
}
Instance of Symbol 393 MovieClip "track53_mc" in Symbol 588 MovieClip Frame 1
onClipEvent (load) {
var dir = -1;
}
Symbol 589 MovieClip Frame 1
width = 800;
height = 600;
total = 200;
var i = 0;
while (i != total) {
var snow = this.attachMovie("snowflake", "snowflake" + i, this.getNextHighestDepth());
snow._x = (Math.random() * (width + 20)) - 10;
snow._y = (Math.random() * (height + 20)) - 10;
snow.yspeed = (Math.random() * 1.75) + 0.25;
snow.speed = (Math.random() * 3) + 2;
snow._xscale = (snow._yscale = (snow.speed + snow.yspeed) * 10);
snow.onEnterFrame = function () {
var _local2 = 120;
this._y = this._y + ((Math.sin(_local2) * this.speed) + this.yspeed);
this._x = this._x + (Math.cos(_local2) * this.speed);
if (this._x > (width + 10)) {
this._x = -10;
} else if (this._x < -10) {
this._x = width + 10;
}
if (this._y > (height + 10)) {
this._y = -10;
} else if (this._y < -10) {
this._y = height + 10;
}
};
i++;
}
Symbol 590 MovieClip Frame 1
_root.arrivinTime = false;
var prevCount = -1;
var intialTime = 0;
var maxTime = 9000;
var clkAngle;
var count = 0;
var a = 1;
var ETA;
var globltArry = [5, 15, 20, 30, 40, 55, 55, 65, 75, 90, 95, 100, 105, 120, 130, 140, 150, 175, 180, 185, 200, 205, 225, 230, 240, 245, 260, 260, 275, 280, 295, 295, 310, 325, 325, 335, 345, 360];
onEnterFrame = function () {
if (_root.isPause == false) {
if (intialTime <= maxTime) {
intialTime = intialTime + _root.speed;
arrow_mc._rotation = (Math.round(intialTime / 25) * 360) / 60;
clkAngle = (Math.round(intialTime / 25) * 30) / 60;
arrow2_mc._rotation = -180 + clkAngle;
_root.globalTime = Math.round(intialTime / 25);
_root.myTime = maxTime - _root.globalTime;
ETA = globltArry[count] - _root.globalTime;
}
if (globltArry[count] <= _root.globalTime) {
if (intialTime == (_root.globalTime * 25)) {
_root.trainCreate = true;
count++;
}
} else {
_root.trainCreate = false;
}
if ((globltArry[count] - 3) == _root.globalTime) {
if (prevCount != count) {
_root.arrivinTime = true;
prevCount = count;
}
} else {
_root.arrivinTime = false;
}
if (_root.globalTime >= 360) {
_root.levelScore = _root.userAmount;
_root.score = _root.score + _root.levelScore;
_root.minimap.removeMovieClip();
_root.gotoAndStop("levelComplete");
}
}
};
Symbol 600 MovieClip Frame 34
stop();
Symbol 601 MovieClip Frame 1
Symbol 601 MovieClip Frame 2
stop();
Symbol 605 MovieClip Frame 1
_root.score = _root.score + _root.userAmount;
Symbol 605 MovieClip Frame 34
stop();
Symbol 621 MovieClip Frame 30
stop();
playAgain_btn.onRelease = function () {
_root.score = 0;
_root.playIntro = true;
_root.playIntroSound = true;
_root.level = 1;
_root.gotoAndStop("lblgameintro");
};
Symbol 636 MovieClip Frame 29
stop();
next_btn.onRelease = function () {
_root.gotoAndStop(_root.levelArray[int(_root.level)]);
};