Frame 1
function scoreEntry() {
this.name = "";
this.score = 0;
}
function processScores(my_xml) {
var _local2 = my_xml;
var _local3 = _global;
var _local1 = 0;
while (_local1 < _local2.firstChild.childNodes.length) {
if (_local2.firstChild.childNodes[_local1].childNodes[0].firstChild.nodeValue == "overall") {
_local3.overAllScores[overInd] = new scoreEntry();
_local3.overAllScores[overInd].name = _local2.firstChild.childNodes[_local1].childNodes[1].firstChild.nodeValue;
_local3.overAllScores[overInd].score = _local2.firstChild.childNodes[_local1].childNodes[2].firstChild.nodeValue;
overInd++;
} else if (_local2.firstChild.childNodes[_local1].childNodes[0].firstChild.nodeValue == "checkpoint") {
_local3.checkPointScores[checkInd] = new scoreEntry();
_local3.checkPointScores[checkInd].name = _local2.firstChild.childNodes[_local1].childNodes[1].firstChild.nodeValue;
_local3.checkPointScores[checkInd].score = _local2.firstChild.childNodes[_local1].childNodes[2].firstChild.nodeValue;
checkInd++;
}
_local1++;
}
}
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
defineOverAllScores = function () {
var _local1 = _global;
_local1.overAllScores = new Array();
_local1.overAllScores[0] = new scoreEntry();
_local1.overAllScores[0].name = "Martyn G";
_local1.overAllScores[0].score = 45200;
_local1.overAllScores[1] = new scoreEntry();
_local1.overAllScores[1].name = "Joanna P";
_local1.overAllScores[1].score = 50800;
_local1.overAllScores[2] = new scoreEntry();
_local1.overAllScores[2].name = "Tess H";
_local1.overAllScores[2].score = 92000 /* 0x016760 */;
_local1.overAllScores[3] = new scoreEntry();
_local1.overAllScores[3].name = "Sean H";
_local1.overAllScores[3].score = 100040 /* 0x0186C8 */;
_local1.overAllScores[4] = new scoreEntry();
_local1.overAllScores[4].name = "Pete Kennedy";
_local1.overAllScores[4].score = 120000 /* 0x01D4C0 */;
};
defineCheckPointScores = function () {
var _local1 = _global;
_local1.checkPointScores = new Array();
_local1.checkPointScores[0] = new scoreEntry();
_local1.checkPointScores[0].name = "Nick W";
_local1.checkPointScores[0].score = 8900;
_local1.checkPointScores[1] = new scoreEntry();
_local1.checkPointScores[1].name = "Nisha P";
_local1.checkPointScores[1].score = 9080;
_local1.checkPointScores[2] = new scoreEntry();
_local1.checkPointScores[2].name = "Paul L";
_local1.checkPointScores[2].score = 10200;
_local1.checkPointScores[3] = new scoreEntry();
_local1.checkPointScores[3].name = "Chris P";
_local1.checkPointScores[3].score = 11100;
_local1.checkPointScores[4] = new scoreEntry();
_local1.checkPointScores[4].name = "Fiona S";
_local1.checkPointScores[4].score = 12200;
};
_global.overAllScores = new Array(5);
_global.checkPointScores = new Array(5);
new XML();
function (success) {
if (success) {
processScores(scoresXML);
} else {
defineCheckPointScores();
defineOverAllScores();
}
};
overInd = 0;
checkInd = 0;
loadMe = function () {
var _local1 = _root;
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
if (totalBytes < 2) {
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
} else {
percentDone = Math.round((loadedBytes / totalBytes) * 100);
_local1.preloader.gotoAndStop(percentDone);
if (_local1._framesloaded >= _local1._totalframes) {
clearInterval(_local1.loadInterval);
gotoAndPlay (3);
} else {
_local1.preloader.gotoAndStop(percentDone);
}
}
};
_root.loadInterval = setInterval(loadMe, 40);
stop();
_global.ipb_get_gname = function () {
var _loc4 = _root._url;
var _loc5 = "";
var _loc2 = "";
var _loc6 = (_loc4.lastIndexOf("\\") + 1);
if ((_loc6 == -1) || (_loc6 == 0)) {
_loc6 = _loc4.lastIndexOf("/") + 1;
}
var _loc3 = _loc6;
var _loc7 = String(_loc4).length;
while (_loc3 < String(_loc4).length) {
_loc2 = _loc4.charAt(_loc3);
if (_loc2 == ".") {
break;
}
_loc5 = _loc5 + _loc2;
_loc3++;
}
return(_loc5);
};
ipb_gname = _global.ipb_get_gname();
xx = new LoadVars();
xx.onLoad = function (success) {
if (success) {
_global.ipb_scoreVar = this.scoreVar;
}
};
fname = ((("arcade/gamedata/" + ipb_gname) + "/") + ipb_gname) + ".txt";
xx.load(fname);
Frame 3
clearInterval(_root.loadInterval);
_quality = "HIGH";
if (_global.highScoreEntered) {
_root.menus.gotoAndPlay("hs");
}
stop();
Frame 4
stop();
Frame 5
_root.game.ramp.play();
_root.gameOver = false;
_global.highScoreEntered = false;
stop();
Frame 6
_quality = "HIGH";
stop();
Symbol 215 MovieClip Frame 1
if (yy.savescore == 1) {
if (ipb_score == undefined) {
ipb_score = eval (_global.ipb_scoreVar);
}
xx = new LoadVars();
xx.arcadegid = _root.ibpro_gameid;
xx.gscore = ipb_score;
xx.gname = _global.ipb_get_gname();
xx.enscore = (ipb_score * yy.randchar) ^ yy.randchar2;
xx.send("index.php?autocom=arcade&do=savescore", "_self", "POST");
stop();
}
_global.ipbSend = function (ipb_score) {
_root._visible = false;
_root.enabled = false;
xx = new LoadVars();
yy = new LoadVars();
xx.sendAndLoad("index.php?autocom=arcade&do=verifyscore", yy, "POST");
};
Symbol 15 Button
on (release) {
_root.menus.gotoAndPlay("hiscores");
}
Symbol 18 Button
on (release) {
_root.menus.gotoAndPlay("help1");
}
Symbol 21 Button
on (release) {
_root.play();
}
Symbol 32 Button
on (release) {
nextFrame();
}
Symbol 34 Button
on (release) {
gotoAndPlay ("helpout");
}
Symbol 47 MovieClip Frame 240
stop();
Symbol 79 Button
on (release) {
gotoAndPlay ("scoresout");
}
Symbol 80 MovieClip Frame 1
populateHighScores = function () {
var _local1 = _global;
var _local2 = _root;
_local2.menus.scoreBoard.BestScore.score1.text = timeToText(_local1.overAllScores[0].score);
_local2.menus.scoreBoard.BestScore.name1.text = _local1.overAllScores[0].name;
_local2.menus.scoreBoard.Scores.score2.text = timeToText(_local1.overAllScores[1].score);
_local2.menus.scoreBoard.Scores.name2.text = _local1.overAllScores[1].name;
_local2.menus.scoreBoard.Scores.score3.text = timeToText(_local1.overAllScores[2].score);
_local2.menus.scoreBoard.Scores.name3.text = _local1.overAllScores[2].name;
_local2.menus.scoreBoard.Scores.score4.text = timeToText(_local1.overAllScores[3].score);
_local2.menus.scoreBoard.Scores.name4.text = _local1.overAllScores[3].name;
_local2.menus.scoreBoard.Scores.score5.text = timeToText(_local1.overAllScores[4].score);
_local2.menus.scoreBoard.Scores.name5.text = _local1.overAllScores[4].name;
};
populateCHighScores = function () {
var _local1 = _global;
var _local2 = _root;
_local2.menus.scoreBoard.cBestScore.score1.text = timeToText(_local1.checkPointScores[0].score);
_local2.menus.scoreBoard.cBestScore.name1.text = _local1.checkPointScores[0].name;
_local2.menus.scoreBoard.cScores.score2.text = timeToText(_local1.checkPointScores[1].score);
_local2.menus.scoreBoard.cScores.name2.text = _local1.checkPointScores[1].name;
_local2.menus.scoreBoard.cScores.score3.text = timeToText(_local1.checkPointScores[2].score);
_local2.menus.scoreBoard.cScores.name3.text = _local1.checkPointScores[2].name;
_local2.menus.scoreBoard.cScores.score4.text = timeToText(_local1.checkPointScores[3].score);
_local2.menus.scoreBoard.cScores.name4.text = _local1.checkPointScores[3].name;
_local2.menus.scoreBoard.cScores.score5.text = timeToText(_local1.checkPointScores[4].score);
_local2.menus.scoreBoard.cScores.name5.text = _local1.checkPointScores[4].name;
};
timeToText = function (time) {
var _local1 = int(time / 1000);
var _local3 = _local1 % 60;
var minutes = int(_local1 / 60);
if (Number(_local3) < 10) {
_local3 = "0" add _local3;
}
_local1 = _local1 * 1000;
time = time - _local1;
var _local2 = int(time / 10);
if (_local2 < 10) {
_local2 = "0" add _local2;
}
var t = ((((minutes add "m.") add _local3) add "s.") add _local2);
return(t);
};
_root.checkCheckPointScores = function () {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.raceCheckPointScores.length) {
thisScore = _local2.raceCheckPointScores[_local3];
var _local1 = 0;
while (_local1 < _global.checkPointScores.length) {
t = _global.checkPointScores[_local1].score;
if (t > thisScore) {
return(_local2.insertCPScore(_local1, _local2.raceCheckPointScores[_local3], _local2.inputName.text));
}
_local1++;
}
_local3++;
}
return(undefined);
};
_root.testCheckPointScores = function () {
var _local3 = _global;
var testResult = 0;
if (_root.raceCheckPointScores.length <= 0) {
trace("_root.raceCheckPointScores.length " add _root.raceCheckPointScores.length);
return(false);
}
var _local2 = 0;
while (_local2 < _root.raceCheckPointScores.length) {
trace("this score = " add _root.raceCheckPointScores[_local2]);
thisScore = _root.raceCheckPointScores[_local2];
var _local1 = 0;
while (_local1 < _local3.checkPointScores.length) {
t = _local3.checkPointScores[_local1].score;
trace(t);
if (t > thisScore) {
testResult++;
}
_local1++;
}
_local2++;
}
if (testResult > 0) {
return(true);
}
return(false);
};
_root.insertCPScore = function (index, score, name) {
var _local1 = _global;
var _local2 = index;
var _local3 = score;
i = _local1.checkPointScores.length - 1;
while (i >= 0) {
if (i > _local2) {
_local1.checkPointScores[i].name = _local1.checkPointScores[i - 1].name;
_local1.checkPointScores[i].score = _local1.checkPointScores[i - 1].score;
} else if (i == _local2) {
_local1.checkPointScores[i].name = name;
_local1.checkPointScores[i].score = _local3;
}
i--;
}
return(_local3);
};
_root.checkScores = function (time) {
var _local2 = _global;
var _local3 = time;
var _local1 = 0;
while (_local1 < _local2.overAllScores.length) {
t = _local2.overAllScores[_local1].score;
if (t > _local3) {
return(_local1);
}
_local1++;
}
return(-1);
};
_root.insertScore = function (index, score, name) {
var _local1 = _global;
var _local2 = index;
var _local3 = name;
i = _local1.overAllScores.length - 1;
while (i >= 0) {
if (i > _local2) {
_local1.overAllScores[i].name = _local1.overAllScores[i - 1].name;
_local1.overAllScores[i].score = _local1.overAllScores[i - 1].score;
} else if (i == _local2) {
_local1.overAllScores[i].name = _local3;
_local1.overAllScores[i].score = score;
}
i--;
}
};
Symbol 80 MovieClip Frame 36
_root.scoreBoard._visible = false;
stop();
Symbol 80 MovieClip Frame 50
_root.scoreBoard._visible = false;
stop();
Symbol 80 MovieClip Frame 53
_root.scoreBoard._visible = false;
play();
Symbol 80 MovieClip Frame 62
_root.scoreBoard._visible = false;
gotoAndPlay ("menuIntro");
Symbol 80 MovieClip Frame 78
_root.scoreBoard._visible = true;
populateHighScores();
populateCHighScores();
stop();
Symbol 80 MovieClip Frame 89
gotoAndPlay ("menuIntro");
Symbol 91 MovieClip Frame 1
this._visible = false;
Symbol 94 MovieClip Frame 1
this._visible = false;
Symbol 95 MovieClip Frame 1
this._visible = false;
Symbol 98 MovieClip Frame 1
this._visible = false;
Symbol 101 MovieClip Frame 1
this._visible = false;
Symbol 104 MovieClip Frame 1
this._visible = false;
Symbol 107 MovieClip Frame 1
this._visible = false;
Symbol 110 MovieClip Frame 1
this._visible = false;
Symbol 113 MovieClip Frame 1
this._visible = false;
Symbol 116 MovieClip Frame 1
this._visible = false;
Symbol 118 MovieClip Frame 1
this._visible = false;
Symbol 121 MovieClip Frame 1
this._visible = false;
Symbol 152 MovieClip Frame 82
_root.play();
stop();
Symbol 152 MovieClip Frame 112
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 1
stop();
Symbol 172 MovieClip Frame 1
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 10
var thisStartTime = getTimer();
Symbol 178 MovieClip Frame 20
var thisFinishTime = getTimer();
trace(thisFinishTime - thisStartTime);
var testResult = (thisFinishTime - thisStartTime);
_root.timetest.text = testResult;
Symbol 178 MovieClip Frame 25
_root.rampOut = true;
Set("/:energy", 70);
_root.game.cyclist._alpha = 100;
stop();
Symbol 181 MovieClip Frame 1
this._visible = false;
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 60
Symbol 189 MovieClip Frame 140
Symbol 189 MovieClip Frame 180
gotoAndPlay ("freewheel");
Symbol 189 MovieClip Frame 181
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 80
stop();
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 60
Symbol 193 MovieClip Frame 1
this._visible = false;
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 65
var testCheckPoints = _root.testCheckPointScores();
trace("testCheckPoints " add testCheckPoints);
if (testCheckPoints == true) {
trace("testCheckPoints " add testCheckPoints);
_root.play();
this.gotoAndStop(1);
}
Symbol 195 MovieClip Frame 67
_global.fade(_root.game.fade, "intro", 12);
this.gotoAndPlay(66);
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 65
_root.play();
Symbol 231 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 10
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 2500
stop();
Symbol 236 MovieClip Frame 13
gotoAndPlay (1);
Symbol 239 MovieClip Frame 10
stop();
Symbol 242 MovieClip Frame 1
_root.game.cyclistStopped._visible = false;
_root.game.cyclistWinning._visible = false;
_root.game.hurry._visible = false;
_root.game.checkpointIcon._visible = false;
Instance of Symbol 231 MovieClip "qControll" in Symbol 242 MovieClip Frame 1
on (release) {
switch (_quality) {
case "HIGH" :
_quality = "MEDIUM";
_root.game.qControll.gotoAndStop("off");
break;
case "MEDIUM" :
_quality = "HIGH";
_root.game.qControll.gotoAndStop("on");
}
}
Symbol 246 MovieClip Frame 1
_root.seconds = 0;
_root.CPcountDown = 15;
_root.game.clock.timeRemaining.text = _root.CPcountDown;
_root.checkPointTime = 10;
time_offset = getTimer();
timeOld = getTimer();
minutes = 0;
secs = 0;
tenths = 0;
time_temp = 0;
Set("/:framecount", 0);
i = 1;
Symbol 246 MovieClip Frame 2
if ((!_root.gameOver) && (!_root.finishLineCrossed)) {
timeNew = (time = Number(getTimer()));
_root.seconds = _root.seconds + (timeNew - timeOld);
timeOld = timeNew;
time = time - time_offset;
Set("/:real_time", time / 1000);
}
if ((!_root.gameOver) && (!_root.finishLineCrossed)) {
if (_root.seconds > 1000) {
_root.seconds = _root.seconds - 1000;
_root.CPcountDown--;
if (_root.CPcountDown <= 4) {
_root.game.hurry._visible = true;
_root.game.clock.timeRemaining.textColor = 16711680 /* 0xFF0000 */;
} else {
_root.game.hurry._visible = false;
_root.game.clock.timeRemaining.textColor = 16777215 /* 0xFFFFFF */;
}
if (_root.CPcountDown <= 0) {
_root.game.hurry._visible = false;
_root.gameOver = true;
}
}
_root.game.clock.timeRemaining.text = _root.CPcountDown;
time_temp = int(time / 1000);
secs = time_temp % 60;
minutes = int(time_temp / 60);
if (Number(secs) < 10) {
secs = "0" add secs;
}
if (minutes < 10) {
m = "0" add minutes;
}
time_temp = time_temp * 1000;
time = time - time_temp;
tenths = int(time / 10);
if (tenths < 10) {
tenths = "0" add tenths;
}
_root.game.clock.minutes.text = m;
_root.game.clock.seconds.text = secs;
_root.game.clock.milliseconds.text = tenths;
}
Set("/:framecount", /:framecount + 1);
Symbol 246 MovieClip Frame 3
gotoAndPlay ("start11");
Symbol 249 MovieClip Frame 1
old_time = getTimer();
new_time = getTimer();
subtract_now = 100;
hertz = 1 / (subtract_now / 1000);
interval = 0;
lastclick_time = 0;
max_clickgap = 500;
denom = 5;
denom2 = 52.5;
Symbol 249 MovieClip Frame 4
new_time = getTimer();
interval = new_time - old_time;
lastclick_time = new_time - /:old_time;
if (Number(interval) > Number(subtract_now)) {
if (Number(/:energy) > 0) {
diff = interval - subtract_now;
if (Number(lastclick_time) > Number(max_clickgap)) {
Set("/:energy", /:energy - 5);
} else if (Number(diff) > 25) {
Set("/:energy", /:energy - ((((/:energy / denom2) * (/:energy / denom2)) * diff) / 25));
} else {
Set("/:energy", /:energy - ((/:energy / denom2) * (/:energy / denom2)));
}
if (Number(/:energy) < 0) {
Set("/:energy", 0);
}
}
old_time = new_time;
}
Symbol 249 MovieClip Frame 5
gotoAndPlay ("start1");
Symbol 251 MovieClip Frame 1
function siteObject() {
this.id = "";
this.frame = 0;
}
_root.speedTest = getTimer();
_root.speedTestFinal = 0;
_root.speedTestCounter = 0;
_root.testOver = false;
_root.testPassed = true;
_root.rampOut = false;
_root.backLeg = 1;
_root.backLegOffset = 30;
_root.roadlineStart = 507;
_root.leftLimit = -(Stage.width / 2);
_root.frameIncLimit = 8;
_root.cyclistTotalFrames = 60;
_root.cyclistMc = _root.game.cyclist;
_root.routeFrame = 1;
_root.checkPoints = new Array(445, 945, 1445, 1945, 2499);
_root.checkPointIndex = 0;
_root.checkPointInc = 10;
_root.nextCPFrame = _root.checkPoints.shift();
_root.checkPointMove = false;
_root.checkPointFar_x = _root.game.bCheck._x;
_root.checkPointNear_x = _root.game.fCheck._x;
_root.bonusAdded = false;
_root.finishLineReached = false;
_root.finishLineCrossed = false;
_root.raceCheckPointScores = new Array();
_root.cpScoresIndex = 0;
_root.cpStartTime = 0;
_root.cpEndTime = 0;
_root.grassOn = 0;
_root.grassOnIndex = 1000;
_root.grassOffIndex = 1900;
_root.timeOutPlayed = false;
addCPTime = function () {
var _local1 = _root;
_local1.cpEndTime = (/:real_time * 1000) - _local1.cpStartTime;
_local1.cpStartTime = _local1.cpStartTime + _local1.cpEndTime;
trace("adding score " add _local1.cpEndTime);
_local1.raceCheckPointScores.push(_local1.cpEndTime);
};
checkPointTest = function () {
var _local1 = _root;
if ((!_local1.gameOver) && (!_local1.finishLineCrossed)) {
if (_local1.game.route._currentframe > _local1.nextCPFrame) {
if (_local1.checkPoints.length == 0) {
_local1.game.hurry._visible = false;
_local1.finishLineReached = true;
}
_local1.nextCPFrame = _local1.checkPoints.shift();
_local1.checkPointMove = true;
}
if ((_local1.game.bCheck._x < 0) && (!_local1.bonusAdded)) {
if (_local1.finishLineReached) {
_local1.finishLineCrossed = true;
}
_local1.CPcountDown = _local1.CPcountDown + _local1.checkPointInc;
_local1.bonusAdded = true;
addCPTime();
_local1.game.hurry._visible = false;
_local1.game.checkpointIcon._visible = true;
_local1.game.checkpointIcon.gotoAndPlay(1);
}
if (_local1.game.bCheck._x < -500) {
_local1.game.bCheck._x = _local1.checkPointFar_x;
_local1.game.fCheck._x = _local1.checkPointNear_x;
_local1.bonusAdded = false;
_local1.checkPointMove = false;
}
}
};
_root.siteArray = new Array();
_root.siteArray[0] = new siteObject();
_root.siteArray[0].id = "_root.game.admiraltyArch";
_root.siteArray[0].frame = Number(50);
_root.siteArray[1] = new siteObject();
_root.siteArray[1].id = "_root.game.londonEye";
_root.siteArray[1].frame = Number(150);
_root.siteArray[2] = new siteObject();
_root.siteArray[2].id = "_root.game.parliament";
_root.siteArray[2].frame = Number(250);
_root.siteArray[3] = new siteObject();
_root.siteArray[3].id = "_root.game.westminsterAbbey";
_root.siteArray[3].frame = Number(450);
_root.siteArray[4] = new siteObject();
_root.siteArray[4].id = "_root.game.buckinghamPalace";
_root.siteArray[4].frame = Number(530);
_root.siteArray[5] = new siteObject();
_root.siteArray[5].id = "_root.game.eros";
_root.siteArray[5].frame = Number(700);
_root.siteArray[6] = new siteObject();
_root.siteArray[6].id = "_root.game.tate";
_root.siteArray[6].frame = Number(1000);
_root.siteArray[7] = new siteObject();
_root.siteArray[7].id = "_root.game.albertHall";
_root.siteArray[7].frame = Number(1350);
_root.siteArray[8] = new siteObject();
_root.siteArray[8].id = "_root.game.albertMemorial";
_root.siteArray[8].frame = Number(1600);
_root.siteArray[9] = new siteObject();
_root.siteArray[9].id = "_root.game.cityHall";
_root.siteArray[9].frame = Number(1900);
_root.siteArray[10] = new siteObject();
_root.siteArray[10].id = "_root.game.marbleArch";
_root.siteArray[10].frame = Number(2160);
_root.siteArray[11] = new siteObject();
_root.siteArray[11].id = "_root.game.stJamesPalace";
_root.siteArray[11].frame = Number(2400);
_root.activeSites = new Array();
_root.siteIndex = 0;
_root.nextSite = _root.siteArray[_root.siteIndex].frame;
siteTest = function () {
if (_root.game.route._currentframe > _root.nextSite) {
_root.activeSites.push(_root.siteArray[_root.siteIndex].id);
thisMc = eval (_root.siteArray[_root.siteIndex].id);
trace("***" add thisMc._name);
thisMc._visible = true;
_root.siteIndex++;
_root.nextSite = _root.siteArray[_root.siteIndex].frame;
}
};
siteMove = function (vel) {
len = _root.activeSites.length;
if (len > 0) {
i = 0;
while (i < len) {
thisMc = eval (_root.activeSites[i]);
thisMc._x = thisMc._x - vel;
if (thisMc._x < -800) {
var whoCares = _root.activeSites.shift();
}
i++;
}
}
};
_global.fade = function (clip, endup, speed) {
mc = eval (clip);
var f = mc._alpha;
f = f + speed;
if (f >= 100) {
_root.gotoAndStop(endup);
} else {
mc._alpha = f;
}
};
swapCyclistMc = function (speed) {
if (speed <= 0) {
_root.cyclistMc._visible = false;
_root.cyclistMc = _root.game.cyclistStopped;
_root.cyclistMc._visible = true;
_root.cyclistMc.frontLeg.gotoAndStop(1);
_root.cyclistMc.frontLeg.frontLegL.gotoAndStop(1);
} else if ((_root.cyclistMc._name == "cyclistStopped") && (speed > 0)) {
_root.cyclistMc._visible = false;
_root.cyclistMc = _root.game.cyclist;
_root.cyclistMc._visible = true;
} else if (_root.finishLineCrossed) {
_root.cyclistMc._visible = false;
_root.cyclistMc = _root.game.cyclistWinning;
_root.cyclistMc._visible = true;
}
};
_root.setAssets = function (testresult) {
var _local1 = _root;
trace("testresult" add testresult);
if (testresult > 250) {
_local1.testPassed = false;
_local1.game.trees1._visible = false;
_local1.game.trees2._visible = false;
_local1.game.trees3._visible = false;
_local1.game.grass1._visible = false;
_local1.game.grass2._visible = false;
_local1.game.grassTransition._visible = false;
} else {
_local1.game.bCheck.arch._visible = true;
_local1.game.fCheck._visible = true;
_local1.game.trees1._visible = true;
_local1.game.trees2._visible = true;
_local1.game.trees3._visible = true;
_local1.game.grass1._visible = true;
_local1.game.grass2._visible = true;
_local1.game.grassTransition._visible = true;
}
trace("test " add _local1.testPassed);
};
Symbol 251 MovieClip Frame 3
if (!_root.testOver) {
if (_root.speedTestCounter == 25) {
_root.speedTest = getTimer();
}
if (_root.speedTestCounter == 28) {
_root.speedTestFinal = getTimer();
_root.setAssets(_root.speedTestFinal - _root.speedTest);
_root.testOver = true;
}
_root.speedTestCounter++;
}
Set("/:speed", /:energy / 5);
if (Number(/:speed) > 8) {
Set("/:speed", 8 + Number(((2 - (8 / /:speed)) - 1) * 3));
}
if (_root.gameOver && (!_root.timeOutPlayed)) {
_root.game.timeOut.play();
_root.timeOutPlayed = true;
_root.game.hurry._visible = false;
}
if (_root.finishLineCrossed && (/:speed <= 1)) {
_root.game.finished.play();
}
if (_root.rampOut) {
_root.cyclistFrameInc = (_root.routeInc = /:speed / 1.5);
if (_root.cyclistFrameInc > _root.frameIncLimit) {
_root.cyclistFrameInc = _root.frameIncLimit;
}
_root.cyclistFrame = _root.cyclistFrame + _root.cyclistFrameInc;
if (_root.cyclistFrame > _root.cyclistTotalFrames) {
_root.cyclistFrame = _root.cyclistFrame - _root.cyclistTotalFrames;
}
_root.backLeg = _root.cyclistFrame + _root.backLegOffset;
if (_root.backLeg > _root.cyclistTotalFrames) {
_root.backLeg = _root.backLeg - _root.cyclistTotalFrames;
}
swapCyclistMc(/:speed);
_root.cyclistMc.gotoAndStop(int(_root.cyclistFrame));
_root.cyclistMc.frontLeg.gotoAndStop(int(_root.cyclistFrame));
_root.cyclistMc.frontLeg.frontLegL.gotoAndStop(int(_root.cyclistFrame));
_root.cyclistMc.backLeg.gotoAndStop(int(_root.backLeg));
_root.cyclistMc.backLegL.gotoAndStop(int(_root.backLeg));
_root.routeFrame = _root.routeFrame + (_root.routeInc * 0.5);
_root.game.route.gotoAndStop(int(1 + _root.routeFrame));
_root.game.ramp._x = _root.game.ramp._x - _root.velocity;
_root.game.trafficLight._visible = false;
_root.velocity = _root.cyclistFrameInc * 4;
_root.game.hoardings1._x = _root.game.hoardings1._x - _root.velocity;
_root.game.hoardings2._x = _root.game.hoardings2._x - _root.velocity;
if ((_root.game.hoardings1._x + _root.game.hoardings1._width) < 0) {
_root.game.hoardings1._x = _root.game.hoardings2._x + _root.game.hoardings2._width;
}
if ((_root.game.hoardings2._x + _root.game.hoardings2._width) < 0) {
_root.game.hoardings2._x = _root.game.hoardings1._x + _root.game.hoardings1._width;
}
if (_root.game.route._currentframe > _root.grassOnIndex) {
_root.grassOn = 1;
}
if (_root.game.route._currentframe > _root.grassOffIndex) {
_root.grassOn = 2;
}
if (_root.testPassed) {
if (_root.grassOn == 1) {
_root.game.grass1._x = _root.game.grass1._x - _root.velocity;
_root.game.grass2._x = _root.game.grass2._x - _root.velocity;
_root.game.trees1._x = _root.game.trees1._x - _root.velocity;
_root.game.trees2._x = _root.game.trees2._x - _root.velocity;
_root.game.grassTransition._x = _root.game.grassTransition._x - _root.velocity;
if ((_root.game.grass1._x + _root.game.grass1._width) < 0) {
_root.game.grass1._x = _root.game.grass2._x + _root.game.grass2._width;
}
if ((_root.game.grass2._x + _root.game.grass2._width) < 0) {
_root.game.grass2._x = _root.game.grass1._x + _root.game.grass1._width;
}
if ((_root.game.trees1._x + _root.game.trees1._width) < 0) {
_root.game.trees1._x = _root.game.trees2._x + _root.game.trees2._width;
}
if ((_root.game.trees2._x + _root.game.trees2._width) < 0) {
_root.game.trees2._x = _root.game.trees1._x + _root.game.trees1._width;
}
if ((_root.game.grassTransition._x + _root.game.grassTransition._width) < 0) {
_root.game.skyLine1._alpha = 0;
_root.game.skyline2._alpha = 0;
_root.game.grassTransition._visible = false;
}
}
if (_root.grassOn == 2) {
_root.game.grass1._x = _root.game.grass1._x - _root.velocity;
_root.game.grass2._x = _root.game.grass2._x - _root.velocity;
_root.game.trees3._x = _root.game.trees3._x - _root.velocity;
_root.game.grassTransition._x = _root.game.grassTransition._x - _root.velocity;
_root.game.trees1._x = _root.game.trees1._x - _root.velocity;
_root.game.trees2._x = _root.game.trees2._x - _root.velocity;
if (_root.game.grass1._x > _root.game.grass2._x) {
_root.game.grassTransitionOut._x = _root.game.grass1._x + _root.game.grass1._width;
_root.game.trees3._x = _root.game.grass1._x + _root.game.grass1._width;
} else {
_root.game.grassTransitionOut._x = _root.game.grass2._x + _root.game.grass2._width;
_root.game.trees3._x = _root.game.grass2._x + _root.game.grass2._width;
}
if ((_root.game.grass1._x + _root.game.grass1._width) < 0) {
_root.game.grass1._visible = false;
}
if ((_root.game.grass2._x + _root.game.grass2._width) < 0) {
_root.game.grass2._visible = false;
}
if ((_root.game.trees2._x + _root.game.trees2._width) < 0) {
_root.game.trees2._visible = false;
}
if ((_root.game.trees1._x + _root.game.trees1._width) < 0) {
_root.game.trees1._visible = false;
}
if ((_root.game.trees3._x + _root.game.trees3._width) < 0) {
_root.game.trees3._visible = false;
}
if ((_root.game.grassTransitionOut._x + _root.game.grassTransitionOut._width) < 0) {
_root.game.grassTransition._visible = false;
}
}
}
if (_root.grassOn == 2) {
_root.game.skyLine1._alpha = 100;
_root.game.skyline2._alpha = 100;
}
_root.game.skyLine1._x = _root.game.skyLine1._x - (_root.cyclistFrameInc * 1.4);
_root.game.skyLine2._x = _root.game.skyLine2._x - (_root.cyclistFrameInc * 1.4);
_root.game.gallery._x = _root.game.gallery._x - (_root.cyclistFrameInc * 1.4);
if ((_root.game.gallery._x + _root.gallery._width) < -550) {
_root.game.gallery._visible = false;
}
if ((_root.game.skyLine1._x + _root.game.skyLine1._width) < 0) {
_root.game.skyLine1._x = _root.game.skyline2._x + _root.game.skyLine2._width;
}
if ((_root.game.skyLine2._x + _root.game.skyLine2._width) < 0) {
_root.game.skyLine2._x = _root.game.skyLine1._x + _root.game.skyLine1._width;
}
_root.game.farBack1._x = _root.game.farBack1._x - (_root.cyclistFrameInc * 0.2);
_root.game.farBack2._x = _root.game.farBack2._x - (_root.cyclistFrameInc * 0.2);
if ((_root.game.farBack1._x + _root.game.farBack1._width) < 0) {
_root.game.farBack1._x = _root.game.farBack2._x + _root.game.farBack2._width;
}
if ((_root.game.farBack2._x + _root.game.farBack2._width) < 0) {
_root.game.farBack2._x = _root.game.farBack1._x + _root.game.farBack1._width;
}
_root.game.line1._x = _root.game.line1._x - _root.velocity;
_root.game.line2._x = _root.game.line2._x - _root.velocity;
if ((_root.game.line1._x + _root.game.line1._width) < _root.leftLimit) {
_root.game.line1._x = _root.roadlineStart;
}
if ((_root.game.line2._x + _root.game.line2._width) < _root.leftLimit) {
_root.game.line2._x = _root.roadlineStart;
}
if (_root.checkPointMove) {
_root.game.bCheck._x = _root.game.bCheck._x - _root.velocity;
if (_root.testPassed) {
_root.game.fCheck._x = _root.game.fCheck._x - _root.velocity;
}
}
checkPointTest();
if (_root.testPassed) {
siteTest();
siteMove(_root.cyclistFrameInc * 1.4);
}
}
gotoAndPlay (2);
Symbol 252 Button
on (press, keyPress "<Left>") {
if ((!_root.gameOver) && (!_root.finishLineCrossed)) {
Set("/:new_time", getTimer());
delta = /:new_time - /:old_time;
delta = delta / 1000;
hertz = 1 / delta;
if (Number(hertz) > 20) {
hertz = 20 + Number(((2 - (20 / hertz)) - 1) * 30);
}
Set("/:old_time", /:new_time);
if (Number(left) == 0) {
Set("/:energy", Number(/:energy) + Number(hertz / denom));
} else if (Number(left) < 2) {
Set("/:energy", Number(/:energy) + Number(hertz / (denom * denom)));
} else {
Set("/:energy", Number(/:energy - ((/:energy * (left - 3)) / 200)) + Number(hertz / (denom * denom)));
}
left = Number(left) + 1;
right = 0;
}
}
on (press, keyPress "<Right>") {
if ((!_root.gameOver) && (!_root.finishLineCrossed)) {
Set("/:new_time", getTimer());
delta = /:new_time - /:old_time;
delta = delta / 1000;
hertz = 1 / delta;
if (Number(hertz) > 20) {
hertz = 20 + Number(((2 - (20 / hertz)) - 1) * 30);
}
Set("/:old_time", /:new_time);
if (Number(right) == 0) {
Set("/:energy", Number(/:energy) + Number(hertz / denom));
} else if (Number(right) < 2) {
Set("/:energy", Number(/:energy) + Number(hertz / (denom * denom)));
} else {
Set("/:energy", Number(/:energy - ((/:energy * (right - 3)) / 400)) + Number(hertz / (denom * denom)));
}
left = 0;
right = Number(right) + 1;
}
}
Symbol 254 MovieClip Frame 1
left = 0;
right = 0;
Set("/:old_time", getTimer());
Set("/:new_time", getTimer());
delta = 0;
hertz = 0;
denom = 4.5;
Symbol 254 MovieClip Frame 2
if (stop_decreasing eq "true") {
}
Symbol 254 MovieClip Frame 3
gotoAndPlay ("start10");
Symbol 257 Button
on (release) {
_global.ipbSend();
}
Symbol 269 MovieClip Frame 1
var testCheckPoints = _root.testCheckPointScores();
var testMainScore = _root.checkScores(/:real_time * 1000);
trace((testCheckPoints add " : ") add ((testMainScore > 0) && (_root.finishLineCrossed == true)));
if ((testCheckPoints == true) || ((testMainScore > 0) && (_root.finishLineCrossed == true))) {
} else if ((testMainScore <= 0) && (_root.finishLineCrossed == true)) {
_root.inputName._visible = false;
gotoAndPlay (2);
}
stop();
Symbol 269 MovieClip Frame 2
stop();