Frame 1
loadingbar.percent_loaded = 0;
stop();
Frame 5
function dealWithCollision(x1, y1, v1xi, v1yi, x2, y2, v2xi, v2yi) {
t1 = findThetaTan(v1xi, v1yi);
t2 = findThetaTan(v2xi, v2yi);
phi = findThetaTan(x2 - x1, y2 - y1);
v1xr = _root.v1 * Math.cos((t1 - phi) * _root.term);
v1yr = _root.v1 * Math.sin((t1 - phi) * _root.term);
v2xr = _root.v2 * Math.cos((t2 - phi) * _root.term);
v2yr = _root.v2 * Math.sin((t2 - phi) * _root.term);
v1fxr = v2xr;
v1fyr = v1yr;
v2fxr = v1fxr + (1 * (v1xr - v2xr));
v2fyr = v2yr;
if (_root.first_hit == 1) {
_root.first_hit = 0;
v1fxr = v1fxr + (_root.english_draw * (_root.v1 / 30));
v1fyr = v1fyr + (_root.english_side * (_root.v1 / 30));
}
_root.o1vx = (Math.cos(phi * term) * v1fxr) + (Math.cos((phi + 90) * term) * v1fyr);
_root.o1vy = (Math.sin(phi * term) * v1fxr) + (Math.sin((phi + 90) * term) * v1fyr);
_root.balls_vxArr[_root.ii] = (Math.cos(phi * term) * v2fxr) + (Math.cos((phi + 90) * term) * v2fyr);
_root.balls_vyArr[_root.ii] = (Math.sin(phi * term) * v2fxr) + (Math.sin((phi + 90) * term) * v2fyr);
}
function findThetaTan(xthing, ything) {
if (xthing < 0) {
t = 180 + (Math.atan(ything / xthing) / _root.term);
} else if ((0 < xthing) and (ything >= 0)) {
t = Math.atan(ything / xthing) / _root.term;
} else if ((0 < xthing) and (ything < 0)) {
t = 360 + (Math.atan(ything / xthing) / _root.term);
} else if ((xthing == 0) and (ything == 0)) {
t = 0;
} else if ((xthing == 0) and (ything >= 0)) {
t = 90;
} else {
t = 270;
}
return(t);
}
function railcollision(angle) {
v1 = Math.sqrt((o1vx * o1vx) + (o1vy * o1vy));
phi = findThetaTan(o1vx, o1vy);
v1xr = _root.v1 * Math.cos(phi * _root.term);
v1yr = _root.v1 * Math.sin(phi * _root.term);
o1x = o1x - o1vx;
o1y = o1y - o1vy;
o1vx = (Math.cos(phi * term) * v1xr) + (Math.cos((phi + angle) * term) * v1yr);
o1vy = (Math.sin(phi * term) * v1xr) + (Math.sin((phi + angle) * term) * v1yr);
o1x = o1x + o1vx;
o1y = o1y + o1vy;
}
function checkpockets() {
if (_root.pockets_1.hitTest(_root.o1x, _root.o1y, true)) {
_root.o1x = 57;
_root.o1y = 134.3;
sunk();
} else if (_root.pockets_2.hitTest(_root.o1x, _root.o1y, true)) {
_root.o1x = 274;
_root.o1y = 127.3;
sunk();
} else if (_root.pockets_3.hitTest(_root.o1x, _root.o1y, true)) {
_root.o1x = 494.2;
_root.o1y = 134.3;
sunk();
} else if (_root.pockets_4.hitTest(_root.o1x, _root.o1y, true)) {
_root.o1x = 492.2;
_root.o1y = 346.3;
sunk();
} else if (_root.pockets_5.hitTest(_root.o1x, _root.o1y, true)) {
_root.o1x = 274;
_root.o1y = 352.3;
sunk();
} else if (_root.pockets_6.hitTest(_root.o1x, _root.o1y, true)) {
_root.o1x = 57;
_root.o1y = 346.3;
sunk();
}
}
function sunk() {
_root.o1x = 0;
_root.o1y = 0;
_root.o1vx = 0;
_root.o1vy = 0;
_root["ball_" + _root.i]._visible = false;
_root.sounds.gotoAndPlay("in_pocket");
if (_root.i == 0) {
_root.scratch = 1;
_root.score = _root.score - (_root.rack_bonus + 200);
if (0 >= _root.score) {
_root.score = 0;
}
_root.run_bonus = 100;
_root.totalpenilty = ("(-" + (_root.rack_bonus + 200)) + ")";
_root.scratch_message.play();
_root.last_shot = _root.last_shot + -250;
} else {
_root.score = _root.score + ((_root.rack_bonus + _root.run_bonus) + (_root.current_bonus * 10));
_root.run_bonus = _root.run_bonus + 100;
_root.balls_in_thisshot++;
_root.balls_in_total++;
}
}
_root.term = (Math.PI/180);
gotoAndPlay (10);
Frame 10
game_duration = 3;
bonus_timer = 0.1666667;
_root.last_shot = 0;
_root.bonustimer.timer_sweeper._rotation = 0;
_root.bonustimer.cover1._visible = false;
_root.bonustimer.cover2._visible = true;
_root.bonus_timermessage = "100";
_root.current_bonus = 10;
_root.rack_bonus = 100;
score = 0;
rack_bonus = 0;
run_bonus = 0;
balls_in_thisshot = 0;
balls_in_total = 0;
firstshot = 1;
samplerArr = new Array(0.5, 1);
rail_angle_1._visible = false;
rail_angle_2._visible = false;
rail_angle_3._visible = false;
rail_angle_4._visible = false;
rail_angle_5._visible = false;
rail_angle_6._visible = false;
rail_angle_7._visible = false;
rail_angle_8._visible = false;
rail_angle_9._visible = false;
rail_angle_10._visible = false;
rail_angle_11._visible = false;
rail_angle_12._visible = false;
pockets_1._visible = false;
pockets_2._visible = false;
pockets_3._visible = false;
pockets_4._visible = false;
pockets_5._visible = false;
pockets_6._visible = false;
balls_xArr = new Array(100, 367, 403, 403, 421, 421, 438, 438, 403, 385, 385, 421, 421, 438, 438, 438);
balls_yArr = new Array(250, 228, 248, 208, 238, 218, 268, 228, 228, 238, 218, 258, 198, 248, 208, 188);
balls_vxArr = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
balls_vyArr = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
stop();
Frame 14
thebreak = 1;
rack_bonus = rack_bonus + 100;
run_bonus = 100;
Frame 22
i = 1;
while (9 >= i) {
name = "ball_" + i;
balls_xArr[i] = _root[name]._x;
balls_yArr[i] = _root[name]._y;
i++;
}
gotoAndPlay (25);
Frame 25
run_bonus = 100;
scratch = 0;
cue._visible = false;
ball_0.gotoAndStop("move");
ball_0._visible = true;
power_meter.gotoAndStop(0);
if ((firstshot == 1) || (thebreak == 1)) {
thebreak = 0;
ball_0.startDrag(true, 69, 147, 167, 334.5);
} else {
ball_0.startDrag(true, 69, 147, 482.9, 334.5);
}
english.english_marker._x = 0;
english.english_marker._y = 0;
_root.english_draw = 0;
_root.english_side = 0;
stop();
Frame 29
ball_0.gotoAndStop("norm");
balls_in_thisshot = 0;
first_hit = 1;
cue._visible = true;
cue._x = ball_0._x;
cue._y = ball_0._y;
power_meter.gotoAndStop(0);
english.english_marker._x = 0;
english.english_marker._y = 0;
_root.english_draw = 0;
_root.english_side = 0;
_root.bonus_starttime = getTimer();
_root.bonustimer.gotoAndPlay("countdown");
Frame 30
hit_tan = Math.abs(cue.cue_stick._y + 10) / 1.6;
if (hit_tan >= 40) {
hit_tan = 40;
}
power_meter.gotoAndStop(Math.floor(hit_tan / 2) + 1);
if (!Key.isDown(32)) {
x = cue._x;
y = cue._y;
x2 = _xmouse;
y2 = _ymouse;
xoffset = Math.abs(x - x2);
yoffset = Math.abs(y - y2);
tangent = Math.sqrt(Math.pow(xoffset, 2) + Math.pow(yoffset, 2));
angle = (Math.atan(yoffset / xoffset) * 180) / Math.PI;
if ((x2 >= x) and (y >= y2)) {
angle = 360 - angle;
} else if ((x >= x2) and (y2 >= y)) {
angle = 180 - angle;
} else if ((x >= x2) and (y >= y2)) {
angle = angle + 180;
}
cue._rotation = angle + 90;
}
if (oktodrag == 1) {
sx = cue._x;
sy = cue._y;
sx2 = _xmouse;
sy2 = _ymouse;
sxoffset = Math.abs(sx - sx2);
syoffset = Math.abs(sy - sy2);
stangent = Math.sqrt(Math.pow(sxoffset, 2) + Math.pow(syoffset, 2));
cue.cue_stick._y = -10 - (stangent - starttangent);
}
if (cue.cue_stick._y >= -10) {
cue.cue_stick._y = -10;
}
Frame 31
gotoAndPlay(_currentframe - 1);
Frame 34
i = 0;
while (9 >= i) {
o1x = balls_xArr[i];
o1y = balls_yArr[i];
o1vx = balls_vxArr[i];
o1vy = balls_vyArr[i];
ii = i + 1;
while (9 >= ii) {
o2x = balls_xArr[ii];
o2y = balls_yArr[ii];
o2vx = balls_vxArr[ii];
o2vy = balls_vyArr[ii];
if ((o2x != 0) || (o2x != 0)) {
if ((((o1vx != 0) || (o1vy != 0)) || (o2vx != 0)) || (o2vy != 0)) {
s = 0;
while (1 >= s) {
xoffset = Math.abs((o1x + (o1vx * samplerArr[s])) - (o2x + (o2vx * samplerArr[s])));
if (20 >= xoffset) {
yoffset = Math.abs((o1y + (o1vy * samplerArr[s])) - (o2y + (o2vy * samplerArr[s])));
if (20 >= yoffset) {
distoffset = Math.sqrt((xoffset * xoffset) + (yoffset * yoffset));
t_xoffset = Math.abs(o1x - o2x);
t_yoffset = Math.abs(o1y - o2y);
t_distoffset = Math.sqrt((t_xoffset * t_xoffset) + (t_yoffset * t_yoffset));
if ((20 >= distoffset) && (distoffset < t_distoffset)) {
v1 = Math.sqrt((o1vx * o1vx) + (o1vy * o1vy));
v2 = Math.sqrt((o2vx * o2vx) + (o2vy * o2vy));
newVelocities = dealWithCollision(o1x, o1y, o1vx, o1vy, o2x, o2y, o2vx, o2vy);
t = v1 + v2;
if ((t >= 20) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("hit_1");
} else if ((t >= 5) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("hit_2");
} else if (sounds._currentframe == 1) {
_root.sounds.gotoAndPlay("hit_3");
}
break;
}
}
}
s++;
}
}
}
ii++;
}
if ((((-0.2 < o1vx) && (o1vx < 0.2)) && (-0.2 < o1vy)) && (o1vy < 0.2)) {
balls_xArr[i] = o1x;
balls_yArr[i] = o1y;
balls_vxArr[i] = 0;
balls_vyArr[i] = 0;
} else {
o1vx = o1vx - (o1vx * 0.04);
o1vy = o1vy - (o1vy * 0.04);
o1x = o1x + o1vx;
o1y = o1y + o1vy;
if ((o1vx != 0) || (o1vy != 0)) {
inpocket = 0;
if ((o1y < 147) && (o1vy < 0)) {
if (((78.4 < o1x) && (o1x < 251.8)) || ((299.5 < o1x) && (o1x < 473.4))) {
o1y = 147;
o1vy = -o1vy;
v1 = Math.sqrt((o1vx * o1vx) + (o1vy * o1vy));
v2 = Math.sqrt((o2vx * o2vx) + (o2vy * o2vy));
t = v1 + v2;
if ((t >= 18) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_1");
} else if ((t >= 5) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_2");
} else if (sounds._currentframe == 1) {
_root.sounds.gotoAndPlay("rail_3");
}
} else if (_root.rail_angle_1.hitTest(o1x, o1y, true)) {
railcollision(135);
} else if (_root.rail_angle_2.hitTest(o1x, o1y, true)) {
railcollision(225);
} else if (_root.rail_angle_3.hitTest(o1x, o1y, true)) {
railcollision(135);
} else if (_root.rail_angle_4.hitTest(o1x, o1y, true)) {
railcollision(225);
} else {
temp = checkpockets();
}
} else if ((332 < o1y) && (0 < o1vy)) {
if (((78.4 < o1x) && (o1x < 251.8)) || ((299.5 < o1x) && (o1x < 473.4))) {
o1y = 332;
o1vy = -o1vy;
v1 = Math.sqrt((o1vx * o1vx) + (o1vy * o1vy));
v2 = Math.sqrt((o2vx * o2vx) + (o2vy * o2vy));
t = v1 + v2;
if ((t >= 18) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_1");
} else if ((t >= 5) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_2");
} else if (sounds._currentframe == 1) {
_root.sounds.gotoAndPlay("rail_3");
}
} else if (_root.rail_angle_7.hitTest(o1x, o1y, true)) {
railcollision(315);
} else if (_root.rail_angle_8.hitTest(o1x, o1y, true)) {
railcollision(45);
} else if (_root.rail_angle_9.hitTest(o1x, o1y, true)) {
railcollision(315);
} else if (_root.rail_angle_10.hitTest(o1x, o1y, true)) {
railcollision(45);
} else {
temp = checkpockets();
}
} else if (482.9 < o1x) {
if ((156.6 < o1y) && (o1y < 325)) {
o1x = 482.9;
o1vx = -o1vx;
v1 = Math.sqrt((o1vx * o1vx) + (o1vy * o1vy));
v2 = Math.sqrt((o2vx * o2vx) + (o2vy * o2vy));
t = v1 + v2;
if ((t >= 18) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_1");
} else if ((t >= 5) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_2");
} else if (sounds._currentframe == 1) {
_root.sounds.gotoAndPlay("rail_3");
}
} else if (_root.rail_angle_5.hitTest(o1x, o1y, true)) {
t = o1vx;
o1vx = o1vy;
o1vy = -t;
} else if (_root.rail_angle_6.hitTest(o1x, o1y, true)) {
t = o1vy;
o1vy = o1vx;
o1vx = -t;
} else {
temp = checkpockets();
}
} else if (o1x < 69.2) {
if ((156.6 < o1y) && (o1y < 325)) {
o1x = 69.2;
o1vx = -o1vx;
v1 = Math.sqrt((o1vx * o1vx) + (o1vy * o1vy));
v2 = Math.sqrt((o2vx * o2vx) + (o2vy * o2vy));
t = v1 + v2;
if ((t >= 18) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_1");
} else if ((t >= 5) && (sounds._currentframe == 1)) {
_root.sounds.gotoAndPlay("rail_2");
} else if (sounds._currentframe == 1) {
_root.sounds.gotoAndPlay("rail_3");
}
} else if (_root.rail_angle_11.hitTest(o1x, o1y, true)) {
t = o1vx;
o1vx = o1vy;
o1vy = -t;
} else if (_root.rail_angle_12.hitTest(o1x, o1y, true)) {
t = o1vy;
o1vy = o1vx;
o1vx = -t;
} else {
temp = checkpockets();
}
}
}
balls_xArr[i] = o1x;
balls_yArr[i] = o1y;
balls_vxArr[i] = o1vx;
balls_vyArr[i] = o1vy;
_root["ball_" + i]._x = balls_xArr[i];
_root["ball_" + i]._y = balls_yArr[i];
}
i++;
}
Frame 35
totalvelocity = 0;
i = 0;
while (9 >= i) {
if (balls_vxArr[i] != 0) {
totalvelocity = 1;
break;
}
if (balls_vyArr[i] != 0) {
totalvelocity = 1;
break;
}
i++;
}
if (totalvelocity == 0) {
if (balls_in_thisshot == 0) {
_root.run_bonus = 100;
}
if (balls_in_total == 9) {
balls_in_total = 0;
gotoAndPlay (14);
} else if (scratch == 1) {
gotoAndPlay (25);
} else {
gotoAndPlay (29);
}
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 41
if (0 < timer.timer_miliseconds) {
timer.gotoAndPlay("bonus");
}
bonustimer.gotoAndStop("pause");
ball_0.gotoAndStop("norm");
ball_0._visible = false;
stop();
Symbol 2 MovieClip Frame 2
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.play();
} else {
percent_loaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
bar._xscale = percent_loaded;
gotoAndPlay (1);
}
Symbol 16 MovieClip Frame 1
playnexttick = 10;
gameoverplayed = 0;
timer_miliseconds = (_root.game_duration * 60) * 1000;
timer = timer_miliseconds;
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.floor((timer_miliseconds - ((m * 1000) * 60)) / 1000);
if (s < 10) {
s = "0" + s;
}
_root.timermessage = ((" " + m) + ":") + s;
timer_sweeper._rotation = 0;
cover1._visible = false;
cover2._visible = true;
stop();
Symbol 16 MovieClip Frame 2
timer_miliseconds = timer - (getTimer() - _root.starttime);
if (0 >= timer_miliseconds) {
_root.timermessage = "0:00";
timer_sweeper._rotation = 0;
if (gameoverplayed == 0) {
_root.sounds.gotoAndPlay("game_over");
gameoverplayed = 1;
}
totalvelocity = 0;
i = 0;
while (9 >= i) {
if (_root.balls_vxArr[i] != 0) {
totalvelocity = 1;
break;
}
if (_root.balls_vyArr[i] != 0) {
totalvelocity = 1;
break;
}
i++;
}
if (totalvelocity == 0) {
_root.gotoAndPlay("game_over");
stop();
}
} else {
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.ceil((timer_miliseconds - ((m * 1000) * 60)) / 1000);
if ((m == 0) and (playnexttick == s)) {
_root.sounds.gotoAndPlay("timer_click");
playnexttick--;
}
if (s < 10) {
s = "0" + s;
}
_root.timermessage = ((" " + m) + ":") + s;
p = (timer - timer_miliseconds) / timer;
r = 360 * p;
timer_sweeper._rotation = r;
if (180 < r) {
cover1._visible = true;
cover2._visible = false;
}
}
Symbol 16 MovieClip Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 16 MovieClip Frame 9
timer_miliseconds = timer_miliseconds - 1000;
_root.score = _root.score + 10;
if (0 >= timer_miliseconds) {
_root.timermessage = "0:00";
timer_sweeper._rotation = 0;
timer_bonus_display = "0";
gotoAndPlay (11);
} else {
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.ceil((timer_miliseconds - ((m * 1000) * 60)) / 1000);
timer_bonus_display = Math.floor(timer_miliseconds / 100);
if (s < 10) {
s = "0" + s;
}
_root.timermessage = ((" " + m) + ":") + s;
p = (timer - timer_miliseconds) / timer;
r = 360 * p;
timer_sweeper._rotation = r;
if (180 < r) {
cover1._visible = true;
cover2._visible = false;
}
}
Symbol 16 MovieClip Frame 10
gotoAndPlay(_currentframe - 1);
Symbol 16 MovieClip Frame 11
stop();
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 2
timer_miliseconds = (_root.bonus_timer * 60) * 1000;
timer = timer_miliseconds;
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.floor((timer_miliseconds - ((m * 1000) * 60)) / 1000);
_root.bonus_timermessage = (" " + s) + "0";
timer_sweeper._rotation = 0;
cover1._visible = false;
cover2._visible = true;
_root.current_bonus = s;
Symbol 27 MovieClip Frame 3
timer_miliseconds = timer - (getTimer() - _root.bonus_starttime);
if (0 >= timer_miliseconds) {
_root.bonus_timermessage = "00";
timer_sweeper._rotation = 0;
_root.current_bonus = 0;
} else {
m = Math.floor((timer_miliseconds / 1000) / 60);
s = Math.ceil((timer_miliseconds - ((m * 1000) * 60)) / 1000);
_root.bonus_timermessage = (" " + s) + "0";
p = (timer - timer_miliseconds) / timer;
r = 360 * p;
timer_sweeper._rotation = r;
if (180 < r) {
cover1._visible = true;
cover2._visible = false;
}
_root.current_bonus = s;
}
Symbol 27 MovieClip Frame 4
gotoAndPlay(_currentframe - 1);
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 2
stop();
Symbol 38 MovieClip Frame 3
stop();
Symbol 38 MovieClip Frame 4
stop();
Symbol 38 MovieClip Frame 5
stop();
Symbol 38 MovieClip Frame 6
stop();
Symbol 38 MovieClip Frame 7
stop();
Symbol 38 MovieClip Frame 8
stop();
Symbol 38 MovieClip Frame 9
stop();
Symbol 38 MovieClip Frame 10
stop();
Symbol 38 MovieClip Frame 11
stop();
Symbol 38 MovieClip Frame 12
stop();
Symbol 38 MovieClip Frame 13
stop();
Symbol 38 MovieClip Frame 14
stop();
Symbol 38 MovieClip Frame 15
stop();
Symbol 38 MovieClip Frame 16
stop();
Symbol 38 MovieClip Frame 17
stop();
Symbol 38 MovieClip Frame 18
stop();
Symbol 38 MovieClip Frame 19
stop();
Symbol 38 MovieClip Frame 20
stop();
Symbol 38 MovieClip Frame 21
stop();
Symbol 100 Button
on (release) {
gotoAndPlay (14);
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 4
gotoAndStop (1);
Symbol 108 MovieClip Frame 12
gotoAndStop (1);
Symbol 108 MovieClip Frame 17
gotoAndStop (1);
Symbol 108 MovieClip Frame 22
gotoAndStop (1);
Symbol 108 MovieClip Frame 40
gotoAndStop (1);
Symbol 108 MovieClip Frame 44
gotoAndStop (1);
Symbol 108 MovieClip Frame 49
gotoAndStop (1);
Symbol 108 MovieClip Frame 82
gotoAndStop (1);
Symbol 108 MovieClip Frame 87
gotoAndStop (1);
Symbol 108 MovieClip Frame 92
gotoAndStop (1);
Symbol 108 MovieClip Frame 98
gotoAndStop (1);
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 46
gotoAndStop (1);
Symbol 127 Button
on (press) {
this.english_marker._x = this._xmouse;
this.english_marker._y = this._ymouse;
_root.english_draw = (this.english_marker._y / 4) * -1;
_root.english_side = this.english_marker._x / 4;
}
Symbol 131 Button
on (release) {
gotoAndPlay (14);
}
Symbol 133 MovieClip Frame 1
stop();
Symbol 164 Button
on (press) {
allclear = 1;
i = 1;
while (9 >= i) {
xoffset = Math.abs(_root._xmouse - _root.balls_xArr[i]);
yoffset = Math.abs(_root._ymouse - _root.balls_yArr[i]);
distoffset = Math.sqrt((xoffset * xoffset) + (yoffset * yoffset));
if (20 >= distoffset) {
allclear = 0;
}
i++;
}
if (allclear == 1) {
stopDrag();
_root.balls_xArr[0] = _root._xmouse;
_root.balls_yArr[0] = _root._ymouse;
_root.gotoAndPlay("aim");
if (_root.firstshot == 1) {
_root.firstshot = 0;
_root.starttime = getTimer();
_root.timer.gotoAndPlay(1);
}
} else {
_root.sounds.gotoAndPlay("not_allowed");
}
}
Symbol 166 Button
on (press) {
allclear = 1;
i = 1;
while (9 >= i) {
xoffset = Math.abs(_root._xmouse - _root.balls_xArr[i]);
yoffset = Math.abs(_root._ymouse - _root.balls_yArr[i]);
distoffset = Math.sqrt((xoffset * xoffset) + (yoffset * yoffset));
if (20 >= distoffset) {
allclear = 0;
}
i++;
}
if (allclear == 1) {
stopDrag();
_root.balls_xArr[0] = _root._xmouse;
_root.balls_yArr[0] = _root._ymouse;
_root.gotoAndPlay("aim");
if (_root.firstshot == 1) {
_root.firstshot = 0;
_root.starttime = getTimer();
_root.timer.gotoAndPlay(1);
}
} else {
_root.sounds.gotoAndPlay("not_allowed");
}
}
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 6
stop();
Symbol 172 Button
on (press) {
_root.oktodrag = 1;
_root.starttangent = _root.tangent;
}
on (release, releaseOutside) {
hit_tan = Math.abs(cue_stick._y + 10) / 1.6;
if (hit_tan >= 40) {
hit_tan = 40;
}
x = _root.ball_0._x;
y = _root.ball_0._y;
x2 = _root.x2;
y2 = _root.y2;
hit_vx = x - x2;
hit_vy = y - y2;
if (hit_vx < 0) {
tx = -1;
} else {
tx = 1;
}
if (hit_vy < 0) {
ty = -1;
} else {
ty = 1;
}
hit_vtotal = Math.abs(hit_vx) + Math.abs(hit_vy);
xpercent = Math.abs(hit_vx) / hit_vtotal;
ypercent = Math.abs(hit_vy) / hit_vtotal;
if (1 < hit_tan) {
cue_stick._y = -10;
_root.oktodrag = 0;
_root.ball_0.gotoAndStop("norm");
_root.balls_vxArr[0] = (hit_tan * xpercent) * tx;
_root.balls_vyArr[0] = (hit_tan * ypercent) * ty;
_root.last_shot = 0;
_root.bonustimer.gotoAndPlay("pause");
_root.gotoAndPlay("roll");
_root.cue._visible = false;
_root.sounds.gotoAndPlay("cue");
} else {
_root.oktodrag = 0;
_root.sounds.gotoAndPlay("not_allowed");
}
}
Symbol 175 Button
on (release) {
var gname = "pooljam";
var gscore = _root.score;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
}
Symbol 183 Button
on (release) {
var gname = "pooljam";
var gscore = _root.score;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
}