Frame 1
function Initialize(id, asessionID) {
if (id == undefined) {
id = "";
asessionID = "";
}
sessionID = asessionID;
metricsUrl = "http://www.roadierunner.com/backend/redir_tell.php";
startSO();
displayScore = "0000000000";
}
function store_click(action) {
_level0.loadVariables((((((metricsUrl + "?sessionId=") + _level0.unique_id) + "&action=") + action) + "&rand=") + random(99999));
}
function callSubmitLink(type, p1, p2, o1, o2, email, name) {
var _local1 = "";
var win = "_blank";
var _local2 = "";
_local1 = REGISTERCGI;
_local2 = SERVERRef + _local1;
var lv:LoadVars = new LoadVars();
lv.onLoad = function (success:Boolean) {
};
_level0.getURL((((((((((((_local2 + "?unique_id=") + _level0.unique_id) + "&optin1=") + o1) + "&optin2=") + o2) + "&type=") + type) + "&email=") + email) + "&name=") + name);
}
function callLink(stype) {
var _local1 = _global;
var _local2 = "";
var win = "_blank";
var _local3 = "";
switch (stype) {
case STAY :
_local2 = STAYCGI;
_local3 = SERVERRef + _local2;
return;
case "friend" :
var lb = "%0D %0A";
EmailSubject = _local1.strings.TELL1;
EmailBody1 = (_local1.strings.TELL2 + lb) + _local1.strings.TELL3;
EmailBody2 = _local1.strings.TELL4;
EmailBody3 = (_local1.strings.TELL5 + lb) + _local1.strings.TELL6;
_level0.getURL(((((("mailto:?subject=" + EmailSubject) + "&body=") + EmailBody1) + bestScore) + EmailBody2) + EmailBody3);
store_click("friend");
return;
case "site" :
_root.getURL("http://www.makeroadssafe.org/", "_blank");
store_click("makeroadssafe");
return;
case "petition" :
_root.getURL("http://www.makeroadssafe.org/", "_blank");
store_click("petition");
return;
case "prizes" :
getURL ("http://www.makeroadssafe.org/news/2006/roadie_runner.html", "_blank");
store_click("prizes");
return;
case "play" :
_local2 = PLAYCGI;
_local3 = SERVERRef + _local2;
if (_level0.doplaycall == "no") {
} else {
var lv:LoadVars = new LoadVars();
lv.onLoad = function (success:Boolean) {
};
lv.load((((((_local3 + "?unique_id=") + _level0.unique_id) + "&lang=") + _level0.lang) + "&cr=") + random(99999));
}
return;
}
}
function startSO(id) {
var _local1 = id;
SO = SharedObject.getLocal(SORef);
nosend = 0;
bestScore = 0;
if (SO.data.id != undefined) {
_level0.unique_id = (_level0.sessionId = SO.data.id);
bestScore = SO.data.bestScore;
if (!_local1) {
_level0.store_click(_level0.unique_id, "reopened_flash");
}
} else if (_local1) {
SO.data.id = (_level0.unique_id = _local1);
} else {
_level0.loadVariables(metricsUrl);
}
if (bestScore == undefined) {
bestScore = 0;
}
_global.shell.updateBestScore();
}
function checkSO() {
var _local1 = _global;
if ((_level0.gametype == "league") || (_local1.leagueStatus == "league")) {
bestScore = _local1.bestScore;
if (_local1.shell.score > bestScore) {
bestScore = int(_local1.shell.score);
_local1.bestScore = bestScore;
if (_level0.gametype == "league") {
sendScoreLeague();
}
}
} else if (_local1.shell.score > bestScore) {
bestScore = int(_local1.shell.score);
}
if ((_level0.gametype != "league") && (_local1.leagueStatus != "league")) {
SO.data.bestScore = bestScore;
SO.data.ranking = ranking;
}
if (bestScore == undefined) {
bestScore = 0;
}
if (ranking == undefined) {
ranking = "0";
}
bestScore = Number(bestScore);
if (bestScore < _local1.shell.score) {
bestScore = _local1.shell.score;
_local1.bestScore = bestScore;
}
_local1.shell.updateBestScore();
}
function getRanking() {
var _local3 = this;
var rankVars = new LoadVars();
rankVars.ref = _local3;
rankVars.onLoad = function (success) {
var _local3 = this;
if (success) {
_local3.ref.rankingAr = _local3.rankings.split("|");
var _local2 = 0;
while (_local2 < _local3.ref.rankingAr.length) {
_local3.ref.rankingAr[_local2] = _local3.ref.rankingAr[_local2].split(",");
var _local1 = 0;
while (_local1 < _local3.ref.rankingAr[_local2].length) {
_local3.ref.rankingAr[_local2][_local1] = parseInt(_local3.ref.rankingAr[_local2][_local1]);
_local1++;
}
_local2++;
}
if (_local3.ref.isUpdatingRanking) {
_global.ServerObject.calcRanking();
}
} else {
_global.UI.score_obj.globalRank = "-";
}
};
rankVars.load(SERVERRef + "rankings/rankings.txt");
}
function calcRanking() {
var _local3 = false;
var _local1 = 0;
while ((!_local3) && (_local1 < rankingAr.length)) {
if (bestScore >= rankingAr[_local1][1]) {
ranking = rankingAr[_local1][0];
_local3 = true;
} else if ((bestScore < rankingAr[_local1][1]) && (bestScore >= rankingAr[_local1][3])) {
_local3 = true;
var _local2 = (bestScore - rankingAr[_local1][3]) / (rankingAr[_local1][1] - rankingAr[_local1][3]);
ranking = "" + int(Math.floor(rankingAr[_local1][2] + (1 - ((rankingAr[_local1][2] - rankingAr[_local1][0]) * _local2))));
} else {
_local1++;
}
}
if (!_local3) {
if (bestScore >= rankingAr[0][1]) {
ranking = "1";
} else {
ranking = "" + int(rankingAr[_local1 - 1][2] + 1);
}
}
if (bestScore == 0) {
ranking = "-";
}
updateScoreObj();
}
function updateScoreObj() {
_global.shell.updateBestScore();
}
function playedGame() {
plays = plays + 1;
}
function requestGlobalPos() {
var _local1 = _global;
checkSO();
if (bestScore < _local1.shell.score) {
bestScore = _local1.shell.score;
_local1.bestScore = bestScore;
_local1.shell.updateBestScore();
}
var _local3 = SERVERRef + SCORENEWCGI;
var sendArgs:Object = new Object();
sendArgs.type = "scorenormal";
outPut((((("checkit !!!" + nosend) + " ") + bestScore) + " ") + _local1.shell.score);
if (nosend != 1) {
var _local2 = 0;
if ((bestScore != 0) && (bestScore != undefined)) {
_local2 = 1;
}
if (firstsend == 1) {
_local2 = 1;
firstsend = 0;
}
if (_local2 == 1) {
sendArgs.score = encryptScore(bestScore);
sendArgs.unique_id = _level0.unique_id;
sendArgs.plays = plays.toString();
sendArgs.session_id = sessionID;
sendArgs.nocache = random(99999).toString();
sendArgs.campaign = SORef;
sendArgs.scoredirection = "p";
sendArgs.encoded = "true";
sendArgs.emailcode = mailCode;
sendArgs.lang = _level0.lang;
sendArgs.estimated = "true";
callServer(_local3, sendArgs, GLOBALPOS);
}
}
nosend = 0;
plays = 0;
}
function encryptScore(ascore) {
if (ascore == undefined) {
ascore = 0;
}
var _local2 = "";
ascore = (ascore * 1000000) + 9876543210;
_local2 = ascore.toString();
var _local3 = 0;
var _local1 = 1;
while (_local1 <= _local2.length) {
_local3 = (_local3 + _local1) + int(_local2.charAt(_local1 - 1));
_local1++;
}
var cs = _local3.toString();
return((cs.length.toString() + _local2) + cs);
}
function respondGlobalPos(vars:LoadVars) {
for (var _local1 in vars) {
}
if (vars.ranking != undefined) {
ranking = vars.ranking;
checkSO();
_global.UI.gameOver.gameOverRanking = ranking;
}
}
_global.firsttime = true;
debugtext = false;
if (_level0.unique_id == undefined) {
if (System.capabilities.playerType == "External") {
_level0.unique_id = "local";
} else {
_level0.unique_id = "not_found";
}
}
if (_level0.unique_id == "session") {
_level0.unique_id = "no_sesh";
}
_global.strings = new Object();
_global.strings.TELL1 = "Play Roadie Runner";
_global.strings.TELL2 = "Why did Dirty Pretty Things cross the road? To get to the other side of course.";
_global.strings.TELL3 = "My best score is ";
_global.strings.TELL4 = " . ";
_global.strings.TELL5 = "Go to http://www.roadierunner.com to play.";
_global.strings.TELL6 = "";
_global.strings.TELL7 = "";
statements = ["Road crashes are the number 1 killer of teenagers in Europe and the US", "Worldwide, only HIV / AIDS kills more young men than road accidents", "More than a million people die on roads every year", "Every 3 minutes a child dies on the world\u2019s roads", "Every 30 seconds someone is killed on the road"];
var SERVERRef = "http://www.roadierunner.com/";
var mailCode = "roadierunner";
var SCORECGI = "cgi-bin/score.cgi";
var SCORENEWCGI = "cgi-bin/score.cgi";
var LEAGUENEWCGI = "cgi-bin/roadierunner/league.cgi";
var MAKELEAGUECGI = "cgi-bin/roadierunner/makeleague.cgi";
var GETLEAGUECGI = "cgi-bin/roadierunner/getleague.cgi";
var REMLEAGUECGI = "cgi-bin/roadierunner/reminder.cgi";
var JOINLEAGUECGI = "cgi-bin/roadierunner/enterleague.cgi";
var ADDPLAYERCGI = "cgi-bin/roadierunner/addplayer.cgi";
var EMAILCGI = "cgi-bin/roadierunner/sendemail.cgi";
var EmailSubject;
var SITECGI = "cgi-bin/roadierunner/redir_site.cgi";
var PLAYCGI = "cgi-bin/roadierunner/redir_play.cgi";
var TELLCGI = "cgi-bin/roadierunner/redir_tell.cgi";
var WHATCGI = "cgi-bin/roadierunner/redir_what.cgi";
var SENDAGECGI = "cgi-bin/roadierunner/redir_sendage.cgi";
var INBOXCGI = "cgi-bin/roadierunner/redir_inbox.cgi";
var STAYCGI = "cgi-bin/roadierunner/redir_film.cgi";
var COMPCGI = "cgi-bin/roadierunner/redir_comp.cgi";
var REGISTERCGI = "cgi-bin/roadierunner/register.cgi";
var TERMSCGI = "terms/terms";
var PLAYLINK = "play";
var TELLFRIEND = "friend";
var SITE = "site";
var INBOX = "inbox";
var STAY = "stay";
var COMP = "comp";
var WIN = "win";
var WHAT = "what";
var TV = "tv";
var TERMS = "terms";
var TERMS2 = "terms2";
var SORef = "roadierunner";
var GLOBALPOS = "getGlobalPos";
var CREATELEAGUE = "createLeague";
var GETLEAGUE = "getLeague";
var JOINLEAGUE = "joinLeague";
var REMLEAGUE = "remLeague";
var RFLEAGUE = "refreshLeague";
var SCRLEAGUE = "scoreLeague";
var ADDPLAYER = "addPlayer";
var leagueTable_mc:MovieClip;
var uniqueID;
var sessionID;
var SO:SharedObject;
var gameType;
var bestScore = 0;
var game_id;
var ranking;
var my_lv:LoadVars;
var plays = 0;
var nosend = 0;
var firstsend = 1;
var voucher = 0;
var rankingAr;
Initialize(_level0.unique_id, _level0.session_id);
_level0.lang = "en";
_global.gPath = "http://www.roadierunner.com/";
System.security.allowDomain(_global.gPath);
_global.shell = this;
stop();
Instance of Symbol 58 MovieClip "loadingMc" in Frame 1
onClipEvent (load) {
_parent.stop();
var mcLoader = _parent;
}
onClipEvent (enterFrame) {
this.percentloaded = Math.floor((mcLoader.getBytesLoaded() / mcLoader.getBytesTotal()) * 100);
this._xscale = percentloaded;
if ((percentloaded == 100) && (!initialized)) {
initialized = true;
_parent.play();
}
}
Frame 2
stop();
Frame 27
function completeFunction() {
}
function playSound(id, lp) {
var _local1 = lp;
_global.sounds[soundPlaying].stop();
if (!_local1) {
_local1 = 1;
}
_global.sounds[id].start(0, _local1);
}
function playBGSound(id, lp) {
var _local1 = lp;
if (!_local1) {
_local1 = 1;
}
_global.soundsBg[id].start(0, _local1);
}
function stopSound(id) {
_global.sounds[id].stop();
_global.soundsBg[id].stop();
}
function buttonrollover() {
this.gotoAndStop("roll");
}
function buttonrollout() {
this.gotoAndStop(1);
}
function initPetition() {
var _local1 = _global;
petitionMC._visible = true;
petitionMC.butt.onRollOver = buttonrollover;
petitionMC.butt.onRollOut = buttonrollout;
petitionMC.butt.onDragOut = buttonrollout;
petitionMC.butt.onDragOver = buttonrollover;
petitionMC.close.onRollOver = buttonrollover;
petitionMC.close.onRollOut = buttonrollout;
petitionMC.close.onDragOut = buttonrollout;
petitionMC.close.onDragOver = buttonrollover;
petitionMC.close.onPress = function () {
var _local1 = _global;
_local1.shell.petitionMC._visible = false;
_local1.shell.resetGame();
_local1.shell.startGame();
_local1.shell.updateScoreObj();
_local1.shell.startMusic();
_local1.shell.alertBox._visible = true;
_local1.shell.alertBox.butt.label = "ready?";
_local1.shell.alertBox.alertTitle = "roadie runner";
_local1.shell.alertBox.alertMessage = "collect the guitar from the other side of the road and bring it back";
_local1.shell.alertBox.butt.onPress = function () {
stopMusic();
playGame();
this._parent._visible = false;
};
};
petitionMC.butt.label = "sign up";
petitionMC.butt.onPress = function () {
var _local1 = _global;
_local1.shell.callLink("petition");
_local1.shell.petitionMC._visible = false;
_local1.shell.resetGame();
_local1.shell.startGame();
_local1.shell.updateScoreObj();
_local1.shell.startMusic();
_local1.shell.alertBox._visible = true;
_local1.shell.alertBox.butt.label = "ready?";
_local1.shell.alertBox.alertTitle = "roadie runner";
_local1.shell.alertBox.alertMessage = "collect the guitar from the other side of the road and bring it back";
_local1.shell.alertBox.butt.onPress = function () {
stopMusic();
playGame();
this._parent._visible = false;
};
};
}
function initPrizes() {
var _local1 = _global;
prizesMC._visible = true;
prizesMC.next.onRollOver = buttonrollover;
prizesMC.next.onRollOut = buttonrollout;
prizesMC.next.onDragOut = buttonrollout;
prizesMC.next.onDragOver = buttonrollover;
prizesMC.next.label = "enter now";
prizesMC.next.onPress = function () {
var _local1 = _global;
_local1.shell.callLink("prizes");
_local1.shell.prizesMC._visible = false;
_local1.shell.resetGame();
_local1.shell.startGame();
_local1.shell.updateScoreObj();
_local1.shell.startMusic();
_local1.shell.alertBox._visible = true;
_local1.shell.alertBox.butt.label = "ready?";
_local1.shell.alertBox.alertTitle = "roadie runner";
_local1.shell.alertBox.alertMessage = "collect the guitar from the other side of the road and bring it back";
_local1.shell.alertBox.butt.onPress = function () {
stopMusic();
playGame();
this._parent._visible = false;
};
};
prizesMC.close.onRollOver = buttonrollover;
prizesMC.close.onRollOut = buttonrollout;
prizesMC.close.onDragOut = buttonrollout;
prizesMC.close.onDragOver = buttonrollover;
prizesMC.close.onPress = function () {
var _local1 = _global;
_local1.shell.prizesMC._visible = false;
_local1.shell.resetGame();
_local1.shell.startGame();
_local1.shell.updateScoreObj();
_local1.shell.startMusic();
_local1.shell.alertBox._visible = true;
_local1.shell.alertBox.butt.label = "ready?";
_local1.shell.alertBox.alertTitle = "roadie runner";
_local1.shell.alertBox.alertMessage = "collect the guitar from the other side of the road and bring it back";
_local1.shell.alertBox.butt.onPress = function () {
stopMusic();
playGame();
this._parent._visible = false;
};
};
}
function initPrizes2() {
var _local1 = _global;
prizesMC.butt.onRollOver = buttonrollover;
prizesMC.butt.onRollOut = buttonrollout;
prizesMC.butt.onDragOut = buttonrollout;
prizesMC.butt.onDragOver = buttonrollover;
prizesMC.butt.label = "enter now";
prizesMC.butt.onPress = function () {
var _local1 = _global;
_local1.shell.callSubmitLink("prizes", "p1", "p2", true, false, "sam@phenotype.net", "sam");
_local1.shell.prizesMC._visible = false;
_local1.shell.resetGame();
_local1.shell.startGame();
_local1.shell.updateScoreObj();
_local1.shell.startMusic();
_local1.shell.alertBox._visible = true;
_local1.shell.alertBox.butt.label = "ready?";
_local1.shell.alertBox.alertTitle = "roadie runner";
_local1.shell.alertBox.alertMessage = "collect the guitar from the other side of the road and bring it back";
_local1.shell.alertBox.butt.onPress = function () {
stopMusic();
playGame();
this._parent._visible = false;
};
};
}
function resetGame() {
var _local1 = _global;
i = 1;
lives = 3;
level = 1;
score = 0;
_local1.shell.timeGraph._xscale = (_local1.shell.timeGraphMeasure = 100);
_local1.shell.timer = true;
lane1Speed = 1.5;
lane2Speed = -1.5;
lane3Speed = 2;
lane4Speed = -2.5;
lane5Speed = 3;
log1Speed = 1;
log2Speed = 1.5;
log3Speed = 1;
log4Speed = 1.5;
checkPoints = 0;
gameLeg = "pickup";
checkArray = ["secondCheck", "firstCheck", "fourthCheck", "thirdCheck"];
checkNameArray = ["guitar", "drum", "amp", "mike"];
iconWanted = 0;
resetCheckPoints();
stage.home.stop();
stage.home._visible = false;
_local1.shell.walker3.gotoAndStop(1);
_local1.shell.walker2.gotoAndStop(1);
_local1.shell.walker1.gotoAndStop(1);
}
function startGame() {
var _local1 = _global;
var _local2 = this;
carsArray = [];
x = 0;
while (x < 2) {
duplicateMovieClip (firstLane, "firstLane" + i, 100 - i);
duplicateMovieClip ("gameMask", "gameMaskTop" + i, 200 - i);
_local2["firstLane" + i].setMask(_local2["gameMaskTop" + i]);
_local1.shell["firstLane" + i]._x = x * 150;
_local1.shell["firstLane" + i]._y = 310;
_local1.shell["firstLane" + i].gotoAndStop(random(_local1.shell.carSprites) + 1);
carsArray.push([1, "firstLane", i]);
i++;
duplicateMovieClip (secondLane, "secondLane" + i, 80 - i);
duplicateMovieClip ("gameMask", "gameMaskTop" + i, 180 - i);
_local2["secondLane" + i].setMask(_local2["gameMaskTop" + i]);
_local1.shell["secondLane" + i]._x = x * 170;
_local1.shell["secondLane" + i]._y = 270;
_local1.shell["secondLane" + i].gotoAndStop(random(_local1.shell.carSprites) + 1);
carsArray.push([2, "secondLane", i]);
i++;
x++;
}
x = 0;
while (x < 2) {
duplicateMovieClip (thirdLane, "thirdLane" + i, 60 - i);
duplicateMovieClip ("gameMask", "gameMaskTop" + i, 160 - i);
_local2["thirdLane" + i].setMask(_local2["gameMaskTop" + i]);
_local1.shell["thirdLane" + i]._x = x * 200;
_local1.shell["thirdLane" + i]._y = 190;
_local1.shell["thirdLane" + i].gotoAndStop(random(_local1.shell.carSprites) + 1);
carsArray.push([3, "thirdLane", i]);
i++;
duplicateMovieClip (fourthLane, "fourthLane" + i, 40 - i);
duplicateMovieClip ("gameMask", "gameMaskTop" + i, 140 - i);
_local2["fourthLane" + i].setMask(_local2["gameMaskTop" + i]);
_local1.shell["fourthLane" + i]._x = x * 200;
_local1.shell["fourthLane" + i]._y = 150;
_local1.shell["fourthLane" + i].gotoAndStop(random(_local1.shell.carSprites) + 1);
carsArray.push([4, "fourthLane", i]);
i++;
x++;
}
x = 0;
while (x < 1) {
duplicateMovieClip (fifthLane, "fifthLane" + i, 20 - i);
duplicateMovieClip ("gameMask", "gameMaskTop" + i, 120 - i);
_local2["fifthLane" + i].setMask(_local2["gameMaskTop" + i]);
_local1.shell["fifthLane" + i]._x = x * 200;
_local1.shell["fifthLane" + i]._y = 110;
_local1.shell["fifthLane" + i].gotoAndStop(random(_local1.shell.carSprites) + 1);
carsArray.push([5, "fifthLane", i]);
i++;
x++;
}
resetLaneDepths();
startCars();
}
function playGame() {
gameLeg = "pickup";
iconWanted = 1;
checkArray = ["firstCheck", "secondCheck", "thirdCheck", "fourthCheck"];
checkNameArray = ["drum", "guitar", "mike", "amp"];
resetCheckPoints();
}
function updateCars() {
var _local1 = _global;
if (_local1.shell.timer && (_local1.shell.carsGo == true)) {
i = 0;
while (i < carsArray.length) {
var _local2 = carsArray[i][1] + carsArray[i][2];
_local1.shell[_local2]._x = _local1.shell[_local2]._x - _local1.shell[("lane" + carsArray[i][0]) + "Speed"];
if (_local1.shell[_local2]._x < (-30 - _local1.shell[_local2]._width)) {
_local1.shell[_local2]._x = 460 + random(40);
_local1.shell[_local2].gotoAndStop(random(_local1.shell.carSprites) + 1);
} else if (_local1.shell[_local2]._x > (460 + _local1.shell[_local2]._width)) {
_local1.shell[_local2]._x = -(30 + random(30));
_local1.shell[_local2].gotoAndStop(random(_local1.shell.carSprites) + 1);
}
if (_local1.shell[_local2].hit.hitTest(_local1.shell.frogClip.hit)) {
_local1.shell.looseLife();
}
i++;
}
}
}
function updateIcons() {
var _local1 = _global;
var _local3 = this;
if (bonusFlag == true) {
if (_local1.shell.bona.hitTest(_local1.shell.frogClip.hit)) {
score = score + 4000;
bona.gotoAndPlay("hit");
_local1.shell.playSound("bonus", 1);
bonusFlag = false;
}
}
checkBarriers();
i = 0;
while (i < checkArray.length) {
var _local2 = checkArray[i];
if (_local1.shell[_local2].hitTest(_local1.shell.frogClip.hit)) {
if (_local1.shell[_local2].flag == false) {
_local1.shell[_local2].flag = true;
_local1.shell[_local2].gotoAndStop(2);
_local1.shell.playSound("bonus", 1);
_local1.shell[_local2]._visible = false;
_local1.shell.frogClip.ico.gotoAndStop(checkNameArray[iconWanted]);
_local1.shell.frogClip.ico._alpha = 100;
turnOnHome();
_local1.shell.bonusOmeter = ceil(_local1.shell.timeGraph._xscale);
_local1.shell.updateScore(_local1.shell.bonusOmeter);
_local1.shell.timer = false;
alertBox.butt.label = "ready?";
alertBox.alertTitle = ("well done <font color='#ffffff'>(time bonus " + _local1.shell.bonusOmeter) + " x10)</font>";
alertBox.alertMessage = "now bring it back to the concert";
alertBox.butt.onPress = function () {
var _local1 = _global;
_local1.shell.timeGraph._xscale = (_local1.shell.timeGraphMeasure = 100);
_local1.shell.timer = true;
this._parent._visible = false;
};
alertBox._visible = true;
_local1.shell.score = _local1.shell.score + 1000;
_local1.shell.gameLeg = "home";
_local1.shell.stage.home.onEnterFrame = function () {
var _local1 = _global;
var _local2 = this;
if (_local2.hitTest(_local1.shell.frogClip.hit)) {
_local2._visible = false;
_local1.shell.frogClip.ico._alpha = 100;
_local1.shell.bonusOmeter = ceil(_local1.shell.timeGraph._xscale);
_local1.shell.timer = false;
_local1.shell.gameLeg = "pickup";
if ((iconWanted + 1) == checkArray.length) {
checkArray = ["secondCheck", "firstCheck", "fourthCheck", "thirdCheck"];
checkNameArray = ["guitar", "drum", "amp", "mike"];
iconWanted = 0;
_local1.shell.resetCheckPoints();
_local1.shell.checkPoints++;
_local1.shell.score = _local1.shell.score + 4000;
_local1.shell.startMusic();
_local1.shell.frogClip.ico._alpha = 0;
alertBox.butt.label = "ready?";
alertBox.alertTitle = ("you got them all <font color='#ffffff'>(time bonus " + _local1.shell.bonusOmeter) + " x50)</font>";
alertBox.alertMessage = "now it gets harder. fetch the " + checkNameArray[iconWanted];
alertBox.butt.onPress = function () {
var _local1 = _global;
_local1.shell.timeGraph._xscale = (_local1.shell.timeGraphMeasure = 100);
_local1.shell.timer = true;
_local1.shell.stage.lights._visible = false;
_local1.shell.stage.crowd.stop();
_local1.shell.stage.dtp.gotoAndPlay("bored");
_local1.shell.stopSound("song");
_local1.shell.playBgSound("rushhour", 10);
_local1.shell.levelUp();
this._parent._visible = false;
};
alertBox._visible = true;
_local1.shell.playSound("bonus", 1);
_local2.onEnterFrame = null;
} else {
iconWanted++;
_local1.shell.resetCheckPoints();
_local1.shell.checkPoints++;
_local1.shell.score = _local1.shell.score + 2000;
_local1.shell.startMusic();
_local1.shell.frogClip.ico._alpha = 0;
alertBox.butt.label = "ready?";
alertBox.alertTitle = ("well done <font color='#ffffff'>(time bonus " + _local1.shell.bonusOmeter) + " x10)</font>";
alertBox.alertMessage = "now go fetch the " + checkNameArray[iconWanted];
alertBox.butt.onPress = function () {
var _local1 = _global;
_local1.shell.timeGraph._xscale = (_local1.shell.timeGraphMeasure = 100);
_local1.shell.timer = true;
_local1.shell.stage.lights._visible = false;
_local1.shell.stage.crowd.stop();
_local1.shell.stage.dtp.gotoAndPlay("bored");
_local1.shell.stopSound("song");
_local1.shell.playBgSound("rushhour", 10);
_local1.shell.levelUp();
this._parent._visible = false;
};
alertBox._visible = true;
_local2.onEnterFrame = null;
}
}
};
}
}
i++;
}
}
function checkBarriers() {
var _local1 = _global;
i = 1;
while (i < 6) {
if (_local1.shell["barrier" + i].hitTest(_local1.shell.frogClip.hit)) {
looseLife();
}
i++;
}
}
function placeFrog() {
var _local1 = _global;
duplicateMovieClip (frog, "frogClip", 1000);
frogClip.icon._visible = false;
_local1.shell.frogClip._x = 120;
_local1.shell.frogClip._y = 330;
_local1.shell.playBgSound("rushhour", 10);
}
function resetLaneDepths(who) {
var _local1 = _global;
var _local2 = who;
dArray = [121, 101, 81, 61, 41, 21, 5];
nArray = ["lane0", "lane1", "lane2", "reservation", "lane3", "lane4", "lane5"];
i = 0;
while (i < nArray.length) {
if (nArray[i] != _local2) {
_local1.shell.createEmptyMovieClip(nArray[i], dArray[i]);
}
i++;
}
}
function checkDepth() {
var _local1 = _global;
var _local2 = this;
switch (_local2.frogClip._y) {
case 330 :
frogClip.swapDepths(_local1.shell.lane0);
resetLaneDepths("lane0");
return;
case 290 :
frogClip.swapDepths(_local1.shell.lane1);
resetLaneDepths("lane1");
return;
case 250 :
frogClip.swapDepths(_local1.shell.lane2);
resetLaneDepths("lane2");
return;
case 210 :
frogClip.swapDepths(_local1.shell.reservation);
resetLaneDepths("reservation");
return;
case 170 :
frogClip.swapDepths(_local1.shell.lane3);
resetLaneDepths("lane3");
return;
case 130 :
frogClip.swapDepths(_local1.shell.lane4);
resetLaneDepths("lane4");
return;
case 90 :
frogClip.swapDepths(_local1.shell.lane5);
resetLaneDepths("lane5");
return;
case 40 :
if (!(((((!_local2.hitTest(_local1.shell.firstCheck)) and (!_local2.hitTest(_local1.shell.secondCheck))) and (!_local2.hitTest(_local1.shell.thirdCheck))) and (!_local2.hitTest(_local1.shell.fourthCheck))) and (!_local2.hitTest(_local1.shell.fifthCheck)))) {
break;
}
_local1.shell.looseLife();
}
}
function shuntStage() {
var _local1 = _global;
_local1.shell.createEmptyMovieClip("stageHolder", nextAvailableZ);
nextAvailableZ++;
_local1.shell.createEmptyMovieClip("man1", nextAvailableZ);
nextAvailableZ++;
_local1.shell.createEmptyMovieClip("man2", nextAvailableZ);
nextAvailableZ++;
_local1.shell.createEmptyMovieClip("man3", nextAvailableZ);
nextAvailableZ++;
stage.swapDepths(_local1.shell.stageHolder);
walker1.swapDepths(_local1.shell.man1);
walker2.swapDepths(_local1.shell.man2);
walker3.swapDepths(_local1.shell.man3);
shunted = true;
}
function walkOn() {
this["walker" + (4 - lives)].gotoAndPlay(2);
}
function addBonus() {
duplicateMovieClip (this["bonus" + Number(random(2) + 1)], "bona", nextAvailableZ);
nextAvailableZ++;
var _local2 = [290, 250, 210, 170, 130];
var _local1 = [120, 160, 200, 240, 280, 320];
bona._x = _local2[random(_local2.length)];
bona._y = _local1[random(_local1.length)];
bona.gotoAndPlay(2);
bonusFlag = true;
}
function gameOverCall() {
var _local1 = _global;
checkSO();
_local1.shell.gameOver._visible = true;
_local1.shell.playSound("dead-fade", 1);
gameOver.mess = ("congratuations! \nyou scored a total of " + _local1.shell.score) + " points.";
}
function turnOnHome() {
_global.shell.stage.home._visible = true;
_global.shell.stage.home.play();
}
function lostLifeAlert() {
var _local1 = _global;
alertBox.butt.label = "next life";
alertBox.alertTitle = "oops";
alertBox.alertMessage = "you killed a roadie.<br>" + statements[random(statements.length)].toLowerCase();
alertBox.butt.onPress = function () {
var _local1 = _global;
gameLeg = "pickup";
_local1.shell.resetCheckPoints();
_local1.shell.stage.home.stop();
_local1.shell.stage.home._visible = false;
_local1.shell.stage.home.onEnterFrame = null;
stage.lights._visible = false;
stage.crowd.stop();
stage.dtp.gotoAndPlay("bored");
_local1.shell.timeGraph._xscale = (_local1.shell.timeGraphMeasure = 100);
_local1.shell.timer = true;
_local1.shell.stopMusic();
this._parent._visible = false;
};
alertBox._visible = true;
}
function updateScore(howMuch) {
if (howMuch != undefined) {
score = score + howMuch;
}
var _local2 = score.toString();
var _local1 = "";
s = 1;
while (s <= (10 - _local2.length)) {
_local1 = _local1 + "0";
s++;
}
displayScore = _local1 + score;
}
function updateBestScore() {
var _local2 = bestScore.toString();
var _local1 = "";
s = 1;
while (s <= (10 - _local2.length)) {
_local1 = _local1 + "0";
s++;
}
displayBestScore = _local1 + bestScore;
}
function looseLife() {
var _local2 = this;
var _local3 = _global;
timer = false;
lives--;
var _local1 = random(4) + 1;
_local2["death" + _local1]._x = frogClip._x;
_local2["death" + _local1]._y = frogClip._y;
var foo = _local3.shell.createEmptyMovieClip("d" + nextAvailableZ, nextAvailableZ);
nextAvailableZ++;
_local2["death" + _local1].swapDepths(foo);
removeMovieClip(_local3.shell.frogClip);
_local2["death" + _local1].gotoAndPlay(2);
_local3.shell.stopSound("rushhour");
}
function levelUp() {
checkPoints = 0;
score = score + 500;
level++;
levelUpClip.gotoAndPlay(2);
lane1Speed = lane1Speed + 0.2;
lane2Speed = lane2Speed + 0.2;
lane3Speed = lane3Speed + 0.2;
lane4Speed = lane4Speed + 0.2;
lane5Speed = lane5Speed + 0.3;
log1Speed = log1Speed + 0.2;
log2Speed = log2Speed + 0.2;
log3Speed = log3Speed + 0.2;
log4Speed = log4Speed + 0.2;
checkPointFlags();
addBonus();
}
function resetCheckPoints() {
var _local2 = _global;
i = iconWanted;
while (i < checkArray.length) {
if (checkArray[i] != "taken") {
var _local1 = checkArray[i];
_local2.shell[_local1].gotoAndStop(1);
_local2.shell[_local1]._visible = true;
_local2.shell[_local1].home.gotoAndStop(1);
_local2.shell[_local1].home._visible = false;
_local2.shell[_local1].flag = true;
_local2.shell[_local1].icon.gotoAndStop(i + 1);
}
i++;
}
_local2.shell[checkArray[iconWanted]].flag = false;
_local2.shell[checkArray[iconWanted]].home.play();
_local2.shell[checkArray[iconWanted]].home._visible = true;
_local2.shell[checkArray[iconWanted]]._visible = true;
checkPointFlags();
}
function checkPointFlags() {
firstCheck.icon.gotoAndStop(1);
secondCheck.icon.gotoAndStop(2);
thirdCheck.icon.gotoAndStop(3);
fourthCheck.icon.gotoAndStop(4);
fifthCheck.icon.gotoAndStop(5);
}
function stopCars() {
carsGo = false;
}
function startCars() {
carsGo = true;
}
function stopMusic() {
stage.lights._visible = false;
stage.crowd.stop();
stage.dtp.gotoAndPlay("bored");
walkOn();
}
function startMusic() {
stage.lights._visible = true;
stage.crowd.play();
_global.shell.stopSound("rushhour");
stage.dtp.gotoAndPlay("rock");
_global.shell.playBgSound("song");
}
function cleanUpGame() {
var _local1 = _global;
gameOver._visible = false;
alertBox._visible = false;
_local1.shell.stopSound("rushhour");
_local1.shell.stopSound("song");
timer = false;
removeMovieClip(_local1.shell.frogClip);
stage.home.stop();
stage.home._visible = false;
stage.home.onEnterFrame = null;
_local1.shell.createEmptyMovieClip("topPrizes", nextAvailableZ);
nextAvailableZ++;
prizesMC.swapDepths(_local1.shell.topPrizes);
_local1.shell.createEmptyMovieClip("topPetition", nextAvailableZ);
nextAvailableZ++;
petitionMC.swapDepths(_local1.shell.topPetition);
}
startSO(_level0.sessionId);
_global.sounds = new Object();
_global.soundsBg = new Object();
_global.sound.playingSounds = new Object();
_global.playingSounds.count = 0;
soundPlaying = "";
soundArray = ["bonus", "crowd-groan", "dead-fade"];
soundBgArray = ["rushhour", "song"];
i = 0;
while (i < soundArray.length) {
_global.sounds[soundArray[i]] = new Sound(this);
_global.sounds[soundArray[i]].attachSound(soundArray[i]);
_global.sounds[soundArray[i]].id = soundArray[i];
i++;
}
i = 0;
while (i < soundBgArray.length) {
_global.soundsBg[soundBgArray[i]] = new Sound(this);
_global.soundsBg[soundBgArray[i]].attachSound(soundBgArray[i]);
_global.soundsBg[soundBgArray[i]].id = soundBgArray[i];
i++;
}
var i = 1;
while (i <= 3) {
thingsToDo_mc["button" + i].onRollOver = buttonrollover;
thingsToDo_mc["button" + i].onRollOut = buttonrollout;
thingsToDo_mc["button" + i].onDragOut = buttonrollout;
thingsToDo_mc["button" + i].onDragOver = buttonrollover;
i++;
}
thingsToDo_mc.button1.label = "tell a friend";
thingsToDo_mc.button2.label = "sign the petition";
thingsToDo_mc.button3.label = "win goodies";
thingsToDo_mc.button1.onPress = function () {
_global.shell.callLink("friend");
};
thingsToDo_mc.button2.onPress = function () {
_global.shell.cleanUpGame();
_global.shell.initPetition();
};
thingsToDo_mc.button3.onPress = (thingsToDo_mc.talbum.onPress = function () {
_global.shell.cleanUpGame();
_global.shell.initPrizes();
});
thingsToDo_mc.button4.onPress = function () {
_global.shell.cleanUpGame();
_global.shell.initPetition();
};
alertBox = _global.shell.attachMovie("alertMC", "alertBox", 10000);
alertBox._x = 26;
alertBox._y = 123;
alertBox.butt.onRollOver = buttonrollover;
alertBox.butt.onRollOut = buttonrollout;
alertBox.butt.onDragOut = buttonrollout;
alertBox.butt.onDragOver = buttonrollover;
alertBox.butt.label = "ready?";
alertBox.alertTitle = "roadie runner";
alertBox.alertMessage = "collect the guitar from the other side of the road and bring it back";
alertBox.butt.onPress = function () {
stopMusic();
playGame();
this._parent._visible = false;
};
gameOver = _global.shell.attachMovie("gameOverMC", "gameOver", 10001);
gameOver._visible = false;
gameOver._x = 50;
gameOver._y = 70;
gameOver.butt.onRollOver = buttonrollover;
gameOver.butt.onRollOut = buttonrollout;
gameOver.butt.onDragOut = buttonrollout;
gameOver.butt.onDragOver = buttonrollover;
var i = 1;
while (i <= 3) {
gameOver["button" + i].onRollOver = buttonrollover;
gameOver["button" + i].onRollOut = buttonrollout;
gameOver["button" + i].onDragOut = buttonrollout;
gameOver["button" + i].onDragOver = buttonrollover;
i++;
}
gameOver.button1.label = "tell a friend";
gameOver.button2.label = "sign the petition";
gameOver.button3.label = "win goodies";
gameOver.button1.onPress = function () {
_global.shell.callLink("friend");
};
gameOver.button2.onPress = function () {
_global.shell.cleanUpGame();
_global.shell.initPetition();
};
gameOver.button3.onPress = function () {
_global.shell.cleanUpGame();
_global.shell.initPrizes();
};
gameOver.butt.label = "play again";
gameOver.butt.onPress = function () {
var _local1 = _global;
_local1.shell.resetGame();
_local1.shell.startGame();
_local1.shell.stopMusic();
_local1.shell.playGame();
this._parent._visible = false;
};
petitionMC = _global.shell.attachMovie("about", "petitionMC", 10002);
petitionMC._visible = false;
prizesMC = _global.shell.attachMovie("prizes", "prizesMC", 10003);
prizesMC._visible = false;
prizesMC._x = 45;
prizesMC._y = 90;
nextAvailableZ = 2000;
_global.shell.carSprites = 14;
button1.label = "start game";
button1.onPress = function () {
stopMusic();
startCars();
};
button2.label = "stop cars";
button2.onPress = function () {
stopCars();
};
resetGame();
startGame();
updateScoreObj();
startMusic();
stop();
Instance of Symbol 121 MovieClip "firstLane" in Frame 27
/* no clip actions */
Instance of Symbol 121 MovieClip "secondLane" in Frame 27
/* no clip actions */
Instance of Symbol 121 MovieClip "thirdLane" in Frame 27
/* no clip actions */
Instance of Symbol 121 MovieClip "fourthLane" in Frame 27
/* no clip actions */
Instance of Symbol 195 MovieClip "frog" in Frame 27
onClipEvent (load) {
this.space = 1;
this.checked = true;
this.incX = (this.incY = 0);
}
onClipEvent (enterFrame) {
_global.shell.updateCars();
if (((this._name != "frog") and (this.space == 1)) and (_global.shell.timer == true)) {
_global.shell.depth.dp = this.getDepth();
_global.shell.xx.dp = this._y;
_global.shell.timeGraphMeasure = _global.shell.timeGraphMeasure - ((0.1 * _global.shell.level) / 2);
_global.shell.timeGraph._xscale = int(_global.shell.timeGraphMeasure);
if ((_global.shell.timeGraph._xscale % 30) == 0) {
_global.shell.timeGraphMeasure = _global.shell.timeGraphMeasure - 1;
_global.shell.addBonus();
}
_global.shell.updateScore(5);
if (_global.shell.timeGraph._xscale < 1) {
_global.shell.looseLife();
}
if (((getTimer() - checksex) > 50) && (checksex != undefined)) {
this._x = this._x + this.incX;
this._y = this._y + this.incY;
if (this.inc == 4) {
this.inc = 0;
this.incX = (this.incY = 0);
this.checksex = null;
_global.shell.updateIcons();
_global.shell.checkDepth();
this.checked = true;
} else {
this.checksex = getTimer();
this.inc++;
}
} else if (this.checked == true) {
if (Key.isDown(38)) {
gotoAndPlay ("forward");
this.checked = false;
if (this.checksex == undefined) {
this.checksex = getTimer();
}
this.incY = -8;
this.space++;
_global.shell.frogSound.gotoAndPlay(2);
}
if (Key.isDown(39)) {
gotoAndPlay ("right");
this.checked = false;
if (this.checksex == undefined) {
this.checksex = getTimer();
}
this.incX = 8;
this.space++;
_global.shell.frogSound.gotoAndPlay(2);
}
if (Key.isDown(40) and (_y < 380)) {
gotoAndPlay ("backward");
this.checked = false;
if (this.checksex == undefined) {
this.checksex = getTimer();
}
this.incY = 8;
this.space++;
_global.shell.frogSound.gotoAndPlay(2);
}
if (Key.isDown(37)) {
gotoAndPlay ("left");
this.checked = false;
if (this.checksex == undefined) {
this.checksex = getTimer();
}
this.incX = -8;
this.space++;
_global.shell.frogSound.gotoAndPlay(2);
}
if (random(200) == 1) {
_global.shell.frogClip.gotoAndPlay("bored" + (random(2) + 1));
}
}
if ((this._x > 470) or (this._x < 10)) {
_global.shell.looseLife();
}
}
}
onClipEvent (keyUp) {
this.space = 1;
}
Instance of Symbol 121 MovieClip "fifthLane" in Frame 27
/* no clip actions */
Instance of Symbol 388 MovieClip "timeGraph" in Frame 27
/* no clip actions */
Instance of Symbol 389 MovieClip "firstCheck" in Frame 27
/* no clip actions */
Instance of Symbol 389 MovieClip "secondCheck" in Frame 27
/* no clip actions */
Instance of Symbol 389 MovieClip "thirdCheck" in Frame 27
/* no clip actions */
Instance of Symbol 389 MovieClip "fourthCheck" in Frame 27
/* no clip actions */
Frame 34
gameOverMc.mess = ("congratuations! \nyou scored a total of " + _global.shell.score) + " points.";
stop();
Frame 48
cleanUpGame();
initPetition();
stop();
Frame 58
cleanUpGame();
initPrizes();
stop();
Frame 67
cleanUpGame();
initPrizes();
stop();
Symbol 16 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 1
stop();
Symbol 28 MovieClip [prizes] Frame 1
stop();
Symbol 28 MovieClip [prizes] Frame 2
_global.shell.initPrizes2();
stop();
Symbol 35 MovieClip [tagButton_obj] Frame 1
stop();
Symbol 63 Button
on (release) {
play();
}
Symbol 70 MovieClip Frame 45
talbum.onPress = function () {
_global.shell.cleanUpGame();
_global.shell.initPrizes();
};
stop();
Symbol 80 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 85 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 91 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 95 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 104 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 110 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 114 MovieClip Frame 1
if (_root.carsGo) {
play();
} else {
stop();
}
Symbol 121 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 8
gotoAndStop ("forward");
Symbol 195 MovieClip Frame 27
gotoAndStop ("backward");
Symbol 195 MovieClip Frame 48
gotoAndStop ("right");
Symbol 195 MovieClip Frame 65
gotoAndStop ("left");
Symbol 195 MovieClip Frame 160
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 102
if (_global.shell.lives > 0) {
_global.shell.lostLifeAlert();
} else {
_global.shell.gameOverCall();
}
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 2
play();
Symbol 235 MovieClip Frame 20
this.gotoAndPlay(2);
Symbol 235 MovieClip Frame 42
this.removeMovieClip();
Symbol 262 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 102
if (_global.shell.lives > 0) {
_global.shell.lostLifeAlert();
} else {
_global.shell.gameOverCall();
}
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 2
play();
Symbol 263 MovieClip Frame 20
this.gotoAndPlay(2);
Symbol 263 MovieClip Frame 42
this.removeMovieClip();
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 102
if (_global.shell.lives > 0) {
_global.shell.lostLifeAlert();
} else {
_global.shell.gameOverCall();
}
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 96
if (_global.shell.lives > 0) {
_global.shell.lostLifeAlert();
} else {
_global.shell.gameOverCall();
}
Symbol 377 MovieClip Frame 15
gotoAndPlay ("rock");
Symbol 377 MovieClip Frame 289
gotoAndPlay ("bored");
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 2
play();
_global.shell.stopSound("song");
Symbol 384 MovieClip Frame 10
play();
Symbol 384 MovieClip Frame 21
_global.shell.shuntStage();
Symbol 384 MovieClip Frame 36
stop();
_parent.placeFrog();
Symbol 385 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 2
play();
_global.shell.stopSound("song");
Symbol 385 MovieClip Frame 10
play();
Symbol 385 MovieClip Frame 25
_global.shell.shuntStage();
Symbol 385 MovieClip Frame 40
stop();
_parent.placeFrog();
Symbol 386 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 2
play();
_global.shell.stopSound("song");
Symbol 386 MovieClip Frame 9
play();
Symbol 386 MovieClip Frame 28
_global.shell.shuntStage();
Symbol 386 MovieClip Frame 43
stop();
_parent.placeFrog();
Symbol 389 MovieClip Frame 1
stop();