Frame 1
function sethigh() {
_quality = "HIGH";
}
function setmid() {
_quality = "MEDIUM";
}
function setlow() {
_quality = "LOW";
}
function setlow() {
_quality = "LOW";
}
function armorg() {
getURL ("http://www.armorgames.com", "_blank");
}
function tamugaia() {
getURL ("http://tamugaia.com/", "_blank");
}
_quality = "MEDIUM";
var my_cm = new ContextMenu();
var menuItem_cmi = new ContextMenuItem("High Quality", sethigh);
my_cm.customItems.push(menuItem_cmi);
var menuItem_cmi2 = new ContextMenuItem("Medium Quality", setmid);
my_cm.customItems.push(menuItem_cmi2);
var menuItem_cmi3 = new ContextMenuItem("Low Quality", setlow);
my_cm.customItems.push(menuItem_cmi3);
var menuItem_cmi5 = new ContextMenuItem("Tamugaia.com", tamugaia, true);
my_cm.customItems.push(menuItem_cmi5);
var menuItem_cmi6 = new ContextMenuItem("Armor Games", armorg);
my_cm.customItems.push(menuItem_cmi6);
my_cm.builtInItems.quality = false;
my_cm.builtInItems.zoom = false;
my_cm.builtInItems.print = false;
my_cm.builtInItems.play = false;
my_cm.builtInItems.loop = false;
my_cm.builtInItems.rewind = false;
my_cm.builtInItems.forward_back = false;
_root.menu = my_cm;
Frame 2
player1 = 0;
player2 = 0;
player3 = 0;
gamemode = "practice";
ballsmove = 0;
previousturn = 1;
player1up = 38;
player1down = 40;
player1left = 37;
player1right = 39;
player1fine = 110;
player1shoot = 96;
player1drag = 97;
player2up = 87;
player2down = 83;
player2left = 65;
player2right = 68;
player2fine = 72;
player2shoot = 71;
player2drag = 74;
player3up = 38;
player3down = 40;
player3left = 37;
player3right = 39;
player3fine = 90;
player3shoot = 32;
player3drag = 88;
Frame 3
gotoAndPlay (7);
Frame 9
_root.descrip = "Have fun! Instructions can be found in the gameplay, please go to Freeplay first to practice. Change Flash quality can be changed by Right-clicking.";
poolrecord = SharedObject.getLocal("agpool");
if (poolrecord.data.exists != undefined) {
mybest = poolrecord.data.rec;
} else {
mybest = "99:99";
}
clearInterval(opo);
stop();
Frame 10
_root.allBalls = new Array();
_root.ballls = 0;
previous_rot = 0;
playerturn = 3 - previousturn;
previousturn = playerturn;
turns = 0;
foul = 0;
p1balls = 0;
p2balls = 0;
p1balltype = 5;
p2balltype = 5;
someballsin = 0;
ttttt = 0;
var clockdisplay = "0:00";
clock = 0;
first_touch = 0;
first_type = null;
pocketeds = new Array();
gonein = 0;
Instance of Symbol 140 MovieClip in Frame 10
onClipEvent (enterFrame) {
this.gotoAndStop("f" + _root.foul);
}
Frame 11
clearInterval(_root.moveinter);
i = 0;
while (i < _root.allBalls.length) {
_root.allBalls[i].ymov = 0;
_root.allBalls[i].xmov = 0;
i++;
}
first_touch = 0;
first_type = 0;
pocketeds = new Array();
turns++;
if (_root.gamemode == "practice") {
_root.gotoAndPlay("player3turn");
} else if (_root.gamemode == "vs") {
_root.gotoAndPlay(("player" + playerturn) + "turn");
} else if (_root.gamemode == "timeattack") {
_root.gotoAndPlay("player3beat");
}
Instance of Symbol 156 MovieClip "blackball" in Frame 11
onClipEvent (load) {
myx = 250;
_type = 3;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 128;
_type = 1;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 88;
_type = 1;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 68;
_type = 1;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 108;
_type = 1;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 168;
_type = 1;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 148;
_type = 1;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 390;
_type = 2;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 450;
_type = 2;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 410;
_type = 2;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 430;
_type = 2;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 370;
_type = 2;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 330;
_type = 2;
}
Instance of Symbol 159 MovieClip in Frame 11
onClipEvent (load) {
myx = 350;
_type = 2;
}
Instance of Symbol 156 MovieClip in Frame 11
onClipEvent (load) {
myx = 48;
_type = 1;
}
Instance of Symbol 161 MovieClip "striker" in Frame 11
onClipEvent (load) {
adder = 1;
pull = 0;
striker = 1;
myx = 500;
_type = 0;
}
Frame 12
myplayer = 1;
if ((!foul) && (turns > 1)) {
if (blackball) {
if (_root.p2balls != 7) {
_root.gotoAndStop("player1wins");
} else if (whiteball) {
_root.gotoAndStop("player1wins");
} else if (pocketeds.length > 1) {
_root.gotoAndStop("player1wins");
} else if (first_type != 3) {
_root.gotoAndStop("player1wins");
} else {
_root.gotoAndStop("player2wins");
}
} else {
play();
}
} else if (blackball) {
if (_root.p2balls != 7) {
_root.gotoAndStop("player1wins");
} else if (whiteball) {
_root.gotoAndStop("player1wins");
} else if (pocketeds.length > 1) {
_root.gotoAndStop("player1wins");
} else if (first_type != 3) {
_root.gotoAndStop("player1wins");
} else {
_root.gotoAndStop("player2wins");
}
} else {
stop();
}
Instance of Symbol 163 MovieClip "presserer" in Frame 12
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
myplayer = "player1";
}
on (press) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
canmove = 1;
if (Key.isDown(_root[myplayer + "shoot"])) {
_root.play();
}
i = 0;
while (i < _root.allBalls.length) {
if (this.hitTest(_root.allBalls[i]) && (_root.allBalls[i]._type != 0)) {
canmove = 0;
break;
}
i++;
}
if (_root.turns > 1) {
if (((((_x >= 70) && (_x <= 430)) && (_y >= 74)) && (_y <= 234)) && (canmove == 1)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
} else if ((((_x >= 70) && (_x <= 158)) && (_y >= 74)) && (_y <= 234)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
if ((((_x > 0) && (_x < 500)) && (_y > 0)) && (_y < 375)) {
_x = (_x + (5 * Key.isDown(_root[myplayer + "right"])));
_x = (_x - (5 * Key.isDown(_root[myplayer + "left"])));
_y = (_y + (5 * Key.isDown(_root[myplayer + "down"])));
_y = (_y - (5 * Key.isDown(_root[myplayer + "up"])));
}
while (_x < 5) {
_x = (_x+1);
}
while (_y < 5) {
_y = (_y+1);
}
while (_x > 495) {
_x = (_x-1);
}
while (_y > 370) {
_y = (_y-1);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Frame 13
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
stop();
Instance of Symbol 169 MovieClip "guideball" in Frame 13
onClipEvent (keyDown) {
reset();
}
onClipEvent (keyUp) {
moveit();
}
Instance of Symbol 176 MovieClip "cue" in Frame 13
onClipEvent (load) {
_rotation = _root.previous_rot;
myplayer = "player1";
}
Instance of Symbol 163 MovieClip "presserer" in Frame 13
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
adder = 1;
pull = 0;
striker = 1;
myx = 500;
myplayer = "player1";
}
on (press) {
pull = 1;
}
on (release) {
_root.striker.xmov = (_root.cue.cuestick._y / 14) * Math.sin((Math.PI/180) * _root.cue._rotation);
_root.striker.ymov = ((-_root.cue.cuestick._y) / 14) * Math.cos((Math.PI/180) * _root.cue._rotation);
_root.cue.play();
this.unloadMovie();
}
onClipEvent (enterFrame) {
if (pull) {
_root.cue.cuestick._y = _root.cue.cuestick._y + (4 * adder);
(((_root.cue.cuestick._y > 100) || (_root.cue.cuestick._y < 0)) ? ((adder = adder * -1)) : null);
}
}
onClipEvent (mouseUp) {
pull = 0;
}
Frame 14
stop();
Instance of Symbol 146 MovieClip in Frame 14
onClipEvent (load) {
function checkfreeze() {
movement = 0;
i = 0;
while (i < _root.allBalls.length) {
(((_root.allBalls[i].ymov != 0) || (_root.allBalls[i].xmov != 0)) ? ((movement = 1)) : null);
i++;
}
return(movement);
}
function moveallballs() {
i = 0;
while (i < _root.allBalls.length) {
_root.allBalls[i].enterframe.call(null);
i++;
}
}
timer = 0;
_root.moveinter = setInterval(this, "moveallballs", 3);
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
p = checkfreeze();
if ((p == 0) || (timer > 180)) {
_root.gotoAndPlay("startturn");
}
}
}
Frame 15
myplayer = 1;
if ((!foul) && (turns > 1)) {
if (blackball) {
if (_root.p1balls != 7) {
_root.gotoAndStop("player2wins");
} else if (whiteball) {
_root.gotoAndStop("player2wins");
} else if (pocketeds.length > 1) {
_root.gotoAndStop("player2wins");
} else if (first_type != 3) {
_root.gotoAndStop("player2wins");
} else {
_root.gotoAndStop("player1wins");
}
} else {
play();
}
} else if (blackball) {
if (_root.p1balls != 7) {
_root.gotoAndStop("player2wins");
} else if (whiteball) {
_root.gotoAndStop("player2wins");
} else if (pocketeds.length > 1) {
_root.gotoAndStop("player2wins");
} else if (first_type != 3) {
_root.gotoAndStop("player2wins");
} else {
_root.gotoAndStop("player1wins");
}
} else {
stop();
}
Instance of Symbol 163 MovieClip "presserer" in Frame 15
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
myplayer = "player2";
}
on (press) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
canmove = 1;
if (Key.isDown(_root[myplayer + "shoot"])) {
_root.play();
}
i = 0;
while (i < _root.allBalls.length) {
if (this.hitTest(_root.allBalls[i]) && (_root.allBalls[i]._type != 0)) {
canmove = 0;
break;
}
i++;
}
if (_root.turns > 1) {
if (((((_x >= 70) && (_x <= 430)) && (_y >= 74)) && (_y <= 234)) && (canmove == 1)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
} else if ((((_x >= 70) && (_x <= 158)) && (_y >= 74)) && (_y <= 234)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
if ((((_x > 0) && (_x < 500)) && (_y > 0)) && (_y < 375)) {
_x = (_x + (5 * Key.isDown(_root[myplayer + "right"])));
_x = (_x - (5 * Key.isDown(_root[myplayer + "left"])));
_y = (_y + (5 * Key.isDown(_root[myplayer + "down"])));
_y = (_y - (5 * Key.isDown(_root[myplayer + "up"])));
}
while (_x < 5) {
_x = (_x+1);
}
while (_y < 5) {
_y = (_y+1);
}
while (_x > 495) {
_x = (_x-1);
}
while (_y > 370) {
_y = (_y-1);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Frame 16
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
stop();
Instance of Symbol 169 MovieClip "guideball" in Frame 16
onClipEvent (keyDown) {
reset();
}
onClipEvent (keyUp) {
moveit();
}
Instance of Symbol 176 MovieClip "cue" in Frame 16
onClipEvent (load) {
_rotation = _root.previous_rot;
myplayer = "player2";
}
Instance of Symbol 163 MovieClip "presserer" in Frame 16
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
adder = 1;
pull = 0;
striker = 1;
myx = 500;
myplayer = "player2";
}
on (press) {
pull = 1;
}
on (release) {
_root.striker.xmov = (_root.cue.cuestick._y / 14) * Math.sin((Math.PI/180) * _root.cue._rotation);
_root.striker.ymov = ((-_root.cue.cuestick._y) / 14) * Math.cos((Math.PI/180) * _root.cue._rotation);
_root.cue.play();
this.unloadMovie();
}
onClipEvent (enterFrame) {
if (pull) {
_root.cue.cuestick._y = _root.cue.cuestick._y + (4 * adder);
(((_root.cue.cuestick._y > 100) || (_root.cue.cuestick._y < 0)) ? ((adder = adder * -1)) : null);
}
}
onClipEvent (mouseUp) {
pull = 0;
}
Frame 17
stop();
Instance of Symbol 146 MovieClip in Frame 17
onClipEvent (load) {
function checkfreeze() {
movement = 0;
i = 0;
while (i < _root.allBalls.length) {
(((_root.allBalls[i].ymov != 0) || (_root.allBalls[i].xmov != 0)) ? ((movement = 1)) : null);
i++;
}
return(movement);
}
function moveallballs() {
i = 0;
while (i < _root.allBalls.length) {
_root.allBalls[i].enterframe.call(null);
i++;
}
}
timer = 0;
_root.moveinter = setInterval(this, "moveallballs", 3);
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
p = checkfreeze();
if ((p == 0) || (timer > 180)) {
_root.gotoAndPlay("startturn");
}
}
}
Frame 18
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
stop();
Instance of Symbol 163 MovieClip "presserer" in Frame 18
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
myplayer = "player3";
}
on (press) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
canmove = 1;
i = 0;
while (i < _root.allBalls.length) {
if (this.hitTest(_root.allBalls[i]) && (_root.allBalls[i]._type != 0)) {
canmove = 0;
break;
}
i++;
}
if (((((_x >= 70) && (_x <= 430)) && (_y >= 74)) && (_y <= 234)) && (canmove == 1)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
if ((((_x > 0) && (_x < 500)) && (_y > 0)) && (_y < 375)) {
_x = (_x + (5 * Key.isDown(_root[myplayer + "right"])));
_x = (_x - (5 * Key.isDown(_root[myplayer + "left"])));
_y = (_y + (5 * Key.isDown(_root[myplayer + "down"])));
_y = (_y - (5 * Key.isDown(_root[myplayer + "up"])));
}
while (_x < 5) {
_x = (_x+1);
}
while (_y < 5) {
_y = (_y+1);
}
while (_x > 495) {
_x = (_x-1);
}
while (_y > 370) {
_y = (_y-1);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 146 MovieClip in Frame 18
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
((timer < 11) ? (timer++) : null);
if (timer == 10) {
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
}
}
Frame 19
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
stop();
Instance of Symbol 169 MovieClip "guideball" in Frame 19
onClipEvent (keyDown) {
reset();
}
onClipEvent (keyUp) {
moveit();
}
Instance of Symbol 176 MovieClip "cue" in Frame 19
onClipEvent (load) {
_rotation = _root.previous_rot;
myplayer = "player3";
}
Instance of Symbol 163 MovieClip "presserer" in Frame 19
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
adder = 1;
pull = 0;
striker = 1;
myx = 500;
myplayer = "player3";
}
on (press) {
pull = 1;
}
on (release) {
_root.striker.xmov = (_root.cue.cuestick._y / 14) * Math.sin((Math.PI/180) * _root.cue._rotation);
_root.striker.ymov = ((-_root.cue.cuestick._y) / 14) * Math.cos((Math.PI/180) * _root.cue._rotation);
_root.cue.play();
this.unloadMovie();
}
onClipEvent (enterFrame) {
if (pull) {
_root.cue.cuestick._y = _root.cue.cuestick._y + (4 * adder);
(((_root.cue.cuestick._y > 100) || (_root.cue.cuestick._y < 0)) ? ((adder = adder * -1)) : null);
}
}
onClipEvent (mouseUp) {
pull = 0;
}
Frame 20
stop();
Instance of Symbol 146 MovieClip in Frame 20
onClipEvent (load) {
function checkfreeze() {
movement = 0;
i = 0;
while (i < _root.allBalls.length) {
(((_root.allBalls[i].ymov != 0) || (_root.allBalls[i].xmov != 0)) ? ((movement = 1)) : null);
i++;
}
return(movement);
}
function moveallballs() {
i = 0;
while (i < _root.allBalls.length) {
_root.allBalls[i].enterframe.call(null);
i++;
}
}
timer = 0;
_root.moveinter = setInterval(this, "moveallballs", 3);
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
p = checkfreeze();
if ((p == 0) || (timer > 180)) {
_root.gotoAndPlay("startturn");
}
}
}
Frame 21
stop();
Frame 22
stop();
Frame 23
function clocktick() {
_root.clock++;
_root.clockdisplay = ((String(int(_root.clock / 60)) + ":") + (((_root.clock % 60) < 10) ? "0" : "")) + String(_root.clock % 60);
touchingtable = 0;
for (ii in _root.allBalls) {
if (_root.allBalls[ii].hitTest(_root.table)) {
touchingtable = 1;
}
}
if ((_root.gonein > 14) || (touchingtable == 0)) {
clearInterval(opo);
_root.gotoAndStop("finalscore");
}
}
if (turns > 1) {
play();
} else {
stop();
}
Instance of Symbol 163 MovieClip "presserer" in Frame 23
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
myplayer = "player3";
}
on (press) {
this.startDrag(true);
}
onClipEvent (enterFrame) {
canmove = 1;
i = 0;
while (i < _root.allBalls.length) {
if (this.hitTest(_root.allBalls[i]) && (_root.allBalls[i]._type != 0)) {
canmove = 0;
break;
}
i++;
}
if (_root.turns > 1) {
if (((((_x >= 70) && (_x <= 430)) && (_y >= 74)) && (_y <= 234)) && (canmove == 1)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
} else if (((((_x >= 70) && (_x <= 158)) && (_y >= 74)) && (_y <= 234)) && (canmove == 1)) {
_root.striker._x = _x;
_root.striker._y = _y;
}
if ((((_x > 0) && (_x < 500)) && (_y > 0)) && (_y < 375)) {
_x = (_x + (5 * Key.isDown(_root[myplayer + "right"])));
_x = (_x - (5 * Key.isDown(_root[myplayer + "left"])));
_y = (_y + (5 * Key.isDown(_root[myplayer + "down"])));
_y = (_y - (5 * Key.isDown(_root[myplayer + "up"])));
}
while (_x < 5) {
_x = (_x+1);
}
while (_y < 5) {
_y = (_y+1);
}
while (_x > 495) {
_x = (_x-1);
}
while (_y > 370) {
_y = (_y-1);
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Frame 24
function clocktick() {
_root.clock++;
_root.clockdisplay = ((String(int(_root.clock / 60)) + ":") + (((_root.clock % 60) < 10) ? "0" : "")) + String(_root.clock % 60);
if (_root.gonein > 14) {
clearInterval(opo);
_root.gotoAndStop("finalscore");
}
}
opo = setInterval(this, "clocktick", 1000);
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
stop();
Instance of Symbol 169 MovieClip "guideball" in Frame 24
onClipEvent (keyDown) {
reset();
}
onClipEvent (keyUp) {
moveit();
}
Instance of Symbol 176 MovieClip "cue" in Frame 24
onClipEvent (load) {
_rotation = _root.previous_rot;
myplayer = "player3";
}
Instance of Symbol 163 MovieClip "presserer" in Frame 24
onClipEvent (load) {
_x = _root.striker._x;
_y = _root.striker._y;
adder = 1;
pull = 0;
striker = 1;
myx = 500;
myplayer = "player3";
}
on (press) {
pull = 1;
}
on (release) {
_root.striker.xmov = (_root.cue.cuestick._y / 14) * Math.sin((Math.PI/180) * _root.cue._rotation);
_root.striker.ymov = ((-_root.cue.cuestick._y) / 14) * Math.cos((Math.PI/180) * _root.cue._rotation);
_root.cue.play();
this.unloadMovie();
}
onClipEvent (enterFrame) {
if (pull) {
_root.cue.cuestick._y = _root.cue.cuestick._y + (4 * adder);
(((_root.cue.cuestick._y > 100) || (_root.cue.cuestick._y < 0)) ? ((adder = adder * -1)) : null);
}
}
onClipEvent (mouseUp) {
pull = 0;
}
Instance of Symbol 146 MovieClip in Frame 24
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
((timer < 11) ? (timer++) : null);
if (timer == 10) {
_root.presserer._x = _root.striker._x;
_root.presserer._y = _root.striker._y;
}
}
Frame 25
clearInterval(opo);
stop();
Instance of Symbol 146 MovieClip in Frame 25
onClipEvent (load) {
function checkfreeze() {
movement = 0;
i = 0;
while (i < _root.allBalls.length) {
(((_root.allBalls[i].ymov != 0) || (_root.allBalls[i].xmov != 0)) ? ((movement = 1)) : null);
i++;
}
return(movement);
}
function moveallballs() {
i = 0;
while (i < _root.allBalls.length) {
_root.allBalls[i].enterframe.call(null);
i++;
}
}
timer = 0;
_root.moveinter = setInterval(this, "moveallballs", 3);
}
onClipEvent (enterFrame) {
timer++;
if (timer > 20) {
p = checkfreeze();
if ((p == 0) || (timer > 180)) {
_root.gotoAndPlay("startturn");
}
}
}
Frame 26
poolrecord = SharedObject.getLocal("agpool");
poolrecord.data.exists = 1;
if (clockdisplay < mybest) {
poolrecord.data.rec = clockdisplay;
}
poolrecord.flush(1000);
clearInterval(opo);
stop();
Frame 27
stop();
Symbol 19 Button
on (release) {
_root.play();
}
Symbol 20 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
this.gotoAndStop(2);
}
};
stop();
Instance of Symbol 14 MovieClip in Symbol 20 MovieClip Frame 1
onClipEvent (enterFrame) {
_xscale = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
}
Symbol 20 MovieClip Frame 2
stop();
Symbol 21 Button
on (release) {
getURL ("http://tamugaia.com", "_blank");
}
Symbol 88 MovieClip Frame 1
_root.stop();
Symbol 88 MovieClip Frame 2
if (this.getBytesLoaded() != this.getBytesTotal()) {
this.gotoAndPlay(1);
}
Symbol 88 MovieClip Frame 431
gotoAndPlay (3);
Symbol 94 MovieClip Frame 6
stop();
Symbol 96 Button
on (release) {
getURL ("http://armorgames.com", "_blank");
}
Symbol 118 MovieClip Frame 1
_root.stop();
Symbol 118 MovieClip Frame 75
_root.play();
stop();
Symbol 122 Button
on (release) {
_root.gamemode = "practice";
_root.gotoAndPlay("startgame");
}
on (rollOver) {
_root.descrip = "Freeplay:\nPlay pool anyway you want. Freeplay is for practice, so you can move the white cueball before each shot. You can also compete with a friend in freeplay by taking turns, and implementing the rules yourselves.";
}
on (rollOut) {
_root.descrip = "Have fun! Instructions can be found in the gameplay, please go to Freeplay first to practice. Change Flash quality can be changed by Right-clicking.";
}
Symbol 123 Button
on (release) {
_root.gamemode = "timeattack";
_root.gotoAndPlay("startgame");
}
on (rollOver) {
_root.descrip = "Time Attack:\nCan you pocket all balls within the shortest time possible? No rules, no fuss. You versus the clock. Knock them down!";
}
on (rollOut) {
_root.descrip = "Have fun! Instructions can be found in the gameplay, please go to Freeplay first to practice. Change Flash quality can be changed by Right-clicking.";
}
Symbol 124 Button
on (release) {
getURL ("http://armorgames.com", "_blank");
}
on (rollOver) {
_root.descrip = "Play More Games:\nYou can get more games right here at Armor Games. Featuring new games every week, Armor Games is one of the biggest flash game arcades on the Internet.";
}
on (rollOut) {
_root.descrip = "Have fun! Instructions can be found in the gameplay, please go to Freeplay first to practice. Change Flash quality can be changed by Right-clicking.";
}
Symbol 134 MovieClip Frame 6
stop();
Symbol 138 Button
on (release) {
getURL ("http://tamugaia.com", "_blank");
}
Symbol 146 MovieClip Frame 1
_visible = false;
Instance of Symbol 149 MovieClip "moverer" in Symbol 150 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = _root.cue.cuestick._y;
}
Symbol 151 Button
on (release) {
_root.gotoAndPlay("mainmenu");
}
Symbol 156 MovieClip Frame 1
function moveMe() {
this.tempx = this._x;
this.tempy = this._y;
this.tempx = this.tempx + this.xmov;
this.tempy = this.tempy + this.ymov;
checkForBalls();
}
function renderMe() {
this._x = this.tempx;
this._y = this.tempy;
updateAfterEvent();
}
function checkForWalls() {
if (this.hitTest(_root.det1) || (this.hitTest(_root.det2))) {
this.tempy = 70;
this.ymov = this.ymov * -1;
this.gotoAndPlay("ballbounce");
} else if (this.hitTest(_root.det3) || (this.hitTest(_root.det4))) {
this.tempy = 234;
this.ymov = this.ymov * -1;
this.gotoAndPlay("ballbounce");
}
if (this.hitTest(_root.det5)) {
this.tempx = 430;
this.xmov = this.xmov * -1;
this.gotoAndPlay("ballbounce");
} else if (this.hitTest(_root.det6)) {
this.tempx = 70;
this.xmov = this.xmov * -1;
this.gotoAndPlay("ballbounce");
}
while (this.hitTest(_root.det1) || (this.hitTest(_root.det2))) {
this._y++;
}
while (this.hitTest(_root.det3) || (this.hitTest(_root.det4))) {
this._y--;
}
while (this.hitTest(_root.det5)) {
this._x--;
}
while (this.hitTest(_root.det6)) {
this._x++;
}
}
function checkForBalls() {
var _local4 = _root.allBalls;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].bid > this.bid) {
var _local6 = _local4[_local3].tempx - this.tempx;
var _local5 = _local4[_local3].tempy - this.tempy;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if (_local7 <= (this.radius + _local4[_local3].radius)) {
if ((_root.first_touch == 0) && (_local4[_local3]._type == 0)) {
_root.first_type = _type;
_root.first_touch = 1;
}
ballBallReaction(this, _local4[_local3], _local7, _local6, _local5);
if (!((xmov > 0.02) || (ymov > 0.02))) {
} else {
(this.gotoAndPlay("ballball"));// not popped
}
}
}
_local3++;
}
}
function ballBallReaction(b1, b2, dist, xdiff, ydiff) {
var _local12 = Math.atan2(ydiff, xdiff);
var _local4 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local5 = (_local4 * b1.xmov) + (_local2 * b1.ymov);
var _local9 = (_local4 * b1.ymov) - (_local2 * b1.xmov);
var _local6 = (_local4 * b2.xmov) + (_local2 * b2.ymov);
var _local8 = (_local4 * b2.ymov) - (_local2 * b2.xmov);
var _local14 = (_local5 * b1.mass) + (_local6 * b2.mass);
var _local13 = _local5 - _local6;
_local5 = (_local14 - (b2.mass * _local13)) / (b1.mass + b2.mass);
_local6 = _local13 + _local5;
b1.xmov = (_local4 * _local5) - (_local2 * _local9);
b1.ymov = (_local4 * _local9) + (_local2 * _local5);
b2.xmov = (_local4 * _local6) - (_local2 * _local8);
b2.ymov = (_local4 * _local8) + (_local2 * _local6);
var _local10 = ((b1.radius + b2.radius) - dist) / 2;
var _local11 = _local4 * _local10;
var _local7 = _local2 * _local10;
b1.tempx = b1.tempx - _local11;
b1.tempy = b1.tempy - _local7;
b2.tempx = b2.tempx + _local11;
b2.tempy = b2.tempy + _local7;
}
function hittestpocket() {
u = 1;
while (u <= 6) {
if (this.hitTest(_root["pocket" + u])) {
_x = _root["pocket" + u]._x;
_y = _root["pocket" + u]._y;
this.play();
}
u++;
}
}
function enterframe() {
checkForWalls();
if (!gotoholl) {
moveMe();
renderMe();
hittestpocket();
xmov = xmov * 0.99;
ymov = ymov * 0.99;
if ((Math.abs(xmov) < 0.1) && (Math.abs(ymov) < 0.1)) {
xmov = 0;
ymov = 0;
}
}
}
var bid;
var xmov;
var ymov;
var tempx;
var tempy;
var mass;
var radius;
this.bid = _root.ballls;
_root.ballls++;
((_root.ballls > 20) ? ((_root.ballls = 0)) : null);
this.parent_mc = parent_mc;
this.xmov = 0;
this.ymov = 0;
this.tempx = this._x;
this.tempy = this._y;
this.radius = this._width / 2;
this.mass = this.radius;
_root.allBalls.push(this);
gotoholl = 0;
stop();
Symbol 156 MovieClip Frame 3
xmov = 0;
ymov = 0;
gotoholl = 1;
_root.gonein++;
Symbol 156 MovieClip Frame 6
_y = 300;
_x = myx;
gotoholl = 0;
_root.pocketeds.push(this._type);
gotoAndStop (2);
Symbol 156 MovieClip Frame 8
stop();
Symbol 156 MovieClip Frame 10
stop();
Symbol 159 MovieClip Frame 1
function moveMe() {
this.tempx = this._x;
this.tempy = this._y;
this.tempx = this.tempx + this.xmov;
this.tempy = this.tempy + this.ymov;
checkForBalls();
}
function renderMe() {
this._x = this.tempx;
this._y = this.tempy;
updateAfterEvent();
}
function checkForWalls() {
if (this.hitTest(_root.det1) || (this.hitTest(_root.det2))) {
this.tempy = 70;
this.ymov = this.ymov * -1;
this.gotoAndPlay("ballbounce");
} else if (this.hitTest(_root.det3) || (this.hitTest(_root.det4))) {
this.tempy = 234;
this.ymov = this.ymov * -1;
this.gotoAndPlay("ballbounce");
}
if (this.hitTest(_root.det5)) {
this.tempx = 430;
this.xmov = this.xmov * -1;
this.gotoAndPlay("ballbounce");
} else if (this.hitTest(_root.det6)) {
this.tempx = 70;
this.xmov = this.xmov * -1;
this.gotoAndPlay("ballbounce");
}
while (this.hitTest(_root.det1) || (this.hitTest(_root.det2))) {
this._y++;
}
while (this.hitTest(_root.det3) || (this.hitTest(_root.det4))) {
this._y--;
}
while (this.hitTest(_root.det5)) {
this._x--;
}
while (this.hitTest(_root.det6)) {
this._x++;
}
}
function checkForBalls() {
var _local4 = _root.allBalls;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].bid > this.bid) {
var _local6 = _local4[_local3].tempx - this.tempx;
var _local5 = _local4[_local3].tempy - this.tempy;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if (_local7 <= (this.radius + _local4[_local3].radius)) {
if ((_root.first_touch == 0) && (_local4[_local3]._type == 0)) {
_root.first_type = _type;
_root.first_touch = 1;
}
ballBallReaction(this, _local4[_local3], _local7, _local6, _local5);
if (!((xmov > 0.02) || (ymov > 0.02))) {
} else {
(this.gotoAndPlay("ballball"));// not popped
}
}
}
_local3++;
}
}
function ballBallReaction(b1, b2, dist, xdiff, ydiff) {
var _local12 = Math.atan2(ydiff, xdiff);
var _local4 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local5 = (_local4 * b1.xmov) + (_local2 * b1.ymov);
var _local9 = (_local4 * b1.ymov) - (_local2 * b1.xmov);
var _local6 = (_local4 * b2.xmov) + (_local2 * b2.ymov);
var _local8 = (_local4 * b2.ymov) - (_local2 * b2.xmov);
var _local14 = (_local5 * b1.mass) + (_local6 * b2.mass);
var _local13 = _local5 - _local6;
_local5 = (_local14 - (b2.mass * _local13)) / (b1.mass + b2.mass);
_local6 = _local13 + _local5;
b1.xmov = (_local4 * _local5) - (_local2 * _local9);
b1.ymov = (_local4 * _local9) + (_local2 * _local5);
b2.xmov = (_local4 * _local6) - (_local2 * _local8);
b2.ymov = (_local4 * _local8) + (_local2 * _local6);
var _local10 = ((b1.radius + b2.radius) - dist) / 2;
var _local11 = _local4 * _local10;
var _local7 = _local2 * _local10;
b1.tempx = b1.tempx - _local11;
b1.tempy = b1.tempy - _local7;
b2.tempx = b2.tempx + _local11;
b2.tempy = b2.tempy + _local7;
}
function hittestpocket() {
u = 1;
while (u <= 6) {
if (this.hitTest(_root["pocket" + u])) {
_x = _root["pocket" + u]._x;
_y = _root["pocket" + u]._y;
this.play();
}
u++;
}
}
function enterframe() {
checkForWalls();
if (!gotoholl) {
moveMe();
renderMe();
hittestpocket();
xmov = xmov * 0.99;
ymov = ymov * 0.99;
if ((Math.abs(xmov) < 0.1) && (Math.abs(ymov) < 0.1)) {
xmov = 0;
ymov = 0;
}
}
}
var bid;
var xmov;
var ymov;
var tempx;
var tempy;
var mass;
var radius;
this.bid = _root.ballls;
_root.ballls++;
((_root.ballls > 20) ? ((_root.ballls = 0)) : null);
this.parent_mc = parent_mc;
this.xmov = 0;
this.ymov = 0;
this.tempx = this._x;
this.tempy = this._y;
this.radius = this._width / 2;
this.mass = this.radius;
_root.allBalls.push(this);
gotoholl = 0;
stop();
Symbol 159 MovieClip Frame 3
xmov = 0;
ymov = 0;
gotoholl = 1;
_root.gonein++;
Symbol 159 MovieClip Frame 6
_y = 300;
_x = myx;
gotoholl = 0;
_root.pocketeds.push(this._type);
gotoAndStop (2);
Symbol 159 MovieClip Frame 8
stop();
Symbol 159 MovieClip Frame 10
stop();
Symbol 161 MovieClip Frame 1
function moveMe() {
this.tempx = this._x;
this.tempy = this._y;
this.tempx = this.tempx + this.xmov;
this.tempy = this.tempy + this.ymov;
checkForWalls();
checkForBalls();
}
function renderMe() {
this._x = this.tempx;
this._y = this.tempy;
updateAfterEvent();
}
function checkForWalls() {
if (this.hitTest(_root.det1) || (this.hitTest(_root.det2))) {
this.tempy = 70;
this.ymov = this.ymov * -1;
this.gotoAndPlay("ballbounce");
} else if (this.hitTest(_root.det3) || (this.hitTest(_root.det4))) {
this.tempy = 234;
this.ymov = this.ymov * -1;
this.gotoAndPlay("ballbounce");
}
if (this.hitTest(_root.det5)) {
this.tempx = 430;
this.xmov = this.xmov * -1;
this.gotoAndPlay("ballbounce");
} else if (this.hitTest(_root.det6)) {
this.tempx = 70;
this.xmov = this.xmov * -1;
this.gotoAndPlay("ballbounce");
}
while (this.hitTest(_root.det1) || (this.hitTest(_root.det2))) {
this._y++;
}
while (this.hitTest(_root.det3) || (this.hitTest(_root.det4))) {
this._y--;
}
while (this.hitTest(_root.det5)) {
this._x--;
}
while (this.hitTest(_root.det6)) {
this._x++;
}
}
function checkForBalls() {
var _local4 = _root.allBalls;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].bid > this.bid) {
var _local6 = _local4[_local3].tempx - this.tempx;
var _local5 = _local4[_local3].tempy - this.tempy;
var _local7 = Math.sqrt((_local6 * _local6) + (_local5 * _local5));
if (_local7 <= (this.radius + _local4[_local3].radius)) {
ballBallReaction(this, _local4[_local3], _local7, _local6, _local5);
if (!((xmov > 0.02) || (ymov > 0.02))) {
} else {
(this.gotoAndPlay("ballball"));// not popped
}
}
}
_local3++;
}
}
function ballBallReaction(b1, b2, dist, xdiff, ydiff) {
var _local12 = Math.atan2(ydiff, xdiff);
var _local4 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local5 = (_local4 * b1.xmov) + (_local2 * b1.ymov);
var _local9 = (_local4 * b1.ymov) - (_local2 * b1.xmov);
var _local6 = (_local4 * b2.xmov) + (_local2 * b2.ymov);
var _local8 = (_local4 * b2.ymov) - (_local2 * b2.xmov);
var _local14 = (_local5 * b1.mass) + (_local6 * b2.mass);
var _local13 = _local5 - _local6;
_local5 = (_local14 - (b2.mass * _local13)) / (b1.mass + b2.mass);
_local6 = _local13 + _local5;
b1.xmov = (_local4 * _local5) - (_local2 * _local9);
b1.ymov = (_local4 * _local9) + (_local2 * _local5);
b2.xmov = (_local4 * _local6) - (_local2 * _local8);
b2.ymov = (_local4 * _local8) + (_local2 * _local6);
var _local10 = ((b1.radius + b2.radius) - dist) / 2;
var _local11 = _local4 * _local10;
var _local7 = _local2 * _local10;
b1.tempx = b1.tempx - _local11;
b1.tempy = b1.tempy - _local7;
b2.tempx = b2.tempx + _local11;
b2.tempy = b2.tempy + _local7;
}
function hittestpocket() {
u = 1;
while (u <= 6) {
if (this.hitTest(_root["pocket" + u])) {
_x = _root["pocket" + u]._x;
_y = _root["pocket" + u]._y;
this.gotoAndPlay("down");
}
u++;
}
}
function enterframe() {
if (!gotoholl) {
moveMe();
renderMe();
hittestpocket();
xmov = xmov * 0.99;
ymov = ymov * 0.99;
if ((Math.abs(xmov) < 0.1) && (Math.abs(ymov) < 0.1)) {
xmov = 0;
ymov = 0;
}
}
}
var bid;
var xmov;
var ymov;
var tempx;
var tempy;
var mass;
var radius;
this.bid = _root.ballls;
_root.ballls++;
((_root.ballls > 20) ? ((_root.ballls = 0)) : null);
this.parent_mc = parent_mc;
this.xmov = 0;
this.ymov = 0;
this.tempx = this._x;
this.tempy = this._y;
this.radius = this._width / 2;
this.mass = this.radius;
_root.allBalls.push(this);
gotoholl = 0;
Symbol 161 MovieClip Frame 2
stop();
Symbol 161 MovieClip Frame 3
xmov = 0;
ymov = 0;
gotoholl = 1;
_root.pocketeds.push(this._type);
Symbol 161 MovieClip Frame 6
_y = 152;
_x = 157;
gotoholl = 0;
gotoAndStop (2);
Symbol 161 MovieClip Frame 8
stop();
Symbol 161 MovieClip Frame 10
stop();
Symbol 165 Button
on (release) {
_root.nextFrame();
}
Symbol 169 MovieClip Frame 1
function reset() {
_x = _root.cue._x;
_y = _root.cue._y;
touch = 1;
}
function moveit() {
_rotation = _root.cue._rotation;
xmov = 1 * Math.sin((Math.PI/180) * _rotation);
ymov = -1 * Math.cos((Math.PI/180) * _rotation);
while (touch == 1) {
u = 1;
while (u <= 6) {
if (this.hitTest(_root["pocket" + u])) {
touch = 0;
}
if (this.hitTest(_root["odet" + u])) {
touch = 0;
}
u++;
}
u = 0;
while (u < _root.allBalls.length) {
xdiff = _root.allBalls[u].tempx - this._x;
ydiff = _root.allBalls[u].tempy - this._y;
dist = Math.sqrt((xdiff * xdiff) + (ydiff * ydiff));
if ((dist <= (_root.allBalls[u].radius * 2)) && (_root.allBalls[u].striker != 1)) {
touch = 0;
}
u++;
}
if (this.hitTest(_root.allBalls[u]) && (_root.allBalls[u].striker != 1)) {
touch = 0;
}
_x = (_x + xmov);
_y = (_y + ymov);
}
}
_visible = false;
_x = _root.cue._x;
_y = _root.cue._y;
moveit();
this.onMouseDown = function () {
reset();
};
this.onMouseUp = function () {
moveit();
};
stop();
Symbol 176 MovieClip Frame 1
pressed = 0;
touchable = 1;
_x = _root.striker._x;
_y = _root.striker._y;
if (touchable) {
this.onEnterFrame = function () {
_x = _root.striker._x;
_y = _root.striker._y;
if (_root[myplayer] == 0) {
_rotation = (_rotation - ((5 - (4.9 * Key.isDown(_root[myplayer + "fine"]))) * Key.isDown(_root[myplayer + "left"])));
_rotation = (_rotation + ((5 - (4.9 * Key.isDown(_root[myplayer + "fine"]))) * Key.isDown(_root[myplayer + "right"])));
cuestick._y = cuestick._y + (((7 - (5 * Key.isDown(_root[myplayer + "fine"]))) * Key.isDown(_root[myplayer + "down"])) * (cuestick._y < 100));
cuestick._y = cuestick._y - (((7 - (5 * Key.isDown(_root[myplayer + "fine"]))) * Key.isDown(_root[myplayer + "up"])) * (cuestick._y > 0));
((cuestick._y > 100) ? ((cuestick._y = 100)) : null);
((cuestick._y < 0) ? ((cuestick._y = 0)) : null);
if (Key.isDown(_root[myplayer + "shoot"]) && (cuestick._y > 0)) {
_root.striker.xmov = (cuestick._y / 14) * Math.sin((Math.PI/180) * _rotation);
_root.striker.ymov = ((-cuestick._y) / 14) * Math.cos((Math.PI/180) * _rotation);
play();
}
}
};
this.onMouseMove = function () {
if ((_root[myplayer] == 0) && (pressed == 1)) {
_rotation = ((Math.round((Math.atan2(_parent._ymouse - this._y, _parent._xmouse - this._x) * 180) / Math.PI) + 90) - 180);
}
};
this.onPress = function () {
pressed = 1;
};
this.onMouseUp = function () {
pressed = 0;
};
}
stop();
Symbol 176 MovieClip Frame 2
touchable = 0;
_root.previous_rot = _rotation;
Symbol 176 MovieClip Frame 5
_root.play();
Symbol 180 MovieClip Frame 1
_x = 0;
_y = (-_parent.lin._height);
this.onEnterFrame = function () {
_x = 0;
_y = (-_parent.lin._height);
};
Symbol 181 MovieClip Frame 1
_x = _root.cue._x;
_y = _root.cue._y;
_rotation = _root.cue._rotation;
lin._height = Math.sqrt(((_x - _root.guideball._x) * (_x - _root.guideball._x)) + ((_y - _root.guideball._y) * (_y - _root.guideball._y)));
this.onEnterFrame = function () {
_x = _root.cue._x;
_y = _root.cue._y;
_rotation = _root.cue._rotation;
lin._height = Math.sqrt(((_x - _root.guideball._x) * (_x - _root.guideball._x)) + ((_y - _root.guideball._y) * (_y - _root.guideball._y)));
};
Symbol 199 Button
on (release) {
_root.nextFrame();
}
on (keyPress "<Space>") {
_root.nextFrame();
}
Symbol 213 Button
on (release) {
_root.submitter.gotoAndPlay(1);
}
Symbol 214 Button
on (release) {
getURL ("http://armorgames.com", "_blank");
}
Symbol 223 Button
on (release) {
if (_root.klausname == "Type Here") {
please.play();
} else {
getURL ((((("http://tamugaia.com/highscores/insert_agpool.php?player=" + _root.klausname) + "&score=874543575856") + (random(6520) * 95656)) + "DgjuhsdfGFGShjsfkgSHGHSRjhfskghRSGSFGjhFGSG&randomiza=") + _root.clockdisplay, "_blank", "GET");
_root.nextFrame();
}
}
Symbol 225 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 7
stop();