Frame 116
stop();
Frame 117
stop();
Frame 118
fin = 4000;
Frame 119
Set("/:NumberOfPlayer", 4);
Set("/:GameField", 1);
field.field.gotoAndStop(/:GameField);
PlayerPerso = new Array();
PlayerType = new Array();
PlayerType[1] = 1;
PlayerType[2] = 2;
PlayerType[3] = 1;
PlayerType[4] = 1;
ActivePerso = new Array();
ActivePerso[1] = 1;
ActivePerso[2] = 1;
ActivePerso[3] = 0;
ActivePerso[4] = 0;
PlayerNames = new Array();
PlayerNames[1] = "Jacky";
PlayerNames[2] = "César";
PlayerNames[3] = "Augustine";
PlayerNames[4] = "Marius";
PlayerScores = new Array();
Set("/:publicsound", 1);
Set("/:Numberofpick", 2);
PlayerBegin = 1;
gotoAndStop (120);
Frame 120
function Array_quickSort() {
var pivot;
var fn;
if (typeof(arguments[2]) == "function") {
fn = arguments[2];
} else {
fn = function (a, b) {
return(a - b);
};
}
if (arguments[0] == null) {
var bot = 0;
} else {
var bot = arguments[0];
}
if (arguments[1] == null) {
var top = (this.length - 1);
} else {
var top = arguments[1];
}
if ((top - bot) == 1) {
if (fn(this[top], this[bot]) < 0) {
temp = this[top];
this[top] = this[bot];
this[bot] = temp;
}
} else {
while (bot < top) {
var j = bot;
var k = top;
pivot = this[bot];
while (j < k) {
while (0 < fn(this[k], pivot)) {
k--;
}
this[j] = this[k];
while ((j < k) && (0 >= fn(this[j], pivot))) {
j++;
}
this[k] = this[j];
}
this[j] = pivot;
this.quickSort(bot, j - 1, fn);
bot = j + 1;
}
}
}
function initialise() {
player.dragger._visible = 1;
player.line._visible = 1;
player.poignee._visible = 1;
distance._visible = 1;
player.perso._rotation = 0;
t = 1;
while (3 >= t) {
if (PlayerBalls[CurrentPlayer] >= t) {
scorepanel["bague" + CurrentPlayer]["boule" + (4 - t)]._visible = 1;
player["boule" + (4 - t)]._visible = 1;
} else {
scorepanel["bague" + CurrentPlayer]["boule" + (4 - t)]._visible = 0;
player["boule" + (4 - t)]._visible = 0;
}
t++;
}
if (numberOfBalls == 0) {
player.poignee.ball._xscale = 15;
player.poignee.ball._yscale = 15;
player.poignee.ball.gotoAndStop(5);
} else {
player.poignee.ball._xscale = 30;
player.poignee.ball._yscale = 30;
player.poignee.ball.gotoAndStop(CurrentPlayer);
}
scorepanel["bague" + CurrentPlayer].gotoAndStop(2);
player.perso.gotoAndStop(/:PlayerPerso[CurrentPlayer]);
if (PlayerType[CurrentPlayer] == 2) {
player.dragger._visible = 0;
player.line._visible = 0;
player.poignee._visible = 0;
distance._visible = 0;
ballNum = 1;
mystop = 0;
var ballMCName = ("ball" + ballNum);
var ballMC = _root[ballMCName];
ballMCposx = ballMC._x;
ballMCposy = ballMC._y;
PlayerPosx = player._x;
PlayerPosy = player._y;
xDiff = ballMCposx - PlayerPosx;
yDiff = ballMCposy - PlayerPosy;
xDiff = (xDiff / 3) * (random(2) + 2);
yDiff = (yDiff / 3) * (random(2) + 2);
myangle = 0;
/:numberOfBalls++;
if (/:numberOfBalls == 1) {
Set("/:speedx", ((-Math.random(5)) + Math.random(10)) + 2);
Set("/:speedy", (-Math.random(5)) - 2);
player.perso._rotation = /:speedx * 12;
} else {
player.perso._rotation = xDiff / 8;
Set("/:speedx", xDiff / 50);
Set("/:speedy", yDiff / 50);
}
waitcomputer.gotoAndPlay(2);
}
}
function makeBalls() {
ballNum = numberOfBalls;
var ballMCName = ("ball" + ballNum);
var ballMCDepth = ballNum;
_root.attachMovie("ball", ballMCName, ballMCDepth);
var ballMC = _root[ballMCName];
ballMC._x = 2000;
ballMC._y = 2000;
ballMC.PlayerName = /:PlayerNames[/:PlayerPerso[CurrentPlayer]];
ballMC.PlayerId = CurrentPlayer;
ballMC.swapDepths(100);
ballMC.dx = /:speedx;
ballMC.dy = /:speedy;
ballMC.dix = Math.abs(/:speedx / 100);
ballMC.diy = Math.abs(/:speedy / 100);
if (ballNum == 1) {
ballMC.balle.gotoAndStop(5);
PlayerBalls[CurrentPlayer]--;
radius = 2;
} else {
ballMC.balle.gotoAndStop(CurrentPlayer);
PlayerBalls[CurrentPlayer]--;
radius = 5;
}
ballMC.radius = radius;
ballMC._width = radius * 2;
ballMC._height = radius * 2;
ballMC.mass = radius / 2;
Set("/:myball", "ball" + ballNum);
playerMC = "p" + PlayerPerso[CurrentPlayer];
player.perso[playerMC].gotoAndPlay("lance");
}
function frameEvent() {
Set("/:movex", 0);
Set("/:movey", 0);
var ballNum = 1;
while (numberOfBalls >= ballNum) {
var ballMCName = ("ball" + ballNum);
var ballMC = _root[ballMCName];
if (_root[ballMC]._visible == true) {
with (ballMC) {
Set("/:movex", /:movex + Math.abs(dx));
Set("/:movey", /:movey + Math.abs(dy));
_x = _x + dx;
_y = _y + dy;
if ((_x < (borderleft + radius)) and (ballMC._currentframe == 1)) {
startsound(6);
_x = borderleft + radius;
dx = -dx;
} else if (_x < (borderleft + radius)) {
if (ballnum == 1) {
_root.gotoAndStop("invalid");
}
_visible = 0;
dx = 0;
dy = 0;
}
if (((width - radius) < _x) and (ballMC._currentframe == 1)) {
startsound(6);
_x = width - radius;
dx = -dx;
} else if ((width - radius) < _x) {
if (ballnum == 1) {
_root.gotoAndStop("invalid");
}
_visible = 0;
dx = 0;
dy = 0;
}
if ((_y < (/:bordertop + radius)) and (ballMC._currentframe == 1)) {
startsound(6);
_y = /:bordertop + radius;
dy = -dy;
} else if (_y < (/:bordertop + radius)) {
if (ballnum == 1) {
_root.gotoAndStop("invalid");
}
_visible = 0;
dx = 0;
dy = 0;
}
if ((height - radius) < _y) {
if (ballnum == 1) {
_root.gotoAndStop("invalid");
}
_visible = 0;
dx = 0;
dy = 0;
}
if ((-0.1 < dx) and (dx < 0.1)) {
dx = 0;
}
if ((dy < 0.1) and (-0.1 < dy)) {
dy = 0;
}
if (dx >= 0.1) {
dx = dx - dix;
} else if (-0.1 >= dx) {
dx = dx + dix;
}
if (dy >= 0.1) {
dy = dy - diy;
} else if (-0.1 >= dy) {
dy = dy + diy;
}
}
}
ballNum++;
}
if ((/:movex == 0) and (/:movey == 0)) {
playerMC = "p" + /:PlayerPerso[CurrentPlayer];
player.perso[playerMC].gotoAndPlay("repos");
resolveDistance(myNearestball);
if (2 < numberOfBalls) {
if ((this["ball" + myNearestball].PlayerId == CurrentPlayer) and (myNearestball != myNearestball1)) {
if (/:publicsound == 1) {
startsound(4);
startsound(5);
}
} else if (/:publicsound == 1) {
startsound(9);
}
}
myNearestball1 = myNearestball;
scorepanel["bague" + CurrentPlayer].gotoAndStop(1);
changePlayer();
if (NumberOfBalls < ((NumberOfPlayer * 3) + 1)) {
_root.gotoAndPlay("begin");
} else {
_root.gotoAndStop("end");
}
}
if ((ballMC._currentframe == 1) or (/:impact == 1)) {
checkCollisions();
}
}
function checkCollisions() {
var ballMCOldName = ("ball" + mybestway);
var ballMCOld = _root[ballMCOldName];
ballMCOld.thebest.GotoAndStop(1);
mybestway = 10000;
var ballOne = 1;
while (ballOne < numberOfBalls) {
var ballOneMCName = ("ball" + ballOne);
if (_root[ballOneMCName]._visible == true) {
var ballTwo = (ballOne + 1);
while (numberOfBalls >= ballTwo) {
var ballTwoMCName = ("ball" + ballTwo);
if (_root[ballTwoMCName]._visible == true) {
var ballMC1 = _root[ballOneMCName];
var ballMC2 = _root[ballTwoMCName];
var xDiff = (ballMC2._x - ballMC1._x);
var yDiff = (ballMC2._y - ballMC1._y);
var distanceSquared = ((xDiff * xDiff) + (yDiff * yDiff));
var sumRadius = (ballMC1.radius + ballMC2.radius);
var sumRadiusSquared = (sumRadius * sumRadius);
if (ballOne == 1) {
var myhypo = Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));
if ((myhypo < mybestway) and (myhypo < 500)) {
var ballMCOldName = ("ball" + myNearestball);
var ballMCOld = _root[ballMCOldName];
ballMCOld.thebest.GotoAndStop(1);
ballMC2.thebest.GotoAndStop(2);
mybestway = myhypo;
myNearestball = ballTwo;
myBestball = _root[ballMCOldName].PlayerId;
}
}
if (sumRadiusSquared >= distanceSquared) {
if (/:impact == 0) {
resolveCollision(ballMC1, ballMC2, xDiff, yDiff, distanceSquared);
if ((ballOneMCName eq "ball1") or (ballTwoMCName eq "ball1")) {
startsound(8);
} else {
startsound(1);
}
} else {
/:impact == 0;
if ((ballOneMCName eq "ball1") or (ballTwoMCName eq "ball1")) {
startsound(8);
} else {
startsound(1);
}
resolveImpact(ballMC1, ballMC2);
}
ballMC1._x = ballMC1._x + ballMC1.dx;
ballMC1._y = ballMC1._y + ballMC1.dy;
ballMC2._x = ballMC2._x + ballMC2.dx;
ballMC2._y = ballMC2._y + ballMC2.dy;
}
}
ballTwo++;
}
}
ballOne++;
}
}
function resolveImpact(ballA, ballB) {
ballB.dy = 2;
ballA.dy = -5;
}
function resolveCollision(ballA, ballB, collisionX, collisionY, collisionLengthSquared) {
collisionVectorLength = Math.sqrt(collisionLengthSquared);
if (collisionVectorLength == 0) {
collisionVectorLength = 1;
}
collisionNormalX = collisionX / collisionVectorLength;
collisionNormalY = collisionY / collisionVectorLength;
Acvx = (ballA.dx * collisionNormalX) + (ballA.dy * collisionNormalY);
Acvy = (ballA.dy * collisionNormalX) - (ballA.dx * collisionNormalY);
Bcvx = (ballB.dx * collisionNormalX) + (ballB.dy * collisionNormalY);
Bcvy = (ballB.dy * collisionNormalX) - (ballB.dx * collisionNormalY);
m1 = ballA.mass;
m2 = ballB.mass;
mT = m1 + m2;
Afvx = (((m1 - m2) * Acvx) + ((m2 + m2) * Bcvx)) / mT;
Bfvx = (((m1 + m1) * Acvx) + ((m2 - m1) * Bcvx)) / mT;
ballA.dx = (Afvx * collisionNormalX) - (Acvy * collisionNormalY);
ballA.dy = (collisionNormalX * Acvy) + (Afvx * collisionNormalY);
ballB.dx = (Bfvx * collisionNormalX) - (Bcvy * collisionNormalY);
ballB.dy = (collisionNormalX * Bcvy) + (Bfvx * collisionNormalY);
ballA.dix = Math.abs(ballA.dx / 100);
ballA.diy = Math.abs(ballA.dy / 100);
ballB.dix = Math.abs(ballB.dx / 100);
ballB.diy = Math.abs(ballB.dy / 100);
}
function resolveDistance(ballB) {
var ballMCName = ("ball" + ballB);
distance._x = ball1._x;
distance._y = ball1._y;
MCcoordx1 = ball1._x;
MCcoordy1 = ball1._y;
MCcoordx2 = this[ballMCName]._x;
MCcoordy2 = this[ballMCName]._y;
MCDistx = MCcoordx1 - MCcoordx2;
MCDisty = MCcoordy1 - MCcoordy2;
myheight = 100;
myhypo = Math.sqrt((MCDistx * MCDistx) + (MCDisty * MCDisty));
myscale = myhypo;
distance._yscale = myscale;
mycos = MCDisty / myhypo;
myangle = Math.acos(mycos) * 57.3;
if (0 < MCDistx) {
myangle = myangle * -1;
}
distance._rotation = myangle;
}
function computerPlay() {
_root.gotoAndPlay(5);
}
function startsound(soundtype) {
mynewsound = new Sound();
mynewsound.attachSound("sound" + soundtype);
mynewsound.start();
}
function changePlayer() {
sortscore();
wait(1);
if (1 < NumberOfBalls) {
if (NumberOfBalls < ((NumberOfPlayer * 3) + 1)) {
CurrentPos = CurrentPlayer;
Ok = 0;
do {
if ((CurrentPos == this["ball" + myNearestball].PlayerId) or (PlayerBalls[CurrentPos] < 0)) {
CurrentPos++;
}
if (NumberOfPlayer < CurrentPos) {
CurrentPos = 1;
}
if (PlayerBalls[CurrentPos] >= 0) {
CurrentPlayer = CurrentPos;
Ok = 1;
}
} while (Ok == 0);
}
}
trace(CurrentPlayer);
}
function wait(nbtime) {
mytime = getTimer();
mynewtime = 0;
do {
mynewtime = (getTimer() - mytime) / 1000;
} while (mynewtime < nbtime);
}
function sortscore() {
PlayerScoresBackup = new Array();
t = 0;
while (4 >= t) {
mystring = PlayerScores[t].toString();
myzero = "00000";
PlayerScoresBackup[t] = (mystring + myzero) + t.toString();
t++;
}
PlayerScoresBackup.sort();
t = 4;
while ((4 - NumberOfPlayer) < t) {
mycible = Number(PlayerScoresBackup[t].substr(PlayerScoresBackup[t].length - 1, 1));
_root.field["pos" + (5 - t)].gotoAndPlay(/:PlayerPerso[Number(mycible)] + 1);
t--;
}
}
function sortball() {
myhypo = new Array();
var ballMC1 = _root.ball1;
t = 2;
while (numberOfBalls >= t) {
ballTwoMCName = "ball" + t;
var ballMC2 = _root[ballTwoMCName];
var xDiff = (ballMC2._x - ballMC1._x);
var yDiff = (ballMC2._y - ballMC1._y);
mystring = Math.sqrt((xDiff * xDiff) + (yDiff * yDiff)).toString();
myhypo[t - 2] = Number(mystring.substr(0, length(mystring) - 1) + ballMC2.PlayerId.toString());
t++;
}
trace(myhypo);
myhypo.sort();
trace(myhypo);
}
function order(a, b) {
var name1 = a.split(":")[0];
var name2 = b.split(":")[0];
if (name2 < name1) {
return(-1);
}
if (name1 < name2) {
return(1);
}
return(0);
}
function Calculescore() {
var ballMCName = ("ball" + myNearestball);
WinnerBall = _root[ballMCName].PlayerId;
}
Set("/:NumberOfPlayer", 4);
PlayerScores[0] = 0;
PlayerScores[1] = 0;
PlayerScores[2] = 0;
PlayerScores[3] = 0;
PlayerScores[4] = 0;
Set("/:Gamelevel", 0);
menu1.gotoAndPlay(2);
stop();
Array.prototype.quickSort = Array_quickSort;
Array.prototype.sort = function (func) {
this.quickSort(null, null, func);
};
trace("// ALL CODES MADE BY FRANCOIS DEJARDIN FOR CROMOZONE - THANKS TO BZZZ FOR BALLS ALGORITHM - FLASHCODER LIST");
trace("// MACROMEDIA FRANCE FORUM - EMERIC - AND SO ON...");
trace("// (c)2001 Cromozone Belgium.");
Frame 121
removeMovieClip("menu1");
Frame 123
_root.field.gotoAndStop(1);
_root.attachMovie("distance", "distance", 199);
_root.attachMovie("player", "player", 200);
player._x = 319.8;
player._y = 377.1;
borderleft = 145;
bordertop = 35;
myNearestball = 1;
width = 370 + borderleft;
height = 340 + bordertop;
ballnum = 0;
field.field.gotoAndStop(GameField);
var PlayerBalls = new Array();
t = 1;
while (NumberOfPlayer >= t) {
if (t == PlayerBegin) {
PlayerBalls[t] = 3;
} else {
PlayerBalls[t] = 2;
}
t++;
}
CurrentPlayer = PlayerBegin;
player.perso.gotoAndStop(/:PlayerPerso[CurrentPlayer]);
scorepanel["bague" + CurrentPlayer].gotoAndStop(2);
_quality = "HIGH";
myplay = 0;
numberOfBalls = 0;
Frame 124
initialise();
stop();
Frame 125
player.dragger._visible = 0;
player.line._visible = 0;
player.poignee._visible = 0;
distance._visible = 0;
Instance of Symbol 313 MovieClip "frameGenerator" in Frame 125
onClipEvent (enterFrame) {
_root.frameEvent();
}
Frame 126
removeMovieClip(_root.player);
removeMovieClip(_root.distance);
endwin.swapDepths(99999);
var ballMCName = ("ball" + myNearestball);
sortball();
Playersort = new Array();
BestPlayer = 0;
Maxscore = 0;
t = 1;
while (3 >= t) {
mystring = myhypo[t - 1].toString();
Playersort[t] = Number(mystring.substr(length(mystring) - 1, 1));
if (t == 1) {
BestPlayer = Playersort[t];
}
if (Playersort[t] == BestPlayer) {
PlayerScores[Playersort[t]] = PlayerScores[Playersort[t]] + 1;
scorepanel["bague" + Playersort[t]].score = PlayerScores[Playersort[t]];
if (Maxscore < PlayerScores[Playersort[t]]) {
BestPlayer = Playersort[t];
Maxscore = PlayerScores[Playersort[t]];
}
} else {
break;
}
t++;
}
if (Maxscore >= 15) {
PlayerWin = ("Jeu gagné par " + PlayerNames[/:PlayerPerso[BestPlayer]]) + ".";
_root.field.gotoAndStop(2);
_root.endwin.gotoAndPlay(2);
} else {
Gamelevel++;
PlayerWin = ((("Manche " + Gamelevel) + " gagnée par ") + PlayerNames[/:PlayerPerso[Playersort[1]]]) + ".";
PlayerBegin = Playersort[1];
endwin.gotoAndStop(1);
}
stop();
Frame 127
removeMovieClip(_root.player);
removeMovieClip(_root.distance);
endwin.swapDepths(100);
_root.endwin.gotoAndPlay(3);
PlayerWin = "Manche annulée !!";
stop();
Symbol 24 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 2
stop();
Symbol 24 MovieClip Frame 3
stop();
Symbol 24 MovieClip Frame 4
stop();
Symbol 24 MovieClip Frame 5
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 2
_root.startsound(7);
play();
Symbol 42 MovieClip Frame 3
Symbol 42 MovieClip Frame 4
point = new object();
point.x = start._x;
point.y = start._y;
localToGlobal(point);
_root[/:myball]._x = point.x;
_root[/:myball]._y = point.y;
_root[/:myball].gotoAndPlay("lance");
Symbol 42 MovieClip Frame 12
stop();
Symbol 42 MovieClip Frame 15
stop();
Symbol 42 MovieClip Frame 31
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 2
play();
point = new object();
point.x = start._x;
point.y = start._y;
localToGlobal(point);
_root[/:myball]._x = point.x;
_root[/:myball]._y = point.y;
_root.startsound(7);
_root[/:myball].gotoAndPlay("lance");
Symbol 47 MovieClip Frame 12
stop();
Symbol 47 MovieClip Frame 16
stop();
Symbol 47 MovieClip Frame 32
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
play();
Symbol 52 MovieClip Frame 3
_root.startsound(7);
Symbol 52 MovieClip Frame 4
point = new object();
point.x = start._x;
point.y = start._y;
localToGlobal(point);
_root[/:myball]._x = point.x;
_root[/:myball]._y = point.y;
_root[/:myball].gotoAndPlay("lance");
Symbol 52 MovieClip Frame 12
stop();
Symbol 52 MovieClip Frame 15
stop();
Symbol 52 MovieClip Frame 31
stop();
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 2
play();
Symbol 57 MovieClip Frame 3
_root.startsound(7);
Symbol 57 MovieClip Frame 4
point = new object();
point.x = start._x;
point.y = start._y;
localToGlobal(point);
_root[/:myball]._x = point.x;
_root[/:myball]._y = point.y;
_root[/:myball].gotoAndPlay("lance");
Symbol 57 MovieClip Frame 11
stop();
Symbol 57 MovieClip Frame 15
stop();
Symbol 57 MovieClip Frame 30
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 3
stop();
Symbol 58 MovieClip Frame 4
stop();
Symbol 59 Button
on (press) {
startDrag (this);
Set("/:myclick", 1);
}
on (release) {
Set("/:myclick", 0);
stopDrag();
}
Symbol 61 MovieClip [player] Frame 1
stop();
Instance of Symbol 19 MovieClip "line" in Symbol 61 MovieClip [player] Frame 1
onClipEvent (enterFrame) {
if (/:myclick == 1) {
myheight = 100;
myheightfinal = Math.round(Math.abs(_parent.dragger._y * 2));
myhypo = Math.sqrt((_parent.dragger._x * _parent.dragger._x) + (_parent.dragger._y * _parent.dragger._y));
myscale = Math.round(((myhypo * 2) / myheight) * 100);
yelastic = myhypo / 2;
if (myscale >= 100) {
this._yscale = myscale;
mycos = _parent.dragger._y / myhypo;
myangle = Math.acos(mycos) * 57.3;
if (0 < _parent.dragger._x) {
myangle = myangle * -1;
}
_parent.perso._rotation = myangle;
this._rotation = myangle;
_parent.poignee._y = _parent.dragger._y;
_parent.poignee._x = _parent.dragger._x;
}
}
if ((100 < this._yscale) and (/:myclick == 0)) {
Set("/:speedx", myangle / 8);
Set("/:speedx", (-_parent.dragger._x) / 25);
Set("/:speedy", (-_parent.dragger._y) / 25);
this._yscale = 100;
this._rotation = 0;
this._x = 0;
_parent.dragger._x = 0;
_parent.dragger._y = 50;
_parent.poignee._y = _parent.dragger._y;
_parent.poignee._x = _parent.dragger._x;
/:numberOfBalls++;
_root.makeBalls();
}
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 2
stop();
Symbol 62 MovieClip Frame 3
stop();
Symbol 62 MovieClip Frame 4
stop();
Symbol 62 MovieClip Frame 5
stop();
Symbol 63 Button
on (rollOver) {
MCName = this._name;
_root[MCName].swapDepths(100);
infobulle.gotoAndStop(2);
}
on (rollOut) {
infobulle.gotoAndStop(1);
}
Symbol 65 MovieClip Frame 1
stop();
Symbol 65 MovieClip Frame 2
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 2
stop();
Symbol 70 MovieClip [ball] Frame 1
Set("/:impact", 0);
stop();
Symbol 70 MovieClip [ball] Frame 2
_root.gotoAndStop("begin1");
play();
Symbol 70 MovieClip [ball] Frame 33
Set("/:impact", 1);
_root.startsound(3);
Symbol 70 MovieClip [ball] Frame 35
Set("/:impact", 0);
MCName = this._name;
if (this._visible == true) {
_root.trace._x = _root[MCName]._x;
_root.trace._y = _root[MCName]._y;
_root.trace.gotoAndPlay(2);
}
Symbol 78 Button
on (release) {
var ballNum = 1;
while (/:numberOfBalls >= ballNum) {
var ballMCName = ("ball" + ballNum);
removeMovieClip(_root[ballMCName]);
ballNum++;
}
_root.gotoAndPlay("config");
removeMovieClip(_root.endwin);
removeMovieClip(_root.player);
_root.distance._x = 2000;
_root.distance._y = 2000;
removeMovieClip(_root.distance);
}
Symbol 81 Button
on (release) {
this.removeMovieClip();
}
Symbol 109 MovieClip Frame 10
Symbol 111 MovieClip Frame 20
gotoAndPlay (1);
Symbol 118 MovieClip Frame 1
var pourcent = 0;
var total = Math.round(_parent.getBytesTotal() / 1000);
var loaded = Math.round(_parent.getBytesLoaded() / 1000);
var animframes = anim._totalframes;
if (loaded == total) {
_parent.gotoAndPlay(_parent._currentframe + 1);
} else {
_parent.stop();
}
Symbol 118 MovieClip Frame 2
loaded = Math.round(_parent.getBytesLoaded() / 1000);
pourcent = Math.round((loaded / total) * 100);
anim.gotoAndStop(Math.round((animframes * 0.01) * pourcent));
if (loaded == total) {
_parent.gotoAndPlay(_parent._currentframe + 1);
}
Symbol 118 MovieClip Frame 3
gotoAndPlay (2);
Symbol 141 Button
on (release) {
tellTarget ("../") {
gotoAndPlay ("suite");
};
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
Symbol 153 MovieClip Frame 3
stop();
Symbol 160 Button
on (release) {
getURL ("http://www.dad.be", "_blank");
}
Symbol 165 MovieClip Frame 5
stop();
Symbol 167 MovieClip Frame 5
stop();
Symbol 169 MovieClip Frame 5
stop();
Symbol 171 MovieClip Frame 5
stop();
Symbol 172 MovieClip Frame 1
stop();
Symbol 172 MovieClip Frame 2
stop();
Symbol 172 MovieClip Frame 3
stop();
Symbol 172 MovieClip Frame 4
stop();
Symbol 172 MovieClip Frame 5
stop();
Symbol 173 MovieClip Frame 1
stop();
Symbol 173 MovieClip Frame 2
_root.sortscore();
var ballNum = 0;
while ((/:numberOfBalls + 1) >= ballNum) {
var ballMCName = ("ball" + ballNum);
removeMovieClip(_root[ballMCName]);
ballNum++;
}
removeMovieClip(_root.distance);
stop();
Symbol 174 MovieClip Frame 1
if (Number(_root.fin) == 1) {
Set("..:fin", 4000);
_parent.nextFrame();
}
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 2
_root.sortscore();
var ballNum = 0;
while ((/:numberOfBalls + 1) >= ballNum) {
var ballMCName = ("ball" + ballNum);
removeMovieClip(_root[ballMCName]);
ballNum++;
}
removeMovieClip(_root.distance);
stop();
Symbol 190 Button
on (release) {
if (/:Numberofpick >= 2) {
Set("/:NumberOfPlayer", /:Numberofpick);
d = 1;
var PlayerType = new Array();
t = 1;
while (4 >= t) {
PlayerType[t] = /:PlayerType[t];
t++;
}
n = 1;
while (/:NumberOfPlayer >= n) {
t = d;
while (4 >= t) {
if (_parent._parent.selectperso["select" + t]._currentframe == 2) {
/:PlayerPerso[n] = t;
/:PlayerType[n] = PlayerType[t];
trace((n + ":") + /:PlayerType[n]);
d = t + 1;
break;
}
t++;
}
n++;
}
_parent._parent._parent.gotoAndPlay("step2");
}
}
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 2
stop();
Instance of Symbol 197 MovieClip in Symbol 198 MovieClip Frame 1
onClipEvent (load) {
title = "Choisis tes collègues :";
}
Symbol 199 Button
on (rollOver) {
_parent.descri.gotoAndStop(perso + 1);
_parent["perso" + perso].gotoAndStop(3);
}
on (rollOut) {
_parent.descri.gotoAndStop(1);
if (/:ActivePerso[perso] == 1) {
_parent["perso" + perso].gotoAndStop(1);
} else {
_parent["perso" + perso].gotoAndStop(2);
}
}
on (release) {
/:ActivePerso[perso] = 2;
_parent._parent["type" + perso].gotoAndStop(1);
/:PlayerType[perso] = 1;
_parent._parent["type" + perso].select1.gotoAndStop(1);
_parent._parent["type" + perso].select2.gotoAndStop(2);
_parent["perso" + perso].gotoAndStop(1);
_parent["ombre" + perso]._visible = 1;
if (/:Numberofpick < /:Numberofplayer) {
/:Numberofpick++;
if (/:Numberofpick >= 2) {
_parent._parent.tableau.gobut.gotoAndStop(1);
} else {
_parent._parent.tableau.gobut.gotoAndStop(2);
}
gotoAndStop (2);
}
}
Symbol 200 Button
on (release) {
/:ActivePerso[perso] = 0;
_parent._parent["type" + perso].gotoAndStop(2);
_parent["perso" + perso].gotoAndStop(2);
_parent["ombre" + perso]._visible = 0;
/:Numberofpick--;
if (/:Numberofpick >= 2) {
_parent._parent.tableau.gobut.gotoAndStop(1);
} else {
_parent._parent.tableau.gobut.gotoAndStop(2);
}
gotoAndStop (1);
}
on (rollOver) {
_parent.descri.gotoAndStop(perso + 1);
_parent["perso" + perso].gotoAndStop(3);
}
on (rollOut) {
_parent.descri.gotoAndStop(1);
_parent["perso" + perso].gotoAndStop(1);
}
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 2
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 2
stop();
Symbol 215 MovieClip Frame 1
stop();
Symbol 215 MovieClip Frame 2
stop();
Symbol 215 MovieClip Frame 3
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 2
stop();
Symbol 218 MovieClip Frame 3
stop();
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 2
stop();
Symbol 221 MovieClip Frame 3
stop();
Symbol 225 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 2
stop();
Symbol 225 MovieClip Frame 3
stop();
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 2
stop();
Symbol 234 MovieClip Frame 3
stop();
Symbol 234 MovieClip Frame 4
stop();
Symbol 234 MovieClip Frame 5
stop();
Symbol 235 MovieClip Frame 1
t = 1;
while (4 >= t) {
if (/:ActivePerso[t] == 0) {
this["perso" + t].gotoAndStop(2);
this["ombre" + t]._visible = 0;
_parent["type" + t].gotoAndStop(2);
} else {
this["perso" + t].gotoAndStop(1);
this["ombre" + t]._visible = 1;
this["select" + t].gotoAndStop(2);
if (/:PlayerType[t] == 1) {
_parent["type" + t].select1.gotoAndStop(1);
_parent["type" + t].select2.gotoAndStop(2);
} else {
_parent["type" + t].select1.gotoAndStop(2);
_parent["type" + t].select2.gotoAndStop(1);
}
}
t++;
}
Instance of Symbol 201 MovieClip "select1" in Symbol 235 MovieClip Frame 1
onClipEvent (load) {
perso = 1;
}
Instance of Symbol 202 MovieClip "select2" in Symbol 235 MovieClip Frame 1
onClipEvent (load) {
perso = 2;
}
Instance of Symbol 203 MovieClip "select3" in Symbol 235 MovieClip Frame 1
onClipEvent (load) {
perso = 3;
}
Instance of Symbol 204 MovieClip "select4" in Symbol 235 MovieClip Frame 1
onClipEvent (load) {
perso = 4;
}
Symbol 240 Button
on (release) {
if (/:publicsound == 1) {
Set("/:publicsound", 0);
nosound._visible = 1;
} else {
Set("/:publicsound", 1);
nosound._visible = 0;
}
}
Instance of Symbol 244 MovieClip in Symbol 245 MovieClip Frame 1
onClipEvent (load) {
title = "Tu veux bouléguer sur :";
}
Symbol 250 Button
on (release) {
_parent["field" + /:GameField].gotoAndStop(1);
Set("/:GameField", 1);
_root.field.field.gotoAndStop(/:GameField);
gotoAndStop (2);
}
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
stop();
Symbol 256 Button
on (release) {
_parent["field" + /:GameField].gotoAndStop(1);
Set("/:GameField", 2);
_root.field.field.gotoAndStop(/:GameField);
gotoAndStop (2);
}
Symbol 257 MovieClip Frame 1
stop();
Symbol 257 MovieClip Frame 2
stop();
Symbol 262 Button
on (release) {
_parent["field" + /:GameField].gotoAndStop(1);
Set("/:GameField", 3);
_root.field.field.gotoAndStop(/:GameField);
gotoAndStop (2);
}
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 2
stop();
Symbol 264 MovieClip Frame 1
this["field" + /:GameField].gotoAndStop(2);
_root.field.field.gotoAndStop(/:GameField);
Symbol 271 Button
on (release) {
/:PlayerType[_parent.number] = 1;
_parent.select1.gotoAndStop(1);
gotoAndStop (2);
}
Symbol 272 Button
on (release) {
/:PlayerType[_parent.number] = 2;
_parent.select1.gotoAndStop(2);
gotoAndStop (1);
}
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 277 Button
on (release) {
/:PlayerType[_parent.number] = 2;
_parent.select2.gotoAndStop(1);
gotoAndStop (2);
}
Symbol 278 Button
on (release) {
/:PlayerType[_parent.number] = 1;
_parent.select2.gotoAndStop(2);
gotoAndStop (1);
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 2
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 2
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 2
stop();
Symbol 284 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 2
stop();
Symbol 285 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 2
stop();
Symbol 286 MovieClip Frame 1
if (/:publicsound == 1) {
nosound._visible = 0;
} else {
nosound._visible = 1;
}
Instance of Symbol 282 MovieClip "type1" in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
number = 1;
}
Instance of Symbol 283 MovieClip "type2" in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
number = 2;
}
Instance of Symbol 284 MovieClip "type3" in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
number = 3;
}
Instance of Symbol 285 MovieClip "type4" in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
number = 4;
}
Symbol 289 MovieClip Frame 1
if (/:publicsound == 1) {
nosound._visible = 0;
} else {
nosound._visible = 1;
}
Instance of Symbol 282 MovieClip "type1" in Symbol 289 MovieClip Frame 1
onClipEvent (load) {
number = 1;
}
Instance of Symbol 283 MovieClip "type2" in Symbol 289 MovieClip Frame 1
onClipEvent (load) {
number = 2;
}
Instance of Symbol 284 MovieClip "type3" in Symbol 289 MovieClip Frame 1
onClipEvent (load) {
number = 3;
}
Instance of Symbol 285 MovieClip "type4" in Symbol 289 MovieClip Frame 1
onClipEvent (load) {
number = 4;
}
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 2
play();
Symbol 291 MovieClip Frame 5
stop();
Symbol 291 MovieClip Frame 10
_root.gotoAndPlay("step2");
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
play();
Symbol 292 MovieClip Frame 40
_root.makeballs();
Symbol 297 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 2
stop();
Symbol 304 MovieClip Frame 3
stop();
Symbol 304 MovieClip Frame 4
stop();
Symbol 309 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 2
stop();
Symbol 310 MovieClip Frame 7
t = 1;
while (/:NumberOfPlayer >= t) {
duplicateMovieClip ("bague", "bague" + t, t);
MCName = "bague" + t;
MCCible = this[MCName];
MCCible._y = -25 + ((t - 1) * 65);
MCCible.PlayerName = /:PlayerNames[/:PlayerPerso[t]];
MCCible.score = /:PlayerScores[t];
MCCible.perso.gotoAndStop(/:PlayerPerso[t]);
MCCible.player = t;
t++;
}
this.bague1.gotoAndStop(2);
stop();
Symbol 311 MovieClip Frame 1
stop();
Symbol 311 MovieClip Frame 2
play();
Symbol 311 MovieClip Frame 5
stop();
Symbol 311 MovieClip Frame 10
_root.gotoAndPlay("step2");
Symbol 312 Button
on (release) {
_root.attachMovie("warning", "warning", 99999);
_root.warning._x = 280;
_root.warning._y = 195;
}
Symbol 316 Button
on (release) {
var ballNum = 1;
while (/:numberOfBalls >= ballNum) {
var ballMCName = ("ball" + ballNum);
removeMovieClip(_root[ballMCName]);
ballNum++;
}
removeMovieClip(_root.endwin);
removeMovieClip(_root.distance);
_root.gotoAndPlay("game1");
}
Symbol 319 Button
on (release) {
var ballNum = 1;
while (/:numberOfBalls >= ballNum) {
var ballMCName = ("ball" + ballNum);
removeMovieClip(_root[ballMCName]);
ballNum++;
}
t = 0;
while (4 >= t) {
/:PlayerScores[t] = 0;
_root.scorepanel["bague" + t].score = 0;
t++;
}
Set("/:Gamelevel", 0);
removeMovieClip(_root.endwin);
removeMovieClip(_root.distance);
_root.gotoAndPlay("game1");
}
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 2
stop();
Symbol 322 MovieClip Frame 3
stop();