Frame 2
if (_framesloaded == _totalframes) {
gotoAndPlay(_currentframe + 2);
} else {
play();
}
Frame 3
prevFrame();
Frame 4
play();
Frame 53
stop();
Frame 57
stop();
Frame 59
stop();
Frame 61
stop();
Frame 62
play();
Frame 63
stop();
Instance of Symbol 98 MovieClip "ombreballe" in Frame 63
/* no clip actions */
Instance of Symbol 145 MovieClip "code" in Frame 63
onClipEvent (load) {
function afficher(message) {
var pano = _parent.affichage;
pano.info = message;
pano._visible = true;
stopDrag();
pano.gotoAndStop(100);
}
function changeserveur() {
if (serveur == "player") {
serveur = "adv";
} else if (serveur == "adv") {
serveur = "player";
}
}
function razjeu() {
pointp = 0;
pointa = 0;
debutjeu = 1;
changeserveur();
numservice = 1;
}
function miseajourscore(type) {
if (_parent.affichage.info == "null") {
if (type == "gagne") {
if ((serveur == "adv") && (numservice == 1)) {
numservice = 2;
afficher(SECSERVICE);
} else if ((pointp == 3) && (2 >= pointa)) {
jeup++;
razjeu();
afficher(GAGNEJEU);
} else if ((pointp == 3) && (pointa == 4)) {
pointa--;
afficher(EGALITE);
numservice = 1;
} else if ((pointp == 4) && (pointa == 3)) {
jeup++;
razjeu();
afficher(GAGNEJEU);
} else {
pointp++;
if (pointp == 4) {
afficher(AVANTAGE + _parent.playername);
} else if (pointp == pointa) {
afficher(point[pointp] + PARTOUT);
} else {
afficher((point[pointp] + " / ") + point[pointa]);
}
numservice = 1;
}
}
if (type == "perdu") {
if ((serveur == "player") && (numservice == 1)) {
numservice = 2;
afficher(SECSERVICE);
} else if ((pointa == 3) && (2 >= pointp)) {
jeua++;
razjeu();
afficher(PERDUJEU);
} else if ((pointa == 3) && (pointp == 4)) {
pointp--;
afficher(EGALITE);
numservice = 1;
} else if ((pointa == 4) && (pointp == 3)) {
jeua++;
razjeu();
afficher(PERDUJEU);
} else {
pointa++;
if (pointa == 4) {
afficher(AVANTAGE + _parent.advname);
} else if (pointp == pointa) {
afficher(point[pointp] + PARTOUT);
} else {
afficher((point[pointp] + " / ") + point[pointa]);
}
numservice = 1;
}
}
}
_parent.scoreplayer = point[pointp];
_parent.scoreadv = point[pointa];
if (numset == 1) {
_parent.scoreset1p = jeup;
_parent.scoreset1a = jeua;
} else if (numset == 2) {
_parent.scoreset2p = jeup;
_parent.scoreset2a = jeua;
} else if (numset == 3) {
_parent.scoreset3p = jeup;
_parent.scoreset3a = jeua;
}
if ((jeup >= 6) && (jeup >= (jeua + 2))) {
jeup = 0;
jeua = 0;
numset++;
setp++;
afficher(GAGNESET);
} else if ((jeua >= 6) && (jeua >= (jeup + 2))) {
jeup = 0;
jeua = 0;
numset++;
seta++;
afficher(PERDUSET);
}
if (setp == _parent.NBRESET) {
afficher(GAGNEMATCH);
} else if (seta == _parent.NBRESET) {
afficher(PERDUMATCH);
}
}
function effacer() {
_parent.affichage._visible = false;
_parent.affichage.info = "null";
}
function initballe() {
_parent.adv._x = 350;
_parent.ombreballe._x = 350;
if (serveur == "player") {
_parent.ombreballe._y = 320;
angleballe = (Math.PI/2);
}
if (serveur == "adv") {
_parent.ombreballe._y = 70;
angleballe = 4.71238898038469;
}
vitballex = 0;
vitballey = 0;
distz = 80;
zmax = 80;
ampRebond = 10;
nbreRebond = 0;
firstRebond = "null";
touche = "null";
service = 1;
}
this._alpha = 0;
startDrag (_parent.player, true, 0, 164, 600, 400);
name = new Array("Pete", "Michael", "André", "Boris", "Yannick", "Sébastien", "Henri", "Andre", "Cédric", "Arthur", "Patrick", "Cédric", "John", "Marcello");
_parent.advname = name[random(name.length)];
PERDUJEU = "Jeu " + _parent.advname;
PERDUSET = "Set " + _parent.advname;
PERDUMATCH = _parent.advname + " gagne";
EGALITE = "Egalité";
GAGNEJEU = "Jeu " + _parent.playername;
GAGNESET = "Set " + _parent.playername;
GAGNEMATCH = _parent.playername + " gagne";
PARTOUT = " partout";
AVANTAGE = "Avantage ";
SECSERVICE = "Second Service";
SERVEPLAYER = "service " + _parent.playername;
SERVEADV = "service " + _parent.advname;
point = new Array(0, 15, 30, 40, "Adv");
debutjeu = 0;
pointp = 0;
pointa = 0;
jeup = 0;
jeua = 0;
setp = 0;
seta = 0;
numset = 1;
serveur = "player";
numservice = 1;
_parent.scoreset1p = 0;
_parent.scoreset1a = 0;
_parent.scoreset2p = "";
_parent.scoreset2a = "";
_parent.scoreset3p = "";
_parent.scoreset3a = "";
fotemps = 0;
coef = 0.178196305686346;
orig = 100 - (coef * 325);
tailleTab = 4;
mouseTab = new Array(tailleTab);
i = 0;
while ((tailleTab - 1) >= i) {
mouseTab[i] = 0;
i++;
}
tailleTab2 = 16;
balleTab = new Array(tailleTab2);
i = 0;
while ((tailleTab2 - 1) >= i) {
balleTab[i] = 0;
i++;
}
initballe();
effacer();
}
onClipEvent (mouseUp) {
if ((setp == _parent.NBRESET) || (seta == _parent.NBRESET)) {
_parent.play();
} else if (debutjeu == 1) {
if (serveur == "player") {
afficher(SERVEPLAYER);
}
if (serveur == "adv") {
afficher(SERVEADV);
}
debutjeu = 0;
} else if (_parent.affichage.info != "null") {
effacer();
initballe();
startDrag (_parent.player, true, 0, 164, 600, 400);
}
}
onClipEvent (enterFrame) {
fotemps++;
temps = fotemps / 24;
_parent.ombreballe._xscale = (_parent.ombreballe._y * coef) + orig;
_parent.ombreballe._yscale = _parent.ombreballe._xscale;
_parent.balle._xscale = (_parent.balle._y * coef) + orig;
_parent.balle._yscale = _parent.balle._xscale;
_parent.player._xscale = (_parent.player._y * coef) + orig;
_parent.player._yscale = _parent.player._xscale;
_parent.adv._xscale = (_parent.adv._y * coef) + orig;
_parent.adv._yscale = _parent.adv._xscale;
_parent.adv._y = 45;
destx = _parent.ombreballe._x - Math.sqrt(Math.pow((_parent.ombreballe._y - _parent.adv._y) / Math.sin(angleballe), 2) - Math.pow(_parent.ombreballe._y - _parent.adv._y, 2));
if ((_parent.adv._x >= (destx - 5)) && ((destx + 5) >= _parent.adv._x)) {
_parent.adv._x = destx;
} else if (destx < _parent.adv._x) {
_parent.adv._x = _parent.adv._x - 5;
} else if (_parent.adv._x < destx) {
_parent.adv._x = _parent.adv._x + 5;
}
_parent.ombreballe._x = _parent.ombreballe._x + (vitballex * Math.cos(angleballe));
_parent.ombreballe._y = _parent.ombreballe._y + (vitballey * Math.sin(angleballe));
if (service == 0) {
distz = Math.abs(zmax * Math.sin(fotemps / ampRebond));
}
_parent.balle._x = _parent.ombreballe._x;
_parent.balle._y = _parent.ombreballe._y - distz;
if (0 < vitballex) {
vitballex = vitballex - (vitballex / 40);
} else {
vitballex = 0;
}
if (0 < vitballey) {
vitballey = vitballey - (vitballey / 40);
} else {
vitballey = 0;
}
if (_parent.player.hitTest(_parent.balle) && (touche != "player")) {
_parent.player.gotoAndPlay("frappe");
dx = (mouseTab[tailleTab - 2] - mouseTab[0]) / 1;
dy = (mouseTab[tailleTab - 1] - mouseTab[1]) / 3;
if (dx >= 0) {
angleballe = Math.PI - Math.atan2((-dy) * 3, dx);
} else {
angleballe = Math.atan2((-dy) * 3, -dx);
}
vitballex = Math.abs(dx / 2);
if (service == 1) {
vitballey = 12 + (dy / 8);
} else {
vitballey = 10 + (dy / 5);
}
ampRebond = 10;
fotemps = (Math.PI * ampRebond) / 4;
zmax = distz + 30;
nbreRebond = 0;
firstRebond = "null";
service = 0;
touche = "player";
}
if (_parent.adv.hitTest(_parent.ombreballe) && (touche != "adv")) {
_parent.adv.gotoAndPlay("frappe");
angleballe = angleballe * -1;
vitballex = 10;
vitballey = 10;
ampRebond = 10;
fotemps = (Math.PI * ampRebond) / 4;
zmax = distz + 30;
nbreRebond = 0;
firstRebond = "null";
touche = "adv";
} else if ((serveur == "adv") && (service == 1)) {
_parent.adv.gotoAndPlay("frappe");
angleballe = angleballe * -1;
vitballex = 10;
vitballey = 8;
ampRebond = 10;
fotemps = (Math.PI * ampRebond) / 4;
zmax = distz;
nbreRebond = 0;
firstRebond = "null";
service = 0;
touche = "adv";
}
if ((((((572 >= _parent.ombreballe._x) && (_parent.ombreballe._x >= 118)) && (160 >= _parent.ombreballe._y)) && (_parent.ombreballe._y >= 140)) && (36 >= distz)) && (touche != "filet")) {
_parent.filet.play();
if (touche == "player") {
miseajourscore("perdu");
}
if (touche == "adv") {
miseajourscore("gagne");
}
angleballe = angleballe * -1;
vitballex = 4;
vitballey = 4;
touche = "filet";
}
if ((((700 < _parent.ombreballe._x) || (_parent.ombreballe._x < 0)) || (400 < _parent.ombreballe._y)) || (_parent.ombreballe._y < 0)) {
if (nbreRebond == 0) {
if (touche == "player") {
miseajourscore("perdu");
}
if (touche == "adv") {
miseajourscore("gagne");
}
}
if (nbreRebond == 1) {
if (touche == "player") {
if (((firstRebond == "t2") || (firstRebond == "t4")) || (firstRebond == "t5")) {
miseajourscore("gagne");
} else {
miseajourscore("perdu");
}
}
if (touche == "adv") {
if (((firstRebond == "t6") || (firstRebond == "t7")) || (firstRebond == "t8")) {
miseajourscore("perdu");
} else {
miseajourscore("gagne");
}
}
}
}
if (8 < distz) {
ressort = 0;
}
i = 1;
while (9 >= i) {
part = _parent["t" + i];
if ((part.hitTest(_parent.ombreballe._x, _parent.ombreballe._y, true) && (8 >= distz)) && (ressort == 0)) {
ressort = 1;
nbreRebond = nbreRebond + 1;
if (nbreRebond == 1) {
firstRebond = "t" + i;
if (touche == "player") {
if (((firstRebond == "t1") || (firstRebond == "t3")) || (firstRebond == "t9")) {
miseajourscore("perdu");
} else if (((firstRebond == "t6") || (firstRebond == "t7")) || (firstRebond == "t8")) {
miseajourscore("perdu");
} else {
numservice = 0;
}
}
if (touche == "adv") {
if (((firstRebond == "t1") || (firstRebond == "t3")) || (firstRebond == "t9")) {
miseajourscore("gagne");
} else if (((firstRebond == "t2") || (firstRebond == "t4")) || (firstRebond == "t5")) {
miseajourscore("gagne");
} else {
numservice = 0;
}
}
}
if (nbreRebond == 2) {
if (touche == "player") {
if (((firstRebond == "t2") || (firstRebond == "t4")) || (firstRebond == "t5")) {
miseajourscore("gagne");
} else {
miseajourscore("perdu");
}
}
if (touche == "adv") {
if (((firstRebond == "t6") || (firstRebond == "t7")) || (firstRebond == "t8")) {
miseajourscore("perdu");
} else {
miseajourscore("gagne");
}
}
}
zmax = zmax - (zmax / 10);
if (1 >= zmax) {
zmax = 0;
}
} else {
part.gotoAndStop(1);
}
i++;
}
mouseTab.pop();
mouseTab.pop();
mouseTab.splice(0, 0, _parent._ymouse);
mouseTab.splice(0, 0, _parent._xmouse);
i = 0;
while ((tailleTab2 - 1) >= i) {
_parent.balle.duplicateMovieClip("balle" + i, i + 150);
_parent["balle" + i]._x = balleTab[i];
_parent["balle" + i]._y = balleTab[i + 1];
_parent["balle" + i]._alpha = ((tailleTab2 - i) * 80) / tailleTab2;
i = i + 2;
}
balleTab.pop();
balleTab.pop();
balleTab.splice(0, 0, _parent.balle._y);
balleTab.splice(0, 0, _parent.balle._x);
}
Frame 64
gotoAndStop (53);
Symbol 12 MovieClip Frame 48
play();
Symbol 25 Button
on (release) {
play();
}
Symbol 45 Button
on (release) {
NBRESET = 1;
_currentframe = 5;
play();
}
Symbol 49 Button
on (release) {
NBRESET = 2;
_currentframe = 5;
play();
}
Symbol 55 Button
on (release) {
_quality = "HIGH";
_currentframe = 7;
play();
}
Symbol 59 Button
on (release) {
_quality = "MEDIUM";
_currentframe = 7;
play();
}
Symbol 63 Button
on (release) {
_quality = "LOW";
_currentframe = 7;
play();
}
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
play();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 2
play();
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 2
play();
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
play();
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 2
play();
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 2
play();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
play();
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 2
play();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
stop();
Symbol 116 MovieClip Frame 6
gotoAndPlay (1);
Symbol 126 MovieClip Frame 6
gotoAndPlay (1);