Frame 1
var_humanscore = 0;
var_compuerscore = 0;
var_player1score = 0;
var_player2score = 0;
stop();
Instance of Symbol 24 MovieClip in Frame 2
onClipEvent (load) {
pause = 3;
}
Instance of Symbol 26 MovieClip "bat1" in Frame 2
onClipEvent (load) {
moveSpeed = 8;
}
onClipEvent (enterFrame) {
if (Key.isDown(90) && (325 >= this._y)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(65) && (this._y >= 100)) {
this._y = this._y - moveSpeed;
}
}
Instance of Symbol 27 MovieClip "bat2" in Frame 2
onClipEvent (load) {
moveSpeed = 10;
mistake = 0;
}
onClipEvent (enterFrame) {
if ((Math.Random() * 100) >= 70) {
mistake = -24;
} else {
mistake = 24;
}
if ((325 >= _root.ball._y) && (_root.ball._y >= 100)) {
if (((Math.Random() * mistake) + _root.ball._y) >= this._y) {
this._y = this._y + movespeed;
} else {
this._y = this._y - movespeed;
}
}
}
Frame 3
stop();
Instance of Symbol 31 MovieClip "ball" in Frame 3
onClipEvent (load) {
moveSpeed = 10;
xmotion = 1;
this._y = (Math.Random() * 300) + 70;
if ((Math.Random() * 100) >= 70) {
ymotion = 1;
} else {
ymotion = -1;
}
soundBeep = new Sound();
soundBeep.attachSound("beep");
soundTada = new Sound();
soundTada.attachSound("tada");
}
onClipEvent (enterFrame) {
if (this._x < -100) {
soundTada.start(0, 1);
_root.gotoAndPlay("human lost round");
}
if (650 < this._x) {
soundTada.start(0, 1);
_root.gotoAndPlay("computer lost round");
}
this._x = this._x - (moveSpeed * xmotion);
this._y = this._y - (moveSpeed * ymotion);
_root.xvalue = this._x;
_root.yvalue = this._y;
if (this.hitTest(_root.bat1) == true) {
soundBeep.start(0, 1);
this._x = 30;
this.xmotion = -xmotion;
}
if (this.hitTest(_root.bat2) == true) {
soundBeep.start(0, 1);
this._x = 510;
this.xmotion = -xmotion;
}
if ((this._y < 70) or (370 < this._y)) {
soundBeep.start(0, 1);
this.ymotion = -ymotion;
}
}
Frame 4
var_computerscore = var_computerscore + 1;
_root.computerscore = var_computerscore;
if (_root.computerscore >= 3) {
soundTada.start(0, 1);
_root.gotoAndPlay("computer wins");
}
Instance of Symbol 36 MovieClip in Frame 4
onClipEvent (load) {
pause = 2;
}
Frame 5
gotoAndPlay (3);
Frame 6
var_humanscore = var_humanscore + 1;
_root.humanscore = var_humanscore;
if (_root.humanscore >= 3) {
soundTada.start(0, 1);
_root.gotoAndPlay("human wins");
}
Instance of Symbol 36 MovieClip in Frame 6
onClipEvent (load) {
pause = 2;
}
Frame 7
gotoAndPlay (3);
Instance of Symbol 24 MovieClip in Frame 8
onClipEvent (load) {
pause = 3;
}
Frame 9
_root.humanscore = 0;
_root.computerscore = 0;
var_humanscore = 0;
var_computerscore = 0;
gotoAndPlay (1);
Instance of Symbol 24 MovieClip in Frame 10
onClipEvent (load) {
pause = 3;
}
Frame 11
_root.humanscore = 0;
_root.computerscore = 0;
var_humanscore = 0;
var_computerscore = 0;
gotoAndPlay (1);
Instance of Symbol 24 MovieClip in Frame 12
onClipEvent (load) {
pause = 3;
}
Instance of Symbol 48 MovieClip "bat1" in Frame 12
onClipEvent (load) {
moveSpeed = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(90) && (325 >= this._y)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(65) && (this._y >= 100)) {
this._y = this._y - moveSpeed;
}
}
Instance of Symbol 49 MovieClip "bat2" in Frame 12
onClipEvent (load) {
moveSpeed = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.DOWN) && (325 >= this._y)) {
this._y = this._y + moveSpeed;
} else if (Key.isDown(Key.UP) && (this._y >= 100)) {
this._y = this._y - moveSpeed;
}
}
Frame 13
stop();
Instance of Symbol 52 MovieClip "ball" in Frame 13
onClipEvent (load) {
moveSpeed = 10;
xmotion = "1";
ymotion = "1";
soundBeep = new Sound();
soundBeep.attachSound("beep");
soundTada = new Sound();
soundTada.attachSound("tada");
}
onClipEvent (enterFrame) {
if (this._x < -100) {
soundTada.start(0, 1);
_root.gotoAndPlay("player 1 lost round");
}
if (650 < this._x) {
soundTada.start(0, 1);
_root.gotoAndPlay("player 2 lost round");
}
this._x = this._x - (moveSpeed * xmotion);
this._y = this._y - (moveSpeed * ymotion);
_root.xvalue = this._x;
_root.yvalue = this._y;
if (this.hitTest(_root.bat1) == true) {
soundBeep.start(0, 1);
this._x = 30;
this.xmotion = -xmotion;
}
if (this.hitTest(_root.bat2) == true) {
soundBeep.start(0, 1);
this._x = 510;
this.xmotion = -xmotion;
}
if ((this._y < 70) or (370 < this._y)) {
soundBeep.start(0, 1);
this.ymotion = -ymotion;
}
}
Frame 14
var_player2score = var_player2score + 1;
_root.player2score = var_player2score;
if (_root.var_player2score >= 3) {
soundTada.start(0, 1);
gotoAndPlay (20);
}
Instance of Symbol 36 MovieClip in Frame 14
onClipEvent (load) {
pause = 2;
}
Frame 15
gotoAndPlay (13);
Frame 16
var_player1score = var_player1score + 1;
_root.player1score = var_player1score;
if (_root.var_player1score >= 3) {
soundTada.start(0, 1);
gotoAndPlay (18);
}
Instance of Symbol 36 MovieClip in Frame 16
onClipEvent (load) {
pause = 2;
}
Frame 17
gotoAndPlay (13);
Instance of Symbol 57 MovieClip in Frame 18
onClipEvent (load) {
pause = 3;
}
Frame 19
_root.player1score = 0;
_root.player2score = 0;
var_player1score = 0;
var_player2score = 0;
gotoAndPlay (1);
Instance of Symbol 57 MovieClip in Frame 20
onClipEvent (load) {
pause = 3;
}
Frame 21
_root.player1score = 0;
_root.player2score = 0;
var_player1score = 0;
var_player2score = 0;
gotoAndPlay (1);
Symbol 16 Button
on (release) {
gotoAndPlay (2);
}
Symbol 17 Button
on (release) {
gotoAndPlay (12);
}
Symbol 24 MovieClip Frame 1
play();
tellTarget ("../") {
stop();
};
Symbol 24 MovieClip Frame 2
start = Number(getTimer() / 1000);
end = start + pause;
Symbol 24 MovieClip Frame 3
current = Number(getTimer() / 1000);
if (current >= end) {
tellTarget ("../") {
play();
};
} else {
play();
}
Symbol 24 MovieClip Frame 8
gotoAndPlay (3);
Symbol 36 MovieClip Frame 1
play();
tellTarget ("../") {
stop();
};
Symbol 36 MovieClip Frame 2
start = Number(getTimer() / 1000);
end = start + pause;
Symbol 36 MovieClip Frame 3
current = Number(getTimer() / 1000);
if (current >= end) {
tellTarget ("../") {
play();
};
} else {
play();
}
Symbol 36 MovieClip Frame 8
gotoAndPlay (3);
Symbol 57 MovieClip Frame 1
play();
tellTarget ("../") {
stop();
};
Symbol 57 MovieClip Frame 2
start = Number(getTimer() / 1000);
end = start + pause;
Symbol 57 MovieClip Frame 3
current = Number(getTimer() / 1000);
if (current >= end) {
tellTarget ("../") {
play();
};
} else {
play();
}
Symbol 57 MovieClip Frame 8
gotoAndPlay (3);