Frame 1
function DemoDim() {
_root.mc_Net.setTint(_root.dimColor);
_root.LScore.setTint(_root.dimColor);
_root.RScore.setTint(_root.dimColor);
_root.gegner2.setTint(_root.dimColor);
_root.ich2.setTint(_root.dimColor);
_root.ball2.setTint(_root.dimColor);
_root.titlePong._visible = true;
_root.mc_clickplayer._visible = true;
_root.sndPaddle.setVolume(0);
_root.sndWall.setVolume(0);
_root.sndScore.setVolume(0);
_root.sndPoint.setVolume(0);
}
function DemoBrt() {
_root.mc_Net.setTint(_root.brtColor);
_root.LScore.setTint(_root.brtColor);
_root.RScore.setTint(_root.brtColor);
_root.gegner2.setTint(_root.brtColor);
_root.ich2.setTint(_root.brtColor);
_root.ball2.setTint(_root.brtColor);
_root.titlePong._visible = false;
_root.mc_clickplayer._visible = false;
_root.sndPaddle.setVolume(100);
_root.sndWall.setVolume(100);
_root.sndScore.setVolume(100);
_root.sndPoint.setVolume(100);
}
XWert = 10;
YWert = 10;
_root.balldir = 0;
_root.GameAlmostOver = false;
_root.ballspeed = 3;
_root.jumpdistance = 15;
_root.dimColor = "333333";
_root.brtColor = "FFFFFF";
_root.LStopArea = 160;
_root.RStopArea = 480;
if (_root.shouldIGo == true) {
gotoAndStop (2);
} else {
_root.sidestarter = 1;
}
movieclip.prototype.setTint = function (newTint) {
c = new Color(this);
c.setRGB(parseInt(newTint, 16));
};
movieclip.prototype.fakeDrag = function () {
_y = _root._ymouse;
};
movieclip.prototype.schieberGegner = function (gBall, prop) {
ballX = _root[gBall]._x;
abstand = _root[gBall][prop] - eval (prop);
if (abstand < 0) {
x = (-_root.jumpdistance) - random((_root.punkteIch + _root.punkteGegner) * 0.75);
} else {
x = _root.jumpdistance + random((_root.punkteIch + _root.punkteGegner) * 0.75);
}
if ((440 < ballX) or (ballX < 320)) {
if ((20 < Math.abs(abstand)) and (_root.balldir < 0)) {
Set(prop, eval (prop) + x);
if (Math.abs(ballX) < 140) {
Set(prop, eval (prop) + (x * 1.5));
}
}
}
};
movieclip.prototype.schieberIch = function (gBall, prop) {
ballX = _root[gBall]._x;
abstand = _root[gBall][prop] - eval (prop);
if (abstand < 0) {
x = -_root.jumpdistance;
} else {
x = _root.jumpdistance;
}
if ((ballX < 200) or (320 < ballX)) {
if ((20 < Math.abs(abstand)) and (0 < _root.balldir)) {
Set(prop, eval (prop) + x);
if (500 < Math.abs(ballX)) {
Set(prop, eval (prop) + (x * 1.5));
}
}
}
};
movieclip.prototype.ballinit = function () {
_root.ball2._visible = true;
_root.ball2._y = random(100) + 140;
_root.ball2._x = 320;
vx = -8 * _root.sidestarter;
vy = 1;
speed = _root.ballspeed;
_root.punkteIch = 0;
_root.punkteGegner = 0;
_root.LScore.gotoAndStop(_root.punkteGegner + 1);
_root.RScore.gotoAndStop(_root.punkteIch + 1);
};
movieclip.prototype.ballverhalten2 = function (sIch, sGegner, propX, propY) {
Set(propX, eval (propX) + (vx * speed));
Set(propY, eval (propY) + (vy * speed));
if (605 < eval (propX)) {
if ((Math.abs(_root[sIch][propY] - eval (propY)) < 60) and (eval (propX) < 660)) {
vx = vx * -1;
speed = speed + 0.02;
diff = eval (propY) - _root[sIch][propY];
y = Math.sin((diff * Math.PI) / 180) * 15;
vy = y;
Set(propX, 605);
_root.sndPaddle.start();
} else if (840 < eval (propX)) {
_root.sndScore.start();
_root.punkteGegner = _root.punkteGegner + 1;
vx = vx * -1;
Set(propX, 320);
speed = _root.ballspeed;
Set(propY, random(100) + 140);
vy = 3;
_root.LScore.gotoAndStop(_root.punkteGegner + 1);
}
}
if (eval (propX) < 30) {
if ((Math.abs(_root[sGegner][propY] - eval (propY)) < 60) and (-30 < eval (propX))) {
vx = vx * -1;
speed = speed + 0.02;
diff = eval (propY) - _root[sGegner][propY];
y = Math.sin((diff * Math.PI) / 180) * 15;
vy = y;
Set(propX, 30);
_root.sndPaddle.start();
} else if (eval (propX) < -200) {
_root.sndScore.start();
_root.punkteIch = _root.punkteIch + 1;
_root.RScore.gotoAndStop(_root.punkteIch + 1);
vx = vx * -1;
speed = _root.ballspeed;
Set(propX, 320);
Set(propY, random(100) + 140);
vy = 3;
}
}
if (eval (propY) < 25) {
vy = vy * -1;
Set(propY, 25);
if ((10 < eval (propX)) and (eval (propX) < 630)) {
_root.sndWall.start();
}
} else if (450 < eval (propY)) {
vy = vy * -1;
Set(propY, 450);
if ((10 < eval (propX)) and (eval (propX) < 630)) {
_root.sndWall.start();
}
}
if ((_root.punkteGegner == _root.WinnerScore) or (_root.punkteIch == _root.WinnerScore)) {
if (_root.punkteGegner == _root.WinnerScore) {
_root.sidestarter = 1;
_root.LScore.gotoAndStop(_root.WinnerScore + 1);
}
if (_root.punkteIch == _root.WinnerScore) {
_root.sidestarter = -1;
_root.RScore.gotoAndStop(_root.WinnerScore + 1);
}
speed = 0;
if (!_root.delayplaying) {
_root.delay.gotoAndPlay(2);
_root.delayplaying = true;
}
}
_root.balldir = vx;
};
Instance of Symbol 14 MovieClip "delay" in Frame 1
onClipEvent (load) {
fscommand ("fullscreen", "true");
_root.WinnerScore = 21;
_root.sndPaddle = new Sound();
_root.sndWall = new Sound();
_root.sndScore = new Sound();
_root.sndPoint = new Sound();
_root.sndPaddle.attachSound("PONGCONTACT");
_root.sndWall.attachSound("PONGCONTACT");
_root.sndScore.attachSound("PONGSCORE");
_root.sndPoint.attachSound("PONGSERVE");
_root.sndPaddle.setVolume(0);
_root.sndWall.setVolume(0);
_root.sndScore.setVolume(0);
_root.sndPoint.setVolume(0);
}
Frame 2
_root.DemoDim();
stop();
Instance of Symbol 40 MovieClip "ball2" in Frame 2
onClipEvent (load) {
ballinit();
}
onClipEvent (enterFrame) {
ballverhalten2("ich2", "gegner2", "_x", "_y");
}
Instance of Symbol 41 MovieClip "ich2" in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE) and (_root.gameMode == "play")) {
_root.gameMode = "demo";
_root.gotoAndPlay(1);
}
schieberIch("ball2", "_y");
}
Instance of Symbol 42 MovieClip "gegner2" in Frame 2
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (_root.gameMode == "play") {
fakeDrag();
} else {
schieberGegner("ball2", "_y");
}
}
Frame 3
gotoAndPlay (1);
Symbol 11 Button
on (release) {
_root.delay.gotoAndStop(1);
_root.gameMode = "play";
_root.DemoBrt();
_root.ball2.ballinit();
}
Symbol 12 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 2
_root.ball2._alpha = 0;
Symbol 14 MovieClip Frame 73
_root.shouldIGo = true;
_root.speed = 1;
_root.delayplaying = false;
_root.ball2._alpha = 100;
_root.gameMode = "demo";
_root.gotoAndPlay(1);
Symbol 16 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 48 Button
on (release) {
if (_level0.inswf == "t") {
getURL ("home.asp?SECTION=HOME", "_top");
} else {
getURL ("index.asp");
}
}