Combined Code
frame 1 {
unl1 = 1;
unl2 = 0;
unl3 = 0;
_root.guyul = 'Zoran Primorak';
}
frame 2 {
xsel = 1;
var flag = true;
fxsound = new Sound();
fxsound.setVolume(100);
_root.instruct._visible = false;
_root.stop();
paddle1._visible = false;
ball._visible = false;
paddle2._visible = false;
shadow._visible = false;
backbox._visible = false;
wins._visible = false;
lose._visible = false;
bluescoreclip._visible = false;
redscoreclip._visible = false;
ball.scales = 20;
ball.speedvar = 0.6;
ball.increasing = 1;
paddle2.ydiff = 10;
paddle2.xdiff = 6;
ball.gravity = 0.1;
if (unl2 == 0) {
medium.gotoAndStop(2);
}
if (unl3 == 0) {
hard.gotoAndStop(2);
}
if (_root.kkl1 == 1) {
easy.xscc.gotoAndStop(2);
}
if (_root.kkl2 == 1) {
easy.xscc.gotoAndStop(2);
}
if (_root.kkl3 == 1) {
easy.xscc.gotoAndStop(2);
}
easy.flah.gotoAndStop(2);
_root.mute.gotoAndStop(1);
}
movieClip 10 {
}
movieClip 11 {
}
instance paddle2 of movieClip 11 {
onClipEvent (enterFrame) {
if (_root.ball.zspeed < 0) {
if (_root.ball._xscale < 37) {
if (60 - _root.ball.realy * 30 / 14 < _y) {
_y = _y - ydiff;
}
if (_y < 60 - _root.ball.realy * 30 / 14) {
_y = _y + ydiff;
}
}
if (_x < _root.ball.realx - xdiff / 2) {
_x = _x + xdiff;
}
if (_root.ball.realx + xdiff / 2 < _x) {
_x = _x - xdiff;
}
}
if (50 - _height / 2 < _y) {
_y = 50 - _height / 2;
}
_rotation = (_x - 300) * 90 / 84;
if (_rotation > 90) {
_rotation = 90;
}
if (_rotation < -90) {
_rotation = -90;
}
}
}
movieClip 13 {
}
instance shadow of movieClip 13 {
onClipEvent (enterFrame) {
_x = _root.ball._x;
_xscale = _root.ball._xscale;
_yscale = _xscale;
_y = 60 + 3.7143 * (_root.ball._xscale - 30);
}
}
movieClip 15 {
}
instance ball of movieClip 15 {
onClipEvent (enterFrame) {
if (realy < 0) {
if (realx > 185 & realx < 365) {
realy = 0;
ydir *= -1;
} else {
realy = 0;
_y = 60 + 3.7143 * (_xscale - 30) - realy * _xscale / 14;
if (zspeed > 0) {
++score1;
_root.bluescoreclip.bluescore = score1;
_root.redscoreclip.redscore = score2 + ' : FORA';
_root.clap2.gotoAndPlay(2);
_root.out.gotoAndPlay(2);
}
if (zspeed < 0) {
++score2;
_root.bluescoreclip.bluescore = score1 + ' : FORA';
_root.redscoreclip.redscore = score2;
_root.out.gotoAndPlay(2);
}
zspeed = 0;
stopDrag();
Mouse.show();
_root.service._visible = true;
}
}
if (_xscale >= 100) {
if (this.hitTest(_root.paddle1.paddle1real)) {
_root.sound.gotoAndPlay(2);
xspeed = (_x - _root.paddle1._x) / 17;
yspeed = 3.5 / ballspeed / ballspeed;
ydir = 1;
zspeed *= -1;
} else {
if (zspeed != 0) {
++score2;
if (_root._currentframe > 7) {
_root.clap1.gotoAndPlay(2);
}
_root.bluescoreclip.bluescore = score1 + ' : ERROU';
_root.redscoreclip.redscore = score2;
zspeed = 0;
stopDrag();
Mouse.show();
_root.service._visible = true;
}
}
}
if (_xscale <= 30) {
if (this.hitTest(_root.paddle2.paddle2real)) {
_root.sound.gotoAndPlay(2);
xspeed = ((_x - _root.paddle2._x) / 17) * 100 / 30;
yspeed = 1.5 / ballspeed / ballspeed;
ydir = 1;
zspeed *= -1;
} else {
if (zspeed != 0) {
++score1;
_root.bluescoreclip.bluescore = score1;
_root.redscoreclip.redscore = score2 + ' : ERROU';
_root.applause.gotoAndPlay(2);
zspeed = 0;
stopDrag();
Mouse.show();
_root.service._visible = true;
}
}
}
if (zspeed != 0) {
if (yspeed < 0) {
yspeed *= -1;
ydir *= -1;
}
realx += (xspeed * 100 / _xscale) * ballspeed;
if (ydir < 0) {
realy -= (yspeed * 32 / _xscale) * ballspeed / 0.6;
yspeed += gravity * 0.42 * 10 / ballspeed;
}
if (ydir > 0) {
realy += (yspeed * 32 / _xscale) * ballspeed / 0.6;
yspeed -= gravity * 0.42 * 10 / ballspeed;
}
_xscale = _xscale + zspeed;
_yscale = _yscale + zspeed;
_x = 300 + (realx - 300) * _xscale / 30;
_y = 60 + 3.7143 * (_xscale - 30) - realy * _xscale / 14;
}
if (increasing == 1) {
ballspeed += speedvar / 1000;
}
if (zspeed < 0) {
zspeed = -3 * ballspeed;
}
if (zspeed > 0) {
zspeed = 3 * ballspeed;
}
}
}
movieClip 17 {
frame 1 {
stop();
}
frame 2 {
if (_root.flag == 0) {
gotoAndStop(1);
}
}
}
movieClip 19 {
frame 1 {
stop();
}
frame 2 {
if (_root.flag == 0) {
gotoAndStop(1);
}
}
}
movieClip 21 {
}
movieClip 22 {
}
instance paddle1 of movieClip 22 {
onClipEvent (enterFrame) {
_rotation = (_x - 300) * 90 / 275;
if (_rotation > 90) {
_rotation = 90;
}
if (_rotation < -90) {
_rotation = -90;
}
}
}
movieClip 24 {
frame 1 {
stop();
}
frame 2 {
if (_root.flag == 0) {
gotoAndStop(1);
}
}
}
movieClip 26 {
frame 1 {
stop();
}
frame 2 {
if (_root.flag == 0) {
gotoAndStop(1);
}
}
}
movieClip 29 {
frame 1 {
stop();
}
}
instance mute of movieClip 29 {
onClipEvent (release) {
if (_root.flag == true) {
_root.flag = false;
this.gotoAndStop(2);
_root.fxsound.setVolume(0);
} else {
_root.flag = true;
this.gotoAndStop(1);
_root.fxsound.setVolume(100);
}
}
}
movieClip 33 {
}
movieClip 35 {
}
movieClip 38 {
}
movieClip 40 {
}
button 47 {
on (release) {
_root.ball.score1 = 0;
_root.ball.score2 = 0;
_root.ball.xspeed = 0;
_root.ball.ballspeed = 1.1;
_root.ball.yspeed = -2.1;
_root.ball._xscale = 99;
_root.ball._yscale = 99;
_root.ball.zspeed = -3;
_root.ball.realx = 300;
_root.ball.realy = 3;
_root.ball.xchill = 5;
_root.ball.ychill = 20;
startDrag(_root._root.paddle1, true);
Mouse.hide();
gotoAndPlay(3);
_root.paddle2._x = 300;
_root.paddle2._y = 60;
ball._visible = true;
paddle1._visible = true;
shadow._visible = true;
paddle2._visible = true;
backbox._visible = true;
paddle2._xscale = 30;
paddle2._yscale = 30;
ball.ydir = 1;
service._visible = false;
wins._visible = false;
lose._visible = false;
bluescoreclip._visible = true;
redscoreclip._visible = true;
bluescoreclip.bluescore = '0';
redscoreclip.redscore = '0';
}
}
button 54 {
on (release) {
getURL('http://www.freeonlinegames.com?tt', '_blank');
}
}
button 57 {
on (release) {
_root._root.ball.xspeed = 0;
_root._root.ball.ballspeed = 1.1;
_root._root.ball.yspeed = -2.1;
_root._root.ball._xscale = 99;
_root._root.ball._yscale = 99;
_root._root.ball.zspeed = -3;
_root._root.ball.realx = 300;
_root._root.ball.realy = 3;
_root._root.ball.xchill = 5;
_root._root.ball.ychill = 20;
startDrag(_root._root.paddle1, true);
Mouse.hide();
tellTarget ('_root') {
gotoAndPlay('sapte');
}
_root._root.paddle2._x = 300;
_root._root.paddle2._y = 60;
_root.ball._visible = true;
_root.paddle1._visible = true;
_root.shadow._visible = true;
_root.paddle2._visible = true;
_root.backbox._visible = true;
_root.paddle2._xscale = 30;
_root.paddle2._yscale = 30;
_root.ball.ydir = 1;
_visible = false;
_root.bluescoreclip.bluescore = _root.ball.score1;
_root.redscoreclip.redscore = _root.ball.score2;
}
}
movieClip 58 {
}
button 62 {
on (release) {
_root.gotoAndStop('sase');
}
}
frame 4 {
if (ball.score1 >= 21 || ball.score2 >= 21) {
if (ball.score1 - ball.score2 > 1 || ball.score2 - ball.score1 > 1) {
service._visible = false;
wins._visible = false;
lose._visible = false;
} else {
gotoAndPlay(3);
}
} else {
gotoAndPlay(3);
}
}
frame 5 {
stop();
if (ball.score2 < ball.score1) {
wins._visible = true;
if (xsel == 1) {
_root.xsc1 = ball.score1 + ' - ' + ball.score2;
_root.kkl1 = 1;
_root.unl2 = 1;
}
if (xsel == 2) {
_root.xsc2 = ball.score1 + ' - ' + ball.score2;
_root.kkl2 = 1;
_root.unl3 = 1;
}
if (xsel == 3) {
_root.xsc3 = ball.score1 + ' - ' + ball.score2;
_root.kkl3 = 1;
}
}
if (ball.score1 < ball.score2) {
lose._visible = true;
}
}
movieClip 64 {
}