Frame 1
Frame 2
byteloaded = _root.getBytesLoaded();
bytetotal = _root.getBytesTotal();
loaded = int((byteloaded / bytetotal) * 100);
page1.load_bar.gotoAndStop(loaded);
Frame 3
fscommand ("trapallkeys", "true");
if (byteloaded == bytetotal) {
play();
} else {
gotoAndPlay (1);
}
Frame 6
removeMovieClip(out);
stop();
_root.myselect = 1;
page1.myplay.gotoAndStop(2);
Frame 7
duplicateMovieClip (out1, "out", 999997);
duplicateMovieClip (score1, "score", 999998);
duplicateMovieClip (mask1, "mask", 99999999);
play();
partie = true;
dep_ordi_x = 4.5 + (_parent.niveau / 1.5);
dep_ordi_y = 0.9 + (_parent.niveau / 10);
pourcentageservice = 0.75 + (0.02 * _parent.niveau);
Frame 11
function miseajourscore(gagnant) {
nbcoup++;
inc_jeu = false;
if (gagnant == "joueur") {
perdant = "ordi";
} else {
perdant = "joueur";
}
if (!tiebreak) {
if (eval ("score.score_" + gagnant) == "A") {
Set("score.jeu_" + gagnant, eval ("score.jeu_" + gagnant) + 1);
inc_jeu = true;
}
if (eval ("score.score_" + gagnant) == "40") {
if (((eval ("score.score_" + perdant) == "0") || (eval ("score.score_" + perdant) == "15")) || (eval ("score.score_" + perdant) == "30")) {
Set("score.jeu_" + gagnant, eval ("score.jeu_" + gagnant) + 1);
inc_jeu = true;
} else if (eval ("score.score_" + perdant) == "40") {
Set("score.score_" + gagnant, "A");
} else {
Set("score.score_" + perdant, "40");
egalite = true;
}
}
if (eval ("score.score_" + gagnant) == "30") {
Set("score.score_" + gagnant, "40");
}
if (eval ("score.score_" + gagnant) == "15") {
Set("score.score_" + gagnant, "30");
}
if (eval ("score.score_" + gagnant) == "0") {
trace("hello");
Set("score.score_" + gagnant, "15");
}
} else {
nbcouptiebreak++;
Set("score.scoretiebreak_" + gagnant, eval ("score.scoretiebreak_" + gagnant) + 1);
if (eval ("score.scoretiebreak_" + gagnant) >= 7) {
if ((eval ("score.scoretiebreak_" + gagnant) - eval ("score.scoretiebreak_" + perdant)) >= 2) {
inc_jeu = true;
tiebreak = false;
nbcouptiebreak = 0;
Set("score.jeu_" + gagnant, eval ("score.jeu_" + gagnant) + 1);
Set("score.scoretiebreak_" + gagnant, 0);
Set("score.scoretiebreak_" + perdant, 0);
} else {
Set("score.score_" + gagnant, " " + (eval ("score.scoretiebreak_" + gagnant) + 1));
}
} else {
Set("score.score_" + gagnant, " " + eval ("score.scoretiebreak_" + gagnant));
}
if (((eval ("score.scoretiebreak_" + gagnant) + eval ("score.scoretiebreak_" + perdant)) % 6) == 0) {
change_cote = true;
}
if (((!(eval ("score.scoretiebreak_" + gagnant) + eval ("score.scoretiebreak_" + perdant))) % 2) == 0) {
service_droite = true;
} else {
service_droite = false;
}
if ((nbcoup == 1) && (nbcouptiebreak == 1)) {
if (service == "joueur") {
service = "ordi";
score.cadre.balltest.gotoAndStop(2);
nbcoup = 0;
} else {
service = "joueur";
score.cadre.balltest.gotoAndStop(1);
nbcoup = 0;
}
}
if (nbcoup == 2) {
if (service == "joueur") {
service = "ordi";
score.cadre.balltest.gotoAndStop(2);
nbcoup = 0;
} else {
service = "joueur";
score.cadre.balltest.gotoAndStop(1);
nbcoup = 0;
}
}
}
if (inc_jeu) {
if (service == "joueur") {
change_cote = true;
service = "ordi";
score.cadre.balletest.gotoAndStop(2);
} else {
service = "joueur";
score.cadre.balletest.gotoAndStop(1);
}
Set("score.score_" + gagnant, "0");
Set("score.score_" + perdant, "0");
nbcoup = 0;
game = true;
egalite = false;
}
if (eval ("score.jeu_" + gagnant) >= 6) {
if (((eval ("score.jeu_" + gagnant) - eval ("score.jeu_" + perdant)) >= 2) || (eval ("score.jeu_" + gagnant) == 7)) {
Set("score.set1_" + gagnant, eval ("score.set1_" + gagnant) + 1);
Set(("_parent.scoreset" + nbset) + gagnant, eval ("score.jeu_" + gagnant) + 1);
Set(("_parent.scoreset" + nbset) + perdant, eval ("score.jeu_" + perdant) + 1);
nbset++;
if (eval ("score.set1_" + gagnant) == 2) {
applaude.gotoAndPlay(2);
compteur_victoire = 0;
while (compteur_victoire < 50) {
compteur_victoire++;
}
if (gagnant == "joueur") {
_parent.resultmatch = 1;
this.gotoAndStop("fin");
} else {
_parent.resultmatch = 0;
this.gotoAndStop("fin");
}
}
Set("score.jeu_" + gagnant, 0);
Set("score.jeu_" + perdant, 0);
service_droite = true;
}
}
if ((eval ("score.jeu_" + gagnant) == 6) && (eval ("score.jeu_" + perdant) == 6)) {
tiebreak = true;
service_droite = true;
}
if ((nbcoup % 2) == 0) {
service_droite = true;
} else {
service_droite = false;
}
}
play();
zone_faute_bas._visible = false;
zonefilet._visible = false;
remiseazero = true;
score.jeu_ordi = 0;
score.jeu_joueur = 0;
score.set1_ordi = 0;
score.set1_joueur = 0;
score.score_joueur = "0";
score.score_ordi = "0";
score.scoretiebreak_ordi = 0;
score.scoretiebreak_joueur = 0;
compteur_changement_cote = 0;
tiebreak = false;
service = "joueur";
service_droite = true;
nbcoup = 0;
zonerenvoi = false;
joueur_bas = true;
nbset = 1;
egalite = false;
game = false;
removeMovieClip(controleur);
if (myselect == 1) {
duplicateMovieClip (man1, "controleur", 1);
} else if (myselect == 2) {
duplicateMovieClip (man3, "controleur", 1);
} else if (myselect == 3) {
duplicateMovieClip (man2, "controleur", 1);
} else if (myselect == 4) {
duplicateMovieClip (man4, "controleur", 1);
}
man1._visible = 0;
man2._visible = 0;
man3._visible = 0;
man4._visible = 0;
Frame 12
if (score.set1_ordi >= 2) {
gotoAndPlay ("end");
} else if (score.set1_joueur >= 2) {
gotoAndPlay ("end");
}
score.gotoAndPlay(2);
controleur.ball.gotoAndStop(1);
controleur.ball.testimpact = 0;
controleur.ball._visible = false;
controleur.ombreballe._visible = false;
if (nbechange > 6) {
applaude.gotoAndPlay(2);
}
if (service == "joueur") {
receveur = "ordi";
} else {
receveur = "joueur";
}
if (controleur.outordi) {
miseajourscore("joueur");
if (eval ("score.score_" + service) == 0) {
Set("score.score_" + service, "0");
}
if (eval ("score.score_" + receveur) == 0) {
Set("score.score_" + receveur, "0");
}
identifiant = ("s" + eval ("score.score_" + service)) + eval ("score.score_" + receveur);
if (identifiant == "s4040") {
if (egalite) {
identifiant = identifiant + "e";
}
}
eval ("son." + identifiant).gotoAndPlay(2);
if (game) {
son.game.gotoAndPlay(2);
game = false;
}
remiseazero = true;
controleur.outordi = false;
controleur.gotoAndPlay(1);
} else if (controleur.outjoueur) {
miseajourscore("ordi");
if (eval ("score.score_" + service) == 0) {
Set("score.score_" + service, "0");
}
if (eval ("score.score_" + receveur) == 0) {
Set("score.score_" + receveur, "0");
}
identifiant = ("s" + eval ("score.score_" + service)) + eval ("score.score_" + receveur);
if (identifiant == "s4040") {
if (egalite) {
identifiant = identifiant + "e";
}
}
if (game) {
son.game.gotoAndPlay(2);
game = false;
}
eval ("son." + identifiant).gotoAndPlay(2);
remiseazero = true;
controleur.outjoueur = false;
controleur.gotoAndPlay(1);
}
play();
Frame 18
stop();
Frame 19
removeMovieClip(controleur);
removeMovieClip(out);
removeMovieClip(score);
removeMovieClip(mask);
Instance of Symbol 639 MovieClip in Frame 19
onClipEvent (load) {
if (score.set1_ordi >= 2) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Frame 60
stop();
Symbol 35 Button
on (release) {
_root.myselect = 1;
_parent.c.gotoAndStop(1);
_parent.b.gotoAndStop(1);
_parent.d.gotoAndStop(1);
play();
}
Symbol 36 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 2
stop();
Symbol 46 Button
on (release) {
_root.myselect = 4;
_parent.a.gotoAndStop(1);
_parent.b.gotoAndStop(1);
_parent.c.gotoAndStop(1);
play();
}
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 2
stop();
Symbol 55 Button
on (release) {
_root.myselect = 3;
_parent.a.gotoAndStop(1);
_parent.b.gotoAndStop(1);
_parent.d.gotoAndStop(1);
play();
}
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
stop();
Symbol 61 Button
on (release) {
_root.myselect = 2;
_parent.a.gotoAndStop(1);
_parent.c.gotoAndStop(1);
_parent.d.gotoAndStop(1);
play();
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 81 Button
on (release) {
_parent.play();
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 84 MovieClip Frame 1
stop();
a.gotoAndStop(2);
Symbol 84 MovieClip Frame 2
ggg.load_bar.gotoAndStop(100);
if (_root.myselect == 1) {
ggg.a.gotoAndStop(2);
ggg.b.gotoAndStop(1);
ggg.c.gotoAndStop(1);
ggg.d.gotoAndStop(1);
} else if (_root.myselect == 2) {
ggg.a.gotoAndStop(1);
ggg.b.gotoAndStop(2);
ggg.c.gotoAndStop(1);
ggg.d.gotoAndStop(1);
} else if (_root.myselect == 3) {
ggg.a.gotoAndStop(1);
ggg.b.gotoAndStop(1);
ggg.c.gotoAndStop(2);
ggg.d.gotoAndStop(1);
} else if (_root.myselect == 4) {
ggg.a.gotoAndStop(1);
ggg.b.gotoAndStop(1);
ggg.c.gotoAndStop(1);
ggg.d.gotoAndStop(2);
}
Symbol 84 MovieClip Frame 14
_root.play();
Symbol 89 Button
on (release) {
getURL ("http://www.t45ol.com", "_blank");
}
Symbol 93 Button
on (release) {
getURL ("http://www.cctv.com", "_blank");
}
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
play();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
play();
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 2
play();
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 2
play();
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 2
play();
Symbol 127 MovieClip Frame 31
gotoAndStop (1);
Symbol 127 MovieClip Frame 33
play();
Symbol 127 MovieClip Frame 66
gotoAndStop (1);
Symbol 127 MovieClip Frame 67
play();
Symbol 127 MovieClip Frame 83
gotoAndStop (1);
Symbol 127 MovieClip Frame 120
gotoAndStop (1);
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 2
stop();
Instance of Symbol 139 MovieClip in Symbol 149 MovieClip Frame 1
onClipEvent (load) {
if (_root.myselect == 1) {
this.gotoAndStop(3);
} else if (_root.myselect == 2) {
this.gotoAndStop(4);
} else if (_root.myselect == 3) {
this.gotoAndStop(1);
} else if (_root.myselect == 4) {
this.gotoAndStop(2);
}
}
Instance of Symbol 139 MovieClip in Symbol 149 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.myselect);
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 2
play();
Symbol 150 MovieClip Frame 14
stop();
Symbol 150 MovieClip Frame 15
play();
Symbol 150 MovieClip Frame 27
stop();
Symbol 246 MovieClip Frame 4
stop();
Symbol 261 MovieClip Frame 6
stop();
stop();
Symbol 265 MovieClip Frame 2
stop();
Symbol 266 MovieClip Frame 1
play();
Symbol 266 MovieClip Frame 2
gotoAndPlay (1);
Symbol 266 MovieClip Frame 9
play();
Symbol 266 MovieClip Frame 16
gotoAndPlay (1);
Symbol 266 MovieClip Frame 17
play();
Symbol 266 MovieClip Frame 25
gotoAndPlay (1);
Symbol 266 MovieClip Frame 26
autorisation_renvoi = false;
coup_fini = false;
Symbol 266 MovieClip Frame 30
stop();
Symbol 266 MovieClip Frame 31
autorisation_renvoi = true;
play();
Symbol 266 MovieClip Frame 41
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 266 MovieClip Frame 42
autorisation_renvoi = false;
coup_fini = false;
Symbol 266 MovieClip Frame 47
stop();
Symbol 266 MovieClip Frame 48
autorisation_renvoi = true;
play();
Symbol 266 MovieClip Frame 58
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 266 MovieClip Frame 78
gotoAndPlay (65);
Symbol 266 MovieClip Frame 85
stop();
Symbol 266 MovieClip Frame 95
gotoAndPlay (1);
Symbol 266 MovieClip Frame 100
coup_finiordi = true;
Symbol 266 MovieClip Frame 119
gotoAndPlay (101);
Symbol 266 MovieClip Frame 124
gotoAndPlay (101);
Symbol 266 MovieClip Frame 130
gotoAndPlay (101);
Symbol 266 MovieClip Frame 131
coup_finiordi = false;
Symbol 266 MovieClip Frame 135
coup_finiordi = true;
Symbol 266 MovieClip Frame 136
play();
Symbol 266 MovieClip Frame 146
gotoAndStop (100);
Symbol 266 MovieClip Frame 147
coup_finiordi = false;
Symbol 266 MovieClip Frame 152
coup_finiordi = true;
Symbol 266 MovieClip Frame 153
play();
Symbol 266 MovieClip Frame 162
coup_fini = true;
gotoAndStop (100);
Symbol 266 MovieClip Frame 170
coup_finiordi = false;
Symbol 266 MovieClip Frame 183
gotoAndPlay (170);
Symbol 266 MovieClip Frame 191
stop();
Symbol 266 MovieClip Frame 212
coup_finiordi = true;
gotoAndPlay (100);
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 2
function ombre(z_fonction) {
_parent.ombreballe._xscale = 100 - (50 * (1 - (50 / (z_fonction + 50))));
_parent.ombreballe._yscale = 100 - (50 * (1 - (50 / (Math.sqrt(z_fonction) + 50))));
}
compteur_pas = 0;
rebond = 0;
if (_parent.vientdeservir) {
rebond = 1;
_parent.vientdeservir = false;
}
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = this._y;
incz_ball = _parent.effet;
limit_incz_ball = _parent.limite_effet;
decrement_z = 0.4;
coeff = 12;
xcible = (coeff * vx) + x;
ycible = (coeff * vy) + y;
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = this._y;
incx = (xcible - x) / rapidite;
incy = (ycible - y) / rapidite;
incz_ball = incz_ball - decrement_z;
this._x = this._x + incx;
this._y = this._y + (incy - incz_ball);
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = _parent.ombreballe._y + incy;
ombre(z);
if (_parent._parent.jeu == "service") {
if ((!_parent.service_bon) && (!filet)) {
if (_parent.deuxieme_service) {
_parent.double_faute = true;
} else {
_parent.deuxieme_service = true;
}
_parent._parent.jeu = "replacement";
_parent._parent.remiseazero = false;
_parent.gotoAndPlay(1);
}
}
Symbol 278 MovieClip Frame 3
ombre._visible = true;
incz_ball = incz_ball - decrement_z;
this._x = this._x + incx;
this._y = this._y + (incy - incz_ball);
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = _parent.ombreballe._y + incy;
if (incz_ball < limit_incz_ball) {
_parent._parent.rebondball.gotoAndPlay(2);
incz_ball = Math.abs(limit_incz_ball);
compterebond = true;
testimpact++;
if (testimpact == 1) {
rebond++;
xrebond = this._x;
yrebond = this._y;
_parent.mcimpact._x = this._x;
_parent.mcimpact._y = this._y;
_parent.mcimpact.gotoAndPlay(1);
limit_incz_ball = -incz_ball;
}
} else {
testimpact = 0;
compterebond = false;
}
ombre(z);
if (filet) {
this.gotoAndPlay("arret");
}
Symbol 278 MovieClip Frame 4
ombre._visible = true;
incz_ball = incz_ball - decrement_z;
this._x = this._x + incx;
this._y = this._y + (incy - incz_ball);
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = _parent.ombreballe._y + incy;
if (incz_ball < limit_incz_ball) {
_parent._parent.rebondball.gotoAndPlay(2);
incz_ball = Math.abs(limit_incz_ball);
compterebond = true;
testimpact++;
if (testimpact == 1) {
rebond++;
xrebond = this._x;
yrebond = this._y;
_parent.mcimpact._x = this._x;
_parent.mcimpact._y = this._y;
_parent.mcimpact.gotoAndPlay(1);
limit_incz_ball = -incz_ball;
}
} else {
testimpact = 0;
compterebond = false;
}
ombre(z);
gotoAndPlay (3);
Symbol 278 MovieClip Frame 7
incxservice = (_parent.xcible_service - _parent.xdepart_service) / puissance_service;
incyservice = (_parent.ycible_service - _parent.ydepart_service) / puissance_service;
xc = _parent.xcible_service;
xd = _parent.xdepart_service;
yc = _parent.ycible_service;
yd = _parent.ydepart_service_sol;
xrebond = _parent.xcible_service;
yrebond = _parent.ycible_service;
vy = (0.15 * (yc - yd)) * (15 / puissance_service);
vx = (0.15 * (xc - xd)) * (15 / puissance_service);
rapidite = (puissance_service * 1.5) + 25;
_parent.effet = 7;
_parent.limite_effet = -7;
this._x = this._x + incxservice;
this._y = this._y + incyservice;
compteur_pas++;
if (compteur_pas == puissance_service) {
if (!filet) {
_parent.ombreballe._visible = true;
if (_parent.service_bon) {
if (_parent.passeparfilet) {
_parent.passeparfilet = false;
} else {
_parent.passeparfilet = true;
}
_parent._parent.rebondball.gotoAndPlay(2);
gotoAndPlay (2);
} else {
_parent._parent.rebondball.gotoAndPlay(2);
gotoAndPlay (2);
}
} else {
_parent.effet = 2;
_parent.limite_effet = -2;
vy = -2 * (Math.abs(vy) / vy);
vx = 0;
gotoAndPlay (2);
}
}
Symbol 278 MovieClip Frame 8
this._x = this._x + incxservice;
this._y = this._y + incyservice;
compteur_pas++;
if (compteur_pas == puissance_service) {
if (!filet) {
if (_parent.service_bon) {
_parent.ombreballe._visible = true;
if (_parent.passeparfilet) {
_parent.passeparfilet = false;
} else {
_parent.passeparfilet = true;
}
_parent._parent.rebondball.start();
gotoAndPlay (2);
} else {
_parent._parent.rebondball.start();
gotoAndPlay (2);
}
} else {
_parent.effet = 2;
_parent.limite_effet = -2;
-2 * (Math.abs(vy) / vy);
vx = 0;
gotoAndPlay (2);
}
} else {
gotoAndPlay (7);
}
Symbol 278 MovieClip Frame 16
play();
compteur = 0;
Symbol 278 MovieClip Frame 17
compteur++;
if (compteur > 50) {
gotoAndPlay (19);
} else {
ombre._visible = true;
incz_ball = incz_ball - decrement_z;
this._x = this._x + incx;
this._y = this._y + (incy - incz_ball);
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = _parent.ombreballe._y + incy;
if (incz_ball < limit_incz_ball) {
_parent._parent.rebondball.gotoAndPlay(2);
incz_ball = Math.abs(limit_incz_ball);
compterebond = true;
testimpact++;
if (testimpact == 1) {
rebond++;
limit_incz_ball = -incz_ball;
}
} else {
testimpact = 0;
compterebond = false;
}
ombre(z);
}
Symbol 278 MovieClip Frame 18
compteur++;
if (compteur > 25) {
gotoAndPlay (19);
} else {
ombre._visible = true;
incz_ball = incz_ball - decrement_z;
this._x = this._x + incx;
this._y = this._y + (incy - incz_ball);
_parent.ombreballe._x = this._x;
_parent.ombreballe._y = _parent.ombreballe._y + incy;
if (incz_ball < limit_incz_ball) {
_parent._parent.rebondball.gotoAndPlay(2);
incz_ball = Math.abs(limit_incz_ball);
compterebond = true;
testimpact++;
if (testimpact == 1) {
rebond++;
limit_incz_ball = -incz_ball;
}
} else {
testimpact = 0;
compterebond = false;
}
ombre(z);
gotoAndPlay(this._currentframe - 1);
}
Symbol 278 MovieClip Frame 19
stop();
if (_parent._parent.jeu == "service") {
this._visible = false;
_parent.ombreballe._visible = false;
if (_parent.deuxieme_service) {
_parent.double_faute = true;
} else {
_parent.deuxieme_service = true;
}
_parent._parent.jeu = "replacement";
_parent._parent.remiseazero = false;
_parent.gotoAndPlay(1);
}
Symbol 280 MovieClip Frame 1
play();
Symbol 280 MovieClip Frame 11
stop();
Symbol 328 MovieClip Frame 8
stop();
Symbol 332 MovieClip Frame 10
stop();
Symbol 371 MovieClip Frame 4
stop();
Symbol 374 MovieClip Frame 12
stop();
Symbol 375 MovieClip Frame 1
play();
Symbol 375 MovieClip Frame 2
gotoAndPlay (1);
Symbol 375 MovieClip Frame 7
play();
Symbol 375 MovieClip Frame 12
gotoAndStop (1);
Symbol 375 MovieClip Frame 13
play();
Symbol 375 MovieClip Frame 18
gotoAndStop (1);
Symbol 375 MovieClip Frame 19
coup_fini = false;
Symbol 375 MovieClip Frame 22
autorisation_renvoi = false;
stop();
Symbol 375 MovieClip Frame 23
autorisation_renvoi = true;
Symbol 375 MovieClip Frame 30
autorisation_renvoi = false;
play();
Symbol 375 MovieClip Frame 34
coup_fini = true;
gotoAndStop (1);
Symbol 375 MovieClip Frame 35
autorisation_renvoi = false;
coup_fini = false;
Symbol 375 MovieClip Frame 39
stop();
Symbol 375 MovieClip Frame 40
autorisation_renvoi = true;
Symbol 375 MovieClip Frame 48
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 375 MovieClip Frame 67
stop();
Symbol 375 MovieClip Frame 75
stop();
Symbol 375 MovieClip Frame 82
gotoAndPlay (1);
Symbol 375 MovieClip Frame 95
coup_finiordi = true;
stop();
Symbol 375 MovieClip Frame 96
play();
Symbol 375 MovieClip Frame 101
gotoAndPlay (95);
Symbol 375 MovieClip Frame 102
play();
Symbol 375 MovieClip Frame 107
gotoAndPlay (95);
Symbol 375 MovieClip Frame 108
coup_finiordi = false;
Symbol 375 MovieClip Frame 111
coup_finiordi = true;
Symbol 375 MovieClip Frame 123
coup_finiordi = true;
gotoAndStop (95);
Symbol 375 MovieClip Frame 124
coup_finiordi = false;
Symbol 375 MovieClip Frame 128
coup_finiordi = true;
Symbol 375 MovieClip Frame 137
coup_finiordi = true;
gotoAndStop (95);
Symbol 375 MovieClip Frame 143
coup_finiordi = false;
Symbol 375 MovieClip Frame 170
stop();
Symbol 375 MovieClip Frame 179
stop();
Symbol 375 MovieClip Frame 196
coup_finiordi = true;
gotoAndPlay (95);
Symbol 375 MovieClip Frame 197
Symbol 384 MovieClip Frame 1
play();
serveurbas_d = mcfilet._x + 80;
serveurbas_g = mcfilet._x - 80;
serveurbas_y = mcfilet._y + 200;
serveurhaut_g = mcfilet._x - 60;
serveurhaut_d = mcfilet._x + 60;
serveurhaut_y = mcfilet._y - 100;
decrement_incy_curseur_bas = 0.35 + (_parent._parent.niveau * 0.08);
decrement_incy_curseur_haut = 0.45 + (_parent._parent.niveau * 0.08);
deplacementx_joueurbas = 12;
deplacementy_joueurbas = 6;
deplacementy_joueurhaut = 5;
deplacementx_joueurhaut = 10;
puissanceordi = 25 - _parent._parent.niveau;
test = Math.random();
if (_parent.service == "joueur") {
ball.actif = "joueur";
} else {
ball.actif = "ordi";
}
ball.rebond = 0;
vientdeservir = false;
renvoiordi = false;
renvoijoueur = false;
compteur_attente_ordi = 0;
compteur_attente_ordi2 = 0;
compteur_bidon = 0;
_parent.nbechange = 0;
_parent.jeu = "replacement";
if (_parent.change_cote && (!_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = true;
_parent.change_cote = false;
}
if (_parent.change_cote && (_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = false;
_parent.change_cote = false;
}
if (_parent.joueur_bas) {
if (_parent.service == "joueur") {
passeparfilet = false;
} else {
passeparfilet = true;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
bas.autorisation_renvoi = false;
bas.coup_fini = true;
bas.gotoAndPlay("immobilejoueur");
haut.gotoAndPlay("immobileordi");
} else {
if (_parent.service == "joueur") {
passeparfilet = true;
} else {
passeparfilet = false;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
haut.autorisation_renvoi = false;
haut.coup_fini = true;
haut.gotoAndPlay("immobilejoueur");
bas.gotoAndPlay("immobileordi");
}
ball.gotoAndPlay("invisible");
curseur_service._visible = false;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
detection_service = false;
buffer_espace = 0;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
espace_relache = false;
detection_relachement = false;
essai_renvoi = false;
anim_avant_service = true;
if (_parent.remiseazero) {
deuxieme_service = false;
double_faute = false;
service_bon = false;
ball.filet = false;
faute_en_cours = false;
} else {
service_bon = false;
ball.filet = false;
}
Symbol 384 MovieClip Frame 2
if (_parent.jeu == "replacement") {
ball.oldyrebond = 10;
ball.rebond = 0;
_parent.compteur_changement_cote++;
if (_parent.compteur_changement_cote >= 50) {
compteur_bidon++;
if (compteur_bidon >= 50) {
if (_parent.service == "joueur") {
if (!deuxieme_service) {
ball.puissance_service = int(15 + (_parent._parent.niveau / 3));
} else {
ball.puissance_service = int(20 + (_parent._parent.niveau / 3));
}
} else {
ball.puissance_service = puissanceordi;
}
if (_parent.service_droite) {
bas._x = serveurbas_d;
bas._y = serveurbas_y;
haut._x = serveurhaut_g;
haut._y = serveurhaut_y;
} else {
bas._x = serveurbas_g;
bas._y = serveurbas_y;
haut._x = serveurhaut_d;
haut._y = serveurhaut_y;
}
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (_parent.service_droite) {
haut._x = haut._x - 30;
} else {
haut._x = haut._x + 30;
}
} else if (_parent.service_droite) {
bas._x = bas._x + 40;
} else {
bas._x = bas._x - 40;
}
}
if (!double_faute) {
_parent.jeu = "service";
} else {
if (_parent.service == "joueur") {
outjoueur = true;
} else {
outordi = true;
}
deuxieme_service = false;
double_faute = false;
_parent.gotoAndPlay("miseajour");
}
}
}
}
if (_parent.jeu == "service") {
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (anim_avant_service) {
bas.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
bas.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y - incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_bas;
if ((mcfilet._y + 100) < curseur_service._y) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (4 - (_parent._parent.niveau / 7.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (4 - (_parent._parent.niveau / 7.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if (curseur_service._y < (mcfilet._y + 50)) {
ball.xcible = curseur_service._x;
bas.gotoAndPlay("fin_servicejoueur");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
trace("Condition " + condition);
if (condition) {
service_bon = true;
if (_parent.passeparfilet) {
_parent.passeparfilet = false;
} else {
_parent.passeparfilet = true;
}
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.rebond = 0;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (_parent.nord_ouest._y < curseur_service._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
} else {
if (anim_avant_service) {
haut.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
haut.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y + incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_haut;
if (curseur_service._y < (mcfilet._y - 100)) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (8 - (_parent._parent.niveau / 2.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (8 - (_parent._parent.niveau / 2.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if ((mcfilet._y - 50) < curseur_service._y) {
ball.xcible = curseur_service._x;
haut.gotoAndPlay("fin_servicejoueur");
_parent.frappe.gotoAndPlay(2);
vientdeservir = true;
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (curseur_service._y < _parent.sud_ouest._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
}
} else if (_parent.joueur_bas) {
if (anim_avant_service) {
haut.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
compteur_attente_ordi++;
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
haut.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.sud_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_ouest._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
haut.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
service_bon = false;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
} else {
compteur_attente_ordi++;
if (anim_avant_service) {
bas.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
bas.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.nord_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.nord_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.nord_ouest._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
bas.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
}
}
if (_parent.joueur_bas) {
if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (bas.coup_fini) {
if (Key.isDown(38)) {
bas.gotoAndStop(3);
bas._y = bas._y - deplacementy_joueurbas;
if (bas._y < (mcfilet._y + 10)) {
bas._y = mcfilet._y + 10;
}
}
if (Key.isDown(40)) {
bas.gotoAndStop(3);
bas._y = bas._y + deplacementy_joueurbas;
}
if (Key.isDown(37)) {
bas.gotoAndPlay("coursejoueurdroite");
bas._x = bas._x - deplacementx_joueurbas;
}
if (Key.isDown(39)) {
bas.gotoAndPlay("coursejoueurgauche");
bas._x = bas._x + deplacementx_joueurbas;
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
bas.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
bas.gotoAndPlay("coup_droit_shootjoueur");
} else {
bas.gotoAndPlay("revers_shootjoueur");
}
}
if (bas.autorisation_renvoi) {
if (mcfilet._y < ball._y) {
if ((Math.abs(ball._x - bas._x) < 75) && (Math.abs(ball._y - bas._y) < 100)) {
coef = (-20 * (bas._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if ((mcfilet._y + 150) < bas._y) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 1);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 20) + (60 - ball.rapidite));
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.6);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 16) + ((60 - ball.rapidite) / 2));
effet = (ball.rapidite / 10) + 3.5;
limite_effet = -effet;
ball.decrement_z = 0.6;
}
ball.gotoAndPlay(2);
bas.autorisation_renvoi = false;
}
}
}
}
} else if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (haut.coup_fini) {
if (Key.isDown(38)) {
haut.gotoAndStop(3);
haut._y = haut._y - deplacementy_joueurhaut;
if (haut._y < 73) {
haut._y = 73;
}
}
if (Key.isDown(40)) {
haut.gotoAndStop(3);
haut._y = haut._y + deplacementy_joueurhaut;
if (mcfilet._y < haut._y) {
haut._y = mcfilet._y;
}
}
if (Key.isDown(37)) {
haut.gotoAndPlay("coursejoueurgauche");
haut._x = haut._x - deplacementx_joueurhaut;
}
if (Key.isDown(39)) {
haut.gotoAndPlay("coursejoueurdroite");
haut._x = haut._x + deplacementx_joueurhaut;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
haut.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
haut.gotoAndPlay("coup_droit_shootjoueur");
} else {
haut.gotoAndPlay("revers_shootjoueur");
}
}
if (haut.autorisation_renvoi) {
if (ball._y < mcfilet._y) {
if ((Math.abs(ball._x - haut._x) < 75) && (Math.abs(ball._y - haut._y) < 100)) {
coef = (-30 * (haut._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if (haut._y < (mcfilet._y - 100)) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.8);
ball.vy = 30 + (60 - ball.rapidite);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.5);
ball.vy = 18 + ((60 - ball.rapidite) / 2);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
}
ball.gotoAndPlay(2);
haut.autorisation_renvoi = false;
}
}
}
}
if (_parent.joueur_bas) {
if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if (Math.abs(haut._x - ball._x) > 30) {
if (ball._x < haut._x) {
haut.gotoAndPlay("courseordidroite");
haut._x = haut._x - _parent.dep_ordi_x;
} else {
haut.gotoAndPlay("courseordigauche");
haut._x = haut._x + _parent.dep_ordi_x;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if ((ball._y < mcfilet._y) && (Math.abs(haut._y - ball._y) > 20)) {
if ((ball._y - 25) < haut._y) {
haut._y = haut._y - _parent.dep_ordi_y;
if (haut._y < 73) {
haut._y = 73;
}
} else {
haut._y = haut._y + _parent.dep_ordi_y;
}
}
} else if ((mcfilet._y < ball._y) && (Math.abs((haut._y - mcfilet._y) - 130) > 20)) {
if (!vientdeservir) {
if ((mcfilet._y - 130) < haut._y) {
haut._y = haut._y - (_parent.dep_ordi_y - 0.5);
} else {
haut._y = haut._y + (_parent.dep_ordi_y - 0.5);
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(haut._y - ball._y) < 20) && (Math.abs(haut._x - ball._x) < 30)) {
trace("Je frappe");
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
haut.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 30;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
} else if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if ((mcfilet._y < ball._y) && (Math.abs(bas._x - ball._x) > 35)) {
if (ball._x < bas._x) {
bas.gotoAndPlay("courseordigauche");
bas._x = bas._x - (_parent.dep_ordi_x + 1);
} else {
bas.gotoAndPlay("courseordidroite");
bas._x = bas._x + (_parent.dep_ordi_x + 1);
}
}
if ((mcfilet._y < ball._y) && (Math.abs(bas._y - ball._y) > 25)) {
if ((ball._y - 50) < bas._y) {
bas._y = bas._y - (_parent.dep_ordi_y + 1);
} else {
bas._y = bas._y + (_parent.dep_ordi_y + 1);
}
}
} else if ((ball._y < mcfilet._y) && (Math.abs((bas._y - mcfilet._y) + 180) > 25)) {
if (!vientdeservir) {
if ((mcfilet._y + 180) < bas._y) {
bas._y = bas._y - _parent.dep_ordi_y;
} else {
bas._y = bas._y + _parent.dep_ordi_y;
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(ball._y - bas._y) < 40) && (Math.abs(ball._x - bas._x) < 50)) {
trace("Je frappe");
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
bas.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 34;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
Symbol 384 MovieClip Frame 3
gotoAndPlay (2);
Symbol 384 MovieClip Frame 4
stop();
Symbol 392 MovieClip Frame 1
play();
Symbol 392 MovieClip Frame 2
gotoAndPlay (1);
Symbol 392 MovieClip Frame 9
play();
Symbol 392 MovieClip Frame 16
gotoAndPlay (1);
Symbol 392 MovieClip Frame 17
play();
Symbol 392 MovieClip Frame 25
gotoAndPlay (1);
Symbol 392 MovieClip Frame 26
autorisation_renvoi = false;
coup_fini = false;
Symbol 392 MovieClip Frame 30
stop();
Symbol 392 MovieClip Frame 31
autorisation_renvoi = true;
play();
Symbol 392 MovieClip Frame 41
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 392 MovieClip Frame 42
autorisation_renvoi = false;
coup_fini = false;
Symbol 392 MovieClip Frame 47
stop();
Symbol 392 MovieClip Frame 48
autorisation_renvoi = true;
play();
Symbol 392 MovieClip Frame 58
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 392 MovieClip Frame 78
gotoAndPlay (65);
Symbol 392 MovieClip Frame 85
stop();
Symbol 392 MovieClip Frame 95
gotoAndPlay (1);
Symbol 392 MovieClip Frame 100
coup_finiordi = true;
Symbol 392 MovieClip Frame 119
gotoAndPlay (101);
Symbol 392 MovieClip Frame 124
gotoAndPlay (101);
Symbol 392 MovieClip Frame 130
gotoAndPlay (101);
Symbol 392 MovieClip Frame 131
coup_finiordi = false;
Symbol 392 MovieClip Frame 135
coup_finiordi = true;
Symbol 392 MovieClip Frame 136
play();
Symbol 392 MovieClip Frame 146
gotoAndStop (100);
Symbol 392 MovieClip Frame 147
coup_finiordi = false;
Symbol 392 MovieClip Frame 152
coup_finiordi = true;
Symbol 392 MovieClip Frame 153
play();
Symbol 392 MovieClip Frame 162
coup_fini = true;
gotoAndStop (100);
Symbol 392 MovieClip Frame 170
coup_finiordi = false;
Symbol 392 MovieClip Frame 183
gotoAndPlay (170);
Symbol 392 MovieClip Frame 191
stop();
Symbol 392 MovieClip Frame 212
coup_finiordi = true;
gotoAndPlay (100);
Symbol 400 MovieClip Frame 1
play();
Symbol 400 MovieClip Frame 2
gotoAndPlay (1);
Symbol 400 MovieClip Frame 7
play();
Symbol 400 MovieClip Frame 12
gotoAndStop (1);
Symbol 400 MovieClip Frame 13
play();
Symbol 400 MovieClip Frame 18
gotoAndStop (1);
Symbol 400 MovieClip Frame 19
coup_fini = false;
Symbol 400 MovieClip Frame 22
autorisation_renvoi = false;
stop();
Symbol 400 MovieClip Frame 23
autorisation_renvoi = true;
Symbol 400 MovieClip Frame 30
autorisation_renvoi = false;
play();
Symbol 400 MovieClip Frame 34
coup_fini = true;
gotoAndStop (1);
Symbol 400 MovieClip Frame 35
autorisation_renvoi = false;
coup_fini = false;
Symbol 400 MovieClip Frame 39
stop();
Symbol 400 MovieClip Frame 40
autorisation_renvoi = true;
Symbol 400 MovieClip Frame 48
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 400 MovieClip Frame 67
stop();
Symbol 400 MovieClip Frame 75
stop();
Symbol 400 MovieClip Frame 82
gotoAndPlay (1);
Symbol 400 MovieClip Frame 95
coup_finiordi = true;
stop();
Symbol 400 MovieClip Frame 96
play();
Symbol 400 MovieClip Frame 101
gotoAndPlay (95);
Symbol 400 MovieClip Frame 102
play();
Symbol 400 MovieClip Frame 107
gotoAndPlay (95);
Symbol 400 MovieClip Frame 108
coup_finiordi = false;
Symbol 400 MovieClip Frame 111
coup_finiordi = true;
Symbol 400 MovieClip Frame 123
coup_finiordi = true;
gotoAndStop (95);
Symbol 400 MovieClip Frame 124
coup_finiordi = false;
Symbol 400 MovieClip Frame 128
coup_finiordi = true;
Symbol 400 MovieClip Frame 137
coup_finiordi = true;
gotoAndStop (95);
Symbol 400 MovieClip Frame 143
coup_finiordi = false;
Symbol 400 MovieClip Frame 170
stop();
Symbol 400 MovieClip Frame 179
stop();
Symbol 400 MovieClip Frame 196
coup_finiordi = true;
gotoAndPlay (95);
Symbol 400 MovieClip Frame 197
Symbol 401 MovieClip Frame 1
play();
serveurbas_d = mcfilet._x + 80;
serveurbas_g = mcfilet._x - 80;
serveurbas_y = mcfilet._y + 200;
serveurhaut_g = mcfilet._x - 60;
serveurhaut_d = mcfilet._x + 60;
serveurhaut_y = mcfilet._y - 100;
decrement_incy_curseur_bas = 0.35 + (_parent._parent.niveau * 0.08);
decrement_incy_curseur_haut = 0.45 + (_parent._parent.niveau * 0.08);
deplacementx_joueurbas = 12;
deplacementy_joueurbas = 6;
deplacementy_joueurhaut = 5;
deplacementx_joueurhaut = 10;
puissanceordi = 25 - _parent._parent.niveau;
test = Math.random();
if (_parent.service == "joueur") {
ball.actif = "joueur";
} else {
ball.actif = "ordi";
}
ball.rebond = 0;
vientdeservir = false;
renvoiordi = false;
renvoijoueur = false;
compteur_attente_ordi = 0;
compteur_attente_ordi2 = 0;
compteur_bidon = 0;
_parent.nbechange = 0;
_parent.jeu = "replacement";
if (_parent.change_cote && (!_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = true;
_parent.change_cote = false;
}
if (_parent.change_cote && (_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = false;
_parent.change_cote = false;
}
if (_parent.joueur_bas) {
if (_parent.service == "joueur") {
passeparfilet = false;
} else {
passeparfilet = true;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
bas.autorisation_renvoi = false;
bas.coup_fini = true;
bas.gotoAndPlay("immobilejoueur");
haut.gotoAndPlay("immobileordi");
} else {
if (_parent.service == "joueur") {
passeparfilet = true;
} else {
passeparfilet = false;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
haut.autorisation_renvoi = false;
haut.coup_fini = true;
haut.gotoAndPlay("immobilejoueur");
bas.gotoAndPlay("immobileordi");
}
ball.gotoAndPlay("invisible");
curseur_service._visible = false;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
detection_service = false;
buffer_espace = 0;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
espace_relache = false;
detection_relachement = false;
essai_renvoi = false;
anim_avant_service = true;
if (_parent.remiseazero) {
deuxieme_service = false;
double_faute = false;
service_bon = false;
ball.filet = false;
faute_en_cours = false;
} else {
service_bon = false;
ball.filet = false;
}
Symbol 401 MovieClip Frame 2
if (_parent.jeu == "replacement") {
ball.oldyrebond = 10;
ball.rebond = 0;
_parent.compteur_changement_cote++;
if (_parent.compteur_changement_cote >= 50) {
compteur_bidon++;
if (compteur_bidon >= 50) {
if (_parent.service == "joueur") {
if (!deuxieme_service) {
ball.puissance_service = int(15 + (_parent._parent.niveau / 3));
} else {
ball.puissance_service = int(20 + (_parent._parent.niveau / 3));
}
} else {
ball.puissance_service = puissanceordi;
}
if (_parent.service_droite) {
bas._x = serveurbas_d;
bas._y = serveurbas_y;
haut._x = serveurhaut_g;
haut._y = serveurhaut_y;
} else {
bas._x = serveurbas_g;
bas._y = serveurbas_y;
haut._x = serveurhaut_d;
haut._y = serveurhaut_y;
}
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (_parent.service_droite) {
haut._x = haut._x - 30;
} else {
haut._x = haut._x + 30;
}
} else if (_parent.service_droite) {
bas._x = bas._x + 40;
} else {
bas._x = bas._x - 40;
}
}
if (!double_faute) {
_parent.jeu = "service";
} else {
if (_parent.service == "joueur") {
outjoueur = true;
} else {
outordi = true;
}
deuxieme_service = false;
double_faute = false;
_parent.gotoAndPlay("miseajour");
}
}
}
}
if (_parent.jeu == "service") {
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (anim_avant_service) {
bas.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
bas.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y - incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_bas;
if ((mcfilet._y + 100) < curseur_service._y) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (4 - (_parent._parent.niveau / 7.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (4 - (_parent._parent.niveau / 7.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if (curseur_service._y < (mcfilet._y + 50)) {
ball.xcible = curseur_service._x;
bas.gotoAndPlay("fin_servicejoueur");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
trace("Condition " + condition);
if (condition) {
service_bon = true;
if (_parent.passeparfilet) {
_parent.passeparfilet = false;
} else {
_parent.passeparfilet = true;
}
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.rebond = 0;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (_parent.nord_ouest._y < curseur_service._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
} else {
if (anim_avant_service) {
haut.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
haut.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y + incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_haut;
if (curseur_service._y < (mcfilet._y - 100)) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (8 - (_parent._parent.niveau / 2.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (8 - (_parent._parent.niveau / 2.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if ((mcfilet._y - 50) < curseur_service._y) {
ball.xcible = curseur_service._x;
haut.gotoAndPlay("fin_servicejoueur");
_parent.frappe.gotoAndPlay(2);
vientdeservir = true;
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (curseur_service._y < _parent.sud_ouest._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
}
} else if (_parent.joueur_bas) {
if (anim_avant_service) {
haut.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
compteur_attente_ordi++;
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
haut.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.sud_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_ouest._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
haut.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
service_bon = false;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
} else {
compteur_attente_ordi++;
if (anim_avant_service) {
bas.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
bas.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.nord_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.nord_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.nord_ouest._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
bas.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
}
}
if (_parent.joueur_bas) {
if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (bas.coup_fini) {
if (Key.isDown(38)) {
bas.gotoAndStop(3);
bas._y = bas._y - deplacementy_joueurbas;
if (bas._y < (mcfilet._y + 10)) {
bas._y = mcfilet._y + 10;
}
}
if (Key.isDown(40)) {
bas.gotoAndStop(3);
bas._y = bas._y + deplacementy_joueurbas;
}
if (Key.isDown(37)) {
bas.gotoAndPlay("coursejoueurdroite");
bas._x = bas._x - deplacementx_joueurbas;
}
if (Key.isDown(39)) {
bas.gotoAndPlay("coursejoueurgauche");
bas._x = bas._x + deplacementx_joueurbas;
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
bas.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
bas.gotoAndPlay("coup_droit_shootjoueur");
} else {
bas.gotoAndPlay("revers_shootjoueur");
}
}
if (bas.autorisation_renvoi) {
if (mcfilet._y < ball._y) {
if ((Math.abs(ball._x - bas._x) < 75) && (Math.abs(ball._y - bas._y) < 100)) {
coef = (-20 * (bas._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if ((mcfilet._y + 150) < bas._y) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 1);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 20) + (60 - ball.rapidite));
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.6);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 16) + ((60 - ball.rapidite) / 2));
effet = (ball.rapidite / 10) + 3.5;
limite_effet = -effet;
ball.decrement_z = 0.6;
}
ball.gotoAndPlay(2);
bas.autorisation_renvoi = false;
}
}
}
}
} else if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (haut.coup_fini) {
if (Key.isDown(38)) {
haut.gotoAndStop(3);
haut._y = haut._y - deplacementy_joueurhaut;
if (haut._y < 73) {
haut._y = 73;
}
}
if (Key.isDown(40)) {
haut.gotoAndStop(3);
haut._y = haut._y + deplacementy_joueurhaut;
if (mcfilet._y < haut._y) {
haut._y = mcfilet._y;
}
}
if (Key.isDown(37)) {
haut.gotoAndPlay("coursejoueurgauche");
haut._x = haut._x - deplacementx_joueurhaut;
}
if (Key.isDown(39)) {
haut.gotoAndPlay("coursejoueurdroite");
haut._x = haut._x + deplacementx_joueurhaut;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
haut.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
haut.gotoAndPlay("coup_droit_shootjoueur");
} else {
haut.gotoAndPlay("revers_shootjoueur");
}
}
if (haut.autorisation_renvoi) {
if (ball._y < mcfilet._y) {
if ((Math.abs(ball._x - haut._x) < 75) && (Math.abs(ball._y - haut._y) < 100)) {
coef = (-30 * (haut._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if (haut._y < (mcfilet._y - 100)) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.8);
ball.vy = 30 + (60 - ball.rapidite);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.5);
ball.vy = 18 + ((60 - ball.rapidite) / 2);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
}
ball.gotoAndPlay(2);
haut.autorisation_renvoi = false;
}
}
}
}
if (_parent.joueur_bas) {
if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if (Math.abs(haut._x - ball._x) > 30) {
if (ball._x < haut._x) {
haut.gotoAndPlay("courseordidroite");
haut._x = haut._x - _parent.dep_ordi_x;
} else {
haut.gotoAndPlay("courseordigauche");
haut._x = haut._x + _parent.dep_ordi_x;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if ((ball._y < mcfilet._y) && (Math.abs(haut._y - ball._y) > 20)) {
if ((ball._y - 25) < haut._y) {
haut._y = haut._y - _parent.dep_ordi_y;
if (haut._y < 73) {
haut._y = 73;
}
} else {
haut._y = haut._y + _parent.dep_ordi_y;
}
}
} else if ((mcfilet._y < ball._y) && (Math.abs((haut._y - mcfilet._y) - 130) > 20)) {
if (!vientdeservir) {
if ((mcfilet._y - 130) < haut._y) {
haut._y = haut._y - (_parent.dep_ordi_y - 0.5);
} else {
haut._y = haut._y + (_parent.dep_ordi_y - 0.5);
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(haut._y - ball._y) < 20) && (Math.abs(haut._x - ball._x) < 30)) {
trace("Je frappe");
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
haut.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 30;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
} else if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if ((mcfilet._y < ball._y) && (Math.abs(bas._x - ball._x) > 35)) {
if (ball._x < bas._x) {
bas.gotoAndPlay("courseordigauche");
bas._x = bas._x - (_parent.dep_ordi_x + 1);
} else {
bas.gotoAndPlay("courseordidroite");
bas._x = bas._x + (_parent.dep_ordi_x + 1);
}
}
if ((mcfilet._y < ball._y) && (Math.abs(bas._y - ball._y) > 25)) {
if ((ball._y - 50) < bas._y) {
bas._y = bas._y - (_parent.dep_ordi_y + 1);
} else {
bas._y = bas._y + (_parent.dep_ordi_y + 1);
}
}
} else if ((ball._y < mcfilet._y) && (Math.abs((bas._y - mcfilet._y) + 180) > 25)) {
if (!vientdeservir) {
if ((mcfilet._y + 180) < bas._y) {
bas._y = bas._y - _parent.dep_ordi_y;
} else {
bas._y = bas._y + _parent.dep_ordi_y;
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(ball._y - bas._y) < 40) && (Math.abs(ball._x - bas._x) < 50)) {
trace("Je frappe");
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
bas.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 34;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
Symbol 401 MovieClip Frame 3
gotoAndPlay (2);
Symbol 401 MovieClip Frame 4
stop();
Symbol 509 MovieClip Frame 5
stop();
Symbol 512 MovieClip Frame 3
stop();
Symbol 513 MovieClip Frame 1
play();
Symbol 513 MovieClip Frame 2
gotoAndPlay (1);
Symbol 513 MovieClip Frame 9
play();
Symbol 513 MovieClip Frame 16
gotoAndPlay (1);
Symbol 513 MovieClip Frame 17
play();
Symbol 513 MovieClip Frame 25
gotoAndPlay (1);
Symbol 513 MovieClip Frame 26
autorisation_renvoi = false;
coup_fini = false;
Symbol 513 MovieClip Frame 30
stop();
Symbol 513 MovieClip Frame 31
autorisation_renvoi = true;
play();
Symbol 513 MovieClip Frame 41
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 513 MovieClip Frame 42
autorisation_renvoi = false;
coup_fini = false;
Symbol 513 MovieClip Frame 47
stop();
Symbol 513 MovieClip Frame 48
autorisation_renvoi = true;
play();
Symbol 513 MovieClip Frame 58
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 513 MovieClip Frame 78
gotoAndPlay (65);
Symbol 513 MovieClip Frame 85
stop();
Symbol 513 MovieClip Frame 95
gotoAndPlay (1);
Symbol 513 MovieClip Frame 100
coup_finiordi = true;
Symbol 513 MovieClip Frame 119
gotoAndPlay (101);
Symbol 513 MovieClip Frame 124
gotoAndPlay (101);
Symbol 513 MovieClip Frame 130
gotoAndPlay (101);
Symbol 513 MovieClip Frame 131
coup_finiordi = false;
Symbol 513 MovieClip Frame 135
coup_finiordi = true;
Symbol 513 MovieClip Frame 136
play();
Symbol 513 MovieClip Frame 146
gotoAndStop (100);
Symbol 513 MovieClip Frame 147
coup_finiordi = false;
Symbol 513 MovieClip Frame 152
coup_finiordi = true;
Symbol 513 MovieClip Frame 153
play();
Symbol 513 MovieClip Frame 162
coup_fini = true;
gotoAndStop (100);
Symbol 513 MovieClip Frame 170
coup_finiordi = false;
Symbol 513 MovieClip Frame 183
gotoAndPlay (170);
Symbol 513 MovieClip Frame 191
stop();
Symbol 513 MovieClip Frame 206
coup_finiordi = true;
gotoAndPlay (100);
Symbol 555 MovieClip Frame 10
stop();
Symbol 605 MovieClip Frame 6
stop();
Symbol 608 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 1
play();
Symbol 609 MovieClip Frame 2
gotoAndPlay (1);
Symbol 609 MovieClip Frame 7
play();
Symbol 609 MovieClip Frame 12
gotoAndStop (1);
Symbol 609 MovieClip Frame 13
play();
Symbol 609 MovieClip Frame 18
gotoAndStop (1);
Symbol 609 MovieClip Frame 19
coup_fini = false;
Symbol 609 MovieClip Frame 22
autorisation_renvoi = false;
stop();
Symbol 609 MovieClip Frame 23
autorisation_renvoi = true;
Symbol 609 MovieClip Frame 30
autorisation_renvoi = false;
play();
Symbol 609 MovieClip Frame 34
coup_fini = true;
gotoAndStop (1);
Symbol 609 MovieClip Frame 35
autorisation_renvoi = false;
coup_fini = false;
Symbol 609 MovieClip Frame 39
stop();
Symbol 609 MovieClip Frame 40
autorisation_renvoi = true;
Symbol 609 MovieClip Frame 48
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 609 MovieClip Frame 67
stop();
Symbol 609 MovieClip Frame 75
stop();
Symbol 609 MovieClip Frame 82
gotoAndPlay (1);
Symbol 609 MovieClip Frame 95
coup_finiordi = true;
stop();
Symbol 609 MovieClip Frame 96
play();
Symbol 609 MovieClip Frame 101
gotoAndPlay (95);
Symbol 609 MovieClip Frame 102
play();
Symbol 609 MovieClip Frame 107
gotoAndPlay (95);
Symbol 609 MovieClip Frame 108
coup_finiordi = false;
Symbol 609 MovieClip Frame 111
coup_finiordi = true;
Symbol 609 MovieClip Frame 123
coup_finiordi = true;
gotoAndStop (95);
Symbol 609 MovieClip Frame 124
coup_finiordi = false;
Symbol 609 MovieClip Frame 128
coup_finiordi = true;
Symbol 609 MovieClip Frame 137
coup_finiordi = true;
gotoAndStop (95);
Symbol 609 MovieClip Frame 143
coup_finiordi = false;
Symbol 609 MovieClip Frame 170
stop();
Symbol 609 MovieClip Frame 179
stop();
Symbol 609 MovieClip Frame 196
coup_finiordi = true;
gotoAndPlay (95);
Symbol 610 MovieClip Frame 1
play();
serveurbas_d = mcfilet._x + 80;
serveurbas_g = mcfilet._x - 80;
serveurbas_y = mcfilet._y + 200;
serveurhaut_g = mcfilet._x - 60;
serveurhaut_d = mcfilet._x + 60;
serveurhaut_y = mcfilet._y - 100;
decrement_incy_curseur_bas = 0.35 + (_parent._parent.niveau * 0.08);
decrement_incy_curseur_haut = 0.45 + (_parent._parent.niveau * 0.08);
deplacementx_joueurbas = 12;
deplacementy_joueurbas = 6;
deplacementy_joueurhaut = 5;
deplacementx_joueurhaut = 10;
puissanceordi = 25 - _parent._parent.niveau;
test = Math.random();
if (_parent.service == "joueur") {
ball.actif = "joueur";
} else {
ball.actif = "ordi";
}
ball.rebond = 0;
vientdeservir = false;
renvoiordi = false;
renvoijoueur = false;
compteur_attente_ordi = 0;
compteur_attente_ordi2 = 0;
compteur_bidon = 0;
_parent.nbechange = 0;
_parent.jeu = "replacement";
if (_parent.change_cote && (!_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = true;
_parent.change_cote = false;
}
if (_parent.change_cote && (_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = false;
_parent.change_cote = false;
}
if (_parent.joueur_bas) {
if (_parent.service == "joueur") {
passeparfilet = false;
} else {
passeparfilet = true;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
bas.autorisation_renvoi = false;
bas.coup_fini = true;
bas.gotoAndPlay("immobilejoueur");
haut.gotoAndPlay("immobileordi");
} else {
if (_parent.service == "joueur") {
passeparfilet = true;
} else {
passeparfilet = false;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
haut.autorisation_renvoi = false;
haut.coup_fini = true;
haut.gotoAndPlay("immobilejoueur");
bas.gotoAndPlay("immobileordi");
}
ball.gotoAndPlay("invisible");
curseur_service._visible = false;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
detection_service = false;
buffer_espace = 0;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
espace_relache = false;
detection_relachement = false;
essai_renvoi = false;
anim_avant_service = true;
if (_parent.remiseazero) {
deuxieme_service = false;
double_faute = false;
service_bon = false;
ball.filet = false;
faute_en_cours = false;
} else {
service_bon = false;
ball.filet = false;
}
Symbol 610 MovieClip Frame 2
if (_parent.jeu == "replacement") {
ball.oldyrebond = 10;
ball.rebond = 0;
_parent.compteur_changement_cote++;
if (_parent.compteur_changement_cote >= 50) {
compteur_bidon++;
if (compteur_bidon >= 50) {
if (_parent.service == "joueur") {
if (!deuxieme_service) {
ball.puissance_service = int(15 + (_parent._parent.niveau / 3));
} else {
ball.puissance_service = int(20 + (_parent._parent.niveau / 3));
}
} else {
ball.puissance_service = puissanceordi;
}
if (_parent.service_droite) {
bas._x = serveurbas_d;
bas._y = serveurbas_y;
haut._x = serveurhaut_g;
haut._y = serveurhaut_y;
} else {
bas._x = serveurbas_g;
bas._y = serveurbas_y;
haut._x = serveurhaut_d;
haut._y = serveurhaut_y;
}
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (_parent.service_droite) {
haut._x = haut._x - 30;
} else {
haut._x = haut._x + 30;
}
} else if (_parent.service_droite) {
bas._x = bas._x + 40;
} else {
bas._x = bas._x - 40;
}
}
if (!double_faute) {
_parent.jeu = "service";
} else {
if (_parent.service == "joueur") {
outjoueur = true;
} else {
outordi = true;
}
deuxieme_service = false;
double_faute = false;
_parent.gotoAndPlay("miseajour");
}
}
}
}
if (_parent.jeu == "service") {
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (anim_avant_service) {
bas.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
bas.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y - incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_bas;
if ((mcfilet._y + 100) < curseur_service._y) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (4 - (_parent._parent.niveau / 7.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (4 - (_parent._parent.niveau / 7.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if (curseur_service._y < (mcfilet._y + 50)) {
ball.xcible = curseur_service._x;
bas.gotoAndPlay("fin_servicejoueur");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
trace("Condition " + condition);
if (condition) {
service_bon = true;
if (_parent.passeparfilet) {
_parent.passeparfilet = false;
} else {
_parent.passeparfilet = true;
}
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.rebond = 0;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (_parent.nord_ouest._y < curseur_service._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
} else {
if (anim_avant_service) {
haut.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
haut.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y + incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_haut;
if (curseur_service._y < (mcfilet._y - 100)) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (8 - (_parent._parent.niveau / 2.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (8 - (_parent._parent.niveau / 2.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if ((mcfilet._y - 50) < curseur_service._y) {
ball.xcible = curseur_service._x;
haut.gotoAndPlay("fin_servicejoueur");
_parent.frappe.gotoAndPlay(2);
vientdeservir = true;
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (curseur_service._y < _parent.sud_ouest._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
}
} else if (_parent.joueur_bas) {
if (anim_avant_service) {
haut.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
compteur_attente_ordi++;
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
haut.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.sud_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_ouest._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
haut.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
service_bon = false;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
} else {
compteur_attente_ordi++;
if (anim_avant_service) {
bas.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
bas.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.nord_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.nord_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.nord_ouest._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
bas.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
}
}
if (_parent.joueur_bas) {
if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (bas.coup_fini) {
if (Key.isDown(38)) {
bas.gotoAndStop(3);
bas._y = bas._y - deplacementy_joueurbas;
if (bas._y < (mcfilet._y + 10)) {
bas._y = mcfilet._y + 10;
}
}
if (Key.isDown(40)) {
bas.gotoAndStop(3);
bas._y = bas._y + deplacementy_joueurbas;
}
if (Key.isDown(37)) {
bas.gotoAndPlay("coursejoueurdroite");
bas._x = bas._x - deplacementx_joueurbas;
}
if (Key.isDown(39)) {
bas.gotoAndPlay("coursejoueurgauche");
bas._x = bas._x + deplacementx_joueurbas;
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
bas.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
bas.gotoAndPlay("coup_droit_shootjoueur");
} else {
bas.gotoAndPlay("revers_shootjoueur");
}
}
if (bas.autorisation_renvoi) {
if (mcfilet._y < ball._y) {
if ((Math.abs(ball._x - bas._x) < 75) && (Math.abs(ball._y - bas._y) < 100)) {
coef = (-20 * (bas._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if ((mcfilet._y + 150) < bas._y) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 1);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 20) + (60 - ball.rapidite));
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.6);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 16) + ((60 - ball.rapidite) / 2));
effet = (ball.rapidite / 10) + 3.5;
limite_effet = -effet;
ball.decrement_z = 0.6;
}
ball.gotoAndPlay(2);
bas.autorisation_renvoi = false;
}
}
}
}
} else if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (haut.coup_fini) {
if (Key.isDown(38)) {
haut.gotoAndStop(1);
haut._y = haut._y - deplacementy_joueurhaut;
if (haut._y < 73) {
haut._y = 73;
}
}
if (Key.isDown(40)) {
haut.gotoAndStop(1);
haut._y = haut._y + deplacementy_joueurhaut;
if (mcfilet._y < haut._y) {
haut._y = mcfilet._y;
}
}
if (Key.isDown(37)) {
haut.gotoAndPlay("coursejoueurgauche");
haut._x = haut._x - deplacementx_joueurhaut;
}
if (Key.isDown(39)) {
haut.gotoAndPlay("coursejoueurdroite");
haut._x = haut._x + deplacementx_joueurhaut;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
haut.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
haut.gotoAndPlay("coup_droit_shootjoueur");
} else {
haut.gotoAndPlay("revers_shootjoueur");
}
}
if (haut.autorisation_renvoi) {
if (ball._y < mcfilet._y) {
if ((Math.abs(ball._x - haut._x) < 75) && (Math.abs(ball._y - haut._y) < 100)) {
coef = (-30 * (haut._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if (haut._y < (mcfilet._y - 100)) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.8);
ball.vy = 30 + (60 - ball.rapidite);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.5);
ball.vy = 18 + ((60 - ball.rapidite) / 2);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
}
ball.gotoAndPlay(2);
haut.autorisation_renvoi = false;
}
}
}
}
if (_parent.joueur_bas) {
if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if (Math.abs(haut._x - ball._x) > 30) {
if (ball._x < haut._x) {
haut.gotoAndPlay("courseordidroite");
haut._x = haut._x - _parent.dep_ordi_x;
} else {
haut.gotoAndPlay("courseordigauche");
haut._x = haut._x + _parent.dep_ordi_x;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if ((ball._y < mcfilet._y) && (Math.abs(haut._y - ball._y) > 20)) {
if ((ball._y - 25) < haut._y) {
haut._y = haut._y - _parent.dep_ordi_y;
if (haut._y < 73) {
haut._y = 73;
}
} else {
haut._y = haut._y + _parent.dep_ordi_y;
}
}
} else if ((mcfilet._y < ball._y) && (Math.abs((haut._y - mcfilet._y) - 130) > 20)) {
if (!vientdeservir) {
if ((mcfilet._y - 130) < haut._y) {
haut._y = haut._y - (_parent.dep_ordi_y - 0.5);
} else {
haut._y = haut._y + (_parent.dep_ordi_y - 0.5);
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(haut._y - ball._y) < 20) && (Math.abs(haut._x - ball._x) < 30)) {
trace("Je frappe");
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
haut.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 30;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
} else if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if ((mcfilet._y < ball._y) && (Math.abs(bas._x - ball._x) > 35)) {
if (ball._x < bas._x) {
bas.gotoAndPlay("courseordigauche");
bas._x = bas._x - (_parent.dep_ordi_x + 1);
} else {
bas.gotoAndPlay("courseordidroite");
bas._x = bas._x + (_parent.dep_ordi_x + 1);
}
}
if ((mcfilet._y < ball._y) && (Math.abs(bas._y - ball._y) > 25)) {
if ((ball._y - 50) < bas._y) {
bas._y = bas._y - (_parent.dep_ordi_y + 1);
} else {
bas._y = bas._y + (_parent.dep_ordi_y + 1);
}
}
} else if ((ball._y < mcfilet._y) && (Math.abs((bas._y - mcfilet._y) + 180) > 25)) {
if (!vientdeservir) {
if ((mcfilet._y + 180) < bas._y) {
bas._y = bas._y - _parent.dep_ordi_y;
} else {
bas._y = bas._y + _parent.dep_ordi_y;
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(ball._y - bas._y) < 40) && (Math.abs(ball._x - bas._x) < 50)) {
trace("Je frappe");
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
bas.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 34;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
Symbol 610 MovieClip Frame 3
gotoAndPlay (2);
Symbol 610 MovieClip Frame 4
stop();
Symbol 618 MovieClip Frame 1
play();
Symbol 618 MovieClip Frame 2
gotoAndPlay (1);
Symbol 618 MovieClip Frame 9
play();
Symbol 618 MovieClip Frame 16
gotoAndPlay (1);
Symbol 618 MovieClip Frame 17
play();
Symbol 618 MovieClip Frame 25
gotoAndPlay (1);
Symbol 618 MovieClip Frame 26
autorisation_renvoi = false;
coup_fini = false;
Symbol 618 MovieClip Frame 30
stop();
Symbol 618 MovieClip Frame 31
autorisation_renvoi = true;
play();
Symbol 618 MovieClip Frame 41
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 618 MovieClip Frame 42
autorisation_renvoi = false;
coup_fini = false;
Symbol 618 MovieClip Frame 47
stop();
Symbol 618 MovieClip Frame 48
autorisation_renvoi = true;
play();
Symbol 618 MovieClip Frame 58
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 618 MovieClip Frame 78
gotoAndPlay (65);
Symbol 618 MovieClip Frame 85
stop();
Symbol 618 MovieClip Frame 95
gotoAndPlay (1);
Symbol 618 MovieClip Frame 100
coup_finiordi = true;
Symbol 618 MovieClip Frame 119
gotoAndPlay (101);
Symbol 618 MovieClip Frame 124
gotoAndPlay (101);
Symbol 618 MovieClip Frame 130
gotoAndPlay (101);
Symbol 618 MovieClip Frame 131
coup_finiordi = false;
Symbol 618 MovieClip Frame 135
coup_finiordi = true;
Symbol 618 MovieClip Frame 136
play();
Symbol 618 MovieClip Frame 146
gotoAndStop (100);
Symbol 618 MovieClip Frame 147
coup_finiordi = false;
Symbol 618 MovieClip Frame 152
coup_finiordi = true;
Symbol 618 MovieClip Frame 153
play();
Symbol 618 MovieClip Frame 162
coup_fini = true;
gotoAndStop (100);
Symbol 618 MovieClip Frame 170
coup_finiordi = false;
Symbol 618 MovieClip Frame 183
gotoAndPlay (170);
Symbol 618 MovieClip Frame 191
stop();
Symbol 618 MovieClip Frame 212
coup_finiordi = true;
gotoAndPlay (100);
Symbol 626 MovieClip Frame 1
play();
Symbol 626 MovieClip Frame 2
gotoAndPlay (1);
Symbol 626 MovieClip Frame 7
play();
Symbol 626 MovieClip Frame 12
gotoAndStop (1);
Symbol 626 MovieClip Frame 13
play();
Symbol 626 MovieClip Frame 18
gotoAndStop (1);
Symbol 626 MovieClip Frame 19
coup_fini = false;
Symbol 626 MovieClip Frame 22
autorisation_renvoi = false;
stop();
Symbol 626 MovieClip Frame 23
autorisation_renvoi = true;
Symbol 626 MovieClip Frame 30
autorisation_renvoi = false;
play();
Symbol 626 MovieClip Frame 34
coup_fini = true;
gotoAndStop (1);
Symbol 626 MovieClip Frame 35
autorisation_renvoi = false;
coup_fini = false;
Symbol 626 MovieClip Frame 39
stop();
Symbol 626 MovieClip Frame 40
autorisation_renvoi = true;
Symbol 626 MovieClip Frame 48
autorisation_renvoi = false;
coup_fini = true;
gotoAndStop (1);
Symbol 626 MovieClip Frame 67
stop();
Symbol 626 MovieClip Frame 75
stop();
Symbol 626 MovieClip Frame 82
gotoAndPlay (1);
Symbol 626 MovieClip Frame 95
coup_finiordi = true;
stop();
Symbol 626 MovieClip Frame 96
play();
Symbol 626 MovieClip Frame 101
gotoAndPlay (95);
Symbol 626 MovieClip Frame 102
play();
Symbol 626 MovieClip Frame 107
gotoAndPlay (95);
Symbol 626 MovieClip Frame 108
coup_finiordi = false;
Symbol 626 MovieClip Frame 111
coup_finiordi = true;
Symbol 626 MovieClip Frame 123
coup_finiordi = true;
gotoAndStop (95);
Symbol 626 MovieClip Frame 124
coup_finiordi = false;
Symbol 626 MovieClip Frame 128
coup_finiordi = true;
Symbol 626 MovieClip Frame 137
coup_finiordi = true;
gotoAndStop (95);
Symbol 626 MovieClip Frame 143
coup_finiordi = false;
Symbol 626 MovieClip Frame 170
stop();
Symbol 626 MovieClip Frame 179
stop();
Symbol 626 MovieClip Frame 196
coup_finiordi = true;
gotoAndPlay (95);
Symbol 626 MovieClip Frame 197
Symbol 627 MovieClip Frame 1
play();
serveurbas_d = mcfilet._x + 80;
serveurbas_g = mcfilet._x - 80;
serveurbas_y = mcfilet._y + 200;
serveurhaut_g = mcfilet._x - 60;
serveurhaut_d = mcfilet._x + 60;
serveurhaut_y = mcfilet._y - 100;
decrement_incy_curseur_bas = 0.35 + (_parent._parent.niveau * 0.08);
decrement_incy_curseur_haut = 0.45 + (_parent._parent.niveau * 0.08);
deplacementx_joueurbas = 12;
deplacementy_joueurbas = 6;
deplacementy_joueurhaut = 5;
deplacementx_joueurhaut = 10;
puissanceordi = 25 - _parent._parent.niveau;
test = Math.random();
if (_parent.service == "joueur") {
ball.actif = "joueur";
} else {
ball.actif = "ordi";
}
ball.rebond = 0;
vientdeservir = false;
renvoiordi = false;
renvoijoueur = false;
compteur_attente_ordi = 0;
compteur_attente_ordi2 = 0;
compteur_bidon = 0;
_parent.nbechange = 0;
_parent.jeu = "replacement";
if (_parent.change_cote && (!_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = true;
_parent.change_cote = false;
}
if (_parent.change_cote && (_parent.joueur_bas)) {
_parent.compteur_changement_cote = 0;
_parent.out.gotoAndPlay("changement");
_parent.joueur_bas = false;
_parent.change_cote = false;
}
if (_parent.joueur_bas) {
if (_parent.service == "joueur") {
passeparfilet = false;
} else {
passeparfilet = true;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
bas.autorisation_renvoi = false;
bas.coup_fini = true;
bas.gotoAndPlay("immobilejoueur");
haut.gotoAndPlay("immobileordi");
} else {
if (_parent.service == "joueur") {
passeparfilet = true;
} else {
passeparfilet = false;
}
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
haut.autorisation_renvoi = false;
haut.coup_fini = true;
haut.gotoAndPlay("immobilejoueur");
bas.gotoAndPlay("immobileordi");
}
ball.gotoAndPlay("invisible");
curseur_service._visible = false;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
detection_service = false;
buffer_espace = 0;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
espace_relache = false;
detection_relachement = false;
essai_renvoi = false;
anim_avant_service = true;
if (_parent.remiseazero) {
deuxieme_service = false;
double_faute = false;
service_bon = false;
ball.filet = false;
faute_en_cours = false;
} else {
service_bon = false;
ball.filet = false;
}
Symbol 627 MovieClip Frame 2
if (_parent.jeu == "replacement") {
ball.oldyrebond = 10;
ball.rebond = 0;
_parent.compteur_changement_cote++;
if (_parent.compteur_changement_cote >= 50) {
compteur_bidon++;
if (compteur_bidon >= 50) {
if (_parent.service == "joueur") {
if (!deuxieme_service) {
ball.puissance_service = int(15 + (_parent._parent.niveau / 3));
} else {
ball.puissance_service = int(20 + (_parent._parent.niveau / 3));
}
} else {
ball.puissance_service = puissanceordi;
}
if (_parent.service_droite) {
bas._x = serveurbas_d;
bas._y = serveurbas_y;
haut._x = serveurhaut_g;
haut._y = serveurhaut_y;
} else {
bas._x = serveurbas_g;
bas._y = serveurbas_y;
haut._x = serveurhaut_d;
haut._y = serveurhaut_y;
}
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (_parent.service_droite) {
haut._x = haut._x - 30;
} else {
haut._x = haut._x + 30;
}
} else if (_parent.service_droite) {
bas._x = bas._x + 40;
} else {
bas._x = bas._x - 40;
}
}
if (!double_faute) {
_parent.jeu = "service";
} else {
if (_parent.service == "joueur") {
outjoueur = true;
} else {
outordi = true;
}
deuxieme_service = false;
double_faute = false;
_parent.gotoAndPlay("miseajour");
}
}
}
}
if (_parent.jeu == "service") {
if (_parent.service == "joueur") {
if (_parent.joueur_bas) {
if (anim_avant_service) {
bas.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
bas.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y - incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_bas;
if ((mcfilet._y + 100) < curseur_service._y) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (4 - (_parent._parent.niveau / 7.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (4 - (_parent._parent.niveau / 7.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if (curseur_service._y < (mcfilet._y + 50)) {
ball.xcible = curseur_service._x;
bas.gotoAndPlay("fin_servicejoueur");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
trace("Condition " + condition);
if (condition) {
service_bon = true;
if (_parent.passeparfilet) {
_parent.passeparfilet = false;
} else {
_parent.passeparfilet = true;
}
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.rebond = 0;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (_parent.nord_ouest._y < curseur_service._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y + 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
} else {
if (anim_avant_service) {
haut.gotoAndPlay("avant_servicejoueur");
anim_avant_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
}
if (Key.isDown(32)) {
if (!detection_service) {
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
haut.gotoAndPlay("servicejoueur");
}
detection_service = true;
curseur_service._visible = true;
curseur_service._y = curseur_service._y + incy_curseur;
incy_curseur = incy_curseur - decrement_incy_curseur_haut;
if (curseur_service._y < (mcfilet._y - 100)) {
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
if (Key.isDown(39)) {
curseur_service._x = curseur_service._x + (8 - (_parent._parent.niveau / 2.5));
}
if (Key.isDown(37)) {
curseur_service._x = curseur_service._x - (8 - (_parent._parent.niveau / 2.5));
}
}
if (detection_service && (!Key.isDown(32))) {
if ((mcfilet._y - 50) < curseur_service._y) {
ball.xcible = curseur_service._x;
haut.gotoAndPlay("fin_servicejoueur");
_parent.frappe.gotoAndPlay(2);
vientdeservir = true;
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball.xcible_a = curseur_service._x;
ball.ycible_a = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
if (curseur_service._y < _parent.sud_ouest._y) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
} else {
_parent.faute.gotoAndPlay(2);
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
faute_en_cours = true;
_parent.out.gotoAndPlay("fault");
_parent.remiseazero = false;
_parent.jeu = "replacement";
curseur_service._visible = false;
}
}
}
detection_service = false;
curseur_service._x = mcfilet._x;
curseur_service._y = mcfilet._y - 100;
incy_curseur = 12 + (_parent._parent.niveau / 1.5);
curseur_service._visible = false;
}
}
} else if (_parent.joueur_bas) {
if (anim_avant_service) {
haut.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
compteur_attente_ordi++;
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
haut.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.sud_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.sud_ouest._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
haut.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = haut._x;
ydepart_service = haut._y - 120;
ydepart_service_sol = haut._y;
service_bon = false;
if (_parent.service_droite) {
condition = _parent.sud_est.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.sud_ouest.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
} else {
compteur_attente_ordi++;
if (anim_avant_service) {
bas.gotoAndPlay("avant_serviceordi");
anim_avant_service = false;
}
if (compteur_attente_ordi >= 50) {
if (compteur_attente_ordi == 50) {
bas.gotoAndPlay("serviceordi");
if (!deuxieme_service) {
_parent.score.gotoAndPlay(19);
}
}
ecart_service = random(_parent.nord_est._width);
if (_parent.service_droite) {
if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = _parent.nord_est._y;
} else {
curseur_service._x = mcfilet._x - random(ecart_service);
curseur_service._y = mcfilet._y;
}
} else if (test < _parent.pourcentageservice) {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = _parent.nord_ouest._y;
} else {
curseur_service._x = mcfilet._x + random(ecart_service);
curseur_service._y = mcfilet._y;
}
if (curseur_service._y > 0) {
compteur_attente_ordi2++;
if (compteur_attente_ordi2 == 10) {
bas.gotoAndPlay("fin_serviceordi");
vientdeservir = true;
_parent.frappe.gotoAndPlay(2);
xdepart_service = bas._x;
ydepart_service = bas._y - 120;
ydepart_service_sol = bas._y;
if (_parent.service_droite) {
condition = _parent.nord_ouest.hitTest(curseur_service.hittestcurseur);
} else {
condition = _parent.nord_est.hitTest(curseur_service.hittestcurseur);
}
if (condition) {
service_bon = true;
_parent.jeu = "echange";
xcible_service = curseur_service._x;
ycible_service = curseur_service._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.gotoAndPlay("service");
} else {
service_bon = false;
}
if (!service_bon) {
xcible_service = curseur_service._x;
ycible_service = mcfilet._y;
ball._x = xdepart_service;
ball._y = ydepart_service;
ball._visible = true;
ball.filet = true;
ball.gotoAndPlay("service");
}
curseur_service._visible = false;
}
}
}
}
}
if (_parent.joueur_bas) {
if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (bas.coup_fini) {
if (Key.isDown(38)) {
bas.gotoAndStop(3);
bas._y = bas._y - deplacementy_joueurbas;
if (bas._y < (mcfilet._y + 10)) {
bas._y = mcfilet._y + 10;
}
}
if (Key.isDown(40)) {
bas.gotoAndStop(3);
bas._y = bas._y + deplacementy_joueurbas;
}
if (Key.isDown(37)) {
bas.gotoAndPlay("coursejoueurdroite");
bas._x = bas._x - deplacementx_joueurbas;
}
if (Key.isDown(39)) {
bas.gotoAndPlay("coursejoueurgauche");
bas._x = bas._x + deplacementx_joueurbas;
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
bas.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
bas.gotoAndPlay("coup_droit_shootjoueur");
} else {
bas.gotoAndPlay("revers_shootjoueur");
}
}
if (bas.autorisation_renvoi) {
if (mcfilet._y < ball._y) {
if ((Math.abs(ball._x - bas._x) < 75) && (Math.abs(ball._y - bas._y) < 100)) {
coef = (-20 * (bas._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if ((mcfilet._y + 150) < bas._y) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 1);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 20) + (60 - ball.rapidite));
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.6);
ball.vy = -(((ball.vy / Math.abs(ball.vy)) * 16) + ((60 - ball.rapidite) / 2));
effet = (ball.rapidite / 10) + 3.5;
limite_effet = -effet;
ball.decrement_z = 0.6;
}
ball.gotoAndPlay(2);
bas.autorisation_renvoi = false;
}
}
}
}
} else if ((_parent.jeu == "echange") || ((_parent.jeu == "service") && (_parent.service == "ordi"))) {
if (haut.coup_fini) {
if (Key.isDown(38)) {
haut.gotoAndStop(3);
haut._y = haut._y - deplacementy_joueurhaut;
if (haut._y < 73) {
haut._y = 73;
}
}
if (Key.isDown(40)) {
haut.gotoAndStop(3);
haut._y = haut._y + deplacementy_joueurhaut;
if (mcfilet._y < haut._y) {
haut._y = mcfilet._y;
}
}
if (Key.isDown(37)) {
haut.gotoAndPlay("coursejoueurgauche");
haut._x = haut._x - deplacementx_joueurhaut;
}
if (Key.isDown(39)) {
haut.gotoAndPlay("coursejoueurdroite");
haut._x = haut._x + deplacementx_joueurhaut;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if (Key.isDown(32)) {
if (!detection_relachement) {
buffer_espace = 60;
buffer_touche_droite = 0;
buffer_touche_gauche = 0;
buffer_touche_haut = 0;
buffer_touche_bas = 0;
}
detection_relachement = true;
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitjoueur");
coup_droit = true;
} else {
haut.gotoAndPlay("reversjoueur");
coup_droit = false;
}
buffer_espace = buffer_espace - 0.5;
if (Key.isDown(39)) {
buffer_touche_droite = buffer_touche_droite + 1;
}
if (Key.isDown(37)) {
buffer_touche_gauche = buffer_touche_gauche + 1;
}
if (Key.isDown(38)) {
buffer_touche_haut = buffer_touche_haut + 1;
}
if (Key.isDown(40)) {
buffer_touche_bas = buffer_touche_bas + 1;
}
}
if (detection_relachement && (!Key.isDown(32))) {
espace_relache = true;
detection_relachement = false;
essai_renvoi = true;
if (coup_droit) {
haut.gotoAndPlay("coup_droit_shootjoueur");
} else {
haut.gotoAndPlay("revers_shootjoueur");
}
}
if (haut.autorisation_renvoi) {
if (ball._y < mcfilet._y) {
if ((Math.abs(ball._x - haut._x) < 75) && (Math.abs(ball._y - haut._y) < 100)) {
coef = (-30 * (haut._x - mcfilet._x)) / mcfilet._x;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "joueur";
renvoijoueur = true;
renvoiordi = false;
_parent.frappe.gotoAndPlay(2);
ball.x = ball._x;
ball.y = ball._y;
if (haut._y < (mcfilet._y - 100)) {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.8);
ball.vy = 30 + (60 - ball.rapidite);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
} else {
ball.rapidite = Math.max(buffer_espace, 20);
ball.vx = coef + ((buffer_touche_droite - buffer_touche_gauche) / 0.5);
ball.vy = 18 + ((60 - ball.rapidite) / 2);
effet = (ball.rapidite / 10) + 2.5;
limite_effet = -effet;
ball.decrement_z = 0.4;
}
ball.gotoAndPlay(2);
haut.autorisation_renvoi = false;
}
}
}
}
if (_parent.joueur_bas) {
if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if (Math.abs(haut._x - ball._x) > 30) {
if (ball._x < haut._x) {
haut.gotoAndPlay("courseordidroite");
haut._x = haut._x - _parent.dep_ordi_x;
} else {
haut.gotoAndPlay("courseordigauche");
haut._x = haut._x + _parent.dep_ordi_x;
if (haut._x > 505) {
haut._x = 505;
}
}
}
if ((ball._y < mcfilet._y) && (Math.abs(haut._y - ball._y) > 20)) {
if ((ball._y - 25) < haut._y) {
haut._y = haut._y - _parent.dep_ordi_y;
if (haut._y < 73) {
haut._y = 73;
}
} else {
haut._y = haut._y + _parent.dep_ordi_y;
}
}
} else if ((mcfilet._y < ball._y) && (Math.abs((haut._y - mcfilet._y) - 130) > 20)) {
if (!vientdeservir) {
if ((mcfilet._y - 130) < haut._y) {
haut._y = haut._y - (_parent.dep_ordi_y - 0.5);
} else {
haut._y = haut._y + (_parent.dep_ordi_y - 0.5);
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(haut._y - ball._y) < 20) && (Math.abs(haut._x - ball._x) < 30)) {
trace("Je frappe");
if (haut._x < ball._x) {
haut.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
haut.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 30;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
} else if (_parent.jeu == "echange") {
if (ball.actif == "joueur") {
if ((mcfilet._y < ball._y) && (Math.abs(bas._x - ball._x) > 35)) {
if (ball._x < bas._x) {
bas.gotoAndPlay("courseordigauche");
bas._x = bas._x - (_parent.dep_ordi_x + 1);
} else {
bas.gotoAndPlay("courseordidroite");
bas._x = bas._x + (_parent.dep_ordi_x + 1);
}
}
if ((mcfilet._y < ball._y) && (Math.abs(bas._y - ball._y) > 25)) {
if ((ball._y - 50) < bas._y) {
bas._y = bas._y - (_parent.dep_ordi_y + 1);
} else {
bas._y = bas._y + (_parent.dep_ordi_y + 1);
}
}
} else if ((ball._y < mcfilet._y) && (Math.abs((bas._y - mcfilet._y) + 180) > 25)) {
if (!vientdeservir) {
if ((mcfilet._y + 180) < bas._y) {
bas._y = bas._y - _parent.dep_ordi_y;
} else {
bas._y = bas._y + _parent.dep_ordi_y;
}
}
}
nejouepas = false;
if (ball.rebond == 0) {
nejouepas = true;
}
if ((ball.actif == "joueur") && (!nejouepas)) {
if ((Math.abs(ball._y - bas._y) < 40) && (Math.abs(ball._x - bas._x) < 50)) {
trace("Je frappe");
if (bas._x < ball._x) {
bas.gotoAndPlay("coup_droitordi");
coup_droitordi = true;
} else {
bas.gotoAndPlay("reversordi");
coup_droitordi = false;
}
_parent.frappe.gotoAndPlay(2);
effet = 7;
limite_effet = -7;
ball.decrement_z = 0.4;
_parent.nbechange++;
ball.rebond = 0;
ball.actif = "ordi";
ball.rapidite = 75 - _parent._parent.niveau;
renvoijoueur = false;
renvoiordi = true;
ball.y = ball._y;
ball.x = ball._x;
chance = Math.random();
if ((0.5 - (_parent._parent.niveau * 0.02)) < chance) {
croise = _parent._parent.niveau + 2;
} else if ((0.75 + ((-_parent._parent.niveau) * 0.02)) < chance) {
croise = -(10 - (_parent._parent.niveau / 2));
} else {
croise = 0;
}
if (mcfilet._x >= ball.x) {
ball.vx = random(8) + croise;
} else {
ball.vx = -(random(8) + croise);
}
ball.vy = ((-ball.vy) / Math.abs(ball.vy)) * 34;
ball.gotoAndPlay(2);
}
}
if (ombreballe.hitTest(_parent.zonefilet)) {
if (ball.ycible < mcfilet._y) {
passeparfilet = true;
} else {
passeparfilet = false;
}
if (((!vientdeservir) && (((-ball._y) + Math.abs(ombreballe._y)) < 20)) && (Math.abs(mcfilet._y - ball._y) < 15)) {
Set("out" + ball.actif, true);
_parent.net.gotoAndPlay(2);
ball.gotoAndStop(1);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
if (ball.rebond == 2) {
if (ball.actif == "joueur") {
outordi = true;
} else {
outjoueur = true;
}
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
if (!vientdeservir) {
if (ball.actif == "joueur") {
if (ball.rebond == 1) {
if (!_parent.courtbas.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outjoueur = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
} else if (ball.rebond == 1) {
if (!_parent.courthaut.hitTest(ball.xrebond, ball.yrebond, true)) {
_parent.faute.gotoAndPlay(2);
outordi = true;
_parent.out.gotoAndPlay(2);
_parent.gotoAndPlay("miseajour");
gotoAndStop (1);
}
}
}
}
Symbol 627 MovieClip Frame 3
gotoAndPlay (2);
Symbol 627 MovieClip Frame 4
stop();
Symbol 631 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 2
play();
Symbol 631 MovieClip Frame 30
gotoAndStop (1);
Symbol 645 Button
on (release) {
gotoAndPlay (1);
}