Frame 1
stop();
Instance of Symbol 41 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.gotoAndPlay(2);
} else {
this.gotoAndStop(Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * this._totalframes));
}
}
Instance of Symbol 41 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.gotoAndPlay(3);
} else {
this.gotoAndStop(Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * this._totalframes));
}
}
Frame 3
stop();
Frame 4
function reset() {
hitFlag = false;
}
decay = 0.99;
score1 = 0;
score2 = 0;
hitFlag = false;
_root.onEnterFrame = function () {
puck.xmov = puck.xmov * decay;
puck.ymov = puck.ymov * decay;
puck._x = puck._x + puck.xmov;
puck._y = puck._y + puck.ymov;
if ((puck._y + puck.ymov) < 100) {
puck._y = 100;
puck.ymov = -puck.ymov;
}
if ((puck._y + puck.ymov) > 333) {
puck._y = 338;
puck.ymov = -puck.ymov;
}
if ((puck._x + puck.xmov) < 55) {
puck._x = 55;
puck.xmov = -puck.xmov;
}
if ((puck._x + puck.xmov) > 545) {
puck._x = 545;
puck.xmov = -puck.xmov;
}
firstSound = new Sound();
firstSound.attachSound("hit");
rgl._alpha = 0;
if (puck.hitTest(paddle)) {
puck.xmov = paddle.vx + 6;
puck.ymov = paddle.vy + 7;
}
if (puck.hitTest(frame1) and (this.hitFlag == false)) {
_root.firstSound.start();
this.hitFlag = true;
this.reset();
}
if (puck.hitTest(frame2) and (this.hitFlag == false)) {
_root.firstSound.start();
this.hitFlag = true;
this.reset();
}
if (puck.hitTest(frame3) and (this.hitFlag == false)) {
_root.firstSound.start();
this.hitFlag = true;
this.reset();
}
if (puck.hitTest(frame4) and (this.hitFlag == false)) {
_root.firstSound.start();
this.hitFlag = true;
this.reset();
}
if ((puck._x >= rgl._x) && (Math.abs(puck._y - rgl._y) < (rgl._width / 2))) {
score1 = score1 + 1;
puck._x = 250;
puck._y = 200;
puck.ymov = 0;
puck.xmov = 0;
if (score1 == 7) {
}
}
};
paddle.onPress = function () {
this.isDragging = true;
this.vx = (this.vy = 0);
this.lmx = _root._xmouse;
this.lmy = _root._ymouse;
this.startDrag(false, 70, 105, 270, 340);
};
paddle.onRelease = function () {
this.isDragging = false;
this.stopDrag();
};
paddle.onEnterFrame = function () {
if (this.isDragging) {
this.vx = this.vx * decay;
this.vy = this.vy * decay;
this.vx = _root._xmouse - this.lmx;
this.vy = _root._ymouse - this.lmy;
this.lmx = _root._xmouse;
this.lmy = _root._ymouse;
}
};
paddle2.onEnterFrame = function () {
if (test) {
this.vx2 = (this.vy2 = 0);
this.lmx2 = this._x;
this.lmy2 = this._y;
}
checker2 = random(2);
if (random <= 1) {
xrnd = random(10);
if (xrnd <= 1) {
xrnd = 2;
}
rnd1 = -1 * xrnd;
}
if (random == 2) {
xrnd = random(10);
if (xrnd <= 1) {
xrnd = 2;
}
rnd1 = 1 * xrnd;
}
if (_root.puck._y <= 175) {
yrnd = random(10);
if (yrnd <= 1) {
yrnd = 2;
}
rnd2 = 1 * yrnd;
} else if (_root.puck._y >= 175) {
yrnd = random(10);
if (yrnd <= 1) {
yrnd = 2;
}
rnd2 = -1 * speedx;
}
if (random <= 1) {
speedx = random(50);
if (speedx <= 1) {
speedx = 2;
}
speed1 = -1 * speedx;
}
this.vx2 = ((rnd1 + this._x) - this.lmx2) + speed1;
this.vy2 = (rnd2 + this._y) - this.lmy2;
this.lmx2 = this._x;
this.lmy2 = this._y;
if (this.hitTest(_root.puck)) {
test = true;
puck.xmov = paddle2.vx2;
puck.ymov = paddle2.vy2;
}
};
stop();
flag = 0;
x = 190;
y = 190;
rand = 0;
GoalSound = new Sound();
GoalSound.attachSound("goal");
Instance of Symbol 74 MovieClip "lgl" in Frame 4
onClipEvent (load) {
_root.score2 = 0;
this._visible = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.puck)) {
_root.score2 = _root.score2 + 1;
_root.puck._x = 350;
_root.puck._y = 200;
_root.puck.ymov = 0;
_root.puck.xmov = 0;
}
}
Instance of Symbol 82 MovieClip "paddle" in Frame 4
/* no clip actions */
Instance of Symbol 84 MovieClip "paddle2" in Frame 4
onClipEvent (enterFrame) {
xx1 = _root.puck._x;
yy1 = _root.puck._y;
xx2 = _root.paddle2._x;
yy2 = _root.paddle2._y;
_root.puck.radius2 = _width / 2;
_root.paddle2.radius2 = _width / 2;
xx = xx2 - xx1;
yx = yy2 - yy1;
distance2 = Math.sqrt((xx * xx) + (yy * yy));
speed = 7;
if (_root.puck._x >= 300) {
if ((xx1 && (yy1 != xx2)) && (yy2)) {
endX = _root.puck._x;
endY = _root.puck._y;
_x = (_x + ((endX - _x) / speed));
_y = (_y + ((endY - _y) / speed));
}
}
if (_root.puck._x <= 300) {
endX = 505;
endY = 200;
_x = (_x + ((endX - _x) / speed));
_y = (_y + ((endY - _y) / speed));
}
}
Instance of Symbol 85 MovieClip "rgl" in Frame 4
onClipEvent (load) {
_root.score1 = 0;
this._visible = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.puck)) {
_root.score1 = _root.score1 + 1;
_root.goalSound.start();
_root.puck._x = 260;
_root.puck._y = 225;
_root.puck.ymov = 0;
_root.puck.xmov = 0;
}
if (_root.score1 >= 9) {
_root.gotoAndStop("gameover1");
}
}
Instance of Symbol 74 MovieClip "lgl" in Frame 4
onClipEvent (load) {
_root.score2 = 0;
this._visible = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.puck)) {
_root.goalSound.start();
_root.score2 = _root.score2 + 1;
_root.puck._x = 350;
_root.puck._y = 225;
_root.puck.ymov = 0;
_root.puck.xmov = 0;
}
if (_root.score2 >= 9) {
_root.gotoAndStop("gameover");
}
}
Frame 5
if (puck.hitTest(frame1)) {
trace("hi");
flag = 1;
}
if (puck.hitTest(frame2)) {
trace("hi");
flag = 2;
}
if (puck.hitTest(frame3)) {
trace("hi");
flag = 3;
}
if (puck.hitTest(frame4)) {
trace("hi");
flag = 4;
}
if (flag == 0) {
x = x + rand;
y = y + 5;
}
if (flag == 1) {
x = x + 5;
y = y - rand;
}
if (flag == 2) {
x = x - 5;
y = y - rand;
}
if (flag == 3) {
x = x - rand;
y = y + 5;
}
if (flag == 4) {
x = x + 5;
y = y - rand;
}
stop();
Frame 6
gotoAndPlay (5);
Frame 7
stop();
Frame 9
stop();
Symbol 32 MovieClip Frame 14
stop();
Symbol 51 Button
on (release) {
gotoAndPlay (4);
}
Symbol 57 Button
on (release) {
gotoAndPlay (9);
}
Symbol 70 Button
on (release) {
getURL ("http://www.Flashfunpages.com/", "_top");
}
Symbol 92 MovieClip Frame 60
stop();
Symbol 98 Button
on (press) {
gotoAndPlay (2);
}
Symbol 115 Button
on (release) {
gotoAndPlay (3);
}