Instance of Symbol 72 MovieClip "preloader" in Frame 1
onClipEvent (load) {
var path = _root;
var label = "intro";
var xmlOK = false;
var loadOK = false;
outLoaded = "";
outTotal = "";
outPercent = "";
preload.barre._width = 0;
var largeur = preload.stroke._width;
msg1.outState = "chargement en cours...";
msg2.outState = "";
}
onClipEvent (enterFrame) {
loaded = Math.round(path.getBytesLoaded() / 1024);
total = Math.round(path.getBytesTotal() / 1024);
percent = Math.round((loaded / total) * 100);
outTotal = total + " ko";
outLoaded = (loaded + " ko / ") + outTotal;
if (percent > 0) {
curseur.outPercent = int(percent) + " %";
}
preload.barre._width = largeur * (percent / 100);
if (percent == 100) {
msg1.outState = "chargement : ok !";
loadOK = true;
}
if (loadOK) {
path.gotoAndPlay(label);
}
}
Frame 2
date = new Date();
copyright = "\u00A9 Dupuis, " + date.getFullYear();
level = 0;
score = 0;
record = 0;
stop();
Frame 4
function CompteARebour() {
var _local1 = this;
Tps = Math.round(tpsIntro - ((getTimer() - Temps) / 1000));
if (tps < 1) {
tps = 0;
if (record < score) {
record = score;
}
i = 0;
while (i < PosiPiece) {
_local1["Piece" + i]._y = 1000;
score = score + (tps * level);
removeMovieClip(_local1["Piece" + i]);
i++;
}
Bruitage("Perdu");
PB._x = 1000;
PB._y = 1000;
gotoAndPlay (80);
}
}
function bruitage(soundName) {
this.soundfx = new Sound(this);
soundfx.attachSound(soundName);
soundfx.start();
}
function DeplacePiece() {
var _local1 = this;
x = _root._xmouse;
y = _root._ymouse;
i = 0;
while (i < PosiPiece) {
if (_local1["Piece" + i].hitTest(x, y, true)) {
dragpart = i;
NatureP = Combi[(i * 2) - 1];
if (((i * 2) - 1) < 0) {
NatureP = 0;
}
CaseP = Combi[i * 2];
PosiC = i * 2;
Combi[i * 2] = 100;
offsetx = _local1["Piece" + i]._x - x;
offsety = _local1["Piece" + i]._y - y;
ReplaceX = _local1["Piece" + i]._x;
ReplaceY = _local1["Piece" + i]._y;
Col = Math.round((ReplaceX - OriX) / TailleCaseX);
Lig = Math.round((ReplaceY - OriY) / TailleCaseY);
trace("Col :" + Col);
trace("Lig :" + Lig);
_local1["Piece" + i].duplicateMovieClip("PB", 2000);
PB._x = _local1["Piece" + i]._x;
PB._y = _local1["Piece" + i]._y;
PB.gotoAndStop(3);
PieceBG = OriX + (0 * TailleCaseX);
PieceBD = OriX + (6 * TailleCaseX);
PieceBH = OriY + (0 * TailleCaseY);
PieceBB = OriY + (6 * TailleCaseY);
if (NatureP == 0) {
Testligne(Lig, 6, CaseP, 2);
}
if (NatureP == 1) {
Testcolonne(Col, 4, CaseP, 2);
}
if (NatureP == 2) {
Testligne(Lig, 4, CaseP, 2);
}
if (NatureP == 3) {
Testcolonne(Col, 3, CaseP, 3);
}
if (NatureP == 4) {
Testligne(Lig, 3, CaseP, 3);
}
if (NatureP == 0) {
Bruitage("Accelere");
} else {
zz = random(3) + 1;
if (zz == 1) {
Bruitage("CliquerA");
}
if (zz == 2) {
Bruitage("CliquerB");
}
if (zz == 3) {
Bruitage("CliquerC");
}
}
return;
}
i++;
}
}
function MiseAjourCaseP() {
var _local1 = this;
if (_local1["Piece" + dragPart]._x < PieceBG) {
_local1["Piece" + dragPart]._x = PieceBG;
}
if (_local1["Piece" + dragPart]._x > PieceBD) {
_local1["Piece" + dragPart]._x = PieceBD;
}
if (_local1["Piece" + dragPart]._y < PieceBH) {
_local1["Piece" + dragPart]._y = PieceBH;
}
if (_local1["Piece" + dragPart]._y > PieceBB) {
_local1["Piece" + dragPart]._y = PieceBB;
}
ReplaceX = _local1["Piece" + dragPart]._x;
ReplaceY = _local1["Piece" + dragPart]._y;
Col = Math.round((ReplaceX - OriX) / TailleCaseX);
Lig = Math.round((ReplaceY - OriY) / TailleCaseY);
_local1["Piece" + dragPart]._x = OriX + (Col * TailleCaseX);
_local1["Piece" + dragPart]._y = OriY + (Lig * TailleCaseY);
_local1["Piece" + dragPart].gotoAndStop(1);
NumCaseC = (Lig * 6) + Col;
if (NumCaseC < 0) {
NumCaseC = 0;
}
Combi[PosiC] = NumCaseC;
PB._x = 1000;
PB._y = 1000;
trace(Combi);
}
function Testligne(LigneT, limD, CaseCou, long) {
var _local1 = LigneT;
var _local2 = long;
var _local3 = limD;
NumCas = 0;
a = 0;
b = _local3;
while (NumCas < 6) {
ii = 0;
while (ii < PosiPiece) {
TestC = NumCas + (_local1 * 6);
TestC2 = NumCas + ((_local1 - 1) * 6);
TestC3 = NumCas + ((_local1 - 2) * 6);
if (((Combi[ii * 2] == TestC) or (((Combi[ii * 2] == TestC2) and (_local1 > 0)) and ((Combi[(ii * 2) - 1] == 1) or (Combi[(ii * 2) - 1] == 3)))) or (((Combi[ii * 2] == TestC3) and (Combi[(ii * 2) - 1] == 3)) and (_local1 > 1))) {
longP = 1;
if ((((ii * 2) - 1) < 0) or (Combi[(ii * 2) - 1] == 2)) {
longP = 2;
}
if (Combi[(ii * 2) - 1] == 4) {
longP = 3;
}
if (TestC < CaseCou) {
a = NumCas + longP;
}
if ((((TestC > CaseCou) and (b == _local3)) and ((NumCas - _local2) >= a)) and ((NumCas - _local2) <= _local3)) {
b = NumCas - _local2;
}
}
ii++;
}
NumCas++;
}
PieceBG = OriX + (a * 51);
trace("a " + a);
PieceBD = OriX + (b * 51);
trace("b " + b);
}
function Testcolonne(ColonneT, limB, CaseCou, long) {
var _local1 = ColonneT;
var _local2 = long;
var _local3 = limB;
NumCas = 0;
a = 0;
b = _local3;
while (NumCas < 30) {
ii = 0;
while (ii < PosiPiece) {
TestC = _local1 + (NumCas * 6);
TestC2 = (_local1 - 1) + (NumCas * 6);
TestC3 = (_local1 - 2) + (NumCas * 6);
if (((Combi[ii * 2] == TestC) or (((Combi[ii * 2] == TestC2) and (_local1 > 0)) and (((((ii * 2) - 1) < 0) or (Combi[(ii * 2) - 1] == 2)) or (Combi[(ii * 2) - 1] == 4)))) or (((Combi[ii * 2] == TestC3) and (Combi[(ii * 2) - 1] == 4)) and (_local1 > 1))) {
longP = 1;
if (Combi[(ii * 2) - 1] == 1) {
longP = 2;
}
if (Combi[(ii * 2) - 1] == 3) {
longP = 3;
}
if (TestC < CaseCou) {
a = NumCas + longP;
}
if ((((TestC > CaseCou) and (b == _local3)) and ((NumCas - _local2) >= a)) and ((NumCas - _local2) <= _local3)) {
b = NumCas - _local2;
}
}
ii++;
}
NumCas++;
}
PieceBH = OriY + (a * 51);
trace("a " + a);
PieceBB = OriY + (b * 51);
trace("b " + b);
}
function TesteDeplace() {
var _local1 = this;
if (((NatureP == 0) or (NatureP == 2)) or (NatureP == 4)) {
_local1["Piece" + dragPart]._x = _root._xmouse + offsetx;
}
if ((NatureP == 1) or (NatureP == 3)) {
_local1["Piece" + dragPart]._y = _root._ymouse + offsety;
}
if (_local1["Piece" + dragPart]._x < PieceBG) {
_local1["Piece" + dragPart]._x = PieceBG;
}
if (_local1["Piece" + dragPart]._x > PieceBD) {
_local1["Piece" + dragPart]._x = PieceBD;
}
if (_local1["Piece" + dragPart]._y < PieceBH) {
_local1["Piece" + dragPart]._y = PieceBH;
}
if (_local1["Piece" + dragPart]._y > PieceBB) {
_local1["Piece" + dragPart]._y = PieceBB;
}
PB._x = _local1["Piece" + i]._x;
PB._y = _local1["Piece" + i]._y;
}
function TesteGagne() {
var _local1 = this;
if (NumCaseC > 16) {
Bruitage("Gagne");
i = 0;
while (i < PosiPiece) {
_local1["Piece" + i]._y = 1000;
removeMovieClip(_local1["Piece" + i]);
i++;
}
score = score + (tps * level);
if (level < 30) {
gotoAndPlay (5);
}
if (level == 30) {
gotoAndPlay (81);
}
}
}
function ArchitectGrille() {
Liste = [];
if (level == 1) {
Liste.push([15, 3, 5, 2, 22, 3, 21, 2, 30, 2, 0]);
}
if (level == 2) {
Liste.push([13, 2, 0, 1, 6, 3, 18, 4, 33, 3, 9, 2, 28, 3, 4, 1, 5, 1, 17]);
}
if (level == 3) {
Liste.push([13, 2, 18, 3, 15, 3, 11, 1, 25, 2, 34]);
}
if (level == 4) {
Liste.push([13, 2, 0, 3, 12, 3, 3, 4, 30, 4, 21]);
}
if (level == 5) {
Liste.push([12, 1, 0, 3, 2, 2, 3, 3, 5, 1, 10, 4, 18, 4, 30]);
}
if (level == 6) {
Liste.push([15, 2, 0, 3, 2, 1, 3, 2, 4, 3, 17, 2, 18, 2, 20, 1, 27, 2, 34]);
}
if (level == 7) {
Liste.push([13, 2, 19, 1, 12, 2, 1, 2, 7, 1, 3, 3, 15, 3, 16, 3, 17, 1, 26, 4, 33]);
}
if (level == 8) {
Liste.push([13, 1, 12, 1, 24, 2, 19, 1, 25, 1, 26, 3, 15, 2, 8, 1, 11, 2, 28, 4, 33, 4, 3]);
}
if (level == 9) {
Liste.push([12, 1, 0, 3, 2, 2, 3, 3, 5, 1, 10, 4, 18, 4, 24, 4, 30]);
}
if (level == 10) {
Liste.push([15, 1, 13, 1, 3, 2, 4, 2, 21, 1, 17, 1, 27, 1, 28, 1, 29]);
}
if (level == 11) {
Liste.push([14, 1, 0, 1, 1, 1, 2, 2, 4, 2, 10, 1, 16, 1, 17, 2, 30, 1, 26, 2, 20, 2, 27]);
}
if (level == 12) {
Liste.push([12, 2, 0, 2, 6, 2, 18, 2, 24, 2, 30, 1, 2, 1, 14, 4, 26, 4, 32, 2, 21, 3, 23, 1, 3, 1, 4]);
}
if (level == 13) {
Liste.push([12, 1, 0, 4, 1, 2, 7, 3, 9, 2, 10, 1, 14, 2, 18, 4, 24, 4, 30, 1, 16, 1, 17]);
}
if (level == 14) {
Liste.push([14, 2, 0, 1, 2, 2, 9, 1, 16, 1, 17, 1, 18, 1, 19, 2, 30, 2, 20, 2, 27, 1, 26]);
}
if (level == 15) {
Liste.push([14, 2, 0, 1, 2, 2, 9, 1, 12, 1, 13, 2, 20, 1, 16, 1, 17, 1, 26, 2, 27, 2, 30]);
}
if (level == 16) {
Liste.push([13, 3, 0, 2, 1, 2, 7, 3, 3, 4, 20, 1, 26, 2, 27, 4, 33]);
}
if (level == 17) {
Liste.push([12, 1, 1, 2, 2, 1, 4, 1, 16, 2, 18, 1, 14, 4, 26]);
}
if (level == 18) {
Liste.push([15, 1, 12, 1, 2, 4, 3, 2, 9, 3, 11, 1, 21, 2, 28, 1, 26, 4, 33]);
}
if (level == 19) {
Liste.push([13, 2, 0, 1, 2, 3, 3, 3, 6, 4, 19, 4, 31]);
}
if (level == 20) {
Liste.push([12, 2, 6, 1, 2, 4, 3, 1, 14, 3, 11, 2, 21, 2, 28, 4, 30, 1, 27]);
}
if (level == 21) {
Liste.push([12, 4, 0, 1, 15, 1, 14, 2, 18, 1, 24, 1, 26, 2, 33, 3, 23, 2, 27]);
}
if (level == 22) {
Liste.push([12, 2, 0, 2, 6, 2, 3, 3, 5, 1, 10, 4, 21, 1, 18, 1, 19, 2, 30, 3, 20]);
}
if (level == 23) {
Liste.push([12, 2, 0, 2, 2, 1, 4, 3, 5, 2, 6, 1, 8, 3, 18, 4, 21, 1, 27, 2, 28, 2, 34, 1, 25]);
}
if (level == 24) {
Liste.push([12, 1, 0, 1, 1, 4, 3, 1, 9, 4, 18, 1, 24, 1, 26, 2, 33, 3, 16, 1, 17, 1, 29]);
}
if (level == 25) {
Liste.push([12, 1, 2, 2, 3, 2, 9, 1, 14, 1, 18, 4, 30, 3, 21, 2, 22, 3, 5]);
}
if (level == 26) {
Liste.push([12, 1, 0, 1, 1, 2, 2, 1, 8, 1, 10, 2, 21, 4, 25, 2, 32, 1, 28]);
}
if (level == 27) {
Liste.push([13, 3, 0, 1, 2, 4, 3, 1, 9, 2, 19, 2, 21, 2, 31, 2, 33, 3, 11]);
}
if (level == 28) {
Liste.push([12, 1, 0, 4, 1, 3, 5, 1, 16, 4, 18, 1, 26, 1, 21, 2, 33, 2, 28, 1, 9]);
}
if (level == 29) {
Liste.push([15, 1, 0, 1, 2, 4, 3, 2, 9, 3, 11, 2, 21, 2, 28, 4, 30, 1, 27, 1, 20]);
}
if (level == 30) {
Liste.push([14, 2, 0, 2, 2, 3, 4, 3, 5, 3, 12, 3, 13, 2, 30, 1, 26, 1, 27, 2, 28, 2, 34]);
}
if (level == 2) {
Liste.push([12, 1, 3, 2, 4]);
}
}
function FabrikGrille() {
Combi = Liste[0];
CoordPB = Combi[0];
PlacePiece(0, CoordPB);
PosiPiece++;
longL = Combi.length;
i = 1;
while (i < longL) {
NatureP = Combi[i];
CoordP = Combi[i + 1];
PlacePiece(NatureP, CoordP);
PosiPiece++;
i = i + 2;
}
}
function PlacePiece(Piece, NumCase) {
var _local1 = Piece;
if (_local1 > 0) {
attachMovie("Type" + _local1, "Piece" + PosiPiece, 1000 + PosiPiece);
}
if (_local1 == 0) {
attachMovie("Type" + _local1, "Piece" + PosiPiece, 1050 + PosiPiece);
}
PieceCou = this["Piece" + PosiPiece];
NumCasex = NumCase;
NumCasey = 0;
NumCas = NumCase;
while (NumCas > 5) {
NumCasey++;
NumCas = NumCas - 6;
NumCasex = NumCas;
}
PieceCou._x = OriX + (NumCasex * TailleCaseX);
PieceCou._y = OriY + (NumCasey * TailleCaseY);
}
level++;
OriX = 132;
OriY = 68;
TailleCaseX = 51;
TailleCaseY = 52;
PosiPiece = 0;
ArchitectGrille();
FabrikGrille();
tps = 120;
tpsIntro = 120;
Temps = getTimer();
dragPart = -1;
stop();
Instance of Symbol 174 MovieClip in Frame 4
onClipEvent (mouseDown) {
_parent.DeplacePiece();
}
onClipEvent (enterFrame) {
if (_parent.dragPart > -1) {
_parent.TesteDeplace();
}
_parent.CompteARebour();
}
onClipEvent (mouseUp) {
if (_parent.dragPart > -1) {
_parent.MiseAjourCaseP();
}
if (_parent.dragPart == 0) {
_parent.TesteGagne();
}
_parent.dragPart = -1;
}
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Instance of Symbol 177 MovieClip in Frame 4
/* no clip actions */
Frame 5
levela = level + 1;
Frame 46
if (level == 1) {
this.code_txt = "fatigue";
}
if (level == 2) {
this.code_txt = "pomme";
}
if (level == 3) {
this.code_txt = "milkshake";
}
if (level == 4) {
this.code_txt = "sueur";
}
if (level == 5) {
this.code_txt = "muscles";
}
if (level == 6) {
this.code_txt = "dur";
}
if (level == 7) {
this.code_txt = "chaud";
}
if (level == 8) {
this.code_txt = "ouch";
}
if (level == 9) {
this.code_txt = "effort";
}
if (level == 10) {
this.code_txt = "super";
}
if (level == 11) {
this.code_txt = "trop";
}
if (level == 12) {
this.code_txt = "blaireau";
}
if (level == 13) {
this.code_txt = "caisses";
}
if (level == 14) {
this.code_txt = "scooter";
}
if (level == 15) {
this.code_txt = "pneu";
}
if (level == 16) {
this.code_txt = "mouche";
}
if (level == 17) {
this.code_txt = "pied";
}
if (level == 18) {
this.code_txt = "trou";
}
if (level == 19) {
this.code_txt = "vache";
}
if (level == 20) {
this.code_txt = "moule";
}
if (level == 21) {
this.code_txt = "boss";
}
if (level == 22) {
this.code_txt = "toto";
}
if (level == 23) {
this.code_txt = "roux";
}
if (level == 24) {
this.code_txt = "mega";
}
if (level == 25) {
this.code_txt = "arg";
}
if (level == 26) {
this.code_txt = "las";
}
if (level == 27) {
this.code_txt = "oufti";
}
if (level == 28) {
this.code_txt = "presque";
}
if (level == 29) {
this.code_txt = "fini";
}
if (level == 30) {
this.code_txt = "hourra";
}
Frame 79
gotoAndPlay (4);
Frame 80
stop();
Frame 81
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 22 MovieClip Frame 3
stop();
Symbol 23 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 24 MovieClip [Type1] Frame 1
stop();
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 2
stop();
Symbol 32 MovieClip Frame 3
stop();
Symbol 33 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 34 MovieClip [Type2] Frame 1
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 43 MovieClip Frame 3
stop();
Symbol 44 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 46 MovieClip [Type0] Frame 1
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 2
stop();
Symbol 53 MovieClip Frame 3
stop();
Symbol 54 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 55 MovieClip [Type3] Frame 1
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 3
stop();
Symbol 59 Button
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 60 MovieClip [Type4] Frame 1
stop();
Symbol 86 Button
on (release) {
getURL ("www.dupuis.com");
}
Symbol 106 Button
on (press) {
gotoAndPlay (4);
}
Symbol 109 Button
on (release) {
gotoAndStop (3);
}
Symbol 120 Button
on (release) {
if (_root.code == "fatigue") {
level = 1;
gotoAndPlay (4);
}
if (_root.code == "pomme") {
level = 2;
gotoAndPlay (4);
}
if (_root.code == "milkshake") {
level = 3;
gotoAndPlay (4);
}
if (_root.code == "sueur") {
level = 4;
gotoAndPlay (4);
}
if (_root.code == "muscles") {
level = 5;
gotoAndPlay (4);
}
if (_root.code == "dur") {
level = 6;
gotoAndPlay (4);
}
if (_root.code == "chaud") {
level = 7;
gotoAndPlay (4);
}
if (_root.code == "ouch") {
level = 8;
gotoAndPlay (4);
}
if (_root.code == "effort") {
level = 9;
gotoAndPlay (4);
}
if (_root.code == "super") {
level = 10;
gotoAndPlay (4);
}
if (_root.code == "trop") {
level = 11;
gotoAndPlay (4);
}
if (_root.code == "blaireau") {
level = 12;
gotoAndPlay (4);
}
if (_root.code == "caisses") {
level = 13;
gotoAndPlay (4);
}
if (_root.code == "scooter") {
level = 14;
gotoAndPlay (4);
}
if (_root.code == "pneu") {
level = 15;
gotoAndPlay (4);
}
if (_root.code == "mouche") {
level = 16;
gotoAndPlay (4);
}
if (_root.code == "pied") {
level = 17;
gotoAndPlay (4);
}
if (_root.code == "trou") {
level = 18;
gotoAndPlay (4);
}
if (_root.code == "vache") {
level = 19;
gotoAndPlay (4);
}
if (_root.code == "moule") {
level = 20;
gotoAndPlay (4);
}
if (_root.code == "boss") {
level = 21;
gotoAndPlay (4);
}
if (_root.code == "toto") {
level = 22;
gotoAndPlay (4);
}
if (_root.code == "roux") {
level = 23;
gotoAndPlay (4);
}
if (_root.code == "mega") {
level = 24;
gotoAndPlay (4);
}
if (_root.code == "arg") {
level = 25;
gotoAndPlay (4);
}
if (_root.code == "las") {
level = 26;
gotoAndPlay (4);
}
if (_root.code == "oufti") {
level = 27;
gotoAndPlay (4);
}
if (_root.code == "presque") {
level = 28;
gotoAndPlay (4);
}
if (_root.code == "fini") {
level = 29;
gotoAndPlay (4);
}
}
Symbol 130 Button
on (release, keyPress "<Enter>") {
if (inName != "") {
_root.pseudo = inName;
scoring.recup(_root.score, 1);
}
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 1
stop();
Instance of Symbol 144 MovieClip "body" in Symbol 145 MovieClip Frame 1
onClipEvent (load) {
function flip() {
n = !n;
(n ? ((col = 1)) : ((col = 2)));
return(col);
}
function build() {
var _local3 = this;
max = chemin.groupOBJ[0].enfant.length - 1;
obj = "item";
var _local1 = 0;
for (k in listMC) {
_local3[listMC[k]].removeMovieClip();
}
listMC = new Array();
item.gotoAndStop("on");
var inity = _local3[obj]._y;
var inith = _local3[obj]._height;
var _local2 = 0;
while (_local2 < 50) {
duplicateMovieClip (obj, obj + _local1, _local1);
_local3[obj + _local1]._y = inity + (inith * _local1);
_local3[obj + _local1].rang = 1 + _local2;
_local3[obj + _local1].score = chemin.groupOBJ[1].enfant[_local2].score;
_local3[obj + _local1].name = chemin.groupOBJ[1].enfant[_local2].pseudo;
coul = flip();
_local3[obj + _local1].gotoAndStop(coul);
listMC.push(obj + _local1);
_local1++;
_local2++;
}
id = chemin.groupOBJ[0].valeur - 1;
if (id >= 0) {
_local3["item" + id].gotoAndStop(3);
}
item.gotoAndStop("off");
_parent._parent.init();
}
var chemin = _parent._parent.scoring;
build();
}
Symbol 151 Button
on (press) {
Set("_parent:scrollPolarity", 1);
tellTarget ("_parent.scrollBarCF") {
play();
};
}
on (release, releaseOutside) {
Set("_parent:scrollPolarity", 0);
tellTarget ("_parent.scrollBarCF") {
stop();
};
}
Symbol 152 MovieClip Frame 1
stop();
Symbol 153 Button
on (press) {
Set("_parent:scrollPolarity", -1);
tellTarget ("_parent.scrollBarCF") {
play();
};
}
on (release, releaseOutside) {
Set("_parent:scrollPolarity", 0);
tellTarget ("_parent.scrollBarCF") {
stop();
};
}
Symbol 156 Button
on (press) {
startDrag ("", false, 0, _parent._parent:sliderBoundMin, 0, _parent._parent:sliderBoundMax);
gotoAndPlay ("drag");
}
on (release, releaseOutside) {
stopDrag();
stop();
}
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
btnSliderPosNew = _y;
Set("_parent._parent:scrollMultiplier", (btnSliderPosNew - _parent._parent:sliderBoundMin) / _parent._parent:scrollableArea);
_parent._parent:updateScroll();
Symbol 157 MovieClip Frame 3
gotoAndPlay ("drag");
Symbol 159 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 2
btnSliderPos = getProperty("_parent.btnSlider", _y);
if (_parent:scrollPolarity == 1) {
btnSliderPosNew = btnSliderPos - _parent._parent:sliderSize;
if (btnSliderPosNew < _parent._parent:sliderBoundMin) {
btnSliderPosNew = _parent._parent:sliderBoundMin;
}
} else if (_parent:scrollPolarity == -1) {
btnSliderPosNew = btnSliderPos + _parent._parent:sliderSize;
if (btnSliderPosNew > _parent._parent:sliderBoundMax) {
btnSliderPosNew = _parent._parent:sliderBoundMax;
}
}
setProperty("_parent.btnSlider", _y , btnSliderPosNew);
Set("_parent._parent:scrollMultiplier", (btnSliderPosNew - _parent._parent:sliderBoundMin) / _parent._parent:scrollableArea);
_parent._parent:updateScroll();
Symbol 159 MovieClip Frame 3
gotoAndPlay ("btnFeedback");
Symbol 160 MovieClip Frame 1
stop();
Symbol 164 Button
on (release) {
_parent.gotoAndStop("intro");
}
Symbol 167 MovieClip Frame 1
function init() {
cnSize = cnMasked.body._height - 174;
sliderSize = scrollBar.btnSlider._height;
scrollBarSize = scrollBar._height;
sliderBoundMin = scrollBar.btnUp._height + 8;
sliderBoundMax = (scrollBarSize - sliderSize) - Number(scrollBar.btnDn._height + 12);
scrollableArea = sliderBoundMax - sliderBoundMin;
scrollMultiplier = 0;
}
function updateScroll() {
setProperty("cnMasked.body", _y , -(cnSize * scrollMultiplier));
}
stop();
var chemin = this;
var pp;
Instance of Symbol 122 MovieClip "scoring" in Symbol 167 MovieClip Frame 1
onClipEvent (load) {
function groupProperty(path) {
var _local1 = path;
var _local2 = this;
for (prop in _local1) {
_local2[prop] = _local1[prop];
}
}
function nodeProperty(path1) {
var _local1 = path1;
var _local2 = this;
for (prop in _local1) {
_local2[prop] = _local1[prop];
}
}
function child(mens) {
if (mens.hasChildNodes) {
nodeOBJ = new Array();
var _local1 = mens.firstChild;
while (_local1 != null) {
if (_local1.nodeType == 3) {
_local1 = _local1.nextSibling;
}
var _local2 = _local1.attributes;
newDot = new nodeProperty(_local2);
nodeOBJ.push(newDot);
_local1 = _local1.nextSibling;
}
}
return(nodeOBJ);
}
function chargement(success) {
var _local2 = _parent;
_root.engine.out = "chargement...";
if (success) {
var _local3 = this.firstChild;
var _local1 = _local3.firstChild;
while (_local1 != null) {
if (_local1.nodeType == 3) {
_local1 = _local1.nextSibling;
}
child(_local1);
path = _local1.attributes;
newGroup = new groupProperty(path);
newGroup.enfant = nodeOBJ;
newGroup.nomNode = _local1.nodeName;
chemin.groupOBJ.push(newGroup);
_local1 = _local1.nextSibling;
}
trace("RECUP OK");
long = Number(chemin.groupOBJ[1].enfant.length - 2);
_local2.pp = chemin.groupOBJ[1].enfant[long].score;
hellopp == _local2.pp;
trace("score le plus petit : " + _local2.pp);
if (_local2._parent.score == 0) {
_local2.gotoAndStop("display");
}
if (_local2._parent.score > _local2.pp) {
_local2.gotoAndStop("login");
} else {
_local2.gotoAndStop("display");
}
if (display) {
trace("affichage");
_local2.gotoAndStop("display");
} else {
trace("recup avant partie");
}
} else {
trace("ERREUR DE RECUP DU FICHIER XML");
}
}
function recup(s, val) {
display = val;
chemin.groupOBJ = new Array();
chemin.recup_groupe = new XML();
chemin.recup_groupe.load((((((page + "?pgm=score_jeu&pseudo=") + _root.pseudo) + "&score=") + s) + "&jeu_id=") + jeu_id);
chemin.recup_groupe.onLoad = chargement;
}
var display = false;
jeu_id = "pb_caisses";
var chemin = this;
var page = "http://www.spirou.com/servlet/jpgame.class";
recup(0, 0);
}
Symbol 167 MovieClip Frame 5
stop();
inName = "";
btok.onPress = function () {
trace("btokhop");
if (inName != "") {
_root.pseudo = inName;
scoring.recup(_root.score, 1);
}
};