home *** CD-ROM | disk | FTP | other *** search
Text File | 2013-12-16 | 44.9 KB | 1,452 lines |
- function clearAllInterval()
- {
- trace("clearAllInterval M1");
- trace("AVANT IntervalRemplisBarre = " + IntervalRemplisBarre);
- trace("AVANT IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
- trace("AVANT IntervalVIRTUEL = " + IntervalVIRTUEL);
- _clearInterval("IntervalRemplisBarre");
- _clearInterval("IntervalLanceBruitageChrono");
- _clearInterval("IntervalVIRTUEL");
- trace("APRES IntervalRemplisBarre = " + IntervalRemplisBarre);
- trace("APRES IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
- trace("APRES IntervalVIRTUEL = " + IntervalVIRTUEL);
- }
- function coupeBruitPerso(lPersoNum)
- {
- if(lPersoNum == undefined)
- {
- lPersoNum = gJoueur - 1;
- }
- trace("lPersoNum = " + lPersoNum);
- if(gTypePartie == 1)
- {
- var _loc1_ = 3;
- while(_loc1_ < 7)
- {
- trace("Bruitage perso coupé = " + ("B_A" + gimme2digits(gListeJoueurMixed[lPersoNum].Avatar) + "_" + gimme2digits(_loc1_)));
- stopBruitage({nomSon:"B_A" + gimme2digits(gListeJoueurMixed[lPersoNum].Avatar) + "_E" + _loc1_});
- _loc1_ = _loc1_ + 1;
- }
- }
- }
- function allumeJoueur()
- {
- var _loc2_ = this["BORNE_" + gJoueur].texte_PSEUDO;
- _loc2_.backgroundColor = "0xFFFF33";
- }
- function eteintJoueurs()
- {
- var _loc2_ = 1;
- while(_loc2_ <= gNbJoueurs_M[gManche - 1])
- {
- var _loc3_ = this["BORNE_" + _loc2_].texte_PSEUDO;
- _loc3_.backgroundColor = "0xFFFFFF";
- _loc2_ = _loc2_ + 1;
- }
- }
- function initPartie()
- {
- gListeNamePirateORDI = [["Boris Cook","Hans Attack","Biscoto Legrand"],["Mary Jump","Ovida Borgne","Scotti Scott"],["Le Baron Bleu","Pit La malice","William Bot"]];
- gListePirateORDIused = [];
- recupListeQuestions();
- var _loc5_ = 1;
- var _loc4_ = 0;
- while(_loc4_ < 4)
- {
- if(gListeJoueur[_loc4_] == undefined)
- {
- var _loc10_ = gListeNamePirateORDI[_loc5_ - 1].length;
- trace("pNbNomPirateORDI " + _loc10_);
- var _loc6_ = randomValue(0,_loc10_ - 1);
- trace("pRandom " + _loc6_);
- trace("pseudo " + gListeNamePirateORDI[_loc5_ - 1][_loc6_]);
- gListeJoueur.push({Pseudo:gListeNamePirateORDI[_loc5_ - 1][_loc6_],Avatar:10 + _loc5_,Score:0,Type:"VIRTUEL"});
- gListePirateORDIused.push(gListeNamePirateORDI[_loc5_ - 1][_loc6_]);
- _loc5_ += 1;
- }
- else
- {
- gListeJoueur[_loc4_].Score = 0;
- gListeJoueur[_loc4_].Type = "REEL";
- }
- _loc4_ = _loc4_ + 1;
- }
- trace("gListeJoueur " + gListeJoueur);
- gListeJoueurMixed = randomiseList(gListeJoueur);
- trace("gListeJoueurMixed " + gListeJoueurMixed);
- var _loc11_ = randomiseList(gListeTotalQ_M1_M2);
- gListePartieQ = [];
- gListePartieQ.push([]);
- _loc4_ = 0;
- while(_loc4_ < gListeNbQ_M[gManche - 1])
- {
- gListePartieQ[0].push(_loc11_[_loc4_]);
- var _loc9_ = gListeThemesQ.length;
- var _loc2_ = 0;
- while(_loc2_ < _loc9_)
- {
- var _loc3_ = getPos(gListeThemesQ[_loc2_],_loc11_[_loc4_]);
- if(_loc3_ !== -1)
- {
- this["gListeThemesQ_" + gListeThemes[_loc2_]].splice(_loc3_,1);
- gListeThemesQ[_loc2_].splice(_loc3_,1);
- break;
- }
- _loc2_ = _loc2_ + 1;
- }
- _loc4_ = _loc4_ + 1;
- }
- var _loc17_ = gListeNbQ_M[gManche - 1];
- var _loc18_ = _loc17_ + gListeNbQ_M[gManche];
- var _loc12_ = duplicate(gListeTotalQ_M3);
- gListePartieQ.push([]);
- gListePartieQ.push([]);
- _loc4_ = 0;
- while(_loc4_ < gNbJoueurs_M[1])
- {
- var _loc8_ = randomiseList(this["gListeThemesQ_" + gListeThemes[_loc4_]]);
- this["gListeThemesQ_" + gListeThemes[_loc4_]] = _loc8_;
- gListePartieQ[1].push(_loc8_);
- if(_loc4_ < gNbJoueurs_M[2])
- {
- trace("pListeTotalQ_M3 = " + _loc12_);
- var _loc7_ = _loc12_.splice(0,3);
- trace("lListM3 = " + _loc7_);
- gListePartieQ[2].push(_loc7_);
- }
- _loc4_ = _loc4_ + 1;
- }
- }
- function initManche()
- {
- var _loc2_ = 0;
- while(_loc2_ < 4)
- {
- this["JOUEUR_" + (_loc2_ + 1)].gotoAndPlay("A" + gListeJoueurMixed[_loc2_].Avatar);
- this["BORNE_" + (_loc2_ + 1)].texte_PSEUDO.text = gListeJoueurMixed[_loc2_].Pseudo;
- this["BORNE_" + (_loc2_ + 1)].LETTRE.texte_LETTRE.text = "";
- this["BORNE_" + (_loc2_ + 1)].SCORE.texte_SCORE.text = String(gListeJoueurMixed[_loc2_].Score);
- if(gListeJoueurMixed[_loc2_].Type == "REEL")
- {
- this["BORNE_" + (_loc2_ + 1)].BARIL.PICTO_ORDI._visible = false;
- }
- _loc2_ = _loc2_ + 1;
- }
- gJoueur = 1;
- gNoQuestion = 1;
- }
- function initBaril()
- {
- var _loc7_ = this["TABLEAU_M" + gManche];
- var _loc2_ = this["BORNE_" + gJoueur].BARIL;
- _loc2_.gotoAndPlay("E4");
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- this["BORNE_" + gJoueur].BARIL.PICTO_ORDI._visible = false;
- }
- _loc2_.pIB = "IB_06";
- _loc2_.onRollOver = function()
- {
- gereCursor(2);
- var _loc3_ = this._x + this._parent._x + 95;
- var _loc2_ = this._y + this._parent._y + 150;
- gereTextes.afficheIB({codeIB:this.pIB,X:_loc3_,Y:_loc2_});
- };
- _loc2_.onRollOut = function()
- {
- gereCursor(1);
- gereTextes.masqueIB();
- };
- _loc2_.onPress = function()
- {
- this.gotoAndPlay("E2");
- gereCursor(1);
- gereTextes.masqueIB();
- gNoQuestion = 1;
- CAPITAINE.gotoAndPlay("E2");
- joueSon({nomSon:"M" + gManche + "_Q" + gNoQuestion,actionFin:"lanceQuestion"});
- desactiveClip(this);
- };
- }
- function desinitReponses()
- {
- var _loc1_ = 0;
- while(_loc1_ < gListeReponse.length)
- {
- var _loc2_ = myClip0["REPONSE_" + gimme2digits(_loc1_ + 1)];
- desactiveClip(_loc2_);
- _loc1_ = _loc1_ + 1;
- }
- }
- function lanceQuestion()
- {
- if(gNoQuestion == 1 && gJoueur == 1)
- {
- gotoAndPlay("JEU_M" + gManche + "_C" + gTypePartie);
- }
- if(gNoQuestion == 1 && gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- gTimerJoueur = getTimer();
- }
- eteintJoueurs();
- allumeJoueur();
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- coupeBruitPerso();
- }
- this["JOUEUR_" + gJoueur].AVATAR.gotoAndPlay("E2");
- gereTextes.videLM();
- var _loc5_ = this["TABLEAU_M" + gManche];
- _loc5_._visible = true;
- var _loc17_ = _loc5_.ZAP;
- if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
- {
- _loc17_._visible = true;
- _loc17_.pIB = "IB_ZAP";
- _loc17_.onRollOver = function()
- {
- gereCursor(2);
- this.gotoAndPlay("E2");
- gereTextes.afficheIB({codeIB:this.pIB,X:740,Y:300});
- };
- _loc17_.onRollOut = function()
- {
- gereCursor(1);
- this.gotoAndPlay("E1");
- gereTextes.masqueIB();
- };
- _loc17_.onPress = function()
- {
- gRemplisBarreOK = undefined;
- desactiveTOUT();
- clearAllInterval();
- gereTextes.masqueIB();
- gereCursor(1);
- this.gotoAndPlay("E1");
- var _loc4_ = gListeReponse.length;
- var _loc3_ = gNoQuestion;
- while(_loc3_ <= gListeNbQ_M[gManche - 1])
- {
- var _loc2_ = randomValue(0,_loc4_ - 1);
- trace("gNoQuestion = " + gNoQuestion);
- trace("________REPONSE__________________ " + gListeReponse[_loc2_]);
- trace("_________POS_________________ " + _loc2_);
- if(Key.isDown(32))
- {
- if(gListeReponse[_loc2_] == "A")
- {
- if(_loc2_ == 0)
- {
- _loc2_ = 1;
- }
- else
- {
- _loc2_ = 0;
- }
- }
- }
- gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(gListeReponse[_loc2_]);
- gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(_loc2_);
- gNoQuestion += 1;
- if(gJoueur == 1)
- {
- gListeReponse = randomiseList(gList_ABC);
- gListeJoueurMixed[gJoueur - 1].gListeTirageReponseManche.push(gListeReponse);
- }
- else
- {
- gListeReponse = gListeJoueurMixed[0].gListeTirageReponseManche[gNoQuestion - 1];
- }
- trace("gListeReponse = " + gListeReponse);
- _loc3_ = _loc3_ + 1;
- }
- joueBruitage({nomSon:"B_ZAP",actionFin:"testeReponseDone"});
- };
- }
- else
- {
- _loc17_._visible = false;
- }
- if(gManche < 3)
- {
- gQuestionNum = gimme2digits(gListePartieQ[gManche - 1][gNoQuestion - 1]);
- gQuestionNumLM = gQuestionNum;
- }
- else
- {
- gQuestionNum = gimme2digits(gListePartieQ[gManche - 1][gNoQuestion - 1]);
- gQuestionNumLM = gQuestionNum + "_3";
- }
- trace("gQuestionNumLM = " + gQuestionNumLM);
- gereTextes.afficheLM({mc:_loc5_,codeLM:"LM_Q" + gQuestionNumLM});
- var _loc6_ = _loc5_["LM_Q" + gQuestionNumLM];
- var _loc8_ = 30;
- if(_loc6_.LM.texte._height < _loc8_)
- {
- _loc6_._y += _loc6_.LM.texte._height / 2;
- }
- CAPITAINE.gotoAndPlay("E1");
- _loc17_ = _loc5_.POINT.texte_POINT;
- if(gManche < 3)
- {
- _loc17_.text = String(gManche);
- }
- else
- {
- _loc17_.text = "4";
- }
- _loc17_ = _loc5_["ROND_" + gNoQuestion];
- _loc17_.gotoAndPlay("E2");
- gList_ABC = ["A","B","C"];
- var _loc3_ = 2;
- while(_loc3_ >= 0)
- {
- var _loc2_ = _loc5_["REPONSE_" + gList_ABC[_loc3_]];
- var _loc7_ = _loc5_["REPONSE_" + gimme2digits(_loc3_ + 1)];
- _loc2_.gotoAndPlay("E1");
- _loc2_._visible = false;
- _loc7_._visible = false;
- desactiveClip(_loc7_);
- _loc5_["texte_LMR" + gimme2digits(_loc3_ + 1)]._visible = 0;
- _loc3_ = _loc3_ - 1;
- }
- if(gManche == 1)
- {
- gList_ABC.splice(2,1);
- }
- if(gJoueur == 1)
- {
- gListeReponse = randomiseList(gList_ABC);
- gListeJoueurMixed[gJoueur - 1].gListeTirageReponseManche.push(gListeReponse);
- }
- else
- {
- gListeReponse = gListeJoueurMixed[0].gListeTirageReponseManche[gNoQuestion - 1];
- }
- trace("gListeReponse = " + gListeReponse);
- gDone = 0;
- _loc3_ = 0;
- while(_loc3_ < gListeReponse.length)
- {
- _loc2_ = _loc5_["REPONSE_" + gimme2digits(_loc3_ + 1)];
- _loc2_.mcBouton = _loc5_["REPONSE_" + gList_ABC[_loc3_]];
- _loc2_.pNum = gimme2digits(_loc3_ + 1);
- _loc2_._visible = true;
- _loc2_.mcBouton.gotoAndPlay("E1");
- _loc2_.mcBouton._visible = true;
- _loc2_.gotoAndPlay("E1");
- _loc2_.pCode = gListeReponse[_loc3_];
- _loc2_.pLettre = gList_ABC[_loc3_];
- _loc2_.pDone = 0;
- gereTextes.afficheLM({mc:_loc5_,codeLM:"LM_R" + gimme2digits(gQuestionNum) + gListeReponse[_loc3_],numR:gimme2digits(_loc3_ + 1)});
- _loc6_ = _loc5_["LM_R" + gimme2digits(gQuestionNum) + gListeReponse[_loc3_]];
- _loc8_ = 30;
- if(_loc6_.LM.texte._height < _loc8_)
- {
- _loc6_._y += _loc6_.LM.texte._height / 2 - 5;
- }
- if(_loc2_.pCode == "A")
- {
- gMcRepOk = _loc2_;
- }
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- _loc2_.onRollOver = function()
- {
- if(gDone == 0)
- {
- gereCursor(2);
- this.mcBouton.gotoAndPlay("E2");
- joueBruitage({nomSon:"B_LETTRE_02"});
- trace(this.pCode);
- if(Key.isDown(32))
- {
- if(this.pCode == "A")
- {
- gereTextes.afficheIB({texte:"bonne réponse",X:650,Y:this._y + 420});
- }
- }
- }
- };
- _loc2_.onRollOut = function()
- {
- if(gDone == 0)
- {
- gereCursor(1);
- stopBruitage({nomSon:"B_LETTRE_02"});
- this.mcBouton.gotoAndPlay("E1");
- gereTextes.masqueIB();
- }
- };
- _loc2_.onPress = function()
- {
- if(gDone == 0)
- {
- gRemplisBarreOK = undefined;
- desactiveTOUT();
- gereTextes.masqueIB();
- clearAllInterval();
- desinitReponses();
- gereCursor(1);
- stopBruitage({nomSon:"B_LETTRE_02"});
- gDone = 1;
- trace("________REPONSE__________________ " + this.pCode);
- trace("_________POS_________________ " + (Number(this.pNum) - 1));
- gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(this.pCode);
- gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(Number(this.pNum) - 1);
- joueBruitage({nomSon:"B_LETTRE",actionFin:"testeReponseDone"});
- }
- };
- }
- gJeuOn = true;
- _loc3_ = _loc3_ + 1;
- }
- clearAllInterval();
- if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
- {
- _setInterval({nomInterval:"IntervalVIRTUEL",mc:this,fonction:"reponseVirtuelle",duree:randomValue(50,gListeTimerM[gManche - 1] * 1000 - 100)});
- }
- else
- {
- gKeyDown = undefined;
- Key.addListener(KeyListener);
- }
- _loc5_.COMPTEUR_T.masque._y = -132;
- gTimer = getTimer();
- gTimerPause = 0;
- gRemplisBarreOK = true;
- trace("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% M1 creation Intervals");
- _setInterval({nomInterval:"IntervalRemplisBarre",mc:this,fonction:"remplisBarre",duree:100});
- _setInterval({nomInterval:"IntervalLanceBruitageChrono",mc:this,fonction:"lanceB_CHRONO",duree:gListeTimerM[gManche - 1] * 1000 - 2191});
- }
- function lanceB_CHRONO()
- {
- if(gRemplisBarreOK == true)
- {
- trace("AV M1 IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
- _clearInterval("IntervalLanceBruitageChrono");
- trace("AP M1 IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
- joueBruitage({nomSon:"B_CHRONO"});
- }
- }
- function reponseVirtuelle()
- {
- if(gRemplisBarreOK == true)
- {
- gRemplisBarreOK = undefined;
- desactiveTOUT();
- clearAllInterval();
- var _loc3_ = this["TABLEAU_M" + gManche];
- var _loc5_ = gListeReponse.length;
- var _loc2_ = randomValue(0,_loc5_ - 1);
- var _loc6_ = _loc3_["REPONSE_" + gimme2digits(_loc2_ + 1)];
- _loc6_.mcBouton.gotoAndPlay("E2");
- trace("VIRTUEL");
- trace("________REPONSE__________________ " + gListeReponse[_loc2_]);
- trace("_________POS_________________ " + _loc2_);
- gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(gListeReponse[_loc2_]);
- gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(_loc2_);
- var _loc4_ = _loc3_.ZAP;
- _loc4_.gotoAndPlay("E1");
- gereTextes.masqueIB();
- joueBruitage({nomSon:"B_LETTRE",actionFin:"testeReponseDone"});
- }
- else
- {
- trace("M1 _ BUG DEJOUE reponseVirtuelle !!!!!!!!");
- }
- }
- function testeReponseDone()
- {
- gRemplisBarreOK = undefined;
- clearAllInterval();
- var _loc2_ = this["TABLEAU_M" + gManche];
- if(gNoQuestion < gListeNbQ_M[gManche - 1])
- {
- var _loc4_ = _loc2_["ROND_" + gNoQuestion];
- _loc4_.gotoAndPlay("E3");
- gNoQuestion += 1;
- CAPITAINE.gotoAndPlay("E2");
- _loc2_._visible = false;
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- joueSon({nomSon:"M" + gManche + "_Q" + gNoQuestion,actionFin:"lanceQuestion"});
- }
- else
- {
- joueSon({nomSon:"M" + gManche + "_Q" + gNoQuestion + "_V",actionFin:"lanceQuestion"});
- }
- }
- else
- {
- trace("gListeJoueurMixed[gJoueur-1].Type = " + gListeJoueurMixed[gJoueur - 1].Type);
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- trace("gTimerJoueur = " + gTimerJoueur);
- trace("getTimer() - gTimerJoueur = " + (getTimer() - gTimerJoueur));
- gListeJoueurMixed[gJoueur - 1].TempsReponse = getTimer() - gTimerJoueur;
- }
- trace("gJoueur = " + gJoueur);
- trace("gListeJoueurMixed[gJoueur-1].gListeReponseManche = " + gListeJoueurMixed[gJoueur - 1].gListeReponseManche);
- trace("gListeJoueurMixed[gJoueur-1].gListePosReponseManche = " + gListeJoueurMixed[gJoueur - 1].gListePosReponseManche);
- _loc4_ = this["BORNE_" + gJoueur].BARIL;
- _loc4_.gotoAndPlay("E1");
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- this["BORNE_" + gJoueur].BARIL.PICTO_ORDI._visible = false;
- }
- coupeBruitPerso();
- this["JOUEUR_" + gJoueur].AVATAR.gotoAndPlay("E1");
- _loc2_._visible = false;
- if(gJoueur < gNbJoueurs_M[gManche - 1])
- {
- gJoueur += 1;
- eteintJoueurs();
- allumeJoueur();
- gNoQuestion = 1;
- CAPITAINE.gotoAndPlay("E2");
- if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
- {
- var _loc3_ = "M" + gManche + "_C2_0" + gJoueur + "_V";
- }
- else
- {
- _loc3_ = "M" + gManche + "_C2_0" + gJoueur;
- }
- joueSon({nomSon:_loc3_,actionFin:"initLanceManche"});
- }
- else
- {
- trace("fin manche");
- CAPITAINE.gotoAndPlay("E2");
- joueSon({nomSon:"M" + gManche + "_C2_R0",actionFin:"lanceVerif"});
- }
- }
- }
- function lanceVerif()
- {
- gJeuOn = false;
- eteintJoueurs();
- gJoueur = 0;
- gNoQuestion = 1;
- var _loc4_ = this["TABLEAU_M" + gManche];
- var _loc2_ = 1;
- while(_loc2_ <= 5)
- {
- var _loc3_ = _loc4_["ROND_" + _loc2_];
- if(_loc2_ <= gListeNbQ_M[gManche - 1])
- {
- _loc3_.gotoAndPlay("E1");
- }
- else
- {
- _loc3_._visible = false;
- }
- _loc2_ = _loc2_ + 1;
- }
- var _loc5_ = _loc4_.COMPTEUR_T.masque;
- _loc5_._y = -132;
- joueSon({nomSon:"M" + gManche + "_C2_R" + gNoQuestion,actionFin:"finCommentResult"});
- lanceQuestionVerif();
- }
- function finCommentResult()
- {
- trace("__________________________________________");
- trace("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% M1 creation Interval suiteVerif");
- finSonDEB();
- _clearInterval("IntervalVerif");
- gOKverif = 1;
- _setInterval({nomInterval:"IntervalVerif",mc:this,fonction:"suiteVerif",duree:gTempsTiming});
- }
- function suiteVerif()
- {
- if(gOKverif == 1)
- {
- trace("suiteVerif M1");
- gOKverif = undefined;
- trace("AV M1 IntervalVerif = " + IntervalVerif);
- _clearInterval("IntervalVerif");
- trace("AP M1 IntervalVerif = " + IntervalVerif);
- var _loc2_ = this["TABLEAU_M" + gManche];
- if(gNoQuestion < gListeNbQ_M[gManche - 1])
- {
- var _loc3_ = _loc2_["ROND_" + gNoQuestion];
- _loc3_.gotoAndPlay("E3");
- gNoQuestion += 1;
- CAPITAINE.gotoAndPlay("E2");
- joueSon({nomSon:"M" + gManche + "_C2_R" + gNoQuestion,actionFin:"finCommentResult"});
- lanceQuestionVerif();
- }
- else
- {
- trace("finVerif");
- _loc2_._visible = false;
- eteintJoueurs();
- classeJoueurs();
- }
- }
- else
- {
- trace("BUG detecte M1 suiteVerif !!!!");
- trace("AV M1 IntervalVerif = " + IntervalVerif);
- _clearInterval("IntervalVerif");
- trace("AP M1 IntervalVerif = " + IntervalVerif);
- }
- }
- function lanceQuestionVerif()
- {
- gereTextes.videLM();
- var _loc3_ = this["TABLEAU_M" + gManche];
- _loc3_._visible = true;
- var _loc18_ = _loc3_.ZAP;
- _loc18_._visible = false;
- if(gManche < 3)
- {
- gQuestionNum = gimme2digits(gListePartieQ[gManche - 1][gNoQuestion - 1]);
- gQuestionNumLM = gQuestionNum;
- }
- else
- {
- gQuestionNum = gimme2digits(gListePartieQ[gManche - 1][gNoQuestion - 1]);
- gQuestionNumLM = gQuestionNum + "_3";
- }
- gereTextes.afficheLM({mc:_loc3_,codeLM:"LM_Q" + gQuestionNumLM});
- var _loc6_ = _loc3_["LM_Q" + gQuestionNumLM];
- var _loc9_ = 30;
- if(_loc6_.LM.texte._height < _loc9_)
- {
- _loc6_._y += _loc6_.LM.texte._height / 2;
- }
- _loc18_ = _loc3_.POINT.texte_POINT;
- if(gManche < 3)
- {
- _loc18_.text = String(gManche);
- }
- else
- {
- _loc18_.text = "4";
- }
- _loc18_ = _loc3_["ROND_" + gNoQuestion];
- _loc18_.gotoAndPlay("E2");
- gList_ABC = ["A","B","C"];
- var _loc2_ = 2;
- while(_loc2_ >= 0)
- {
- var _loc7_ = _loc3_["REPONSE_" + gList_ABC[_loc2_]];
- trace("myClip = " + _loc7_);
- var _loc8_ = _loc3_["REPONSE_" + gimme2digits(_loc2_ + 1)];
- _loc7_.gotoAndPlay("E1");
- _loc7_._visible = false;
- _loc8_._visible = false;
- desactiveClip(_loc8_);
- _loc3_["texte_LMR" + gimme2digits(_loc2_ + 1)]._visible = 0;
- _loc2_ = _loc2_ - 1;
- }
- if(gManche == 1)
- {
- gList_ABC.splice(2,1);
- }
- gListeReponse = gListeJoueurMixed[0].gListeTirageReponseManche[gNoQuestion - 1];
- _loc2_ = 0;
- while(_loc2_ < gListeReponse.length)
- {
- _loc7_ = _loc3_["REPONSE_" + gimme2digits(_loc2_ + 1)];
- trace("myClip = " + _loc7_);
- _loc7_.mcBouton = _loc3_["REPONSE_" + gList_ABC[_loc2_]];
- trace("myClip.mcBouton = " + _loc7_.mcBouton);
- _loc7_.pNum = gimme2digits(_loc2_ + 1);
- _loc7_._visible = true;
- _loc7_.mcBouton.gotoAndPlay("E1");
- _loc7_.mcBouton._visible = true;
- _loc7_.pCode = gListeReponse[_loc2_];
- trace("myClip.pCode = " + _loc7_.pCode);
- if(_loc7_.pCode == "A")
- {
- _loc7_.mcBouton.gotoAndPlay("E3");
- }
- gereTextes.afficheLM({mc:_loc3_,codeLM:"LM_R" + gimme2digits(gQuestionNum) + gListeReponse[_loc2_],numR:gimme2digits(_loc2_ + 1)});
- _loc6_ = _loc3_["LM_R" + gimme2digits(gQuestionNum) + gListeReponse[_loc2_]];
- _loc9_ = 30;
- if(_loc6_.LM.texte._height < _loc9_)
- {
- _loc6_._y += _loc6_.LM.texte._height / 2 - 5;
- }
- _loc2_ = _loc2_ + 1;
- }
- _loc2_ = 0;
- while(_loc2_ < gNbJoueurs_M[gManche - 1])
- {
- _loc7_ = this["JOUEUR_" + (_loc2_ + 1)].AVATAR;
- var _loc4_ = this["BORNE_" + (_loc2_ + 1)].LETTRE;
- var _loc11_ = this["BORNE_" + (_loc2_ + 1)].SCORE.texte_SCORE;
- var _loc12_ = gListeJoueurMixed[_loc2_].gListeReponseManche[gNoQuestion - 1];
- var _loc10_ = gListeJoueurMixed[_loc2_].gListePosReponseManche[gNoQuestion - 1];
- var _loc17_ = gListeJoueurMixed[0].gListeTirageReponseManche[gNoQuestion - 1];
- var _loc5_ = gList_ABC[_loc10_];
- trace("pReponseLettre = " + _loc5_);
- switch(_loc12_)
- {
- case 0:
- _loc4_.gotoAndPlay("E2");
- _loc7_.gotoAndPlay("E4");
- break;
- case "A":
- var _loc16_ = gListeNbPoints_M[gManche - 1];
- gListeJoueurMixed[_loc2_].Score += 1;
- _loc11_.text = String(gListeJoueurMixed[_loc2_].Score);
- _loc4_.gotoAndPlay("E3");
- _loc8_ = this["BORNE_" + (_loc2_ + 1)].LETTRE.texte_LETTRE;
- _loc8_.text = _loc5_;
- _loc7_.gotoAndPlay("E3");
- break;
- default:
- _loc4_.gotoAndPlay("E4");
- _loc8_ = this["BORNE_" + (_loc2_ + 1)].LETTRE.texte_LETTRE;
- _loc8_.text = _loc5_;
- _loc7_.gotoAndPlay("E4");
- }
- _loc2_ = _loc2_ + 1;
- }
- }
- function classeJoueurs()
- {
- var _loc30_ = undefined;
- var _loc7_ = [];
- var _loc18_ = 50;
- var _loc6_ = [];
- var _loc2_ = [];
- var _loc29_ = [];
- var _loc21_ = 0;
- var _loc14_ = [];
- var _loc19_ = [];
- var _loc13_ = 0;
- while(_loc13_ < gNbJoueurs_M[gManche - 1])
- {
- if(gListeJoueurMixed[_loc13_].Score == 0)
- {
- _loc29_.push(_loc13_);
- }
- if(gListeJoueurMixed[_loc13_].Score < _loc18_)
- {
- _loc7_ = [];
- _loc7_.push(_loc13_);
- _loc18_ = gListeJoueurMixed[_loc13_].Score;
- }
- else if(gListeJoueurMixed[_loc13_].Score == _loc18_)
- {
- _loc7_.push(_loc13_);
- }
- if(gListeJoueurMixed[_loc13_].Score > _loc21_)
- {
- _loc6_ = [];
- _loc6_.push(_loc13_);
- _loc21_ = gListeJoueurMixed[_loc13_].Score;
- }
- else if(gListeJoueurMixed[_loc13_].Score == _loc21_)
- {
- _loc6_.push(_loc13_);
- }
- trace("gListeJoueurMixed Joueur " + _loc13_ + " Score = " + gListeJoueurMixed[_loc13_].Score);
- if(gListeJoueurMixed[_loc13_].Type == "REEL")
- {
- _loc14_.push(_loc13_);
- }
- else
- {
- _loc19_.push(_loc13_);
- }
- trace("gListeJoueurMixed Joueur " + _loc13_ + " Type = " + gListeJoueurMixed[_loc13_].Type);
- _loc13_ = _loc13_ + 1;
- }
- trace("pScoreMin = " + _loc18_);
- trace("pListePosMin = " + _loc7_);
- trace("pListePosMax = " + _loc6_);
- trace("pListeREEL = " + _loc14_);
- trace("pListeVIRTUEL = " + _loc19_);
- trace("################################");
- trace("pListeZERO = " + _loc29_);
- var _loc4_ = [];
- var _loc17_ = [];
- if(_loc6_.length > 1)
- {
- _loc13_ = 0;
- while(_loc13_ < _loc6_.length)
- {
- if(gListeJoueurMixed[_loc6_[_loc13_]].Type == "REEL")
- {
- _loc4_.push(_loc6_[_loc13_]);
- }
- else
- {
- _loc17_.push(_loc6_[_loc13_]);
- }
- trace("gListeJoueurMixed MAX joueur " + [_loc6_[_loc13_]] + " Type = " + gListeJoueurMixed[_loc6_[_loc13_]].Type);
- _loc13_ = _loc13_ + 1;
- }
- trace("pListePosMax _______________________ ");
- trace("pListeREEL_MAX = " + _loc4_);
- trace("pListeVIRTUEL_MAX = " + _loc17_);
- if(_loc4_.length == 1)
- {
- gFirst = _loc4_[0];
- _loc2_.push(_loc4_[0]);
- trace("--- pListeOrdre MAX 1 = " + _loc2_);
- var _loc12_ = _loc17_.length;
- if(_loc12_ > 0)
- {
- var _loc9_ = 0;
- while(_loc9_ < _loc12_)
- {
- _loc2_.push(_loc17_[_loc9_]);
- trace("--- pListeOrdre MAX AJOUT VIRTUEL(S) 1 = " + _loc2_);
- _loc9_ = _loc9_ + 1;
- }
- }
- }
- else
- {
- trace("test chrono");
- var _loc26_ = 0;
- var _loc27_ = 0;
- _loc13_ = 0;
- while(_loc13_ < _loc4_.length)
- {
- trace("pListeREEL[i] = " + _loc4_[_loc13_]);
- trace("gListeJoueurMixed[pListeREEL_MAX[i]].TempsReponse = " + gListeJoueurMixed[_loc4_[_loc13_]].TempsReponse);
- if(_loc26_ == 0)
- {
- _loc27_ = gListeJoueurMixed[_loc4_[_loc13_]].TempsReponse;
- gFirst = _loc4_[_loc13_];
- _loc2_.push(_loc4_[_loc13_]);
- trace("--- pListeOrdre MAX 2= " + _loc2_);
- _loc26_ = 1;
- }
- else if(gListeJoueurMixed[_loc4_[_loc13_]].TempsReponse < _loc27_)
- {
- gFirst = _loc4_[_loc13_];
- _loc2_.splice(0,0,_loc4_[_loc13_]);
- trace("--- pListeOrdre MAX 3 = " + _loc2_);
- }
- else
- {
- trace("getPos(pListeOrdre,gFirst)+1 = " + (getPos(_loc2_,gFirst) + 1));
- _loc2_.push(_loc4_[_loc13_]);
- trace("___ pListeOrdre MAX 5 = " + _loc2_);
- }
- _loc13_ = _loc13_ + 1;
- }
- _loc12_ = _loc17_.length;
- if(_loc12_ > 0)
- {
- _loc9_ = 0;
- while(_loc9_ < _loc12_)
- {
- _loc2_.push(_loc17_[_loc9_]);
- trace("--- pListeOrdre MAX AJOUT VIRTUEL(S) 2 = " + _loc2_);
- _loc9_ = _loc9_ + 1;
- }
- }
- }
- }
- else
- {
- gFirst = _loc6_[0];
- _loc2_.push(_loc6_[0]);
- trace("--- pListeOrdre MAX 4 = " + _loc2_);
- }
- if(_loc2_.length < gNbJoueurs_M[gManche - 1])
- {
- var _loc5_ = [];
- var _loc8_ = [];
- if(_loc7_.length > 1)
- {
- _loc13_ = 0;
- while(_loc13_ < _loc7_.length)
- {
- if(gListeJoueurMixed[_loc7_[_loc13_]].Type == "REEL")
- {
- _loc5_.push(_loc7_[_loc13_]);
- }
- else
- {
- _loc8_.push(_loc7_[_loc13_]);
- }
- trace("gListeJoueurMixed MIN joueur " + [_loc7_[_loc13_]] + " Type = " + gListeJoueurMixed[_loc7_[_loc13_]].Type);
- _loc13_ = _loc13_ + 1;
- }
- trace("pListeREEL_MIN = " + _loc5_);
- trace("pListeVIRTUEL_MIN = " + _loc8_);
- if(_loc5_.length > 0)
- {
- trace("test chrono");
- _loc26_ = 0;
- _loc27_ = 0;
- _loc13_ = 0;
- while(_loc13_ < _loc5_.length)
- {
- trace("pListeREEL_MIN[i] = " + _loc5_[_loc13_]);
- trace("gListeJoueurMixed[pListeREEL_MIN[i]].TempsReponse = " + gListeJoueurMixed[_loc5_[_loc13_]].TempsReponse);
- if(_loc26_ == 0)
- {
- _loc27_ = gListeJoueurMixed[_loc5_[_loc13_]].TempsReponse;
- gDer = _loc5_[_loc13_];
- _loc2_.push(_loc5_[_loc13_]);
- trace("___ pListeOrdre MIN 2 = " + _loc2_);
- _loc26_ = 1;
- }
- else if(gListeJoueurMixed[_loc5_[_loc13_]].TempsReponse > _loc27_)
- {
- _loc2_.push(_loc5_[_loc13_]);
- trace("___ pListeOrdre MIN 3 = " + _loc2_);
- gDer = _loc5_[_loc13_];
- }
- else
- {
- _loc2_.splice(getPos(_loc2_,gDer),0,_loc5_[_loc13_]);
- trace("___ pListeOrdre MIN 5 = " + _loc2_);
- }
- _loc13_ = _loc13_ + 1;
- }
- _loc30_ = true;
- _loc12_ = _loc8_.length;
- if(_loc12_ > 0)
- {
- _loc9_ = 0;
- while(_loc9_ < _loc12_)
- {
- _loc2_.push(_loc8_[_loc9_]);
- gDer = _loc8_[_loc9_];
- trace("--- pListeOrdre MIN AJOUT VIRTUEL(S) 2 = " + _loc2_);
- _loc9_ = _loc9_ + 1;
- }
- }
- }
- else if(_loc8_.length > 0)
- {
- var _loc10_ = 0;
- while(_loc10_ < _loc8_.length)
- {
- gDer = _loc8_[_loc10_];
- _loc2_.push(_loc8_[_loc10_]);
- trace("___ pListeOrdre MIN 1 = " + _loc2_);
- _loc10_ = _loc10_ + 1;
- }
- }
- }
- else
- {
- gDer = _loc7_[0];
- _loc2_.push(_loc7_[0]);
- trace("___ pListeOrdre MIN 4 = " + _loc2_);
- }
- }
- else
- {
- gDer = _loc2_[_loc2_.length - 1];
- _loc30_ = true;
- }
- trace("gDer = " + gDer);
- trace("gListeJoueurMixed[gDer].Score = " + gListeJoueurMixed[gDer].Score);
- trace("AJOUT ");
- _loc13_ = 0;
- while(_loc13_ < gNbJoueurs_M[gManche - 1])
- {
- var _loc15_ = getPos(_loc2_,_loc13_);
- trace("pListeOrdre = " + _loc2_);
- trace("i = " + _loc13_);
- trace("pPos = " + _loc15_);
- if(_loc15_ == -1)
- {
- _loc12_ = _loc2_.length;
- trace("pLength = " + _loc12_);
- var _loc3_ = 0;
- while(_loc3_ < _loc12_)
- {
- trace("gListeJoueurMixed[i].Score = " + gListeJoueurMixed[_loc13_].Score);
- trace("j = " + _loc3_);
- trace("pListeOrdre[j] = " + _loc2_[_loc3_]);
- trace("gListeJoueurMixed[pListeOrdre[j]].Score = " + gListeJoueurMixed[_loc2_[_loc3_]].Score);
- if(gListeJoueurMixed[_loc13_].Score >= gListeJoueurMixed[_loc2_[_loc3_]].Score)
- {
- if(gListeJoueurMixed[_loc13_].Score == gListeJoueurMixed[_loc2_[_loc3_]].Score)
- {
- if(gListeJoueurMixed[_loc13_].Type == "REEL" && gListeJoueurMixed[_loc2_[_loc3_]].Type == "VIRTUEL")
- {
- var _loc11_ = _loc3_;
- }
- else
- {
- _loc11_ = _loc3_ + 1;
- }
- }
- else
- {
- _loc11_ = _loc3_;
- }
- _loc2_.splice(_loc11_,0,_loc13_);
- trace("___ pListeOrdre AJOUT = " + _loc2_);
- break;
- }
- _loc3_ = _loc3_ + 1;
- }
- }
- _loc13_ = _loc13_ + 1;
- }
- trace("pListePosMin = " + _loc7_);
- trace("pListePosMax = " + _loc6_);
- trace("+++ pListeOrdre = " + _loc2_);
- trace("gDer = " + gDer);
- trace("gFirst = " + gFirst);
- _loc13_ = 0;
- while(_loc13_ < gNbJoueurs_M[gManche - 1])
- {
- var _loc16_ = this["JOUEUR_" + (_loc13_ + 1)].AVATAR;
- var _loc23_ = this["BORNE_" + (_loc13_ + 1)].LETTRE;
- _loc23_.gotoAndPlay("E1");
- var _loc22_ = this["BORNE_" + (_loc13_ + 1)].LETTRE.texte_LETTRE;
- _loc22_.text = "";
- trace("gListeJoueurMixed[i].Score = " + gListeJoueurMixed[_loc13_].Score);
- if(_loc13_ !== gDer && gListeJoueurMixed[_loc13_].Score !== 0)
- {
- _loc16_.gotoAndPlay("E5");
- }
- else
- {
- _loc16_.gotoAndPlay("E6");
- }
- _loc13_ = _loc13_ + 1;
- }
- var _loc24_ = [];
- _loc13_ = 0;
- while(_loc13_ < _loc2_.length - 1)
- {
- if(gListeJoueurMixed[_loc2_[_loc13_]].Score !== 0)
- {
- trace("gListeJoueurMixed[pListeOrdre[i]].Pseudo = " + gListeJoueurMixed[_loc2_[_loc13_]].Pseudo);
- trace("pListeOrdre[i] = " + _loc2_[_loc13_]);
- _loc24_[_loc13_] = gListeJoueurMixed[_loc2_[_loc13_]];
- }
- _loc13_ = _loc13_ + 1;
- }
- LM_M1_CAP._visible = false;
- CAPITAINE.gotoAndPlay("E3");
- var _loc20_ = 0;
- var _loc25_ = 0;
- _loc13_ = 0;
- while(_loc13_ < _loc14_.length)
- {
- trace("gListeJoueurMixed[pListeREEL[i]].Score = " + gListeJoueurMixed[_loc14_[_loc13_]].Score);
- if(gListeJoueurMixed[_loc14_[_loc13_]].Score !== 0)
- {
- _loc25_ += 1;
- }
- _loc13_ = _loc13_ + 1;
- }
- trace("pNumReelPositif = " + _loc25_);
- var _loc28_ = 0;
- _loc13_ = 0;
- while(_loc13_ < _loc19_.length)
- {
- if(gListeJoueurMixed[_loc19_[_loc13_]].Score !== 0)
- {
- _loc28_ += 1;
- }
- _loc13_ = _loc13_ + 1;
- }
- trace("pNumVirtuelPositif = " + _loc28_);
- if(_loc24_.length < 3)
- {
- trace("- de 3 joueurs qualifiés");
- switch(_loc14_.length)
- {
- case 1:
- switch(_loc25_)
- {
- case 0:
- _loc20_ = 1;
- break;
- case 1:
- switch(_loc28_)
- {
- case 0:
- _loc20_ = 2;
- break;
- case 1:
- _loc20_ = 2;
- }
- }
- break;
- case 2:
- switch(_loc25_)
- {
- case 0:
- _loc20_ = 1;
- break;
- case 1:
- _loc20_ = 2;
- break;
- case 2:
- _loc20_ = 3;
- }
- break;
- case 3:
- switch(_loc25_)
- {
- case 0:
- _loc20_ = 1;
- break;
- case 1:
- _loc20_ = 2;
- break;
- case 2:
- _loc20_ = 3;
- }
- break;
- case 4:
- switch(_loc24_.length)
- {
- case 0:
- _loc20_ = 1;
- break;
- case 1:
- _loc20_ = 2;
- break;
- case 2:
- _loc20_ = 3;
- }
- }
- }
- else
- {
- trace("3 joueurs qualifiés");
- var _loc0_ = null;
- if((_loc0_ = _loc14_.length) === 1)
- {
- trace("1 seul joueur reel");
- trace("pNumReelPositif = " + _loc25_);
- switch(_loc25_)
- {
- case 0:
- _loc20_ = 1;
- break;
- case 1:
- switch(_loc28_)
- {
- case 0:
- _loc20_ = 2;
- break;
- case 1:
- _loc20_ = 2;
- break;
- case 3:
- if(gTypePartie == 1)
- {
- if(gListeJoueurMixed[gDer].Type == "REEL")
- {
- _loc20_ = 1;
- }
- }
- }
- }
- }
- }
- trace("pCas = " + _loc20_);
- trace("pNewList.length = " + _loc24_.length);
- switch(_loc20_)
- {
- case 0:
- trace(" 3 joueurs qualifiés => config normale");
- if(gTypePartie == 1)
- {
- joueSon({nomSon:"M" + gManche + "_C1_S",actionFin:"finManche"});
- }
- else if(_loc30_ == true)
- {
- joueSon({nomSon:"M" + gManche + "_C2_FIN4",actionFin:"finManche"});
- }
- else
- {
- joueSon({nomSon:"M" + gManche + "_C2_FIN",actionFin:"finManche"});
- }
- break;
- case 1:
- CAPITAINE.gotoAndPlay("E4");
- trace(" aucun joueur REEL qualifié");
- if(gTypePartie == 1)
- {
- joueSon({nomSon:"M" + gManche + "_C1_E1",actionFin:"finPartie"});
- }
- else
- {
- joueSon({nomSon:"M" + gManche + "_C2_FIN2",actionFin:"finPartie"});
- }
- var _loc31_ = 1;
- break;
- case 2:
- trace(" passage en mode SOLO, 1 ou 2 joueurs à ajouter");
- _loc24_ = ajouteVIRTUEL(_loc24_);
- if(gTypePartie == 1)
- {
- joueSon({nomSon:"M" + gManche + "_C1_S",actionFin:"finManche"});
- }
- else
- {
- joueSon({nomSon:"M" + gManche + "_C2_FIN3",actionFin:"finManche"});
- }
- gTypePartie = 1;
- break;
- case 3:
- trace(" Il manque 1 joueur pour continuer en MULTIJOUEUR");
- _loc24_ = ajouteVIRTUEL(_loc24_);
- joueSon({nomSon:"M" + gManche + "_C2_FIN3",actionFin:"finManche"});
- }
- if(_loc31_ == undefined)
- {
- gListeJoueurMixed = _loc24_;
- }
- }
- function ajouteVIRTUEL(maList)
- {
- trace("ajouteVirtuel");
- var _loc6_ = maList.length;
- var _loc4_ = [];
- var _loc5_ = 0;
- while(_loc5_ < _loc6_)
- {
- if(maList[_loc5_].Type == "VIRTUEL")
- {
- _loc4_.push(maList[_loc5_].Avatar - 10);
- }
- _loc5_ = _loc5_ + 1;
- }
- trace("ListeVirtuelPris = " + _loc4_);
- trace("nbJoueur = " + _loc6_);
- var _loc12_ = maList;
- var _loc13_ = 0;
- _loc5_ = _loc6_ + 1;
- while(_loc5_ <= 3)
- {
- var _loc1_ = randomValue(1,3);
- while(getPos(_loc4_,_loc1_) !== -1)
- {
- _loc1_ = randomValue(1,3);
- }
- _loc4_.push(_loc1_);
- trace("pOrdi = " + _loc1_);
- var _loc3_ = gListeNamePirateORDI[_loc1_ - 1].length;
- var _loc2_ = randomValue(0,_loc3_ - 1);
- while(getPos(gListePirateORDIused,gListeNamePirateORDI[_loc1_ - 1][_loc2_]) !== -1)
- {
- _loc2_ = randomValue(0,_loc3_ - 1);
- }
- gListePirateORDIused.push(gListeNamePirateORDI[_loc1_ - 1][_loc2_]);
- _loc12_.push({Pseudo:gListeNamePirateORDI[_loc1_ - 1][_loc2_],Avatar:10 + _loc1_,Score:randomValue(1,gListeJoueurMixed[gFirst].Score),Type:"VIRTUEL"});
- _loc13_ += 1;
- _loc5_ = _loc5_ + 1;
- }
- trace("pNbOrdiAjoute = " + _loc13_);
- trace("theList.length = " + _loc12_.length);
- return _loc12_;
- }
- function finManche()
- {
- if(gTypePartie == 1)
- {
- var _loc1_ = 0;
- while(_loc1_ < gNbJoueurs_M[gManche - 1])
- {
- if(gListeJoueurMixed[_loc1_].Type == "REEL")
- {
- coupeBruitPerso(_loc1_);
- break;
- }
- _loc1_ = _loc1_ + 1;
- }
- }
- gereTextes.videLM();
- CAPITAINE.gotoAndPlay("E1");
- gManche += 1;
- gotoAndPlay("TRANSIT_0" + gManche);
- }
- function finPartie()
- {
- if(gTypePartie == 1)
- {
- var _loc1_ = 0;
- while(_loc1_ < gNbJoueurs_M[gManche - 1])
- {
- if(gListeJoueurMixed[_loc1_].Type == "REEL")
- {
- coupeBruitPerso(_loc1_);
- break;
- }
- _loc1_ = _loc1_ + 1;
- }
- }
- gFin = undefined;
- gereTextes.videLM();
- CAPITAINE.gotoAndPlay("E1");
- gotoAndStop("I_02_02");
- play();
- }
- function desactiveTOUT()
- {
- Key.removeListener(KeyListener);
- var _loc4_ = this["TABLEAU_M" + gManche];
- var _loc5_ = _loc4_.ZAP;
- desactiveClip(_loc5_);
- var _loc2_ = 0;
- while(_loc2_ < gListeReponse.length)
- {
- var _loc3_ = _loc4_["REPONSE_" + gimme2digits(_loc2_ + 1)];
- desactiveClip(_loc3_);
- _loc2_ = _loc2_ + 1;
- }
- _loc5_ = _loc4_.ZAP;
- desactiveClip(_loc3_);
- }
- function remplisBarre()
- {
- if(gRemplisBarreOK == true)
- {
- gTemps = getTimer() - (gTimer + gTimerPause);
- var _loc6_ = gTemps * 100 / (gListeTimerM[gManche - 1] * 1000);
- var _loc4_ = this["TABLEAU_M" + gManche];
- var _loc5_ = _loc4_.COMPTEUR_T.masque;
- _loc5_._y = -132 + 69 * _loc6_ / 100;
- if(_loc5_._y >= -63)
- {
- desactiveTOUT();
- var _loc2_ = 0;
- while(_loc2_ < gListeReponse.length)
- {
- var _loc3_ = _loc4_["REPONSE_" + gList_ABC[_loc2_]];
- _loc3_.gotoAndPlay("E1");
- _loc2_ = _loc2_ + 1;
- }
- trace("fin descente ");
- trace("combien = " + (getTimer() - gTimer));
- _loc5_._y = -63;
- trace("AV M1 IntervalRemplisBarre = " + IntervalRemplisBarre);
- _clearInterval("IntervalRemplisBarre");
- trace("AP M1 IntervalRemplisBarre = " + IntervalRemplisBarre);
- gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(0);
- gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(-1);
- testeReponseDone();
- }
- }
- else
- {
- trace("M1 _ BUG DEJOUE remplisBarre !!!!!!!!");
- }
- }
- function initAfficheManche()
- {
- this["BORNE_" + gJoueur].BARIL.gotoAndPlay("E2");
- if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
- {
- this["BORNE_" + gJoueur].BARIL.PICTO_ORDI._visible = false;
- }
- lanceQuestion();
- }
- function initLanceManche()
- {
- LM_M1_CAP._visible = false;
- CAPITAINE.gotoAndPlay("E1");
- var _loc4_ = this["TABLEAU_M" + gManche];
- var _loc2_ = 1;
- while(_loc2_ <= 5)
- {
- var _loc3_ = _loc4_["ROND_" + _loc2_];
- if(_loc2_ <= gListeNbQ_M[gManche - 1])
- {
- _loc3_.gotoAndPlay("E1");
- }
- else
- {
- _loc3_._visible = false;
- }
- _loc2_ = _loc2_ + 1;
- }
- gListeJoueurMixed[gJoueur - 1].gListeReponseManche = [];
- gListeJoueurMixed[gJoueur - 1].gListePosReponseManche = [];
- if(gTypePartie == 1)
- {
- initAfficheManche();
- }
- else
- {
- eteintJoueurs();
- allumeJoueur();
- if(gJoueur == 1)
- {
- gListeJoueurMixed[gJoueur - 1].gListeTirageReponseManche = [];
- }
- if(gJoueur == 1 || gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
- {
- initAfficheManche();
- }
- else
- {
- initBaril();
- }
- }
- }
- delete onEnterFrame;
- gManche = 1;
- KeyListener = new Object();
- KeyListener.onKeyDown = function()
- {
- var _loc3_ = -1;
- if(pauseOnMod == undefined)
- {
- if(gKeyDown == undefined)
- {
- switch(Key.getCode())
- {
- case 65:
- trace("A");
- _loc3_ = 0;
- break;
- case 66:
- trace("B");
- _loc3_ = 1;
- break;
- case 67:
- if(gListeReponse.length > 2)
- {
- trace("C");
- _loc3_ = 2;
- }
- }
- if(_loc3_ !== -1)
- {
- gRemplisBarreOK = undefined;
- clearAllInterval();
- desactiveTOUT();
- gKeyDown = 1;
- var _loc4_ = _root["TABLEAU_M" + gManche];
- var _loc2_ = 1;
- while(_loc2_ < 3)
- {
- var _loc5_ = _loc4_["REPONSE_" + gimme2digits(_loc2_)];
- _loc5_.mcBouton.gotoAndPlay("E1");
- _loc2_ = _loc2_ + 1;
- }
- _loc5_ = _loc4_["REPONSE_" + gimme2digits(_loc3_ + 1)];
- _loc5_.mcBouton.gotoAndPlay("E2");
- trace("________REPONSE__________________ " + gListeReponse[_loc3_]);
- trace("_________POS_________________ " + pLettre);
- gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(gListeReponse[_loc3_]);
- gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(_loc3_);
- joueBruitage({nomSon:"B_LETTRE",actionFin:"testeReponseDone"});
- }
- }
- }
- };
- KeyListener.onKeyUp = function()
- {
- gKeyDown = undefined;
- };
- initPartie();
-