Frame 1
_root.lives = 3;
score = 0;
_root.playlevel = 1;
stop();
Instance of Symbol 73 MovieClip [high_scores] in Frame 1
onClipEvent (load) {
gotoAndPlay (1);
}
Frame 2
function buildMap(map) {
this.attachMovie("empty", "clip", 0);
this.scrClip._x = startX;
this.scrClip._y = startY;
mapW = map[0].length;
mapH = map.length;
var i = 0;
while (i < mapH) {
var j = 0;
while (j < mapW) {
this.clip.attachMovie("tile", (("t_" + i) + "_") + j, ++d);
this.clip[(("t_" + i) + "_") + j]._x = j * tileW;
this.clip[(("t_" + i) + "_") + j]._y = i * tileH;
this.clip[(("t_" + i) + "_") + j].gotoAndStop(map[i][j]);
this.clip[(("t_" + i) + "_") + j]._quality = "LOW";
if (map[i][j] == 3) {
_root.exittile_i = i;
_root.exittile_j = j;
}
if (map[i][j] >= 6) {
_root.goodiesleft++;
}
if ((i == startPos[1]) && (j == startPos[0])) {
this.clip.attachMovie("char", "char", 12000);
this.clip.char.xpos = (j * tileW) + charW;
this.clip.char.ypos = ((i + 1) * tileH) - charH;
}
j++;
}
i++;
}
k = 1;
enemyvar = this["numenemies_" + playlevel];
while (k <= enemyvar) {
thisenemy0 = this[(("enemy_" + playlevel) + "_") + k][0];
thisenemy1 = this[(("enemy_" + playlevel) + "_") + k][1];
this.clip.attachMovie("enemy", "enemy_" + k, ++d);
this.clip["enemy_" + k].xpos = (thisenemy0 * tileW) - 6;
this.clip["enemy_" + k].ypos = (thisenemy1 * tileH) - 11;
this.clip["enemy_" + k].enemyW = 6;
this.clip["enemy_" + k].enemyH = 11;
this.clip["enemy_" + k].speed = 1;
this.clip["enemy_" + k].num = k;
k++;
}
}
numenemies_1 = 2;
startPos_1 = [2, 3];
enemy_1_1 = [24, 8];
enemy_1_2 = [11, 5];
map_1 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 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2, 2, 2, 2, 2, 2, 2, 2, 2]];
_root.totallevels = 15;
tileW = 12;
tileH = 12;
headinfo.swapDepths(1000);
startPos = this["startPos_" + playlevel];
charH = 8;
charW = 5;
_root.timelefta = 99;
tile1 = {walkable:"yes"};
tile2 = {walkable:"no"};
delete _root.gameovermessage;
playlevel = _root.playlevel;
map = this["map_" + playlevel];
buildMap(map);
stop();
Instance of Symbol 63 MovieClip [top_row_text] "headinfo" in Frame 2
/* no clip actions */
Instance of Symbol 4 MovieClip [empty] in Frame 2
onClipEvent (enterFrame) {
if (_root.iskilled != "yes") {
_root.timelefta = _root.timelefta - 0.1;
_root.timeleft = Math.round(_root.timelefta);
}
if (_root.timeleft <= 0) {
_root.timelefta = 0;
_root.gameovermessage = "Time's Up!";
_root.clip.char.gotoAndStop(6);
}
}
Instance of Symbol 79 MovieClip "messagebox" in Frame 2
onClipEvent (enterFrame) {
this.swapDepths(1);
}
Frame 3
_root.lives--;
removeMovieClip(headinfo);
stop();
Instance of Symbol 41 MovieClip "death" in Frame 3
onClipEvent (enterFrame) {
this._y = this._y - 3;
}
Instance of Symbol 4 MovieClip [empty] in Frame 3
onClipEvent (enterFrame) {
if ((Key.getAscii() == 99) || (Key.getAscii() == 67)) {
_root.iskilled = undefined;
_root.gotoAndPlay(2);
}
if (_root.lives == 0) {
_root.specialmessage = "ONE MORE TRY!";
} else {
_root.specialmessage = "";
}
}
Frame 4
removeMovieClip(headinfo);
Selection.setFocus("_root.user_name");
stop();
Instance of Symbol 4 MovieClip [empty] in Frame 4
onClipEvent (enterFrame) {
if (Key.getAscii() == "78") {
_root.lives = 3;
_root.score = 0;
_root.playlevel = 1;
_root.iskilled = undefined;
_root.gotoAndPlay(2);
}
if (Key.isDown(13)) {
_root.lives = 3;
_root.playlevel = 1;
_root.iskilled = undefined;
_root.gotoAndPlay(6);
}
}
Frame 5
function endoflevel() {
tick++;
if (tick >= 20) {
_root.timebonustext = "time bonus:";
bonusloop++;
if (bonusloop <= _root.timeleft) {
_root.timebonus++;
} else {
newloop++;
if (newloop == 8) {
_root.newscoretext = "score:";
_root.score = _root.score + _root.timebonus;
_root.newscore = _root.score;
}
if (newloop >= 26) {
_root.continuetext = "press C to start next level";
if ((Key.getAscii() == 99) || (Key.getAscii() == 67)) {
if (_root.playlevel < _root.totallevels) {
_root.playlevel++;
} else {
_root.playlevel = 1;
}
_root.gotoAndPlay(2);
}
}
}
}
}
removeMovieClip(headinfo);
_root.timebonus = undefined;
_root.timebonustext = undefined;
_root.continuetext = undefined;
tick = undefined;
bonusloop = undefined;
newloop = undefined;
_root.newscoretext = undefined;
_root.newscore = undefined;
stop();
Instance of Symbol 4 MovieClip [empty] in Frame 5
onClipEvent (enterFrame) {
_parent.endoflevel();
}
Instance of Symbol 30 MovieClip in Frame 5
onClipEvent (enterFrame) {
this._x = this._x + 2;
}
Frame 6
function addhighscore() {
thisloop++;
if (_root.CheckAdd == "1") {
_root.score = 0;
gotoAndStop (1);
} else {
gotoAndStop (6);
}
if (thisloop >= 15) {
_root.addingmessage = "ADDING SCORE TO DATABASE...";
trace(_root.CheckAdd);
}
}
loadVariablesNum ((("http://www.daveheinzel.com/beerdude/add_scores.php?name=" + _root.user_name) + "&score=") + _root.score, 0);
thisloop = 0;
stop();
Instance of Symbol 4 MovieClip [empty] in Frame 6
onClipEvent (enterFrame) {
_parent.addhighscore();
}
Symbol 42 MovieClip [char] Frame 1
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function getcornersright() {
cordrx = Math.ceil((xpos + charW) / tileW) - 1;
cordtry = Math.ceil((ypos - charH) / tileH) - 1;
cordcry = Math.ceil(ypos / tileH) - 1;
cordbry = Math.ceil((ypos + charH) / tileH) - 1;
trwalk = _root["tile" + _root.map[cordtry][cordrx]].walkable;
crwalk = _root["tile" + _root.map[cordcry][cordrx]].walkable;
brwalk = _root["tile" + _root.map[cordbry][cordrx]].walkable;
tiletype = _root.map[cordcry][cordrx];
}
function getcornersleft() {
cordlx = Math.ceil((xpos - charW) / tileW) - 1;
cordtry = Math.ceil((ypos - charH) / tileH) - 1;
cordcly = Math.ceil(ypos / tileH) - 1;
cordbly = Math.ceil((ypos + charH) / tileH) - 1;
tlwalk = _root["tile" + _root.map[cordtry][cordlx]].walkable;
clwalk = _root["tile" + _root.map[cordcly][cordlx]].walkable;
blwalk = _root["tile" + _root.map[cordbly][cordlx]].walkable;
}
function getcornerstop() {
cordty = Math.ceil((ypos - charH) / tileH) - 1;
cordtlx = Math.ceil(((xpos - charW) + padding) / tileW) - 1;
cordtcx = Math.ceil(xpos / tileW) - 1;
cordtrx = Math.ceil(((xpos + charW) - padding) / tileW) - 1;
tlwalk = _root["tile" + _root.map[cordty][cordtlx]].walkable;
tcwalk = _root["tile" + _root.map[cordty][cordtcx]].walkable;
trwalk = _root["tile" + _root.map[cordty][cordtrx]].walkable;
}
function getcornersbottom(gcb) {
cordby = Math.ceil(((ypos + gcb) + charH) / tileH) - 1;
cordblx = Math.ceil(((xpos - charW) + padding) / tileW) - 1;
cordbcx = Math.ceil(xpos / tileW) - 1;
cordbrx = Math.ceil(((xpos + charW) - padding) / tileW) - 1;
blwalk = _root["tile" + _root.map[cordby][cordblx]].walkable;
bcwalk = _root["tile" + _root.map[cordby][cordbcx]].walkable;
brwalk = _root["tile" + _root.map[cordby][cordbrx]].walkable;
}
function control() {
if (Key.isDown(16)) {
running = "yes";
speed = runspeed;
} else {
speed = walkspeed;
if (running == "yes") {
running = "no";
}
}
if (Key.isDown(37)) {
directionx = "left";
xpos = xpos - speed;
this.getcornersleft();
if (((tlwalk == "no") || (clwalk == "no")) || (blwalk == "no")) {
xpos = ((cordlx + 1) * tileW) + charW;
}
} else if (directionx == "left") {
directionx = "still";
}
if (Key.isDown(39)) {
directionx = "right";
xpos = xpos + speed;
this.getcornersright();
if (((trwalk == "no") || (crwalk == "no")) || (brwalk == "no")) {
xpos = (cordrx * tileW) - charW;
}
} else if (directionx == "right") {
directionx = "still";
}
if (!jumping) {
jumping = "no";
}
if (((((jumping == "no") && (canjump != "no")) && (onground == "yes")) && (jumplup == "0")) && (Key.isDown(32))) {
canjump = "no";
fspeed = 2;
jumping = "yes";
onground = "no";
jumplup++;
yjspeed = jumpspeed;
}
if (Key.isDown(32)) {
canjump = "no";
} else {
canjump = "yes";
}
if (jumplup > 0) {
if (jumplup >= (_root.tileH - jumpspeed)) {
jumplup = (_root.tileH - jumpspeed) - 1;
}
yjspeed = Math.round(jumpspeed + (jumplup * gravity));
if (!Key.isDown(32)) {
if (yjspeed < -3) {
yjspeed = -3;
jumplup = Math.abs(jumpspeed);
}
}
if (yjspeed > (tileH - 1)) {
yjspeed = tileH - 1;
}
if (yjspeed < 0) {
ypos = ypos + Math.round(yjspeed);
jumplup++;
} else {
jumplup = 0;
}
} else {
jumplup = "0";
jumping = "no";
}
this.getcornersbottom(1);
if (jumplup == "0") {
if (((blwalk == "no") || (bcwalk == "no")) || (brwalk == "no")) {
bottomhit = "yes";
onground = "yes";
fspeed = 2;
} else {
bottomhit = "no";
if (jumplup == "0") {
if (!fspeed) {
fspeed = 2;
}
if (fspeed >= (tileH - 5)) {
fspeed = tileH - 5;
}
ypos = ypos + Math.round(fspeed * gravity);
fspeed++;
}
onground = "no";
}
}
this.getcornersbottom();
if (((blwalk == "no") || (bcwalk == "no")) || (brwalk == "no")) {
ypos = (cordby * tileH) - charH;
}
if (onground == "no") {
this.getcornerstop();
if (((tlwalk == "no") || (tcwalk == "no")) || (trwalk == "no")) {
jumplup = 0;
ypos = ((cordty + 1) * tileH) + (charH + 1);
}
}
if (jumplup != "0") {
directiony = "jumping";
} else if (fspeed != "2") {
directiony = "falling";
} else {
directiony = "still";
}
if (ypos > 400) {
ypos = 400;
}
if (xpos < charW) {
xpos = charW;
}
if (xpos > 391) {
xpos = 391;
}
if (directiony == "jumping") {
this.gotoAndStop(4);
} else if (directiony == "falling") {
this.gotoAndStop(5);
} else if (directionx == "still") {
this.gotoAndStop(1);
} else if (directionx == "left") {
this.gotoAndStop(2);
} else if (directionx == "right") {
this.gotoAndStop(3);
}
coordx = Math.round((xpos + charW) / tileW) - 1;
coordy = Math.round((ypos + charH) / tileH) - 1;
tiletype = _root.map[coordy][coordx];
if (tiletype >= "6") {
_root.map[coordy][coordx] = 1;
_root.clip[(("t_" + coordy) + "_") + coordx].removeMovieClip();
_root.goodiesleft--;
if (tiletype == "6") {
_root.score = _root.score + 5;
}
if (tiletype == "7") {
_root.score = _root.score + 10;
}
if (tiletype == "8") {
_root.score = _root.score + 20;
}
}
if (_root.goodiesleft <= 0) {
_root.clip[(("t_" + _root.exittile_i) + "_") + _root.exittile_j].gotoAndStop(4);
if (tiletype == "3") {
removeMovieClip(_root.clip);
removeMovieClip(_root.messagebox);
_root.goodiesleft = 0;
_root.gotoAndPlay(5);
}
}
if (ypos > 254) {
_root.gameovermessage = "PBR me ASAP!";
_root.iskilled = "yes";
_root.clip.char.gotoAndStop(6);
}
this.render();
}
walkspeed = 3;
runspeed = 5;
jumpspeed = -14;
gravity = 1.4;
padding = 2;
directionx = "still";
charW = _root.charW;
charH = _root.charH;
tileW = _root.tileW;
tileH = _root.tileH;
stop();
Instance of Symbol 4 MovieClip [empty] in Symbol 42 MovieClip [char] Frame 1
onClipEvent (enterFrame) {
_parent.control();
}
Symbol 42 MovieClip [char] Frame 6
function diefunction() {
dieloop++;
if (dieloop >= 50) {
removeMovieClip(_root.clip);
removeMovieClip(_root.messagebox);
_root.goodiesleft = 0;
if (_root.lives > 0) {
_root.gotoAndPlay(3);
} else {
_root.gotoAndStop(4);
}
} else {
ypos = ypos - 3;
}
_y = Math.round(ypos);
}
stop();
Instance of Symbol 4 MovieClip [empty] in Symbol 42 MovieClip [char] Frame 6
onClipEvent (enterFrame) {
_parent.diefunction();
}
Symbol 48 MovieClip [enemy] Frame 1
function render() {
this._x = xpos;
this._y = ypos;
}
function gettiles(psnum) {
cordy = Math.ceil(ypos / tileH) - 1;
cordx = Math.ceil((xpos + (psnum * (tileW / 2))) / tileW) - 1;
cordcx = Math.ceil(xpos / tileW) - 1;
tile_X = _root["tile" + _root.map[cordy][cordx]].walkable;
tile_Y = _root["tile" + _root.map[cordy + 1][cordcx]].walkable;
}
function moveenemy() {
this.gettiles(edirX);
if (tile_X == "no") {
edirX = edirX * -1;
}
if (tile_Y != "no") {
if (fallspeed < tileH) {
fallspeed++;
}
ypos = ypos + fallspeed;
} else {
ypos = (cordy * tileH) + enemyH;
fallspeed = 0;
}
if (xpos < 5) {
edirX = 1;
}
if (xpos > 392) {
edirX = -1;
}
var xdist = (xpos - _root.clip.char.xpos);
var ydist = ((ypos - enemyH) - _root.clip.char.ypos);
if (Math.sqrt((xdist * xdist) + (ydist * ydist)) < (((enemyW * 2) + 0) + _root.char.width)) {
_root.gameovermessage = "Watch out for them buggers!";
_root.iskilled = "yes";
_root.clip.char.gotoAndStop(6);
}
xpos = (xpos = xpos + (speed * edirX));
ypos = ypos;
this.render();
}
edirX = 1;
tileW = _root.tileW;
tileH = _root.tileH;
Instance of Symbol 4 MovieClip [empty] in Symbol 48 MovieClip [enemy] Frame 1
onClipEvent (enterFrame) {
_parent.moveenemy();
}
Instance of Symbol 52 MovieClip [timebox] in Symbol 63 MovieClip [top_row_text] Frame 1
onClipEvent (enterFrame) {
if (_root.timeleft < 10) {
if ((_root.timeleft % 2) != 0) {
this._alpha = 100;
} else {
this._alpha = 0;
}
} else {
this._alpha = 0;
}
}
Symbol 73 MovieClip [high_scores] Frame 1
function loopnow() {
thisloop++;
if (_root.CheckLog == "1") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
if (thisloop >= 15) {
_root.loadingmessage = "LOADING HIGH SCORES...";
}
}
loadVariablesNum ("http://www.daveheinzel.com/beerdude/display_scores.php", 0);
thisloop = 0;
stop();
Instance of Symbol 4 MovieClip [empty] in Symbol 73 MovieClip [high_scores] Frame 1
onClipEvent (enterFrame) {
_parent.loopnow();
}
Symbol 73 MovieClip [high_scores] Frame 2
stop();
Symbol 74 Button [play_again]
on (release) {
gotoAndStop (2);
}