Frame 1
function website() {
getURL ("http://www.rrrrthats5rs.com", "_blank");
}
function BS() {
}
function drawninit() {
_global.xpart = 8;
_global.ypart = 3;
_global.drawn = [];
m = 0;
while (m <= 9) {
n = 0;
while (n <= 9) {
if (((m > 0) & (m <= _global.xpart)) & ((n > 0) & (n <= _global.ypart))) {
_global.drawn[(10 * m) + n] = 1;
} else {
_global.drawn[(10 * m) + n] = 0;
}
n++;
}
m++;
}
_global.array1 = StartButton._x - (StartButton._width / 2);
_global.array2 = StartButton._x + (StartButton._width / 2);
_global.array3 = StartButton._width / xpart;
_global.array4 = StartButton._y - (StartButton._height / 2);
_global.array5 = StartButton._y + (StartButton._height / 2);
_global.array6 = StartButton._height / ypart;
}
function pay() {
clearInterval(_global.paytime);
if (_global.dead == 0) {
if (_global.paid != 7) {
_root.gotoAndStop("end");
} else {
_global.paid = 0;
StartButton.StartButtonText.text = "Scratch Off Your Lottery Ticket";
_global.increaselevel();
}
}
}
function scratch() {
clearInterval(_global.scratchtime);
if (_global.dead == 0) {
sum = 0;
g = 0;
while (g < _global.drawn.length) {
sum = sum + _global.drawn[g];
g++;
}
removeMovieClip(_root.line);
if (sum > 12) {
_root.gotoAndStop("end");
} else {
StartButton.StartButtonText.text = "Kick a Field Goal";
_global.increaselevel();
}
}
}
MENU = new ContextMenu();
MENU.hideBuiltInItems();
MenChoice1 = new ContextMenuItem("Visit RRRRThats5Rs", website);
MenChoice2 = new ContextMenuItem("Unlock Secret Levels", BS);
MENU.customItems.push(MenChoice1);
MENU.customItems.push(MenChoice2);
_root.menu = MENU;
_global.draggable = 1;
_global.drawing = 0;
_global.paid = 0;
_root.LevelText.text = "Level 1";
_global.templength = StartButton.StartButtonText.length;
Food._visible = false;
Food2._visible = false;
Food3._visible = false;
PowerLevel._visible = false;
PowSlide._visible = false;
AccLevel._visible = false;
AccSlide._visible = false;
Merge1._visible = false;
Merge2._visible = false;
Braille._visible = false;
_global.checkscratch = function (xm, ym) {
xnum = 0;
ynum = 0;
i = array1;
while (i < array2) {
xnum = xnum + 1;
if ((xm > i) & (xm < (i + array3))) {
break;
}
i = i + array3;
}
j = array4;
while (j < array5) {
ynum = ynum + 1;
if ((ym > j) & (ym < (j + array6))) {
break;
}
j = j + array6;
}
_global.drawn[(10 * xnum) + ynum] = 0;
};
stop();
if (_global.highscore == undefined) {
_global.highscore = 0;
}
_global.dead = 0;
if (_root.line == undefined) {
_root.createEmptyMovieClip("line", 1);
_root.line.lineStyle(12, 0, 100);
}
_global.level = 1;
_global.increaselevel = function () {
tempwidth = StartButton.StartButtonText._width;
tempmult = StartButton.StartButtonText._width / _global.templength;
StartButton.StartButtonText._width = 1.39 * (tempmult * StartButton.StartButtonText.length);
tempshift = (StartButton.StartButtonText._width - tempwidth) / 2;
StartButton.StartButtonText._x = StartButton.StartButtonText._x - tempshift;
StartButton.StartButtonBox._x = StartButton.StartButtonText._x;
StartButton.StartButtonBox._y = StartButton.StartButtonText._y;
StartButton.StartButtonBox._width = StartButton.StartButtonText._width;
StartButton.StartButtonBox._height = StartButton.StartButtonText._height;
_global.level = _global.level + 1;
_root.LevelText.text = "Level " + _global.level;
_global.templength = StartButton.StartButtonText.length;
switch (_global.level) {
case 5 :
Food._visible = false;
_global.killable = 0;
_global.paytime = setInterval(pay, 6000);
break;
case 6 :
drawninit();
_global.scratchtime = setInterval(scratch, 6000);
break;
case 7 :
_global.killable = 1;
PowerLevel._visible = true;
PowSlide._visible = true;
AccLevel._visible = true;
AccSlide._visible = true;
_global.powacc = 0;
_global.yzero = PowerLevel._y;
_global.powertimecounter = 0;
_global.powertime = setInterval(_global.power, 50);
break;
case 8 :
Food2._visible = true;
break;
case 9 :
_global.killable = 0;
Food2._visible = false;
_global.draggable = 1;
_global.dodging = 0;
_global.tempx = StartButton._x;
_global.tempy = StartButton._y;
_global.dodgechecktime = setInterval(_global.dodgecheck, 2000);
_global.dodgetime = setInterval(_global.dodge, 6500);
break;
case 10 :
_global.mergetime = setInterval(_global.merge, 6000);
break;
case 11 :
StartButton._visible = false;
Braille._visible = true;
break;
case 12 :
_global.killable = 1;
StartButton._y = 112;
StartButton._x = 150;
Braille._visible = false;
StartButton._visible = true;
_global.tricktime = setInterval(_global.trick, 10000);
}
};
_root.onMouseMove = function () {
if (_global.dragging == 1) {
_global.dragging = 0;
if (_global.level == 3) {
_global.starttimer = getTimer();
}
}
};
_global.power = function () {
_global.powertimecounter = _global.powertimecounter + 0.5;
PowerLevel._y = _global.yzero + (30 * Math.sin(_global.powertimecounter));
};
_global.acc = function () {
_global.acctimecounter = _global.acctimecounter + 0.3;
AccLevel._rotation = _global.rotzero + (25 * Math.sin(_global.acctimecounter));
};
_root.onMouseDown = function () {
_global.drawing = 1;
if (_global.level == 6) {
if (checkmouse(_xmouse, _ymouse) == 1) {
line.moveTo(_xmouse, _ymouse);
_global.drawn1 = [_xmouse, _ymouse];
this.onMouseMove = function () {
if ((checkmouse(_xmouse, _ymouse) == 1) & (_global.drawing == 1)) {
line.lineTo(_xmouse, _ymouse);
_global.checkscratch(_xmouse, _ymouse);
updateAfterEvent();
}
};
}
} else if (_global.level == 9) {
this.onMouseMove = function () {
_global.dodging = 1;
};
}
};
_root.onMouseUp = function () {
switch (_global.level) {
case 1 :
break;
case 2 :
break;
case 3 :
break;
case 6 :
_global.drawing = 0;
Mouse.show();
break;
default :
Mouse.show();
}
};
checkmouse = function (xm, ym) {
if ((xm > (StartButton._x - (StartButton._width / 2))) & (xm < (StartButton._x + (StartButton._width / 2)))) {
if ((ym > (StartButton._y - (StartButton._height / 2))) & (ym < (StartButton._y + (StartButton._height / 2)))) {
return(1);
}
return(0);
}
return(0);
};
_global.dodgecheck = function () {
clearInterval(_global.dodgechecktime);
if (_global.dead == 0) {
if (_global.dodging == 0) {
_root.gotoAndStop("end");
} else {
_global.dodging = 0;
_global.dodgechecktime = setInterval(_global.dodgecheck, 600);
}
}
};
_global.dodge = function () {
clearInterval(_global.dodgetime);
clearInterval(_global.dodgechecktime);
if (_global.dead == 0) {
StartButton._visible = false;
Merge1._y = _global.tempy;
Merge1._x = _global.tempx - 40;
Merge1._visible = true;
Merge2._y = _global.tempy + 60;
Merge2._x = _global.tempx + 40;
Merge2._visible = true;
Mouse.show();
_global.level = 9;
_global.draggable = 1;
_global.increaselevel();
}
};
_global.merge = function () {
clearInterval(_global.mergetime);
if (_global.dead == 0) {
_global.level = 10;
Merge1._visible = false;
Merge2._visible = false;
StartButton._visible = true;
mergex = Math.abs(Merge1._x - Merge2._x);
mergey = Math.abs(Merge1._y - Merge2._y);
if ((mergex + mergey) < 40) {
StartButton.StartButtonText.text = "Find the Noodle Soup";
Mouse.show();
_global.increaselevel();
}
}
};
_global.trick = function () {
clearInterval(_global.tricktime);
if (_global.dead == 0) {
_global.killable = 0;
_global.level = _global.level + 1;
_root.gotoAndStop("end");
}
};
_global.kill = function () {
clearInterval(_global.killtime);
if (_global.killable == 1) {
_global.dead = 1;
if (_global.level == 0) {
_global.level = _global.bklevel;
}
Mouse.show();
_root.gotoAndStop("end");
}
};
Instance of Symbol 34 MovieClip "StartButton" in Frame 1
on (press) {
function doorscale() {
scalefactor = ((100 - _global.tempy) + _y) / (_global.swingscale + 1);
_xscale = scalefactor;
_yscale = scalefactor;
}
if (_global.draggable == 1) {
Mouse.hide();
if (_global.level == 3) {
_global.tempy = _y;
this.startDrag(true, _x, _y - 60, _x, _y);
_global.dragging = 1;
_global.swingscale = 0;
_global.doorscaletime = setInterval(doorscale, 50);
} else if (_global.level == 9) {
_global.tempy = _y;
_global.tempx = _x;
this.startDrag(true, _x - 150, _y - 60, _x + 150, _y + 60);
_global.dragging = 1;
}
}
}
on (release) {
function walk() {
if (_global.dead == 0) {
_x = (_x + (Math.random() * 4));
_y = (270 - (1 * Math.abs(Math.sin(2000 * _x))));
if (_x > (_global.startx + 140)) {
clearInterval(_global.walktime);
_global.walkpausetime = setInterval(walkpause, 300);
}
} else {
clearInterval(_global.walktime);
}
}
function walkpause() {
clearInterval(walkpausetime);
if (_global.dead == 0) {
Mouse.show();
_global.level = 1;
StartButtonText.text = "Cross the Street";
_global.increaselevel();
}
}
function cross() {
if (_global.dead == 0) {
_y = (_y - (Math.random() * 2.5));
_x = (_x + (Math.random() - 0.5));
if (_y < 140) {
clearInterval(_global.crosstime);
_global.crosspausetime = setInterval(crosspause, 600);
}
} else {
clearInterval(_global.crosstime);
}
}
function crosspause() {
clearInterval(_global.crosspausetime);
if (_global.dead == 0) {
Mouse.show();
_y = 140;
_x = _global.startx;
_global.level = 2;
StartButtonText.text = "Push Open the Door";
_global.increaselevel();
}
}
function dswing() {
if (_global.dead == 0) {
_y = (_y - 6);
if (_y < (_global.tempy - 100)) {
clearInterval(_global.dswingtime);
_global.swingscale = 0;
_global.dswingpausetime = setInterval(dswingpause, 600);
}
} else {
clearInterval(_global.dswingtime);
}
}
function dswingpause() {
clearInterval(_global.doorscaletime);
clearInterval(_global.dswingpausetime);
if (_global.dead == 0) {
Mouse.show();
_y = 140;
_xscale = 100;
_yscale = 100;
_global.level = 3;
StartButtonText.text = "Find the Noodle Soup";
_root.Food._visible = true;
_global.increaselevel();
}
}
function dslam() {
if (_global.dead == 0) {
speed = Math.sqrt((80 - _global.tempy) + _y);
_y = (_y + speed);
if (_y > _global.tempy) {
_y = _global.tempy;
clearInterval(_global.dslamtime);
clearInterval(_global.doorscaletime);
_global.level = 3;
}
} else {
clearInterval(_global.dslamtime);
clearInterval(_global.doorscaletime);
}
}
function goalpause() {
clearInterval(goalpausetime);
if (_global.dead == 0) {
Mouse.show();
_global.level = 7;
_root.PowerLevel._visible = false;
_root.PowSlide._visible = false;
_root.AccLevel._visible = false;
_root.AccSlide._visible = false;
trace(_global.powertemp);
trace(_global.acctemp);
if ((_global.powertemp + _global.acctemp) < 150) {
_root.gotoAndStop("end");
} else {
_root.StartButton.StartButtonText.text = "Find the Noodle Soup";
_global.increaselevel();
}
}
}
switch (_global.level) {
case 1 :
_global.killable = 1;
_global.startx = _x;
_global.bklevel = _global.level;
_global.level = 0;
_global.walktime = setInterval(walk, 40);
killswitch = Math.round(Math.random() * 50000);
_global.killtime = setInterval(_global.kill, killswitch);
break;
case 2 :
_global.startx = _x;
_global.bklevel = _global.level;
_global.level = 0;
_global.crosstime = setInterval(cross, 40);
break;
case 3 :
this.stopDrag();
_global.bklevel = _global.level;
_global.level = 0;
speed = getTimer() - _global.starttimer;
if ((speed < 500) & ((_global.tempy - _y) > 50)) {
_global.swingscale = 1;
_global.dswingtime = setInterval(dswing, 40);
} else {
Mouse.show();
_global.dslamtime = setInterval(dslam, 40);
}
break;
case 5 :
_global.paid = _global.paid + 1;
Mouse.show();
break;
case 6 :
Mouse.show();
this.stopDrag();
break;
case 7 :
if (_global.powacc == 0) {
clearInterval(_global.powertime);
_global.powertemp = Math.round(100 - (1.66 * (_root.PowerLevel._y - 70))) + 267;
_global.powacc = 1;
_global.rotzero = _root.AccLevel._rotation;
_global.acctimecounter = 0;
_global.acctime = setInterval(_global.acc, 50);
} else {
clearInterval(_global.acctime);
_global.bklevel = _global.level;
_global.level = 0;
yupo = Math.abs(90 + _root.AccLevel._rotation);
_global.acctemp = Math.round(100 - (4 * yupo));
_global.goalpausetime = setInterval(goalpause, 1000);
}
break;
case 9 :
Mouse.show();
this.stopDrag();
break;
default :
Mouse.show();
}
}
Instance of Symbol 47 MovieClip "Merge2" in Frame 1
on (press) {
Mouse.hide();
this.startDrag();
}
on (release) {
Mouse.show();
this.stopDrag();
}
Instance of Symbol 56 MovieClip "Merge1" in Frame 1
on (press) {
Mouse.hide();
this.startDrag();
}
on (release) {
Mouse.show();
this.stopDrag();
}
Frame 4
stop();
comments = [["You slipped and broke your neck.", "A dog attacked you.", "You got lost."], ["You were hit by a trolley.", "You fell in a manhole", "You had a nervous breakdown."], ["The door was on fire.", "The door hit a baby.", "The door was locked."], ["You picked the wrong food.", "You call that soup?", "Hint: it comes in a CAN."], ["You didn't pay the right amount.", "You were mugged.", "You died of dysentery."], ["Someone stole your ticket.", "You didn't win anything.", "Your cat died."], ["Wide right, no good.", "The wind ruined your shot.", "It was blocked."], ["You don't have enough money.", "You got food poisoning.", "You were caught naked."], ["You were crushed by a rock.", "You tripped on a rock.", "You were hit by lightning."], ["They walked out on the deal.", "You insulted the CEO.", "They hated your proposal."], ["You need to read faster.", "You got bored and fell asleep.", "You'll never win."], ["You almost won.", "You accidentally died.", "The store blew up."], ["There wasn't any noodle soup.\nBut thanks anyway."]];
if (_root.line != undefined) {
removeMovieClip(_root.line);
}
_global.score = _global.level - 1;
commentchoice = Math.floor(Math.random() * comments[_global.level - 1].length);
_root.TitleText.text = comments[_global.level - 1][commentchoice];
if (_global.score > _global.highscore) {
_global.highscore = _global.score;
}
_root.LastLevelText.text = "Last Level Completed: " + _global.score;
_root.HighestLevelText.text = "Highest Level Completed: " + _global.highscore;
Symbol 2 Button
on (release) {
_root.StartButton.StartButtonText.text = "Pay Seven Dollars";
_global.increaselevel();
}
Symbol 4 Button
on (release) {
_root.gotoAndStop("end");
}
Symbol 6 Button
on (release) {
_root.gotoAndStop("end");
}
Symbol 8 Button
on (release) {
_root.gotoAndStop("end");
}
Symbol 20 Button
on (release) {
getURL ("http://www.rrrrthats5rs.com", "_blank");
}
Symbol 30 Button
on (release) {
_root.StartButton.StartButtonText.text = "Dodge the Falling Rocks";
_global.increaselevel();
}
Instance of Symbol 35 MovieClip in Symbol 38 MovieClip Frame 1
on (release) {
_root.StartButton.StartButtonText = "Find the Noodle Soup";
_global.increaselevel();
}
Symbol 61 Button
on (release) {
gotoAndPlay ("start");
}