Frame 2
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndStop (7);
}
Instance of Symbol 10 MovieClip in Frame 2
onClipEvent (enterFrame) {
percent = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
disp_percent = percent + "%";
if (percent == 100) {
_root.play();
}
}
Frame 6
stop();
Frame 7
stop();
soundMusic.stop();
Frame 8
function createSound(id, name, depth) {
_root.attachMovie("holder", name + "_mc", depth);
var mc = eval (name + "_mc");
_root[name] = new Sound(mc);
_root[name].attachSound(id);
}
function setSound(mode) {
if (mode == "off") {
trace("SOUND OFF");
soundMode = "off";
soundSplash1.setVolume(0);
soundSplash2.setVolume(0);
soundMusic.setVolume(0);
soundMetal.setVolume(0);
soundCheer.setVolume(0);
soundZip.setVolume(0);
soundFlush.setVolume(0);
soundRelief1.setVolume(0);
soundRelief2.setVolume(0);
soundRelief3.setVolume(0);
soundRelief4.setVolume(0);
soundShoes1.setVolume(0);
soundShoes2.setVolume(0);
soundShoes3.setVolume(0);
} else {
trace("SOUND ON");
soundMode = "on";
soundSplash1.setVolume(100);
soundSplash2.setVolume(100);
soundMusic.setVolume(100);
soundMetal.setVolume(100);
soundCheer.setVolume(100);
soundZip.setVolume(40);
soundFlush.setVolume(100);
soundRelief1.setVolume(100);
soundRelief2.setVolume(100);
soundRelief3.setVolume(100);
soundRelief4.setVolume(100);
soundShoes1.setVolume(100);
soundShoes2.setVolume(100);
soundShoes3.setVolume(100);
}
}
function playSoundShoes() {
if (mcSoundShoes.soundFinished) {
mcSoundShoes.soundID = random(3) + 1;
mcSoundShoes.gotoAndPlay("start");
}
}
function initMouse() {
trace("INITMOUSE");
_root.attachMovie("pointer", "pointer", 3);
pointer.midScreenX = 375;
pointer.midScreenY = 200;
pointer._visible = false;
}
function findDist(x, y, targetX, targetY) {
var dist = Math.sqrt(((targetX - x) * (targetX - x)) + ((targetY - y) * (targetY - y)));
return(dist);
}
function ramp(id, start, end, inc, rand) {
var output;
if (((_root[id] = _root[id] + inc)) < end) {
output = _root[id];
} else {
output = end;
}
output = output + (random((2 * rand) + 1) - rand);
return(output);
}
function startGame() {
mode = "play";
_quality = "HIGH";
Mouse.hide();
initMouse();
initCross();
mainInterval.gotoAndPlay("start");
allPints.startDrink();
loo.startMove();
soundWater.start(0, 2);
}
function resumeGame() {
mode = "play";
_quality = qualitySave;
Mouse.hide();
initMouse();
initCross();
mainInterval.gotoAndPlay("start");
allPints.resumeDrinking();
loo.startMove();
soundWater.start(0, 2);
}
function pauseGame() {
mode = "stop";
qualitySave = _quality;
_quality = "HIGH";
Mouse.show();
mainInterval.gotoAndStop("stop");
cross.removeMovieClip();
loo.stopMove();
allPints.stopAll();
}
function stopGame() {
mode = "stop";
_quality = "HIGH";
Mouse.show();
mainInterval.gotoAndStop("stop");
cross.removeMovieClip();
loo.stopMove();
warning.gotoAndStop("stop");
}
function endGame(outCome) {
stopGame();
allPints.stopAll();
if (outCome == "win") {
gotoAndPlay (22);
} else {
gotoAndPlay (42);
}
}
function createDrop() {
depth++;
xTarget = cross._x;
yTarget = cross._y;
str = "drop" + depth;
_root.stream.attachMovie("drop", str, depth);
_root.stream[str].finalX = (xTarget - stream._x) + (Math.sin(depth / 2) * 10);
_root.stream[str].finalY = yTarget - stream._y;
size = random(20) + 100;
_root.stream[str]._xscale = size;
_root.stream[str]._yscale = size;
}
function initCross() {
_root.attachMovie("cross", "cross", 2);
xMin = 204;
xMax = 504;
yMin = 127;
yMax = 427;
ramp1 = undefined;
ramp2 = undefined;
}
function moveCross() {
count++;
str = "cross";
if (currRound == 1) {
value1 = ramp("ramp1", 0, 50, 0.5, 0);
value2 = ramp("ramp2", 0, 50, 0.5, 0);
loo.moveAmplitude = 0;
loo.blur = false;
} else if (currRound == 2) {
value1 = ramp("ramp1", 0, 100, 1, 0);
value2 = ramp("ramp2", 0, 100, 1, 0);
loo.moveAmplitude = 3;
loo.blur = false;
} else if (currRound == 3) {
value1 = ramp("ramp1", 0, 150, 1, 0);
value2 = ramp("ramp2", 0, 150, 1, 0);
loo.moveAmplitude = 10;
loo.blur = false;
} else if (currRound == 4) {
value1 = ramp("ramp1", 0, 200, 1, 0);
value2 = ramp("ramp2", 0, 200, 1, 0);
loo.moveAmplitude = 15;
loo.blur = true;
}
cross._x = ((value1 * Math.sin(count / 10)) + 375) + pointer.dx;
cross._y = ((value2 * Math.cos(count / 20)) + 200) + pointer.dy;
if (cross._x < xMin) {
cross._x = xMin;
}
if (xMax < cross._x) {
cross._x = xMax;
}
if (cross._y < yMin) {
cross._y = yMin;
}
if (yMax < cross._y) {
cross._y = yMax;
}
}
function createBonus(x, y, score) {
bonusDepth++;
str = "bonus" + bonusDepth;
bonusHolder.attachMovie("bonus", str, bonusDepth++);
bonusHolder[str]._x = x;
bonusHolder[str]._y = y;
bonusHolder[str].disp_bonus = "+" + score;
}
function fadeOutSound(soundObj) {
if (soundMode == "on") {
_root.attachMovie("soundFader", "soundFader", 5);
soundFader.sound2fade = soundObj;
}
}
roundTxt = new Array();
roundTxt[1] = "A NICE SOCIAL DRINK";
roundTxt[2] = "SLIGHTLY TIPSY";
roundTxt[3] = "FUMBLING & STUMBLING";
roundTxt[4] = "SLURRING & BLURRY";
roundReadyTxt = new Array();
roundReadyTxt[1] = new Array("RELAX YOUR HIPS!", "CLICK HERE");
roundReadyTxt[2] = new Array("STEADY AS YOU GO!", "NEXT ROUND");
roundReadyTxt[3] = new Array("MIND YOUR ZIPPER!", "NEXT ROUND");
roundReadyTxt[4] = new Array("WHOAAH!! EASY TIGER!", "FINAL ROUND");
numJoker = 1;
warningTime = 20;
_root.soundMusic.stop();
createSound("pissWater", "soundWater", 100);
createSound("pissSplash1", "soundSplash1", 101);
createSound("pissSplash2", "soundSplash2", 102);
createSound("music", "soundMusic", 107);
createSound("pissMetal", "soundMetal", 108);
createSound("cheer", "soundCheer", 109);
createSound("zip", "soundZip", 110);
createSound("flush", "soundFlush", 111);
createSound("relief1", "soundRelief1", 112);
createSound("relief2", "soundRelief2", 113);
createSound("relief3", "soundRelief3", 114);
createSound("relief4", "soundRelief4", 115);
createSound("shoes1", "soundShoes1", 116);
createSound("shoes2", "soundShoes2", 117);
createSound("shoes3", "soundShoes3", 118);
soundWater.setVolume(0);
soundZip.setVolume(40);
gotoAndStop (12);
Instance of Symbol 139 MovieClip "loo" in Frame 8
onClipEvent (load) {
function init() {
initX = looPic._x;
initY = looPic._y;
_root.targetWater = new Object();
resetPosGo = false;
}
function resetPos() {
finalPosX = initX;
finalPosY = initY;
finalAlpha = 100;
resetPosGo = true;
}
function startMove() {
go = true;
count = 0;
}
function stopMove() {
go = false;
}
function flush() {
looPic.gotoAndPlay("flush");
}
init();
}
onClipEvent (enterFrame) {
if (resetPosGo) {
currPosX = looPic._x;
currPosY = looPic._y;
currAlpha = looPic._alpha;
dx = (finalPosX - currPosX) / 3;
dy = (finalPosY - currPosY) / 3;
dalpha = (finalAlpha - currAlpha) / 3;
looPic._x = looPic._x + dx;
looPic._y = looPic._y + dy;
looPic._alpha = looPic._alpha + dalpha;
if (((Math.abs(dx) + Math.abs(dy)) + Math.abs(dalpha)) < 0.1) {
resetPosGo = false;
}
}
_root.targetWater.x = ((looPic.targetDummy._x + looPic._x) + this._x) - _root.stream._x;
_root.targetWater.y = ((looPic.targetDummy._y + looPic._y) + this._y) - _root.stream._y;
_root.targetWater.radius = looPic.targetDummy._width / 2;
if (go && (0 < moveAmplitude)) {
ampX = ((25 < moveAmplitude) ? 25 : (moveAmplitude));
ampY = ((7 < moveAplitude) ? 7 : (moveAmplitude - 3));
looPic._x = initX + (ampX * Math.sin(count / 2));
looPic._y = initY + (ampY * Math.cos(count + (Math.PI/2)));
count = count + -0.2;
if (blur) {
looPic._alpha = 50;
}
}
}
Frame 12
currRound = 1;
score = 0;
popup.gotoAndPlay("startRound");
soundMusic.start(0, 100);
stop();
Frame 22
soundCheer.start();
Frame 38
if (gender == "boys") {
stop();
} else {
nextFrame();
}
Frame 42
_root.soundMetal.stop();
_root.soundWater.stop();
_root.soundSplash1.stop();
_root.soundSplash2.stop();
_root.soundSplash3.stop();
_root.soundSplash4.stop();
_root.soundSplash5.stop();
_root.soundSplash6.stop();
Frame 58
if (gender == "boys") {
stop();
} else {
nextFrame();
}
Symbol 17 MovieClip [bonus] Frame 25
this.removeMovieClip();
Symbol 22 MovieClip [drop] Frame 1
i = 1;
while (5 >= i) {
str = "droplet" + i;
this.attachMovie("droplet", str, i + 10);
this[str]._x = random(15) - 7;
this[str]._y = random(15) - 7;
i++;
}
Symbol 22 MovieClip [drop] Frame 2
_x = (_x + dx);
_y = (_y + dy);
startX = _x;
startY = _y;
speed = random(5) + 5;
dx = (finalX - startX) / speed;
dy = (finalY - startY) / speed;
curve = 15;
if (curve < dx) {
dx = curve;
} else if (dx < (-curve)) {
dx = -curve;
}
_xscale = (_xscale / 1.05);
_yscale = (_yscale / 1.05);
Symbol 22 MovieClip [drop] Frame 3
if (1 < (Math.abs(dx) + Math.abs(dy))) {
gotoAndPlay(_currentframe - 1);
} else {
dist = _root.findDist(_x, _y, _root.targetWater.x, _root.targetWater.y);
if (_root.mode == "play") {
score = ((_root.targetWater.radius < dist) ? 0 : (Math.round(_root.targetWater.radius - dist)));
if (60 < score) {
score = 100 * _root.currRound;
_root.createBonus(_x + _root.stream._x, _y + _root.stream._y, score);
}
_root.score = Number(_root.score) + score;
}
if (125 < dist) {
if (_root.mode == "play") {
_root.warning.gotoAndPlay("start");
_root.soundWater.setVolume(0);
_root.soundSplash1.stop();
_root.soundSplash2.stop();
if ((-130 < _y) && (dist < 150)) {
_root.playSoundShoes();
this.removeMovieClip();
} else {
gotoAndStop (8);
_root.soundMetal.start();
}
}
} else if (_root.targetWater.radius < dist) {
gotoAndStop (8);
if (_root.mode == "play") {
_root.warning.gotoAndStop("stop");
}
_root.soundMetal.stop();
_root.soundWater.setVolume(0);
_root["soundSplash" + (random(2) + 1)].start();
} else {
gotoAndStop (5);
if (_root.mode == "play") {
_root.warning.gotoAndStop("stop");
}
if (_root.soundMode == "on") {
_root.soundWater.setVolume(100);
} else {
_root.soundWater.setVolume(0);
}
_root.soundMetal.stop();
_root.soundSplash1.stop();
_root.soundSplash2.stop();
}
}
Symbol 22 MovieClip [drop] Frame 5
_root.ploufDepth++;
str = "plouf" + _root.ploufDepth;
_root.loo.looPic.ploufHolder.attachMovie("plouf", str, _root.ploufDepth);
_root.loo.looPic.ploufHolder[str]._x = _x + (((_root.stream._x - _root.loo._x) - _root.loo.looPic._x) - _root.loo.looPic.ploufHolder._x);
_root.loo.looPic.ploufHolder[str]._y = _y + (((_root.stream._y - _root.loo._y) - _root.loo.looPic._y) - _root.loo.looPic.ploufHolder._y);
this.removeMovieClip();
Symbol 22 MovieClip [drop] Frame 8
i = 1;
while (5 >= i) {
str = "splat" + i;
this.attachMovie("splat", str, i);
this[str]._xscale = random(51) + 50;
this[str]._rotation = random(361);
i++;
}
Symbol 26 MovieClip [pintEngine] Frame 1
dPos = new Array();
dSize = new Array();
flex = 0.6;
drag = 0.3;
Symbol 26 MovieClip [pintEngine] Frame 2
sum = 0;
for (i in finalPos) {
dPos[i] = (dPos[i] * flex) + ((finalPos[i].pos - finalPos[i].mc._x) * drag);
dSize[i] = (dSize[i] * flex) + ((finalPos[i].size - finalPos[i].mc._xscale) * drag);
finalPos[i].mc._x = finalPos[i].mc._x + dPos[i];
finalPos[i].mc._xscale = finalPos[i].mc._xscale + dSize[i];
finalPos[i].mc._yscale = finalPos[i].mc._yscale + dSize[i];
sum = sum + Math.abs(dSize[i] * flex);
}
Symbol 26 MovieClip [pintEngine] Frame 3
if (sum < 0.01) {
this.removeMovieClip();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 28 MovieClip [plouf] Frame 40
this.removeMovieClip();
Symbol 32 MovieClip [pointer] Frame 1
_x = _root._xmouse;
_y = _root._ymouse;
dx = _x - midScreenX;
dy = _y - midScreenY;
Symbol 32 MovieClip [pointer] Frame 2
gotoAndPlay(_currentframe - 1);
Symbol 33 MovieClip [soundFader] Frame 1
volume = 100;
trace("SOUNDFADER: " + sound2fade);
Symbol 33 MovieClip [soundFader] Frame 2
volume = volume - 5;
sound2Fade.setVolume(volume);
Symbol 33 MovieClip [soundFader] Frame 3
if (0 < volume) {
gotoAndPlay(_currentframe - 1);
} else {
sound2Fade.setVolume(0);
sound2fade.stop();
this.removeMovieClip();
}
Symbol 35 MovieClip [splat] Frame 7
_parent.removeMovieClip();
Symbol 65 Button
on (release) {
if (gender != "boys") {
gotoAndPlay (5);
gender = "boys";
}
}
Symbol 69 Button
on (release) {
if (gender != "girls") {
gotoAndPlay (30);
gender = "girls";
}
}
Symbol 71 Button
on (release) {
if (gender != "boys") {
gotoAndPlay (5);
gender = "boys";
}
}
Symbol 72 Button
on (release) {
if (gender != "girls") {
gotoAndPlay (30);
gender = "girls";
}
}
Symbol 81 Button
on (release) {
_root.gender = gender;
_root.nextFrame();
}
Symbol 86 Button
on (release) {
play();
gender = undefined;
}
Symbol 87 Button
on (release) {
if (gender != "girls") {
play();
gender = "girls";
}
}
Symbol 94 Button
on (release) {
if (gender != "boys") {
play();
gender = "boys";
}
}
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 20
stop();
Symbol 96 MovieClip Frame 25
if (gender == undefined) {
gotoAndStop (1);
} else {
gotoAndPlay (30);
}
Symbol 96 MovieClip Frame 45
stop();
Symbol 96 MovieClip Frame 50
if (gender == undefined) {
gotoAndStop (1);
} else {
gotoAndPlay (5);
}
Symbol 103 Button
on (release) {
getURL ("info.asp", "bottom");
}
Symbol 111 Button
on (release) {
getURL ("challenge.asp?score=-1", "bottom");
}
Symbol 118 Button
on (release) {
nextFrame();
}
Symbol 121 Button
on (release) {
prevFrame();
}
Symbol 122 MovieClip Frame 1
stop();
_root.setSound("on");
Symbol 122 MovieClip Frame 2
_root.setSound("off");
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 30
_root["soundRelief" + (random(4) + 1)].start();
Symbol 138 MovieClip Frame 60
_root.soundFlush.start();
Symbol 138 MovieClip Frame 145
_root.popup.gotoAndPlay("startRound");
Symbol 154 Button
on (release) {
play();
}
Symbol 166 MovieClip Frame 1
stop();
if (!evaluated) {
evaluated = true;
currJoker = 0;
}
Symbol 166 MovieClip Frame 2
warningScore++;
if (_root.warningTime < warningScore) {
warningScore = 0;
currJoker++;
_root.fadeOutSound(_root.soundWater);
if (_root.numJoker >= currJoker) {
_root.pauseGame();
gotoAndStop (10);
} else {
_root.endGame("lose");
}
}
Symbol 166 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 166 MovieClip Frame 45
_root.resumeGame();
Symbol 177 MovieClip Frame 139
gotoAndPlay (20);
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 2
st = getTimer();
cf = _currentframe;
Symbol 179 MovieClip Frame 30
Symbol 179 MovieClip Frame 90
avgTime = (getTimer() - st) / (_currentframe - cf);
if (40 < avgTime) {
_quality = "LOW";
}
trace("time: " + avgTime);
Symbol 179 MovieClip Frame 450
_parent.finishPint();
_root.fadeOutSound(_root.soundWater);
stop();
Symbol 188 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 1
function PintClass(mc, pos, size) {
this.mc = mc;
this.pos = pos;
this.size = size;
}
function startDrink() {
startPint(_root.currRound);
}
function finishDrink() {
}
function startPint(indice) {
this["pint" + indice].gotoAndPlay(2);
}
function finishPint() {
_root.currRound++;
if (numPints >= _root.currRound) {
_root.stopGame();
_root.loo.flush();
} else {
_root.endGame("win");
}
}
function activatePint(indice) {
dispRoundNum.disp_roundNum = ("ROUND NUMBER " + _root.currRound) + ":";
dispRoundNum.disp_roundTxt = _root.roundTxt[_root.currRound];
dispRoundNum.gotoAndPlay("start");
this.attachMovie("pintEngine", "pintEngine", 1);
pintEngine.finalPos = new Array();
i = 1;
while (numPints >= i) {
mc = this["pint" + i];
pos = (i - 3) * 35;
pintEngine.finalPos.push(new PintClass(mc, pos, size));
i++;
}
arrIndice = indice - 1;
pintEngine.finalPos[arrIndice - 3].size = 100;
pintEngine.finalPos[arrIndice - 2].size = 100;
pintEngine.finalPos[arrIndice - 1].size = 135;
pintEngine.finalPos[arrIndice + 0].size = 180;
pintEngine.finalPos[arrIndice + 1].size = 135;
pintEngine.finalPos[arrIndice + 2].size = 100;
pintEngine.finalPos[arrIndice + 3].size = 100;
pintEngine.finalPos[arrIndice - 3].pos = pintEngine.finalPos[arrIndice - 3].pos + -23;
pintEngine.finalPos[arrIndice - 2].pos = pintEngine.finalPos[arrIndice - 2].pos + -23;
pintEngine.finalPos[arrIndice - 1].pos = pintEngine.finalPos[arrIndice - 1].pos + -15;
pintEngine.finalPos[arrIndice + 0].pos = pintEngine.finalPos[arrIndice + 0].pos + 0;
pintEngine.finalPos[arrIndice + 1].pos = pintEngine.finalPos[arrIndice + 1].pos + 15;
pintEngine.finalPos[arrIndice + 2].pos = pintEngine.finalPos[arrIndice + 2].pos + 23;
pintEngine.finalPos[arrIndice + 3].pos = pintEngine.finalPos[arrIndice + 3].pos + 23;
}
function stopAll() {
i = 1;
while (numPints >= i) {
this["pint" + i].stop();
i++;
}
}
function resumeDrinking() {
this["pint" + _root.currRound].play();
}
numPints = 4;
Symbol 191 Button
on (release) {
_root.startGame();
gotoAndStop (1);
}
Symbol 210 MovieClip Frame 1
disp_line1 = _root.roundReadyTxt[_root.currRound][0];
disp_line2 = _root.roundReadyTxt[_root.currRound][1];
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 15
stop();
_root.allPints.activatePint(_root.currRound);
_root.loo.resetPos();
_root.soundZip.start();
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 2
if (_root.mode == "play") {
_root.moveCross();
_root.createDrop();
}
Symbol 213 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 215 MovieClip Frame 1
soundFinished = true;
stop();
Symbol 215 MovieClip Frame 2
soundFinished = false;
_root["soundShoes" + soundID].start();
Symbol 215 MovieClip Frame 10
if (soundID == 2) {
gotoAndStop (1);
}
Symbol 215 MovieClip Frame 17
if (soundID == 3) {
gotoAndStop (1);
}
Symbol 215 MovieClip Frame 18
if (soundID == 1) {
gotoAndStop (1);
}
Symbol 225 Button
on (release) {
gotoAndStop (7);
}
Symbol 228 Button
on (release) {
getURL ("challenge.asp?score=" + score, "bottom");
}
Symbol 231 Button
on (release) {
getURL ("submit.asp?score=" + score, "bottom");
}
Symbol 245 Button
on (release) {
gotoAndStop (7);
}
Symbol 246 Button
on (release) {
getURL ("challenge.asp?score=-1", "bottom");
}
Symbol 247 Button
on (release) {
getURL ("submit.asp?score=" + score, "bottom");
}