Frame 1
this_is_for_you = "If you really want to how to program this game then , http://www.webmandu.com/flash ";
Frame 49
stop();
Frame 50
function dangle(sss, tangle, dda) {
x = eval ("" + dda)._x - _root.ball._x;
y = eval ("" + dda)._y - _root.ball._y;
ballangle = Math.floor(Math.atan2(x, y) / (Math.PI/180));
_root.ball.angle = -180 + (90 - ballangle);
_root.ball.speed = sss;
hhh = _root.ball.angle;
ballvirangle = _root.ball.angle - tangle;
if (((ballvirangle >= 45) and (90 >= ballvirangle)) or (ballvirangle >= -45)) {
aangle = _root.ball.angle - tangle;
la = 180 - aangle;
eval ("" + dda).angle = _root.ball.angle - la;
}
if ((ballvirangle < 45) and (ballvirangle < -45)) {
eval ("" + dda).angle = tangle + (tangle - _root.ball.angle);
}
if (ballvirangle >= 90) {
ballvirangle = 90;
}
if (-90 >= ballvirangle) {
ballvirangle = -90;
}
if (0 >= ballvirangle) {
eval ("" + dda).speed = (_root.ball.speed / 100) * (-ballvirangle);
} else {
eval ("" + dda).speed = (_root.ball.speed / 100) * ballvirangle;
}
}
function mangle(ddd, lat, same) {
mx = eval ("" + same)._x - _root.mall._x;
my = eval ("" + same)._y - _root.mall._y;
mallangle = Math.floor(Math.atan2(mx, my) / (Math.PI/180));
_root.mall.angle = -180 + (90 - mallangle);
_root.mall.speed = ddd;
mallvirangle = _root.mall.angle - lat;
if (((mallvirangle >= 45) and (90 >= mallvirangle)) or (mallvirangle >= -45)) {
tata = _root.mall.angle - lat;
lala = 180 - tata;
eval ("" + same).angle = _root.mall.angle - lala;
}
if ((mallvirangle < 45) and (mallvirangle < -45)) {
eval ("" + same).angle = lat + (lat - _root.mall.angle);
}
if (mallvirangle >= 90) {
mallvirangle = 90;
}
if (-90 >= mallvirangle) {
mallvirangle = -90;
}
if (0 >= mallvirangle) {
eval ("" + same).speed = (_root.mall.speed / 100) * (-mallvirangle);
} else {
eval ("" + same).speed = (_root.mall.speed / 100) * mallvirangle;
}
}
function cuecue(hat, sat, mat) {
cx = eval ("" + mat)._x - _root.cue._x;
cy = eval ("" + mat)._y - _root.cue._y;
ccangle = Math.floor(Math.atan2(cx, cy) / (Math.PI/180));
_root.cue.angle = -180 + (90 - ccangle);
_root.cue.speed = hat;
cuevirangle = _root.cue.angle - sat;
if (((cuevirangle >= 45) and (90 >= cuevirangle)) or (cuevirangle >= -45)) {
cma = _root.cue.angle - sat;
cqq = 180 - cma;
eval ("" + mat).angle = _root.cue.angle - cqq;
}
if ((cuevirangle < 45) and (cuevirangle < -45)) {
eval ("" + mat).angle = sat + (sat - _root.cue.angle);
}
if (cuevirangle >= 90) {
cuevirangle = 90;
}
if (-90 >= cuevirangle) {
cuevirangle = -90;
}
if (0 >= cuevirangle) {
eval ("" + mat).speed = (_root.cue.speed / 100) * (-cuevirangle);
} else {
eval ("" + mat).speed = (_root.cue.speed / 100) * cuevirangle;
}
}
function bluee2(bh_s, bsat, bmat) {
_root.blue2.speed = bh_s;
cxb2 = eval ("" + bmat)._x - _root.blue2._x;
cyb2 = eval ("" + bmat)._y - _root.blue2._y;
blangle2 = Math.floor(Math.atan2(cxb2, cyb2) / (Math.PI/180));
_root.blue2.angle = -180 + (90 - blangle2);
blconag = _root.blue2.angle - bsat;
if (((blconag >= 45) and (90 >= blconag)) or (blconag >= -45)) {
cmabl2 = _root.blue2.angle - bsat;
cqqbl2 = 180 - cmabl2;
eval ("" + bmat).angle = _root.blue2.angle - cqqbl2;
}
if ((blconag < 45) and (blconag < -45)) {
eval ("" + bmat).angle = bsat + (bsat - _root.blue2.angle);
}
if (blconag >= 90) {
blconag = 90;
}
if (-90 >= blconag) {
blconag = -90;
}
if (0 >= blconag) {
eval ("" + bmat).speed = (_root.blue2.speed / 100) * (-blconag);
} else {
eval ("" + bmat).speed = (_root.blue2.speed / 100) * blconag;
}
}
function redd2(rbh2, rbsat2, rbmat2) {
recxb2 = eval ("" + rbmat2)._x - _root.red2._x;
recyb2 = eval ("" + rbmat2)._y - _root.red2._y;
reblangle2 = Math.floor(Math.atan2(recxb2, recyb2) / (Math.PI/180));
_root.red2.angle = -180 + (90 - reblangle2);
_root.red2.speed = rbh2;
red2virangle = _root.red2.angle - rbsat2;
if (((red2virangle >= 45) and (90 >= red2virangle)) or (red2virangle >= -45)) {
recmabl2 = _root.red2.angle - rbsat2;
recqqbl2 = 180 - recmabl2;
eval ("" + rbmat2).angle = _root.red2.angle - recqqbl2;
}
if ((red2virangle < 45) and (red2virangle < -45)) {
eval ("" + rbmat2).angle = rbsat2 + (rbsat2 - _root.red2.angle);
}
if (red2virangle >= 90) {
red2virangle = 90;
}
if (-90 >= red2virangle) {
red2virangle = -90;
}
if (0 >= red2virangle) {
eval ("" + rbmat2).speed = (_root.red2.speed / 100) * (-red2virangle);
} else {
eval ("" + rbmat2).speed = (_root.red2.speed / 100) * red2virangle;
}
}
function bluee3(bh3, bsat3, bmat3) {
bcxb3 = eval ("" + bmat3)._x - _root.blue3._x;
bcyb3 = eval ("" + bmat3)._y - _root.blue3._y;
blangle3 = Math.floor(Math.atan2(bcxb3, bcyb3) / (Math.PI/180));
_root.blue3.angle = -180 + (90 - blangle3);
_root.blue3.speed = bh3;
blue3virangle = _root.blue3.angle - bsat3;
if (((blue3virangle >= 45) and (90 >= blue3virangle)) or (blue3virangle >= -45)) {
bcmabl3 = _root.blue3.angle - bsat3;
bcqqbl3 = 180 - bcmabl3;
eval ("" + bmat3).angle = _root.blue3.angle - bcqqbl3;
}
if ((blue3virangle < 45) and (blue3virangle < -45)) {
eval ("" + bmat3).angle = bsat3 + (bsat3 - _root.blue3.angle);
}
if (blue3virangle >= 90) {
blue3virangle = 90;
}
if (-90 >= blue3virangle) {
blue3virangle = -90;
}
if (0 >= blue3virangle) {
eval ("" + bmat3).speed = (_root.blue3.speed / 100) * (-blue3virangle);
} else {
eval ("" + bmat3).speed = (_root.blue3.speed / 100) * blue3virangle;
}
}
function redd3(rbh3, rbsat3, rbmat3) {
red3x = eval ("" + rbmat3)._x - _root.red3._x;
red3y = eval ("" + rbmat3)._y - _root.red3._y;
reblangle3 = Math.floor(Math.atan2(red3x, red3y) / (Math.PI/180));
_root.red3.angle = -180 + (90 - reblangle3);
_root.red3.speed = rbh3;
red3virangle = _root.red3.angle - rbsat3;
if (((red3virangle >= 45) and (90 >= red3virangle)) or (red3virangle >= -45)) {
recmabl3 = _root.red3.angle - rbsat3;
recqqbl3 = 180 - recmabl3;
eval ("" + rbmat3).angle = _root.red3.angle - recqqbl3;
}
if ((red3virangle < 45) and (red3virangle < -45)) {
eval ("" + rbmat3).angle = rbsat3 + (rbsat3 - _root.red3.angle);
}
if (red3virangle >= 90) {
red3virangle = 90;
}
if (-90 >= red3virangle) {
red3virangle = -90;
}
if (0 >= red3virangle) {
eval ("" + rbmat3).speed = (_root.red3.speed / 100) * (-red3virangle);
} else {
eval ("" + rbmat3).speed = (_root.red3.speed / 100) * red3virangle;
}
}
function blackball(fat, blackrbsat3, blackmat) {
blackx = eval ("" + blackmat)._x - _root.black._x;
blacky = eval ("" + blackmat)._y - _root.black._y;
blackangle = Math.floor(Math.atan2(blackx, blacky) / (Math.PI/180));
_root.black.angle = -180 + (90 - blackangle);
_root.black.speed = fat;
blackvirangle = _root.black.angle - blackrbsat3;
if (((blackvirangle >= 45) and (90 >= blackvirangle)) or (blackvirangle >= -45)) {
blackrecmabl3 = _root.black.angle - blackrbsat3;
blackrecqqbl3 = 180 - blackrecmabl3;
eval ("" + blackmat).angle = _root.black.angle - blackrecqqbl3;
}
if ((blackvirangle < 45) and (blackvirangle < -45)) {
eval ("" + blackmat).angle = blackrbsat3 + (blackrbsat3 - _root.black.angle);
}
if (blackvirangle >= 90) {
blackvirangle = 90;
}
if (-90 >= blackvirangle) {
blackvirangle = -90;
}
if (0 >= blackvirangle) {
eval ("" + blackmat).speed = (_root.black.speed / 100) * (-blackvirangle);
} else {
eval ("" + blackmat).speed = (_root.black.speed / 100) * blackvirangle;
}
}
function bl2noco(nocobl2, nocobl2x, nocobl2y) {
nocoblangle2 = Math.floor(Math.atan2(nocobl2x, nocobl2y) / (Math.PI/180));
nocosangel = -180 + (90 - nocoblangle2);
nocoangel = 180 - nocosangel;
eval ("" + nocobl2)._x = eval ("" + nocobl2)._x + (Math.cos(nocoangel * (Math.PI/180)) * 1);
eval ("" + nocobl2)._y = eval ("" + nocobl2)._y + (Math.sin(nocoangel * (Math.PI/180)) * 1);
}
stop();
retardation = 0.3;
okay = true;
Instance of Symbol 21 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.ball._x - 7;
this._y = _root.ball._y - 0.5;
}
Instance of Symbol 22 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.mall._x - 7;
this._y = _root.mall._y - 0.5;
}
Instance of Symbol 23 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.blue2._x - 7;
this._y = _root.blue2._y - 0.5;
}
Instance of Symbol 24 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.red2._x - 7;
this._y = _root.red2._y - 0.5;
}
Instance of Symbol 25 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.blue3._x - 7;
this._y = _root.blue3._y - 0.5;
}
Instance of Symbol 26 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.red3._x - 7;
this._y = _root.red3._y - 0.5;
}
Instance of Symbol 27 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.cue._x - 7;
this._y = _root.cue._y - 0.5;
}
Instance of Symbol 28 MovieClip in Frame 50
onClipEvent (enterFrame) {
this._x = _root.black._x - 7;
this._y = _root.black._y - 0.5;
}
Instance of Symbol 31 MovieClip "ball" in Frame 50
onClipEvent (load) {
name = "ball";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
a = _x - _root.mall._x;
b = _y - _root.mall._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.mangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1150;
speed = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1150;
speed = 0;
}
}
Instance of Symbol 32 MovieClip "mall" in Frame 50
onClipEvent (load) {
name = "mall";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
ba = _x - _root.ball._x;
bb = _y - _root.ball._y;
bdistance = Math.sqrt((ba * ba) + (bb * bb));
if (21 >= Math.floor(bdistance)) {
_root.dangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1100;
speed = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1100;
speed = 0;
}
}
Instance of Symbol 33 MovieClip "blue2" in Frame 50
onClipEvent (load) {
name = "blue2";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
ba = _x - _root.ball._x;
bb = _y - _root.ball._y;
bdistance = Math.sqrt((ba * ba) + (bb * bb));
if (21 >= Math.floor(bdistance)) {
_root.dangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
a = _x - _root.mall._x;
b = _y - _root.mall._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.mangle(speed, angle, name);
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1050;
speed = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1050;
speed = 0;
}
}
Instance of Symbol 34 MovieClip "red2" in Frame 50
onClipEvent (load) {
name = "red2";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
a = _x - _root.mall._x;
b = _y - _root.mall._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.mangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
}
ba = _x - _root.ball._x;
bb = _y - _root.ball._y;
bdistance = Math.sqrt((ba * ba) + (bb * bb));
if (21 >= Math.floor(bdistance)) {
_root.dangle(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1200;
speed = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1200;
speed = 0;
}
}
Instance of Symbol 35 MovieClip "blue3" in Frame 50
onClipEvent (load) {
name = "blue3";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
ba = _x - _root.ball._x;
bb = _y - _root.ball._y;
bdistance = Math.sqrt((ba * ba) + (bb * bb));
if (21 >= Math.floor(bdistance)) {
_root.dangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
a = _x - _root.mall._x;
b = _y - _root.mall._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.mangle(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1250;
speed = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1250;
speed = 0;
}
}
Instance of Symbol 36 MovieClip "red3" in Frame 50
onClipEvent (load) {
name = "red3";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
a = _x - _root.mall._x;
b = _y - _root.mall._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.mangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
ba = _x - _root.ball._x;
bb = _y - _root.ball._y;
bdistance = Math.sqrt((ba * ba) + (bb * bb));
if (21 >= Math.floor(bdistance)) {
_root.dangle(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1300;
speed = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1300;
speed = 0;
}
}
Instance of Symbol 37 MovieClip "black" in Frame 50
onClipEvent (load) {
name = "black";
}
onClipEvent (enterFrame) {
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
ba = _x - _root.ball._x;
bb = _y - _root.ball._y;
bdistance = Math.sqrt((ba * ba) + (bb * bb));
if (21 >= Math.floor(bdistance)) {
_root.dangle(speed, angle, name);
}
cuea = _x - _root.cue._x;
cueb = _y - _root.cue._y;
cuedistance = Math.sqrt((cuea * cuea) + (cueb * cueb));
if (21 >= Math.floor(cuedistance)) {
_root.cuecue(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
a = _x - _root.mall._x;
b = _y - _root.mall._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.mangle(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 1000;
speed = 0;
this._visible = 0;
}
if ((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) {
this._x = 1000;
speed = 0;
this._visible = 0;
}
}
Instance of Symbol 40 MovieClip "cue" in Frame 50
onClipEvent (load) {
name = "cue";
}
onClipEvent (enterFrame) {
_root.cuespeed = speed;
_root.cuerotate = _rotation;
_root.cuedis = bl2dis;
_root.angel = angel;
speed = speed - _root.retardation;
if (0 >= Math.floor(speed)) {
speed = 0;
_root.stick._x = this._x;
_root.stick._y = this._y;
}
this._rotation = angle;
_x = (_x + (Math.cos(_rotation * (Math.PI/180)) * speed));
_y = (_y + (Math.sin(_rotation * (Math.PI/180)) * speed));
_root.tangle = this._rotation;
}
onClipEvent (enterFrame) {
_root.angle = this._rotation;
a = _x - _root.ball._x;
b = _y - _root.ball._y;
distance = Math.sqrt((a * a) + (b * b));
if (21 >= Math.floor(distance)) {
_root.dangle(speed, angle, name);
}
ma = _x - _root.mall._x;
mb = _y - _root.mall._y;
mdistance = Math.sqrt((ma * ma) + (mb * mb));
if (21 >= Math.floor(mdistance)) {
_root.mangle(speed, angle, name);
}
bl2x = _x - _root.blue2._x;
bl2y = _y - _root.blue2._y;
bl2dis = Math.sqrt((bl2x * bl2x) + (bl2y * bl2y));
if (21 >= Math.floor(bl2dis)) {
_root.bluee2(speed, angle, name);
if (0 >= Math.floor(speed)) {
}
}
re2x = _x - _root.red2._x;
re2y = _y - _root.red2._y;
re2dis = Math.sqrt((re2x * re2x) + (re2y * re2y));
if (21 >= Math.floor(re2dis)) {
_root.redd2(speed, angle, name);
}
bl3x = _x - _root.blue3._x;
bl3y = _y - _root.blue3._y;
bl3dis = Math.sqrt((bl3x * bl3x) + (bl3y * bl3y));
if (21 >= Math.floor(bl3dis)) {
_root.bluee3(speed, angle, name);
}
re3x = _x - _root.red3._x;
re3y = _y - _root.red3._y;
re3dis = Math.sqrt((re3x * re3x) + (re3y * re3y));
if (21 >= Math.floor(re3dis)) {
_root.redd3(speed, angle, name);
}
blax = _x - _root.black._x;
blay = _y - _root.black._y;
bladis = Math.sqrt((blax * blax) + (blay * blay));
if (21 >= Math.floor(bladis)) {
_root.blackball(speed, angle, name);
}
if (((this._y >= 84) && (267 >= this._y)) && (Math.floor(this._x) >= 515)) {
this._x = 514;
angle = 180 - angle;
}
if (((this._y >= 84) && (267 >= this._y)) && (135 >= Math.floor(this._x))) {
this._x = 136;
angle = 180 - angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (70 >= Math.floor(this._y))) {
this._y = 71;
angle = -angle;
}
if (((this._x >= 148) && (504 >= this._x)) && (Math.floor(this._y) >= 280)) {
this._y = 279;
angle = -angle;
}
if ((((this.hitTest(_root.spot1) == true) or (this.hitTest(_root.spot2) == true)) or (this.hitTest(_root.spot3) == true)) or (this.hitTest(_root.spot4) == true)) {
this._x = 240;
this._y = 175.1;
speed = 0;
}
if ((((this.hitTest(_root.spot5) == true) or (this.hitTest(_root.spot6) == true)) or (this.hitTest(_root.spot7) == true)) or (this.hitTest(_root.spot8) == true)) {
this._x = 240;
this._y = 175.1;
speed = 0;
}
}
Instance of Symbol 42 MovieClip "stick" in Frame 50
onClipEvent (load) {
cou = 1;
sou = 0;
}
onClipEvent (enterFrame) {
if (0 >= Math.floor(_root.cue.speed)) {
_root.okay = true;
}
if ((0 >= Math.floor(_root.cue.speed)) && (_root.okay == true)) {
x = _x - _root._xmouse;
y = _y - _root._ymouse;
_rotation = (Math.round((-Math.atan2(x, y)) / (Math.PI/180)) - 180);
}
if (Key.isDown(Key.SHIFT)) {
if (cou >= 17) {
cou = 17;
}
if (cou == 15) {
cou = 16;
}
cou++;
sou++;
_root.okay = false;
gotoAndStop(sou);
}
}
onClipEvent (mouseDown) {
_root.s.start();
_root.cue.angle = this._rotation - 90;
_root.cue.speed = cou;
sou = 1;
gotoAndStop (1);
cou = 0;
}
Symbol 13 Button
on (release) {
nextFrame();
}
Symbol 39 Button
on (press) {
startDrag ("", true);
}
on (release) {
stopDrag();
}
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 2
stop();
Symbol 42 MovieClip Frame 3
stop();
Symbol 42 MovieClip Frame 4
stop();
Symbol 42 MovieClip Frame 5
stop();
Symbol 42 MovieClip Frame 6
stop();
Symbol 42 MovieClip Frame 7
stop();
Symbol 42 MovieClip Frame 8
stop();
Symbol 42 MovieClip Frame 9
stop();
Symbol 42 MovieClip Frame 10
stop();
Symbol 42 MovieClip Frame 11
stop();
Symbol 42 MovieClip Frame 12
stop();
Symbol 42 MovieClip Frame 13
stop();
Symbol 42 MovieClip Frame 14
stop();
Symbol 42 MovieClip Frame 15
stop();
Symbol 42 MovieClip Frame 16
stop();
Symbol 42 MovieClip Frame 17
stop();
Symbol 42 MovieClip Frame 18
stop();
Symbol 42 MovieClip Frame 19
stop();
Symbol 42 MovieClip Frame 20
stop();