Frame 3
stop();
Frame 4
shotstarted = false;
score = 0;
timer = 100;
level = 1;
ballstop = 0.5;
ball = 1;
while (balls >= ball) {
thisball = eval ("ball" + ball);
trace((("startballx[" + ball) + "] = ") + thisball._x);
trace((("startbally[" + ball) + "] = ") + thisball._y);
ball++;
}
Instance of Symbol 74 MovieClip "ball1" in Frame 4
onClipEvent (mouseDown) {
if (!_level0.shotstarted) {
powstart = getTimer();
moused = true;
}
}
onClipEvent (mouseUp) {
if ((!_level0.shotstarted) and moused) {
moused = false;
powstop = getTimer();
_level0.pwr = powstop - powstart;
_level0.cuex = _xmouse;
_level0.cuey = _ymouse;
_level0.shotstarted = true;
}
}
onClipEvent (enterFrame) {
cuex = _xmouse;
cuey = _ymouse;
ncuey = (10 * (-cuey)) / (math.abs(cuex) + math.abs(cuey));
ncuex = (10 * cuex) / (math.abs(cuex) + math.abs(cuey));
rot = (Math.atan2(ncuex, ncuey) * 180) / 3.142;
temppwr = getTimer() - powstart;
if (!_level0.shotstarted) {
if (moused) {
pb = int(temppwr / 50);
_level0.powerbar.gotoandstop(pb);
}
_level0.cue._x = _level0.ball1._x;
_level0.cue._y = _level0.ball1._y;
_level0.cue._rotation = ROT;
}
}
Instance of Symbol 77 MovieClip "t2" in Frame 4
onClipEvent (load) {
rtime = _level0.timer;
running = true;
lasttime = -99;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.05;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
_root.gotoandplay("explode");
running = false;
}
}
raw = int(rtime);
if (raw != lasttime) {
time = raw;
} else {
lasttime = raw;
}
}
Instance of Symbol 77 MovieClip "t5" in Frame 4
onClipEvent (load) {
rtime = _level0.timer;
running = true;
lasttime = -99;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.05;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
_root.gotoandplay("explode");
running = false;
}
}
raw = int(rtime);
if (raw != lasttime) {
time = raw;
} else {
lasttime = raw;
}
}
Instance of Symbol 77 MovieClip "t4" in Frame 4
onClipEvent (load) {
rtime = _level0.timer;
running = true;
lasttime = -99;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.05;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
_root.gotoandplay("explode");
running = false;
}
}
raw = int(rtime);
if (raw != lasttime) {
time = raw;
} else {
lasttime = raw;
}
}
Instance of Symbol 77 MovieClip "t7" in Frame 4
onClipEvent (load) {
rtime = _level0.timer;
running = true;
lasttime = -99;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.05;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
_root.gotoandplay("explode");
running = false;
}
}
raw = int(rtime);
if (raw != lasttime) {
time = raw;
} else {
lasttime = raw;
}
}
Instance of Symbol 78 MovieClip "t6" in Frame 4
onClipEvent (load) {
rtime = _level0.timer;
running = true;
lasttime = -99;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.05;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
_root.gotoandplay("explode");
running = false;
}
}
raw = int(rtime);
if (raw != lasttime) {
time = raw;
} else {
lasttime = raw;
}
}
Instance of Symbol 77 MovieClip "t3" in Frame 4
onClipEvent (load) {
rtime = _level0.timer;
running = true;
lasttime = -99;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.05;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
_root.gotoandplay("explode");
running = false;
}
}
raw = int(rtime);
if (raw != lasttime) {
time = raw;
} else {
lasttime = raw;
}
}
Frame 5
function init_balls() {
leveltext = level_text[level];
if (level_dynamite[level]) {
dynamite._x = 400;
dynamite._y = 300;
} else {
dynamite._x = -300;
dynamite._y = -300;
}
trace(level);
if (level_balls[level] == 1) {
trace("init");
startballx[1] = 200 + random(30);
startbally[1] = 120 + random(220);
startballx[2] = 160;
startbally[2] = 300;
startballx[3] = 160;
startbally[3] = 160;
startballx[4] = 160;
startbally[4] = 230;
startballx[5] = 330;
startbally[5] = 230;
startballx[6] = 430;
startbally[6] = 230;
startballx[7] = 530;
startbally[7] = 230;
} else if (level_balls[level] == 2) {
startballx[1] = (77.7 + random(20)) - random(20);
startbally[1] = (230 + random(20)) - random(20);
startballx[2] = 393.05;
startbally[2] = 265.6;
startballx[3] = 466.55;
startbally[3] = 168.5;
startballx[4] = 390.05;
startbally[4] = 212.6;
startballx[5] = 466.55;
startbally[5] = 302.3;
startballx[6] = 537;
startbally[6] = 212.6;
startballx[7] = 541;
startbally[7] = 265.6;
} else {
dynamite._x = random(500) + 75;
dynamite._y = random(160) + 150;
item = 1;
while (7 >= item) {
safe = false;
while (!safe) {
placex = random(500) + 75;
placey = random(200) + 130;
safe = true;
if (item == 1) {
dbx = dynamite._x - placex;
dby = dynamite._y - placey;
delta = Math.sqrt((dby * dby) + (dbx * dbx));
if (delta < 70) {
safe = false;
}
} else {
checki = 1;
while ((item - 1) >= checki) {
dbx = startballx[checki] - placex;
dby = startbally[checki] - placey;
delta = Math.sqrt((dby * dby) + (dbx * dbx));
if (delta < (radius * 2)) {
safe = false;
}
dbx = dynamite._x - placex;
dby = dynamite._y - placey;
delta = Math.sqrt((dby * dby) + (dbx * dbx));
if (delta < 70) {
safe = false;
}
checki++;
}
}
}
startballx[item] = placex;
startbally[item] = placey;
item++;
}
}
ball = 1;
while (balls >= ball) {
thisball = eval ("ball" + ball);
thisball._x = startballx[ball];
thisball._y = startbally[ball];
realx[ball] = thisball._x;
realy[ball] = _level0.starty - thisball._y;
eval ("t" + ball)._x = thisball._x;
eval ("t" + ball)._y = thisball._y;
eval ("t" + ball).rtime = Level_timer[level];
eval ("t" + ball).running = true;
potted[ball] = false;
trace((("startballx[" + ball) + "] = ") + thisball._x);
trace((("startbally[" + ball) + "] = ") + thisball._y);
ball++;
}
}
hit = 0;
bonus = 0;
gameover = false;
u = 30;
t = 0;
radius = 24;
a = -1;
startx = white._x;
balls = 7;
ballspotted = 0;
starty = 400;
friction = 0.1;
explode._x = -999;
explode._y = -999;
explode.gotoandstop(1);
vx = new array(0, 0, 0);
vy = new array(0, 0, 0);
realx = new array(0, 200, 200);
realy = new array(0, 300, 300);
potted = new array();
startballx = new array();
startbally = new array();
max_level = 10;
level_text = new Array();
level_balls = new Array();
level_dynamite = new Array();
level_timer = new Array();
level_text[1] = "LEVEL ONE: CLEAR THE BOMBS IN 100 SECONDS !";
level_text[2] = "LEVEL TWO: CLEAR THE CIRCLE OF BOMBS !";
level_text[3] = "LEVEL THREE: DON'T DISTURB THE DYNAMITE !";
level_text[4] = "LEVEL FOUR: DON'T DISTURB THE DYNAMITE !";
level_text[5] = "LEVEL FIVE: DON'T DISTURB THE DYNAMITE !";
level_text[6] = "LEVEL SIX: DON'T DISTURB THE DYNAMITE !";
level_text[7] = "LEVEL SEVEN: DON'T DISTURB THE DYNAMITE !";
level_text[8] = "LEVEL EIGHT: DON'T DISTURB THE DYNAMITE !";
level_text[9] = "LEVEL NINE: DON'T DISTURB THE DYNAMITE !";
level_text[10] = "FINAL LEVEL: DON'T DISTURB THE DYNAMITE !";
Level_balls[1] = 1;
Level_balls[2] = 2;
Level_balls[3] = 3;
Level_balls[4] = 3;
Level_balls[5] = 3;
Level_balls[6] = 3;
Level_balls[7] = 3;
Level_balls[8] = 3;
Level_balls[9] = 3;
Level_balls[10] = 3;
level_dynamite[1] = false;
level_dynamite[2] = false;
level_dynamite[3] = true;
level_dynamite[4] = true;
level_dynamite[5] = true;
level_dynamite[6] = true;
level_dynamite[7] = true;
level_dynamite[8] = true;
level_dynamite[9] = true;
level_dynamite[10] = true;
Level_timer[1] = 100;
Level_timer[2] = 95;
Level_timer[3] = 90;
Level_timer[4] = 80;
Level_timer[5] = 75;
Level_timer[6] = 70;
Level_timer[7] = 65;
Level_timer[8] = 60;
Level_timer[9] = 55;
Level_timer[10] = 50;
ball = 1;
while (balls >= ball) {
thisball = eval ("ball" + ball);
trace((("startballx[" + ball) + "] = ") + thisball._x);
trace((("startbally[" + ball) + "] = ") + thisball._y);
ball++;
}
init_balls();
Frame 6
shotstarted = false;
Frame 7
cue.gotoandstop(1);
powerbar.gotoandstop(1);
Frame 8
if (gameover) {
gotoAndPlay (31);
}
Frame 9
if (!shotstarted) {
gotoAndPlay (8);
}
Frame 10
power = pwr / 50;
if (15 < power) {
power = 15;
}
ncuey = (power * (-cuey)) / (math.abs(cuex) + math.abs(cuey));
ncuex = (power * cuex) / (math.abs(cuex) + math.abs(cuey));
vx[1] = ncuex;
vy[1] = ncuey;
shotstarted = true;
cue.gotoandplay(2);
Frame 19
allstillc = 0;
ii = 1;
while (balls >= ii) {
if ((vx[ii] == 0) and (vy[ii] == 0)) {
allstillc++;
}
jj = ii + 1;
while (balls >= jj) {
white = eval ("_level0.ball" + ii);
red = eval ("_level0.ball" + jj);
why = starty - white._y;
rey = starty - red._y;
dby = (-why) + rey;
dbx = (-white._x) + red._x;
delta = Math.sqrt((dby * dby) + (dbx * dbx));
if (delta < radius) {
trace("COLLIDE!");
white._x = white._x - vx[ii];
white._y = white._y + vy[ii];
realx[ii] = realx[ii] - vx[ii];
realy[ii] = realy[ii] - vy[ii];
red._x = red._x - vx[jj];
red._y = red._y + vy[jj];
realx[jj] = realx[jj] - vx[jj];
realy[jj] = realy[jj] - vy[jj];
x1 = white._x;
y1 = starty - white._y;
x2 = red._x;
y2 = starty - red._y;
angle = Math.atan2(y2 - y1, x2 - x1);
x1 = vx[ii];
y1 = vy[ii];
x2 = vx[jj];
y2 = vy[jj];
if (3 < (((Math.abs(x1) + Math.abs(x2)) + Math.abs(y1)) + Math.abs(y2))) {
shotsound.gotoandplay(2);
}
cma = Math.cos(-angle);
sma = Math.sin(-angle);
sa = Math.sin(angle);
ca = Math.cos(angle);
nx1 = (x1 * cma) - (y1 * sma);
ny1 = (x1 * sma) + (y1 * cma);
nx2 = (x2 * cma) - (y2 * sma);
ny2 = (x2 * sma) + (y2 * cma);
nx1 = nx2;
x1 = (nx1 * ca) - (ny1 * sa);
y1 = (nx1 * sa) + (ny1 * ca);
next1x = x1;
next1y = y1;
x2 = white._x;
y2 = starty - white._y;
x1 = red._x;
y1 = starty - red._y;
angle = Math.atan2(y2 - y1, x2 - x1);
x2 = vx[ii];
y2 = vy[ii];
x1 = vx[jj];
y1 = vy[jj];
nx1 = (x1 * Math.cos(-angle)) - (y1 * Math.sin(-angle));
ny1 = (x1 * Math.sin(-angle)) + (y1 * Math.cos(-angle));
nx2 = (x2 * Math.cos(-angle)) - (y2 * Math.sin(-angle));
ny2 = (x2 * Math.sin(-angle)) + (y2 * Math.cos(-angle));
nx1 = nx2;
x1 = (nx1 * Math.cos(angle)) - (ny1 * Math.sin(angle));
y1 = (nx1 * Math.sin(angle)) + (ny1 * Math.cos(angle));
next2x = x1;
next2y = y1;
vx[ii] = next1x;
vy[ii] = next1y;
vx[jj] = next2x;
vy[jj] = next2y;
}
jj++;
}
ii++;
}
Frame 20
function update_balls() {
ball = 1;
while (balls >= ball) {
bamc = eval ("ball" + ball);
if (dynamite.hit.hittest(bamc._x, bamc._y, true)) {
_level0.gameover = true;
_root.gotoandplay("explode");
}
if (!middle.hitTest(bamc._x, bamc._y, false)) {
check_pockets();
}
if (!potted[ball]) {
if (_level0.shotstarted) {
absvx = Math.ABS(vx[ball]);
absvy = Math.ABS(vy[ball]);
if ((absvx + absvy) == 0) {
lessy = 0;
lessx = 0;
} else {
lessy = absvy / (absvx + absvy);
lessx = absvx / (absvx + absvy);
}
if (0 < Vx[ball]) {
vx[ball] = vx[ball] - (_level0.friction * lessx);
} else {
vx[ball] = vx[ball] + (_level0.friction * lessx);
}
if (0 < Vy[ball]) {
vy[ball] = vy[ball] - (_level0.friction * lessy);
} else {
vy[ball] = vy[ball] + (_level0.friction * lessy);
}
if ((absvx < ballstop) and (absvy < ballstop)) {
vy[ball] = 0;
vx[ball] = 0;
}
realx[ball] = realx[ball] + vx[ball];
realy[ball] = realy[ball] + vy[ball];
thisball = eval ("ball" + ball);
thisball._x = realx[ball];
thisball._y = _level0.starty - realy[ball];
eval ("t" + ball)._x = thisball._x;
eval ("t" + ball)._y = thisball._y;
if (!middle.hitTest(bamc._x, bamc._y, false)) {
check_wall(ball);
}
}
}
ball++;
}
}
function check_pockets() {
bamc = eval ("ball" + ball);
p = 1;
while (6 >= p) {
pomc = eval ("pocket" + p);
if (pomc.hittest(bamc._x, bamc._y, true)) {
down.gotoandplay(2);
score = score + eval ("t" + ball).time;
bamc._visible = false;
vx[ball] = 0;
vy[ball] = 0;
bamc._x = 100;
bamc._y = 0;
realx[ball] = 130 + (ballspotted * 30);
realy[ball] = 350;
bamc._y = _level0.starty - realy[ball];
bamc._x = realx[ball];
bamc._visible = true;
potted[ball] = true;
if (1 < ball) {
ballspotted++;
pomc.gotoandplay("red");
} else {
pomc.gotoandplay("white");
_level0.gameover = true;
_root.gotoandplay("explode");
}
eval ("t" + ball).running = false;
eval ("t" + ball)._y = bamc._y;
eval ("t" + ball)._x = bamc._x;
}
p++;
}
}
function check_wall(index) {
if (realx[index] < 50) {
realx[index] = 50;
vx[index] = -vx[index];
}
if (280 < realy[index]) {
realy[index] = 280;
vy[index] = -vy[index];
}
if (realy[index] < 50) {
realy[index] = 50;
vy[index] = -vy[index];
}
if (610 < realx[index]) {
realx[index] = 610;
vx[index] = -vx[index];
}
}
update_balls();
if ((allstillc < balls) and (!gameover)) {
gotoAndPlay (19);
}
Frame 21
if (gameover) {
gotoAndPlay (31);
}
Frame 22
if (ballspotted == (balls - 1)) {
gotoAndPlay (59);
}
Frame 28
gotoAndPlay (6);
Frame 31
explode._x = 300;
explode._y = 200;
explode.gotoandplay(2);
Frame 43
gotoAndPlay (139);
Frame 58
stop();
Frame 59
level++;
Frame 138
if (10 < level) {
trace("here!");
gotoAndPlay (139);
} else {
gotoAndPlay (5);
}
Frame 139
if (score < 2000) {
gotoAndPlay (143);
} else {
band = 1;
if (score >= 500) {
band = 2;
}
if (score >= 750) {
band = 3;
}
if (score >= 1000) {
band = 4;
}
if (score >= 2000) {
band = 5;
}
_level0.message = new array();
_level0.prize = new array();
trace(_level0.level);
_level0.message[1] = "TXT BLAST BLUE";
_level0.message[2] = "TXT BLAST RED";
_level0.message[3] = "TXT BLAST GREEN";
_level0.message[4] = "TXT BLAST WHITE";
_level0.message[5] = "TXT BLAST GOLD";
_level0.prize[1] = "£25 Amazon voucher";
_level0.prize[2] = "£50 Amazon voucher";
_level0.prize[3] = "£75 Amazon voucher";
_level0.prize[4] = "£100 Amazon voucher";
_level0.prize[5] = "£250 Amazon voucher";
_level0.prize_txt = _level0.prize[band];
_level0.prize_txt_msg = _level0.message[band];
}
explode.gotoandstop(1);
explode._x = -999;
stop();
Frame 143
stop();
Frame 151
command = "update";
this.loadVariables("highscores_bill_new.php?" + int(Math.random() * 100000), "POST");
Symbol 8 MovieClip Frame 7
gotoAndPlay (1);
Symbol 11 MovieClip Frame 32
gotoAndPlay (1);
Symbol 16 MovieClip Frame 1
doneLoading = 0;
stop();
Instance of Symbol 13 MovieClip "bkgd" in Symbol 16 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.doneLoading == 0) {
total = _parent._parent.getBytesTotal();
isloaded = _parent._parent.getBytesLoaded();
p = 100 * (isLoaded / total);
_parent.bytes = ((int(isloaded / 1000) add " KB of ") add int(total / 1000)) add " KB";
_parent.percent = int(p) add "% LOADED";
_parent.bar._xscale = p;
if (Number(95) < Number(p)) {
_parent._parent.gotoAndPlay(Number(2));
_parent.gotoAndStop("off");
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(Number(1));
}
}
}
Instance of Symbol 13 MovieClip "bar" in Symbol 16 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.doneLoading == 0) {
total = _parent._parent.getBytesTotal();
isloaded = _parent._parent.getBytesLoaded();
p = 100 * (isLoaded / total);
_parent.bytes = ((int(isloaded / 1000) add " KB of ") add int(total / 1000)) add " KB";
_parent.percent = int(p) add "% LOADED";
_parent.bar._xscale = p;
if (Number(95) < Number(p)) {
_parent._parent.gotoAndPlay(Number(2));
_parent.gotoAndStop("off");
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(Number(1));
}
}
}
Symbol 27 Button
on (release) {
play();
}
Symbol 63 MovieClip Frame 4
gotoAndPlay (1);
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 12
gotoAndStop (1);
Symbol 66 MovieClip Frame 30
gotoAndStop (1);
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 12
gotoAndStop (1);
Symbol 67 MovieClip Frame 30
gotoAndStop (1);
Symbol 75 MovieClip Frame 4
gotoAndPlay (1);
Symbol 80 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 45
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 20
stop();
Symbol 99 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 105 Button
on (release) {
init_balls();
score = 0;
level = 1;
gotoAndPlay (4);
}
Symbol 112 Button
on (release) {
getURL ("http://www.pendry-media.co.uk/cgi-bin/billiards/bill_read.pl", "_blank");
}
Symbol 114 Button
on (press) {
if (0 < Number(length(name))) {
security1 = Number(random(4)) + 2;
security2 = (score * 4) - (security1 * security1);
trace(security2);
getURL ("http://www.pendry-media.co.uk/cgi-bin/billiards/billENTER.pl", "_blank", "GET");
} else {
name = "Anon";
}
}
on (release) {
score = "0";
}
Symbol 115 MovieClip Frame 1
score = _level0:score;
Symbol 123 Button
on (release) {
gotoAndPlay (5);
}
Symbol 130 Button
on (release) {
getURL ("http://www.mousebreaker.co.uk");
}
Symbol 139 Button
on (release) {
gotoAndPlay (4);
}
Symbol 145 Button
on (release) {
gotoAndStop (151);
}
Symbol 147 Button
on (release) {
init_balls();
score = 0;
level = 1;
gotoAndPlay (3);
}
Symbol 154 Button
on (release) {
getURL ("http://www.playaholics.com", "_blank");
}
Symbol 165 Button
on (press) {
textDown.gotoAndPlay("down");
}
on (release, dragOut) {
textDown.gotoAndStop("empty");
}
Symbol 166 Button
on (press) {
textUp.gotoAndPlay("up");
}
on (release, dragOut) {
textUp.gotoAndStop("empty");
}
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 2
if (_parent._parent.players.scroll < _parent._parent.players.maxscroll) {
_parent._parent.players.scroll = _parent._parent.players.scroll + 1;
_parent._parent.scores.scroll = _parent._parent.scores.scroll + 1;
}
Symbol 167 MovieClip Frame 3
gotoAndPlay (2);
Symbol 168 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 2
_parent._parent.players.scroll = _parent._parent.players.scroll - 1;
_parent._parent.players.scroll = _parent._parent.scores.scroll - 1;
Symbol 168 MovieClip Frame 3
gotoAndPlay (2);