Frame 6
_root.percent = Math.floor((getBytesLoaded() / getBytesTotal()) * 100);
loader.mask._xscale = 100 - _root.percent;
Frame 7
if ((getBytesLoaded() >= getBytesTotal()) && (getBytesTotal() > 1)) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Instance of Symbol 17 MovieClip in Frame 11
onClipEvent (enterFrame) {
_root.everyframe();
}
Frame 12
function traffic() {
if (Game.status != "play") {
return(undefined);
}
i = 1;
while (i <= Game.Lanes) {
createCar(i);
i++;
}
createloot();
getloot();
}
function createloot() {
var _local1 = _root;
i = 0;
while (i < Game.loot.length) {
if ((Game.loot[i] == 0) && (Game.lootDelay > 66)) {
if (random(Game.frequency1) <= 30) {
coin = random(Game.frequency1);
if ((coin >= 5) && (coin <= 40)) {
loot = 0.05;
frame = "05c";
} else if ((coin >= 41) && (coin <= 75)) {
loot = 0.1;
frame = "10c";
} else if ((random(Game.frequency1) >= 76) && (coin <= 85)) {
loot = 0.25;
frame = "25c";
} else if (((coin >= 86) && (coin <= 91)) && (Game.level >= 2)) {
loot = 1;
frame = "100c";
} else if ((((coin >= 92) && (coin <= 98)) && (Game.level >= 4)) && (Bum.coffee == -1)) {
loot = "coffee";
frame = "coffee";
} else if ((coin == 99) && (Game.level >= 5)) {
loot = "booze";
frame = "booze";
} else {
loot = 0.01;
frame = "01c";
}
} else {
return;
}
Game["lootTimer" + i] = 0;
Game.lootDelay = 0;
Game.loot[i] = loot;
coins.attachmovie("art_loot", "loot" + i, 3000 + i);
coins["loot" + i].gotoAndStop(frame);
coins["loot" + i]._x = _local1["lootplacer" + (random(5) + 1)]._x - (coins["loot" + i]._width / 2);
coins["loot" + i]._y = random(330) + 10;
return;
}
i++;
}
}
function trackLoot() {
var _local1 = _root;
i = 0;
while (i < Game.loot.length) {
Game["lootTimer" + i]++;
if (((Game["lootTimer" + i] == (Game.lootspan - 30)) || (Game["lootTimer" + i] == (Game.lootspan - 20))) || (Game["lootTimer" + i] == (Game.lootspan - 10))) {
coins["loot" + i]._alpha = 0;
} else if (((Game["lootTimer" + i] == (Game.lootspan - 25)) || (Game["lootTimer" + i] == (Game.lootspan - 14))) || (Game["lootTimer" + i] == (Game.lootspan - 5))) {
coins["loot" + i]._alpha = 100;
} else if (Game["lootTimer" + i] >= Game.lootspan) {
removeMovieClip(_local1.coins["loot" + i]);
Game.loot[i] = 0;
}
i++;
}
}
function getloot() {
var _local1 = _root;
i = 0;
while (i < Game.loot.length) {
if (Bum.path.lootgrabber.hittest(_local1.coins["loot" + i])) {
removeMovieClip(_local1.coins["loot" + i]);
if (Game.loot[i] == "booze") {
Bum.lives = Bum.lives + 1;
nav.lives.text = Bum.lives;
nav.lives_display.play();
_local1.soundshift.gotoAndPlay("booze");
} else if (Game.loot[i] == "coffee") {
Bum.nowSpeed = Bum.fastSpeed;
Bum.coffee = 100;
nav.speed._alpha = 100;
_local1.soundshift.gotoAndPlay("coffee");
} else {
Game.score = Number(Game.score) + Game.loot[i];
convertScore();
_local1.nav.score.text = "$" + Game.score;
_local1.soundshift.gotoAndPlay("loot1");
}
Game.loot[i] = 0;
Game.levelAdvance();
return;
}
i++;
}
}
function createCar(lane) {
var _local1 = lane;
var _local2 = _root;
if (Game["lane" + _local1] == "open") {
if (random(Game.frequency) == 1) {
_local2["lane" + _local1].attachmovie("car1", "car" + Game.carCount, 2000 + Game.carCount);
_local2["lane" + _local1]["car" + Game.carCount]._y = -_local2["lane" + _local1]["car" + Game.carCount]._height;
_local2["lane" + _local1]["car" + Game.carCount]._x = 0;
Game.carCount++;
if (Game.carCount > 49) {
Game.carCount = 0;
}
}
}
}
function moveCar(car, lane, cherry) {
var _local1 = _root;
var _local2 = lane;
var _local3 = car;
if (Game.status == "pause") {
} else {
_local1["lane" + _local2]["car" + String(_local3).substr(17)]._y = _local1["lane" + _local2]["car" + String(_local3).substr(17)]._y + Game.speed;
if (_local1["lane" + _local2]["car" + String(_local3).substr(17)]._y < 70) {
Game["lane" + _local2] = "closed";
} else if (cherry == "virgin") {
Game["lane" + _local2] = "open";
_local1["lane" + _local2]["car" + String(_local3).substr(17)].actions.cherry = "popped";
}
if (_local1["lane" + _local2]["car" + String(_local3).substr(17)]._y > 500) {
removeMovieClip(_local1["lane" + _local2]["car" + String(_local3).substr(17)]);
}
if (Bum.path.hit.hittest(_local1["lane" + _local2]["car" + String(_local3).substr(17)].hit)) {
Bum.hit();
_local1.soundshift.gotoAndPlay("kill");
} else if (Bum.path.hit.hittest(Cop.path.hit)) {
Bum.hit();
Cop.path.gotoandstop(2);
_local1.soundshift.gotoAndPlay("beat");
}
}
}
function everyFrame() {
if (Game.status == "pause") {
return(undefined);
}
Game.lootDelay++;
traffic();
trackloot();
if (Bum.status == "active") {
manMove("bum");
}
i = 0;
while (i < enemies.length) {
manMove("enemy" + i);
i++;
}
if (Bum.coffee > 0) {
nav.speed.coffee._yScale = Bum.coffee;
Bum.coffee = Bum.coffee - 0.25;
} else if ((Bum.coffee <= 0) && (Bum.coffee > -1)) {
Bum.coffee = -1;
nav.speed.gotoAndPlay("empty");
Bum.nowSpeed = Bum.baseSpeed;
}
if (Cop.path._currentframe == 1) {
Cop.path._y = Cop.path._y + Cop.speed;
}
if (Cop.path._y > 450) {
Cop.place(random(3));
}
}
function convertScore() {
if (String(Game.score).charAt(String(Game.score).length - 2) == ".") {
Game.score = Game.score + "0";
} else if (String(Game.score).charAt(String(Game.score).length - 3) != ".") {
Game.score = Game.score + ".00";
}
}
function soundswitch(dir) {
if (Game.sound == "off") {
vol.setVolume(0);
} else {
vol.setVolume(100);
}
}
Game = {};
Game.init = function () {
var _local1 = this;
_local1.edgeX = 500;
_local1.edgeY = 400;
_local1.status = "play";
_local1.lanes = 6;
_local1.level = 1;
_local1.setupLanes();
_local1.carCount = 0;
_local1.loot = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
_local1.score = 0;
_root.nav.score.text = "$" + _local1.score;
_local1.initialized = "yes";
_local1.frequency1 = 100;
_local1.lootDelay = 80;
_local1.lootspan = 400;
_local1.levelArray = ["none", 1, 3, 5, 7, 10, 15, 20, 25, 30, 40, 50];
_local1.speedArray = ["none", 3, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15];
_local1.frequencyArray = ["none", 150, 140, 130, 100, 100, 80, 80, 70, 65, 60, 50];
if (_local1.sound != "off") {
_local1.sound = "on";
}
Game.nextlevel = Game.levelArray[Game.level];
Game.frequency = Game.frequencyArray[Game.level];
Game.speed = Game.speedArray[Game.level];
};
Game.setupLanes = function () {
i = 1;
while (i <= Game.lanes) {
Game["lane" + i] = "open";
i++;
}
};
Game.start = function () {
_root.attachmovie("ready", "ready", 50000);
ready._x = 250;
ready._y = 200;
if (Bum.lives < 0) {
Game.initialized = "no";
Bum.lives = Bum.maxLives;
Game.status = "pause";
ready.gotoAndPlay("gameover");
}
};
Game.go = function () {
removeMovieClip(_root.ready);
if (Game.initialized != "yes") {
Game.init();
Bum.lives = Bum.maxLives;
}
Bum.init();
nav.lives.text = Bum.lives;
Bum.place(Bum.startX, Bum.startY);
if (Game.level > 2) {
Cop.init();
}
};
Game.reset = function () {
var _local1 = _root;
Game.status = "pause";
start._x = 0;
nav.gotoAndStop(1);
i = 1;
while (i <= 6) {
j = 0;
while (j <= 50) {
removeMovieClip(_local1["lane" + i]["car" + j]);
j++;
}
i++;
}
i = 0;
while (i <= Game.loot.length) {
removeMovieClip(_local1.coins["loot" + i]);
i++;
}
removeMovieClip(_local1.ready);
removeMovieClip(_local1.Cop.path);
};
Game.levelAdvance = function () {
if (Game.score >= Game.nextlevel) {
_root.attachmovie("ready", "ready", 50000);
ready._x = 250;
ready._y = 200;
_root.ready.gotoAndPlay("levelup");
Game.level++;
ready.level.text = Game.level;
Game.nextlevel = Game.levelArray[Game.level];
Game.frequency = Game.frequencyArray[Game.level];
Game.speed = Game.speedArray[Game.level];
if (Game.speed == undefined) {
Game.speed = Game.speedArray[Game.speedArray.length - 1];
}
if (Game.frequency == undefined) {
Game.frequency = Game.frequencyArray[Game.frequencyArray.length - 1];
}
if (Game.nextlevel == undefined) {
Game.nextlevel = Game.nextlevel + (Game.nextlevel * 0.5);
}
if (Game.level == 3) {
Cop.init();
}
}
};
vol = new Sound(_root);
function manMove(bum) {
var _local1 = _root;
if (Game.status == "pause") {
} else if (key.isdown(Game.lastkey)) {
_local1.Bum.fromX = _local1.Bum.path._x;
_local1.Bum.fromY = _local1.Bum.path._y;
_local1.Bum.path._x = _local1.Bum.path._x + _local1.Bum.xSpeed;
_local1.Bum.path._y = _local1.Bum.path._y + _local1.Bum.ySpeed;
if ((((_local1.Bum.path._x < 0) || (_local1.Bum.path._y < 0)) || ((_local1.Bum.path._x + _local1.Bum.path._width) > _local1.Game.edgeX)) || ((_local1.Bum.path._y + _local1.Bum.path._height) > _local1.Game.edgeY)) {
_local1.Bum.path._x = _local1.Bum.path._x - _local1.Bum.xSpeed;
_local1.Bum.path._y = _local1.Bum.path._y - _local1.Bum.ySpeed;
}
_local1.Bum.path.bum.gotoAndStop("walk");
} else {
Bum.xSpeed = 0;
Bum.ySpeed = 0;
_local1.Bum.path.bum.gotoAndStop("still");
}
}
Bum = {};
Bum.init = function () {
street.attachmovie("art_bum", "art_bum", 10000);
Bum.path = street.art_bum;
Bum.status = "active";
Bum.xSpeed = 0;
Bum.ySpeed = 0;
Bum.baseSpeed = 6;
Bum.nowSpeed = Bum.baseSpeed;
Bum.fastSpeed = 10;
Bum.startX = 228;
Bum.startY = 180;
Bum.maxLives = 2;
Bum.coffee = -1;
if (Bum.lives == undefined) {
Bum.lives = Bum.maxlives;
}
};
Bum.place = function (x, y) {
Bum.path._x = x;
Bum.path._y = y;
};
Bum.hit = function (x, y) {
Bum.lives = Bum.lives - 1;
coins.attachmovie("bum_dead", "bum_dead", 10000);
coins.bum_dead._x = Bum.path._x;
coins.bum_dead._y = Bum.path._y;
removeMovieClip(Bum.path);
if (Bum.coffee != -1) {
Bum.coffee = -1;
nav.speed.gotoAndPlay("empty");
Bum.nowSpeed = Bum.baseSpeed;
}
};
keyListener = new Object();
keyListener.onKeyDown = function () {
if (Game.status == "pause") {
return(undefined);
}
if (String(key.getCode()) == 37) {
Game.lastkey = 37;
Bum.xSpeed = -1 * Bum.nowSpeed;
Bum.ySpeed = 0;
Bum.path.gotoAndStop("left");
} else if (String(key.getCode()) == 39) {
Game.lastkey = 39;
Bum.xSpeed = Bum.nowSpeed;
Bum.ySpeed = 0;
Bum.path.gotoAndStop("right");
} else if (String(key.getCode()) == 38) {
Game.lastkey = 38;
Bum.ySpeed = -1 * Bum.nowSpeed;
Bum.xSpeed = 0;
Bum.path.gotoAndStop("up");
} else if (String(key.getCode()) == 40) {
Game.lastkey = 40;
Bum.ySpeed = Bum.nowSpeed;
Bum.xSpeed = 0;
Bum.path.gotoAndStop("down");
}
};
key.addListener(keyListener);
Cop = {};
Cop.init = function () {
street.attachmovie("art_cop", "art_cop", 9000);
Cop.path = street.art_cop;
Cop.speed = 2;
Cop.startpoint = [5, 227, 450];
Cop.place = function (x) {
Cop.path._x = Cop.startpoint[x];
Cop.path._y = -100;
};
Cop.place(1);
Cop.path.gotoAndStop(1);
_root.soundshift.gotoAndPlay("cop");
};
Instance of Symbol 225 MovieClip "lane1" in Frame 12
onClipEvent (load) {
lane = 1;
}
Instance of Symbol 225 MovieClip "lane2" in Frame 12
onClipEvent (load) {
lane = 2;
}
Instance of Symbol 225 MovieClip "lane3" in Frame 12
onClipEvent (load) {
lane = 3;
}
Instance of Symbol 225 MovieClip "lane4" in Frame 12
onClipEvent (load) {
lane = 4;
}
Instance of Symbol 225 MovieClip "lane5" in Frame 12
onClipEvent (load) {
lane = 5;
}
Instance of Symbol 225 MovieClip "lane6" in Frame 12
onClipEvent (load) {
lane = 6;
}
Frame 15
stop();
Symbol 8 MovieClip [art_loot] Frame 1
stop();
Symbol 8 MovieClip [art_loot] Frame 7
stop();
Symbol 8 MovieClip [art_loot] Frame 13
stop();
Symbol 8 MovieClip [art_loot] Frame 19
stop();
Symbol 8 MovieClip [art_loot] Frame 25
stop();
Symbol 8 MovieClip [art_loot] Frame 31
stop();
Symbol 8 MovieClip [art_loot] Frame 37
stop();
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 4
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 4
stop();
Symbol 29 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 4
stop();
Symbol 31 MovieClip [art_bum] Frame 1
stop();
Symbol 31 MovieClip [art_bum] Frame 2
stop();
Symbol 31 MovieClip [art_bum] Frame 3
stop();
Symbol 31 MovieClip [art_bum] Frame 4
stop();
Symbol 31 MovieClip [art_bum] Frame 10
stop();
Symbol 60 MovieClip [car1] Frame 1
gotoAndStop(random(this._totalframes) + 1);
Instance of Symbol 17 MovieClip "actions" in Symbol 60 MovieClip [car1] Frame 1
onClipEvent (load) {
cherry = "virgin";
}
onClipEvent (enterFrame) {
_root.moveCar(_parent, _parent._parent.lane, cherry);
}
Symbol 60 MovieClip [car1] Frame 30
if (_root.Game.level < 4) {
gotoAndStop(_currentframe - 10);
}
Symbol 60 MovieClip [car1] Frame 31
if (_root.Game.level < 4) {
gotoAndStop(_currentframe - 10);
}
Symbol 60 MovieClip [car1] Frame 32
if (_root.Game.level < 4) {
gotoAndStop(_currentframe - 10);
}
Symbol 60 MovieClip [car1] Frame 33
if (_root.Game.level < 6) {
gotoAndStop(_currentframe - 10);
}
Symbol 95 Button
on (release) {
getURL ("http://www.thefrown.com", "_blank");
}
Symbol 104 MovieClip [ready] Frame 18
play();
if (_root.Game.level == undefined) {
_root.Game.level = 1;
}
level.text = _root.Game.level;
Symbol 104 MovieClip [ready] Frame 47
_root.Game.go();
stop();
Symbol 104 MovieClip [ready] Frame 54
play();
score.text = "$" + _root.Game.score;
Symbol 104 MovieClip [ready] Frame 67
stop();
Symbol 104 MovieClip [ready] Frame 76
play();
Symbol 104 MovieClip [ready] Frame 105
stop();
Symbol 105 MovieClip [bum_dead] Frame 36
_root.Game.start();
_root.nav.speed.gotoAndStop(1);
removeMovieClip(this);
removeMovieClip(_root.Cop.path);
Symbol 111 MovieClip [art_cop] Frame 1
stop();
Symbol 111 MovieClip [art_cop] Frame 2
stop();
Symbol 120 MovieClip Frame 1
stop();
trace(mask._x);
Symbol 120 MovieClip Frame 2
percent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
mask._xscale = percent;
Symbol 120 MovieClip Frame 3
if (_root.getBytesLoaded < _root.getBytesTotal) {
gotoAndPlay(_currentframe - 1);
}
Symbol 166 Button
on (release) {
_root.Game.start();
gotoAndStop (2);
_root.start._x = -1000;
}
Symbol 172 Button
on (press) {
if (_root.Game.status == "play") {
_root.Game.status = "pause";
} else {
_root.Game.status = "play";
}
}
Symbol 177 Button
on (press) {
_root.Game.reset();
}
Symbol 184 MovieClip Frame 1
this._alpha = 0;
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 190 Button
on (press) {
play();
}
Symbol 197 MovieClip Frame 1
_root.Game.sound = "on";
_root.soundswitch();
stop();
Symbol 197 MovieClip Frame 2
_root.Game.sound = "off";
_root.soundswitch();
stop();
Symbol 198 MovieClip Frame 1
_root.Game.level = 1;
stop();
Symbol 223 MovieClip Frame 1
stop();
Instance of Symbol 17 MovieClip in Symbol 223 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.everyframe();
}
Symbol 223 MovieClip Frame 6
gotoAndStop (1);
Symbol 223 MovieClip Frame 11
gotoAndStop (1);
Symbol 223 MovieClip Frame 16
if ((_global.bumspeak == undefined) || (_global.bumspeak == 20)) {
_global.bumspeak = 0;
}
_global.bumspeak++;
gotoAndPlay("b" + _global.bumspeak);
Symbol 223 MovieClip Frame 46
gotoAndStop (1);
Symbol 223 MovieClip Frame 73
gotoAndStop (1);
Symbol 223 MovieClip Frame 98
gotoAndStop (1);
Symbol 223 MovieClip Frame 123
gotoAndStop (1);
Symbol 223 MovieClip Frame 148
gotoAndStop (1);
Symbol 223 MovieClip Frame 171
gotoAndStop (1);
Symbol 223 MovieClip Frame 197
gotoAndStop (1);
Symbol 223 MovieClip Frame 223
gotoAndStop (1);
Symbol 223 MovieClip Frame 241
gotoAndStop (1);
Symbol 223 MovieClip Frame 256
gotoAndStop (1);
Symbol 223 MovieClip Frame 285
gotoAndStop (1);
Symbol 223 MovieClip Frame 309
gotoAndStop (1);
Symbol 223 MovieClip Frame 325
gotoAndStop (1);
Symbol 223 MovieClip Frame 357
gotoAndStop (1);
Symbol 223 MovieClip Frame 374
gotoAndStop (1);
Symbol 223 MovieClip Frame 391
gotoAndStop (1);
Symbol 223 MovieClip Frame 425
gotoAndStop (1);
Symbol 223 MovieClip Frame 447
gotoAndStop (1);
Symbol 223 MovieClip Frame 469
gotoAndStop (1);
Symbol 223 MovieClip Frame 511
gotoAndStop (1);
Symbol 223 MovieClip Frame 512
gotoAndStop (1);
Symbol 223 MovieClip Frame 517
gotoAndStop (1);
Symbol 223 MovieClip Frame 522
gotoAndStop (1);