home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 148 / MOBICLIC148.ISO / mac / DATA / QZZ148 / QZZ148_00 / QZZ148_00.swf / scripts / frame_195 / DoAction.as < prev   
Text File  |  2012-10-16  |  44KB  |  1,265 lines

  1. function clearAllInterval()
  2. {
  3.    trace("clearAllInterval M2");
  4.    trace("AVANT IntervalRemplisBarre = " + IntervalRemplisBarre);
  5.    trace("AVANT IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
  6.    trace("AVANT IntervalVIRTUEL = " + IntervalVIRTUEL);
  7.    clearInterval(IntervalRemplisBarre);
  8.    clearInterval(IntervalLanceBruitageChrono);
  9.    clearInterval(IntervalVIRTUEL);
  10.    trace("APRES IntervalRemplisBarre = " + IntervalRemplisBarre);
  11.    trace("APRES IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
  12.    trace("APRES IntervalVIRTUEL = " + IntervalVIRTUEL);
  13. }
  14. function remplisBarre()
  15. {
  16.    if(gRemplisBarreOK == true)
  17.    {
  18.       gTemps = getTimer() - gTimer;
  19.       var _loc6_ = gTemps * 100 / (gListeTimerM[gManche - 1] * 1000);
  20.       var _loc4_ = this["TABLEAU_M" + gManche];
  21.       var _loc5_ = _loc4_.COMPTEUR_T.masque;
  22.       _loc5_._y = -132 + 69 * _loc6_ / 100;
  23.       if(_loc5_._y >= -63)
  24.       {
  25.          desactiveTOUT();
  26.          trace("AV M2 IntervalRemplisBarre = " + IntervalRemplisBarre);
  27.          clearInterval(IntervalRemplisBarre);
  28.          trace("AP M2 IntervalRemplisBarre = " + IntervalRemplisBarre);
  29.          var _loc2_ = 0;
  30.          while(_loc2_ < gListeReponse.length)
  31.          {
  32.             var _loc3_ = _loc4_["REPONSE_" + gList_ABC[_loc2_]];
  33.             _loc3_.gotoAndPlay("E1");
  34.             _loc2_ = _loc2_ + 1;
  35.          }
  36.          trace("fin descente ");
  37.          trace("combien = " + (getTimer() - gTimer));
  38.          _loc5_._y = -63;
  39.          gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(0);
  40.          gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(-1);
  41.          testeReponseDone();
  42.       }
  43.    }
  44.    else
  45.    {
  46.       trace("M2 __ BUG DEJOUE remplisBarre !!!!!!!!");
  47.    }
  48. }
  49. function initManche()
  50. {
  51.    var _loc2_ = 0;
  52.    while(_loc2_ < gNbJoueurs_M[gManche - 1])
  53.    {
  54.       trace("initManche");
  55.       trace("i = " + _loc2_);
  56.       trace("gListeJoueurMixed[i].Avatar = " + gListeJoueurMixed[_loc2_].Avatar);
  57.       this["JOUEUR_" + (_loc2_ + 1)].gotoAndPlay("A" + gListeJoueurMixed[_loc2_].Avatar);
  58.       this["BORNE_" + (_loc2_ + 1)].texte_PSEUDO.text = gListeJoueurMixed[_loc2_].Pseudo;
  59.       this["BORNE_" + (_loc2_ + 1)].LETTRE.texte_LETTRE.text = "";
  60.       this["BORNE_" + (_loc2_ + 1)].SCORE.texte_SCORE.text = String(gListeJoueurMixed[_loc2_].Score);
  61.       trace("gListeJoueurMixed[i].Type = " + gListeJoueurMixed[_loc2_].Type);
  62.       if(gListeJoueurMixed[_loc2_].Type == "REEL")
  63.       {
  64.          this["BORNE_" + (_loc2_ + 1)].BARIL.PICTO_ORDI._visible = false;
  65.       }
  66.       _loc2_ = _loc2_ + 1;
  67.    }
  68.    gJoueur = 1;
  69.    gNoQuestion = 1;
  70. }
  71. function initThemesVisu()
  72. {
  73.    var _loc2_ = 0;
  74.    while(_loc2_ < gNbJoueurs_M[gManche - 1])
  75.    {
  76.       var _loc3_ = this["THEME_" + (_loc2_ + 1)];
  77.       XmlLM = this.moduleInfo.returnNodeByPath("Module." + gLangue + ".LegendesMedias");
  78.       var _loc4_ = gereTextes.recusiveGetTextByAttribute(XmlLM,"code",gListeThemes[_loc2_]);
  79.       _loc3_.pTheme = gListeThemes[_loc2_];
  80.       gereTextes.afficheLM({codeLM:"LM_" + gListeThemes[_loc2_],mc:_loc3_,texte_LM:"texte_LMT",texte:_loc4_});
  81.       _loc2_ = _loc2_ + 1;
  82.    }
  83.    TABLEAU_THEME.ZAP._visible = false;
  84.    gereTextes.afficheLM({mc:TABLEAU_THEME,codeLM:"LM_T01_"});
  85.    gereTextes.masqueLM({mc:TABLEAU_THEME,codeLM:"LM_T01_"});
  86. }
  87. function simuleDistriTheme(lMc)
  88. {
  89.    var _loc4_ = randomValue(0,glisteCible.length - 1);
  90.    lMc.pNewLoc = [_root[glisteCible[_loc4_]]._x + _root[glisteCible[_loc4_]]._width / 2,_root[glisteCible[_loc4_]]._y + _root[glisteCible[_loc4_]]._height / 2];
  91.    lMc.pCompteur = 0;
  92.    lMc.pNumRandom = _loc4_;
  93.    lMc.pDistLoc = [(lMc.pOldLoc[0] - lMc.pNewLoc[0]) / 10,(lMc.pOldLoc[1] - lMc.pNewLoc[1]) / 10];
  94.    trace("lMc.pDistLoc = " + lMc.pDistLoc);
  95.    lMc.onEnterFrame = function()
  96.    {
  97.       this.pCompteur += 1;
  98.       this._x -= this.pDistLoc[0];
  99.       this._y -= this.pDistLoc[1];
  100.       if(this.pCompteur == 10)
  101.       {
  102.          this._alpha = 0;
  103.          gListeDone.push(this);
  104.          var _loc4_ = glisteCible[this.pNumRandom].split("_")[2];
  105.          var _loc3_ = _root["BORNE_" + _loc4_];
  106.          _loc3_.gotoAndPlay("E2");
  107.          var _loc5_ = gereTextes.recusiveGetTextByAttribute(XmlLM,"code",this.pTheme);
  108.          gereTextes.afficheLM({codeLM:"LM_" + this.pTheme,mc:_loc3_.THEME_X,texte_LM:"texte_LMT",texte:_loc5_});
  109.          gListeJoueurMixed[Number(_loc4_) - 1].Theme = this.pTheme;
  110.          trace("glisteCible AVANT = " + glisteCible);
  111.          glisteCible.splice(this.pNumRandom,1);
  112.          trace("glisteCible APRES = " + glisteCible);
  113.          joueBruitage({nomSon:"B_SAC"});
  114.          delete this.onEnterFrame;
  115.          if(glisteCible.length == 0)
  116.          {
  117.             CAPITAINE.gotoAndPlay("E2");
  118.             if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
  119.             {
  120.                gereTextes.masqueLM({mc:TABLEAU_THEME,codeLM:"LM_T02_"});
  121.             }
  122.             else
  123.             {
  124.                gereTextes.masqueLM({mc:TABLEAU_THEME,codeLM:"LM_T01_"});
  125.             }
  126.             TABLEAU_THEME._visible = false;
  127.             joueSon({nomSon:"M2_02_0" + gJoueur,actionFin:"finM2_02_01"});
  128.          }
  129.          else
  130.          {
  131.             trace("Number(this._name.split(_)[1])+1) = " + (Number(this._name.split("_")[1]) + 1));
  132.             var _loc6_ = _root["THEME_" + (Number(this._name.split("_")[1]) + 1)];
  133.             simuleDistriTheme(_loc6_);
  134.          }
  135.       }
  136.    };
  137. }
  138. function initThemes()
  139. {
  140.    eteintJoueurs();
  141.    allumeJoueur();
  142.    if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
  143.    {
  144.       gereTextes.afficheLM({mc:TABLEAU_THEME,codeLM:"LM_T02_"});
  145.    }
  146.    else
  147.    {
  148.       gereTextes.afficheLM({mc:TABLEAU_THEME,codeLM:"LM_T01_"});
  149.    }
  150.    glisteCible = ["ZONE_DROP_1","ZONE_DROP_2","ZONE_DROP_3"];
  151.    gListeDone = [];
  152.    CAPITAINE.gotoAndPlay("E1");
  153.    TABLEAU_THEME.ZAP._visible = false;
  154.    if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
  155.    {
  156.       var _loc11_ = 1;
  157.       while(_loc11_ <= gNbJoueurs_M[gManche - 1])
  158.       {
  159.          var _loc4_ = this["THEME_" + _loc11_];
  160.          _loc4_.pOldLoc = [_loc4_._x,_loc4_._y];
  161.          _loc4_.gotoAndPlay("E1");
  162.          if(_loc11_ == 1)
  163.          {
  164.             simuleDistriTheme(_loc4_);
  165.          }
  166.          _loc11_ = _loc11_ + 1;
  167.       }
  168.    }
  169.    else
  170.    {
  171.       _loc11_ = 0;
  172.       while(_loc11_ < gNbJoueurs_M[gManche - 1])
  173.       {
  174.          _loc4_ = this["THEME_" + (_loc11_ + 1)];
  175.          _loc4_.gotoAndPlay("E1");
  176.          _loc4_.pDepth = _loc4_.getDepth();
  177.          _loc4_.pOldLoc = [_loc4_._x,_loc4_._y];
  178.          _loc4_.pCible = undefined;
  179.          _loc4_.pBruitRoll = "B_THEME";
  180.          _loc4_.pBruitDrop = "B_SAC";
  181.          _loc4_.onRollOver = function()
  182.          {
  183.             trace("rollOver " + gDrag);
  184.             if(gDrag == undefined)
  185.             {
  186.                gereCursor(3);
  187.                this.gotoAndPlay("E2");
  188.                joueBruitage({nomSon:this.pBruitRoll});
  189.             }
  190.          };
  191.          _loc4_.onRollOut = function()
  192.          {
  193.             trace("rollOutttttttttttttt " + gDrag);
  194.             if(gDrag == undefined)
  195.             {
  196.                gereCursor(1);
  197.                this.gotoAndPlay("E1");
  198.                stopBruitage({nomSon:this.pBruitRoll});
  199.             }
  200.          };
  201.          _loc4_.onPress = function()
  202.          {
  203.             if(gDrag == undefined)
  204.             {
  205.                gereCursor(4);
  206.                gDrag = this;
  207.                stopBruitage({nomSon:this.pBruitRoll});
  208.                this.swapDepths(_root.getNextHighestDepth());
  209.             }
  210.          };
  211.          _loc4_.onRelease = _loc4_.onReleaseOutside = function()
  212.          {
  213.             if(gDrag == this)
  214.             {
  215.                gDrag = undefined;
  216.                gereCursor(1);
  217.                this.swapDepths(this.pDepth);
  218.                this._x = this.pOldLoc[0];
  219.                this._y = this.pOldLoc[1];
  220.                if(this.pCible !== undefined)
  221.                {
  222.                   desactiveClip(this);
  223.                   gListeJoueurMixed[this.pCible - 1].Theme = this.pTheme;
  224.                   var _loc14_ = getPos(glisteCible,"ZONE_DROP_" + this.pCible);
  225.                   glisteCible.splice(_loc14_,1);
  226.                   gListeDone.push(this);
  227.                   if(glisteCible.length == 1)
  228.                   {
  229.                      var _loc5_ = 0;
  230.                      while(_loc5_ < 3)
  231.                      {
  232.                         var _loc3_ = _root["THEME_" + (_loc5_ + 1)];
  233.                         if(getPos(gListeDone,_loc3_) == -1)
  234.                         {
  235.                            desactiveClip(_loc3_);
  236.                            _loc3_.pNewLoc = [_root[glisteCible[0]]._x + _root[glisteCible[0]]._width / 2,_root[glisteCible[0]]._y + _root[glisteCible[0]]._height / 2];
  237.                            _loc3_.pCompteur = 0;
  238.                            _loc3_.pDistLoc = [(_loc3_.pOldLoc[0] - _loc3_.pNewLoc[0]) / 10,(_loc3_.pOldLoc[1] - _loc3_.pNewLoc[1]) / 10];
  239.                            _loc3_.onEnterFrame = function()
  240.                            {
  241.                               this.pCompteur += 1;
  242.                               this._x -= this.pDistLoc[0];
  243.                               this._y -= this.pDistLoc[1];
  244.                               if(this.pCompteur == 10)
  245.                               {
  246.                                  joueBruitage({nomSon:"B_SAC"});
  247.                                  this._alpha = 0;
  248.                                  gListeDone.push(this);
  249.                                  var _loc3_ = glisteCible[0].split("_")[2];
  250.                                  var _loc4_ = _root["BORNE_" + _loc3_];
  251.                                  _loc4_.gotoAndPlay("E2");
  252.                                  var _loc5_ = gereTextes.recusiveGetTextByAttribute(XmlLM,"code",this.pTheme);
  253.                                  gereTextes.afficheLM({codeLM:"LM_" + this.pTheme,mc:_loc4_.THEME_X,texte_LM:"texte_LMT",texte:_loc5_});
  254.                                  gListeJoueurMixed[Number(_loc3_) - 1].Theme = this.pTheme;
  255.                                  glisteCible.splice(Number(_loc3_) - 1,1);
  256.                                  delete this.onEnterFrame;
  257.                                  if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
  258.                                  {
  259.                                     gereTextes.masqueLM({mc:TABLEAU_THEME,codeLM:"LM_T02_"});
  260.                                  }
  261.                                  else
  262.                                  {
  263.                                     gereTextes.masqueLM({mc:TABLEAU_THEME,codeLM:"LM_T01_"});
  264.                                  }
  265.                                  TABLEAU_THEME._visible = false;
  266.                                  CAPITAINE.gotoAndPlay("E2");
  267.                                  joueSon({nomSon:"M2_02_0" + gJoueur,actionFin:"finM2_02_01"});
  268.                               }
  269.                            };
  270.                            break;
  271.                         }
  272.                         _loc5_ = _loc5_ + 1;
  273.                      }
  274.                   }
  275.                }
  276.                else
  277.                {
  278.                   trace("this.hitTest(_xmouse,_ymouse,true) = " + this.hitTest(_xmouse,_ymouse,true));
  279.                   if(this.hitTest(_xmouse,_ymouse,true))
  280.                   {
  281.                      this.onRollOver();
  282.                   }
  283.                   else
  284.                   {
  285.                      this.onRollOut();
  286.                   }
  287.                }
  288.             }
  289.          };
  290.          _loc4_.onEnterFrame = function()
  291.          {
  292.             if(gDrag == this)
  293.             {
  294.                this._x = _xmouse;
  295.                this._y = _ymouse;
  296.                var _loc11_ = 0;
  297.                var _loc3_ = 0;
  298.                while(_loc3_ < glisteCible.length)
  299.                {
  300.                   if(_root[glisteCible[_loc3_]].hitTest(_xmouse,_ymouse,true))
  301.                   {
  302.                      _loc11_ = 1;
  303.                      var _loc4_ = glisteCible[_loc3_].split("_")[2];
  304.                      switch(this.pCible)
  305.                      {
  306.                         default:
  307.                            var _loc5_ = _root["BORNE_" + this.pCible];
  308.                            _loc5_.gotoAndPlay("E1");
  309.                         case undefined:
  310.                            joueBruitage({nomSon:this.pBruitDrop});
  311.                            this.pCible = _loc4_;
  312.                            this._alpha = 0;
  313.                            _loc5_ = _root["BORNE_" + this.pCible];
  314.                            _loc5_.gotoAndPlay("E2");
  315.                            var _loc6_ = gereTextes.recusiveGetTextByAttribute(XmlLM,"code",this.pTheme);
  316.                            gereTextes.afficheLM({codeLM:"LM_" + this.pTheme,mc:_loc5_.THEME_X,texte_LM:"texte_LMT",texte:_loc6_});
  317.                            break;
  318.                         case _loc4_:
  319.                      }
  320.                      break;
  321.                   }
  322.                   _loc3_ = _loc3_ + 1;
  323.                }
  324.                if(_loc11_ == 0)
  325.                {
  326.                   if(this.pCible !== undefined)
  327.                   {
  328.                      this._alpha = 100;
  329.                      _root["BORNE_" + this.pCible].gotoAndPlay("E1");
  330.                      this.pCible = undefined;
  331.                      stopBruitage({nomSon:this.pBruitDrop});
  332.                   }
  333.                }
  334.             }
  335.          };
  336.          _loc11_ = _loc11_ + 1;
  337.       }
  338.    }
  339. }
  340. function initBaril()
  341. {
  342.    var _loc7_ = this["TABLEAU_M" + gManche];
  343.    var _loc2_ = this["BORNE_" + gJoueur].BARIL;
  344.    _loc2_.gotoAndPlay("E4");
  345.    _loc2_.pIB = "IB_06";
  346.    _loc2_.onRollOver = function()
  347.    {
  348.       gereCursor(2);
  349.       var _loc3_ = this._x + this._parent._x + 95;
  350.       var _loc2_ = this._y + this._parent._y + 150;
  351.       gereTextes.afficheIB({codeIB:this.pIB,X:_loc3_,Y:_loc2_});
  352.    };
  353.    _loc2_.onRollOut = function()
  354.    {
  355.       gereCursor(1);
  356.       gereTextes.masqueIB();
  357.    };
  358.    _loc2_.onPress = function()
  359.    {
  360.       this.gotoAndPlay("E2");
  361.       gereCursor(1);
  362.       gereTextes.masqueIB();
  363.       gNoQuestion = 1;
  364.       CAPITAINE.gotoAndPlay("E2");
  365.       joueSon({nomSon:"M" + gManche + "_Q" + gNoQuestion,actionFin:"lanceQuestion"});
  366.       desactiveClip(this);
  367.    };
  368. }
  369. function desinitReponses()
  370. {
  371.    var _loc1_ = 0;
  372.    while(_loc1_ < gListeReponse.length)
  373.    {
  374.       var _loc2_ = myClip0["REPONSE_" + gimme2digits(_loc1_ + 1)];
  375.       desactiveClip(_loc2_);
  376.       _loc1_ = _loc1_ + 1;
  377.    }
  378. }
  379. function lanceQuestion()
  380. {
  381.    gClipReponse = undefined;
  382.    if(gNoQuestion == 1 && gJoueur == 1)
  383.    {
  384.       gotoAndPlay("JEU_M" + gManche + "_C" + gTypePartie);
  385.    }
  386.    if(gNoQuestion == 1 && gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  387.    {
  388.       gTimerJoueur = getTimer();
  389.    }
  390.    eteintJoueurs();
  391.    allumeJoueur();
  392.    var _loc20_ = this["BORNE_" + gJoueur].LETTRE;
  393.    _loc20_.gotoAndPlay("E1");
  394.    var _loc8_ = this["BORNE_" + gJoueur].LETTRE.texte_LETTRE;
  395.    _loc8_.text = "";
  396.    if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  397.    {
  398.       coupeBruitPerso();
  399.    }
  400.    this["JOUEUR_" + gJoueur].AVATAR.gotoAndPlay("E2");
  401.    gereTextes.videLM();
  402.    var _loc6_ = this["TABLEAU_M" + gManche];
  403.    _loc6_._visible = true;
  404.    var _loc21_ = _loc6_.ZAP;
  405.    if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
  406.    {
  407.       _loc21_._visible = true;
  408.       _loc21_.pIB = "IB_ZAP";
  409.       _loc21_.onRollOver = function()
  410.       {
  411.          gereCursor(2);
  412.          this.gotoAndPlay("E2");
  413.          gereTextes.afficheIB({codeIB:this.pIB,X:740,Y:300});
  414.       };
  415.       _loc21_.onRollOut = function()
  416.       {
  417.          gereCursor(1);
  418.          this.gotoAndPlay("E1");
  419.          gereTextes.masqueIB();
  420.       };
  421.       _loc21_.onPress = function()
  422.       {
  423.          gRemplisBarreOK = undefined;
  424.          desactiveTOUT();
  425.          clearAllInterval();
  426.          gereTextes.masqueIB();
  427.          gereCursor(1);
  428.          this.gotoAndPlay("E1");
  429.          var _loc6_ = gListeReponse.length;
  430.          var _loc4_ = gNoQuestion;
  431.          while(_loc4_ <= gListeNbQ_M[gManche - 1])
  432.          {
  433.             var _loc3_ = randomValue(0,_loc6_ - 1);
  434.             trace("gNoQuestion = " + gNoQuestion);
  435.             trace("________REPONSE__________________ " + gListeReponse[_loc3_]);
  436.             trace("_________POS_________________ " + _loc3_);
  437.             if(Key.isDown(32))
  438.             {
  439.                if(gListeReponse[_loc3_] == "A")
  440.                {
  441.                   if(_loc3_ == 0)
  442.                   {
  443.                      _loc3_ = 1;
  444.                   }
  445.                   else if(_loc3_ == 1)
  446.                   {
  447.                      _loc3_ = 2;
  448.                   }
  449.                   else
  450.                   {
  451.                      _loc3_ = 0;
  452.                   }
  453.                }
  454.             }
  455.             gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(gListeReponse[_loc3_]);
  456.             gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(_loc3_);
  457.             if(gListeReponse[_loc3_] == "A")
  458.             {
  459.                gListeJoueurMixed[gJoueur - 1].Score += 2;
  460.                var _loc5_ = _root["BORNE_" + gJoueur].SCORE.texte_SCORE;
  461.                _loc5_.text = String(gListeJoueurMixed[gJoueur - 1].Score);
  462.             }
  463.             gNoQuestion += 1;
  464.             gListeReponse = randomiseList(gList_ABC);
  465.             gListeJoueurMixed[gJoueur - 1].gListeTirageReponseManche.push(gListeReponse);
  466.             trace("gListeReponse = " + gListeReponse);
  467.             _loc4_ = _loc4_ + 1;
  468.          }
  469.          joueBruitage({nomSon:"B_ZAP",actionFin:"suiteReponse"});
  470.       };
  471.    }
  472.    else
  473.    {
  474.       _loc21_._visible = false;
  475.    }
  476.    if(gManche < 3)
  477.    {
  478.       gQuestionNum = gimme2digits(this["gListeThemesQ_" + gListeJoueurMixed[gJoueur - 1].Theme][gNoQuestion - 1]);
  479.       gQuestionNumLM = gQuestionNum;
  480.    }
  481.    else
  482.    {
  483.       gQuestionNum = gimme2digits(gListePartieQ[gManche - 1][gNoQuestion - 1]);
  484.       gQuestionNumLM = gQuestionNum + "_3";
  485.    }
  486.    trace("gQuestionNumLM = " + gQuestionNumLM);
  487.    gereTextes.afficheLM({mc:_loc6_,codeLM:"LM_Q" + gQuestionNumLM});
  488.    var _loc7_ = _loc6_["LM_Q" + gQuestionNumLM];
  489.    var _loc9_ = 30;
  490.    if(_loc7_.LM.texte._height < _loc9_)
  491.    {
  492.       _loc7_._y += _loc7_.LM.texte._height / 2;
  493.    }
  494.    CAPITAINE.gotoAndPlay("E1");
  495.    _loc21_ = _loc6_.POINT.texte_POINT;
  496.    if(gManche < 3)
  497.    {
  498.       _loc21_.text = String(gManche);
  499.    }
  500.    else
  501.    {
  502.       _loc21_.text = "4";
  503.    }
  504.    _loc21_ = _loc6_["ROND_" + (gNoQuestion - 1)];
  505.    _loc21_.gotoAndPlay("E3");
  506.    _loc21_ = _loc6_["ROND_" + gNoQuestion];
  507.    _loc21_.gotoAndPlay("E2");
  508.    gList_ABC = ["A","B","C"];
  509.    var _loc5_ = 2;
  510.    while(_loc5_ >= 0)
  511.    {
  512.       var _loc3_ = _loc6_["REPONSE_" + gList_ABC[_loc5_]];
  513.       _loc8_ = _loc6_["REPONSE_" + gimme2digits(_loc5_ + 1)];
  514.       _loc3_.gotoAndPlay("E1");
  515.       _loc3_._visible = false;
  516.       _loc8_._visible = false;
  517.       desactiveClip(_loc8_);
  518.       _loc6_["texte_LMR" + gimme2digits(_loc5_ + 1)]._visible = 0;
  519.       _loc5_ = _loc5_ - 1;
  520.    }
  521.    if(gManche == 1)
  522.    {
  523.       gList_ABC.splice(2,1);
  524.    }
  525.    gListeReponse = randomiseList(gList_ABC);
  526.    gListeJoueurMixed[gJoueur - 1].gListeTirageReponseManche.push(gListeReponse);
  527.    trace("gListeReponse = " + gListeReponse);
  528.    gDone = 0;
  529.    _loc5_ = 0;
  530.    while(_loc5_ < gListeReponse.length)
  531.    {
  532.       _loc3_ = _loc6_["REPONSE_" + gimme2digits(_loc5_ + 1)];
  533.       _loc3_.mcBouton = _loc6_["REPONSE_" + gList_ABC[_loc5_]];
  534.       _loc3_.pNum = gimme2digits(_loc5_ + 1);
  535.       _loc3_._visible = true;
  536.       _loc3_.mcBouton.gotoAndPlay("E1");
  537.       _loc3_.mcBouton._visible = true;
  538.       _loc3_.gotoAndPlay("E1");
  539.       _loc3_.pCode = gListeReponse[_loc5_];
  540.       _loc3_.pLettre = gList_ABC[_loc5_];
  541.       _loc3_.pDone = 0;
  542.       gereTextes.afficheLM({mc:_loc6_,codeLM:"LM_R" + gimme2digits(gQuestionNum) + gListeReponse[_loc5_],numR:gimme2digits(_loc5_ + 1)});
  543.       _loc7_ = _loc6_["LM_R" + gimme2digits(gQuestionNum) + gListeReponse[_loc5_]];
  544.       _loc9_ = 30;
  545.       if(_loc7_.LM.texte._height < _loc9_)
  546.       {
  547.          _loc7_._y += _loc7_.LM.texte._height / 2 - 5;
  548.       }
  549.       if(_loc3_.pCode == "A")
  550.       {
  551.          gMcRepOk = _loc3_;
  552.       }
  553.       if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  554.       {
  555.          _loc3_.onRollOver = function()
  556.          {
  557.             if(gDone == 0)
  558.             {
  559.                gereCursor(2);
  560.                this.mcBouton.gotoAndPlay("E2");
  561.                joueBruitage({nomSon:"B_LETTRE_02"});
  562.                trace(this.pCode);
  563.                if(Key.isDown(32))
  564.                {
  565.                   if(this.pCode == "A")
  566.                   {
  567.                      gereTextes.afficheIB({texte:"bonne r├⌐ponse",X:650,Y:this._y + 420});
  568.                   }
  569.                }
  570.             }
  571.          };
  572.          _loc3_.onRollOut = function()
  573.          {
  574.             if(gDone == 0)
  575.             {
  576.                gereCursor(1);
  577.                stopBruitage({nomSon:"B_LETTRE_02"});
  578.                this.mcBouton.gotoAndPlay("E1");
  579.                gereTextes.masqueIB();
  580.             }
  581.          };
  582.          _loc3_.onPress = function()
  583.          {
  584.             if(gDone == 0)
  585.             {
  586.                gRemplisBarreOK = undefined;
  587.                gereTextes.masqueIB();
  588.                desactiveTOUT();
  589.                clearAllInterval();
  590.                desinitReponses();
  591.                gereCursor(1);
  592.                stopBruitage({nomSon:"B_LETTRE_02"});
  593.                gDone = 1;
  594.                trace("________REPONSE__________________ " + this.pCode);
  595.                trace("_________POS_________________ " + (Number(this.pNum) - 1));
  596.                gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(this.pCode);
  597.                gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(Number(this.pNum) - 1);
  598.                gClipReponse = this;
  599.                joueBruitage({nomSon:"B_LETTRE",actionFin:"testeReponseDone"});
  600.             }
  601.          };
  602.       }
  603.       _loc5_ = _loc5_ + 1;
  604.    }
  605.    clearAllInterval();
  606.    if(gListeJoueurMixed[gJoueur - 1].Type == "VIRTUEL")
  607.    {
  608.       IntervalVIRTUEL = setInterval(this,"reponseVirtuelle",randomValue(50,gListeTimerM[gManche - 1] * 1000 - 100));
  609.    }
  610.    else
  611.    {
  612.       gKeyDown = undefined;
  613.       Key.addListener(KeyListener);
  614.    }
  615.    _loc6_.COMPTEUR_T.masque._y = -132;
  616.    gTimer = getTimer();
  617.    trace("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% M2 creation Intervals");
  618.    gRemplisBarreOK = true;
  619.    IntervalRemplisBarre = setInterval(this,"remplisBarre",100);
  620.    IntervalLanceBruitageChrono = setInterval(this,"lanceB_CHRONO",gListeTimerM[gManche - 1] * 1000 - 2191);
  621. }
  622. function lanceB_CHRONO()
  623. {
  624.    if(gRemplisBarreOK == true)
  625.    {
  626.       trace("AV M2 IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
  627.       clearInterval(IntervalLanceBruitageChrono);
  628.       trace("AP M2 IntervalLanceBruitageChrono = " + IntervalLanceBruitageChrono);
  629.       joueBruitage({nomSon:"B_CHRONO"});
  630.    }
  631. }
  632. function reponseVirtuelle()
  633. {
  634.    if(gRemplisBarreOK == true)
  635.    {
  636.       gRemplisBarreOK = undefined;
  637.       desactiveTOUT();
  638.       var _loc3_ = this["TABLEAU_M" + gManche];
  639.       clearAllInterval();
  640.       var _loc6_ = gListeReponse.length;
  641.       var _loc2_ = randomValue(0,_loc6_ - 1);
  642.       var _loc4_ = _loc3_["REPONSE_" + gimme2digits(_loc2_ + 1)];
  643.       gClipReponse = _loc4_;
  644.       _loc4_.mcBouton.gotoAndPlay("E2");
  645.       trace("VIRTUEL");
  646.       trace("________REPONSE__________________ " + gListeReponse[_loc2_]);
  647.       trace("_________POS_________________ " + _loc2_);
  648.       gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(gListeReponse[_loc2_]);
  649.       gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(_loc2_);
  650.       var _loc5_ = _loc3_.ZAP;
  651.       _loc5_.gotoAndPlay("E1");
  652.       gereTextes.masqueIB();
  653.       joueBruitage({nomSon:"B_LETTRE",actionFin:"testeReponseDone"});
  654.    }
  655.    else
  656.    {
  657.       trace("M2 __ BUG DEJOUE reponseVirtuelle !!!!!!!!");
  658.    }
  659. }
  660. function testeReponseDone()
  661. {
  662.    var _loc10_ = this["TABLEAU_M" + gManche];
  663.    gMcRepOk.mcBouton.gotoAndPlay("E3");
  664.    if(gClipReponse == gMcRepOk)
  665.    {
  666.       trace("bonne reponse");
  667.    }
  668.    else
  669.    {
  670.       trace("mauvaise reponse");
  671.    }
  672.    if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  673.    {
  674.       gListeJoueurMixed[gJoueur - 1].TempsReponse = getTimer() - gTimerJoueur;
  675.    }
  676.    var _loc4_ = this["JOUEUR_" + gJoueur].AVATAR;
  677.    var _loc2_ = this["BORNE_" + gJoueur].LETTRE;
  678.    var _loc7_ = this["BORNE_" + gJoueur].SCORE.texte_SCORE;
  679.    var _loc8_ = gListeJoueurMixed[gJoueur - 1].gListeReponseManche[gNoQuestion - 1];
  680.    var _loc6_ = gListeJoueurMixed[gJoueur - 1].gListePosReponseManche[gNoQuestion - 1];
  681.    var _loc13_ = gListeJoueurMixed[0].gListeTirageReponseManche[gNoQuestion - 1];
  682.    var _loc3_ = gList_ABC[_loc6_];
  683.    trace("pReponseLettre = " + _loc3_);
  684.    switch(_loc8_)
  685.    {
  686.       case 0:
  687.          _loc2_.gotoAndPlay("E2");
  688.          _loc4_.gotoAndPlay("E4");
  689.          joueBruitage({nomSon:"B_REPONSE_E",actionFin:"suiteReponse"});
  690.          break;
  691.       case "A":
  692.          var _loc12_ = gListeNbPoints_M[gManche - 1];
  693.          gListeJoueurMixed[gJoueur - 1].Score += 2;
  694.          _loc7_.text = String(gListeJoueurMixed[gJoueur - 1].Score);
  695.          _loc2_.gotoAndPlay("E3");
  696.          var _loc5_ = this["BORNE_" + gJoueur].LETTRE.texte_LETTRE;
  697.          _loc5_.text = _loc3_;
  698.          _loc4_.gotoAndPlay("E3");
  699.          joueBruitage({nomSon:"B_REPONSE_S",actionFin:"suiteReponse"});
  700.          break;
  701.       default:
  702.          _loc2_.gotoAndPlay("E4");
  703.          _loc5_ = this["BORNE_" + gJoueur].LETTRE.texte_LETTRE;
  704.          _loc5_.text = _loc3_;
  705.          _loc4_.gotoAndPlay("E4");
  706.          joueBruitage({nomSon:"B_REPONSE_E",actionFin:"suiteReponse"});
  707.    }
  708. }
  709. function suiteReponse()
  710. {
  711.    gRemplisBarreOK = undefined;
  712.    clearAllInterval();
  713.    var _loc4_ = this["TABLEAU_M" + gManche];
  714.    if(gNoQuestion < gListeNbQ_M[gManche - 1])
  715.    {
  716.       gNoQuestion += 1;
  717.       CAPITAINE.gotoAndPlay("E2");
  718.       if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  719.       {
  720.          joueSon({nomSon:"M" + gManche + "_Q" + gNoQuestion,actionFin:"lanceQuestion"});
  721.       }
  722.       else
  723.       {
  724.          joueSon({nomSon:"M" + gManche + "_Q" + gNoQuestion + "_V",actionFin:"lanceQuestion"});
  725.       }
  726.    }
  727.    else
  728.    {
  729.       trace("gJoueur = " + gJoueur);
  730.       trace("gListeJoueurMixed[gJoueur-1].gListeReponseManche = " + gListeJoueurMixed[gJoueur - 1].gListeReponseManche);
  731.       trace("gListeJoueurMixed[gJoueur-1].gListePosReponseManche = " + gListeJoueurMixed[gJoueur - 1].gListePosReponseManche);
  732.       var _loc6_ = this["BORNE_" + gJoueur].BARIL;
  733.       _loc6_.gotoAndPlay("E1");
  734.       if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  735.       {
  736.          this["BORNE_" + gJoueur].BARIL.PICTO_ORDI._visible = false;
  737.       }
  738.       _loc4_._visible = false;
  739.       var _loc3_ = this["BORNE_" + gJoueur].LETTRE;
  740.       _loc3_.gotoAndPlay("E1");
  741.       var _loc2_ = this["BORNE_" + gJoueur].LETTRE.texte_LETTRE;
  742.       _loc2_.text = "";
  743.       if(gJoueur < gNbJoueurs_M[gManche - 1])
  744.       {
  745.          gJoueur += 1;
  746.          eteintJoueurs();
  747.          allumeJoueur();
  748.          _loc6_ = this["BORNE_" + gJoueur].BARIL;
  749.          _loc6_.gotoAndPlay("E2");
  750.          if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  751.          {
  752.             this["BORNE_" + gJoueur].BARIL.PICTO_ORDI._visible = false;
  753.          }
  754.          _loc3_ = this["BORNE_" + gJoueur].LETTRE;
  755.          _loc3_.gotoAndPlay("E1");
  756.          _loc2_ = this["BORNE_" + gJoueur].LETTRE.texte_LETTRE;
  757.          _loc2_.text = "";
  758.          gNoQuestion = 1;
  759.          CAPITAINE.gotoAndPlay("E2");
  760.          if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  761.          {
  762.             var _loc5_ = "M" + gManche + "_02_0" + gJoueur;
  763.          }
  764.          else
  765.          {
  766.             _loc5_ = "M" + gManche + "_02_0" + gJoueur + "_V";
  767.          }
  768.          joueSon({nomSon:_loc5_,actionFin:"initLanceManche"});
  769.       }
  770.       else
  771.       {
  772.          eteintJoueurs();
  773.          trace("fin manche");
  774.          classeJoueurs();
  775.       }
  776.    }
  777. }
  778. function classeJoueurs()
  779. {
  780.    var _loc28_ = undefined;
  781.    var _loc7_ = [];
  782.    var _loc18_ = 50;
  783.    var _loc6_ = [];
  784.    var _loc2_ = [];
  785.    var _loc19_ = 0;
  786.    var _loc25_ = [];
  787.    var _loc24_ = [];
  788.    var _loc11_ = 0;
  789.    while(_loc11_ < gNbJoueurs_M[gManche - 1])
  790.    {
  791.       if(gListeJoueurMixed[_loc11_].Score < _loc18_)
  792.       {
  793.          _loc7_ = [];
  794.          _loc7_.push(_loc11_);
  795.          _loc18_ = gListeJoueurMixed[_loc11_].Score;
  796.       }
  797.       else if(gListeJoueurMixed[_loc11_].Score == _loc18_)
  798.       {
  799.          _loc7_.push(_loc11_);
  800.       }
  801.       if(gListeJoueurMixed[_loc11_].Score > _loc19_)
  802.       {
  803.          _loc6_ = [];
  804.          _loc6_.push(_loc11_);
  805.          _loc19_ = gListeJoueurMixed[_loc11_].Score;
  806.       }
  807.       else if(gListeJoueurMixed[_loc11_].Score == _loc19_)
  808.       {
  809.          _loc6_.push(_loc11_);
  810.       }
  811.       trace("gListeJoueurMixed Joueur " + _loc11_ + " Score = " + gListeJoueurMixed[_loc11_].Score);
  812.       if(gListeJoueurMixed[_loc11_].Type == "REEL")
  813.       {
  814.          _loc25_.push(_loc11_);
  815.       }
  816.       else
  817.       {
  818.          _loc24_.push(_loc11_);
  819.       }
  820.       trace("gListeJoueurMixed Joueur " + _loc11_ + " Type = " + gListeJoueurMixed[_loc11_].Type);
  821.       _loc11_ = _loc11_ + 1;
  822.    }
  823.    trace("pScoreMin = " + _loc18_);
  824.    trace("pListePosMin = " + _loc7_);
  825.    trace("pListePosMax = " + _loc6_);
  826.    trace("pListeREEL = " + _loc25_);
  827.    trace("pListeVIRTUEL = " + _loc24_);
  828.    var _loc4_ = [];
  829.    var _loc17_ = [];
  830.    if(_loc6_.length > 1)
  831.    {
  832.       _loc11_ = 0;
  833.       while(_loc11_ < _loc6_.length)
  834.       {
  835.          if(gListeJoueurMixed[_loc6_[_loc11_]].Type == "REEL")
  836.          {
  837.             _loc4_.push(_loc6_[_loc11_]);
  838.          }
  839.          else
  840.          {
  841.             _loc17_.push(_loc6_[_loc11_]);
  842.          }
  843.          trace("gListeJoueurMixed MAX joueur " + [_loc6_[_loc11_]] + " Type = " + gListeJoueurMixed[_loc6_[_loc11_]].Type);
  844.          _loc11_ = _loc11_ + 1;
  845.       }
  846.       trace("pListePosMax _______________________ ");
  847.       trace("pListeREEL_MAX = " + _loc4_);
  848.       trace("pListeVIRTUEL_MAX = " + _loc17_);
  849.       if(_loc4_.length == 1)
  850.       {
  851.          gFirst = _loc4_[0];
  852.          _loc2_.push(_loc4_[0]);
  853.          trace("--- pListeOrdre MAX 1 = " + _loc2_);
  854.          var _loc13_ = _loc17_.length;
  855.          if(_loc13_ > 0)
  856.          {
  857.             var _loc9_ = 0;
  858.             while(_loc9_ < _loc13_)
  859.             {
  860.                _loc2_.push(_loc17_[_loc9_]);
  861.                trace("--- pListeOrdre MAX AJOUT VIRTUEL(S) 1 = " + _loc2_);
  862.                _loc9_ = _loc9_ + 1;
  863.             }
  864.          }
  865.       }
  866.       else
  867.       {
  868.          trace("test chrono");
  869.          var _loc22_ = 0;
  870.          var _loc23_ = 0;
  871.          _loc11_ = 0;
  872.          while(_loc11_ < _loc4_.length)
  873.          {
  874.             trace("pListeREEL[i] = " + _loc4_[_loc11_]);
  875.             trace("gListeJoueurMixed[pListeREEL_MAX[i]].TempsReponse = " + gListeJoueurMixed[_loc4_[_loc11_]].TempsReponse);
  876.             if(_loc22_ == 0)
  877.             {
  878.                _loc23_ = gListeJoueurMixed[_loc4_[_loc11_]].TempsReponse;
  879.                gFirst = _loc4_[_loc11_];
  880.                _loc2_.push(_loc4_[_loc11_]);
  881.                trace("--- pListeOrdre MAX 2= " + _loc2_);
  882.                _loc22_ = 1;
  883.             }
  884.             else if(gListeJoueurMixed[_loc4_[_loc11_]].TempsReponse < _loc23_)
  885.             {
  886.                gFirst = _loc4_[_loc11_];
  887.                _loc2_.splice(0,0,_loc4_[_loc11_]);
  888.                trace("--- pListeOrdre MAX 3 = " + _loc2_);
  889.             }
  890.             else
  891.             {
  892.                trace("getPos(pListeOrdre,gFirst)+1 = " + (getPos(_loc2_,gFirst) + 1));
  893.                _loc2_.push(_loc4_[_loc11_]);
  894.                trace("___ pListeOrdre MAX 5 = " + _loc2_);
  895.             }
  896.             _loc11_ = _loc11_ + 1;
  897.          }
  898.          _loc13_ = _loc17_.length;
  899.          if(_loc13_ > 0)
  900.          {
  901.             _loc9_ = 0;
  902.             while(_loc9_ < _loc13_)
  903.             {
  904.                _loc2_.push(_loc17_[_loc9_]);
  905.                trace("--- pListeOrdre MAX AJOUT VIRTUEL(S) 2 = " + _loc2_);
  906.                _loc9_ = _loc9_ + 1;
  907.             }
  908.          }
  909.       }
  910.    }
  911.    else
  912.    {
  913.       gFirst = _loc6_[0];
  914.       _loc2_.push(_loc6_[0]);
  915.       trace("--- pListeOrdre MAX 4 = " + _loc2_);
  916.    }
  917.    if(_loc2_.length < gNbJoueurs_M[gManche - 1])
  918.    {
  919.       var _loc5_ = [];
  920.       var _loc8_ = [];
  921.       if(_loc7_.length > 1)
  922.       {
  923.          _loc11_ = 0;
  924.          while(_loc11_ < _loc7_.length)
  925.          {
  926.             if(gListeJoueurMixed[_loc7_[_loc11_]].Type == "REEL")
  927.             {
  928.                _loc5_.push(_loc7_[_loc11_]);
  929.             }
  930.             else
  931.             {
  932.                _loc8_.push(_loc7_[_loc11_]);
  933.             }
  934.             trace("gListeJoueurMixed MIN joueur " + [_loc7_[_loc11_]] + " Type = " + gListeJoueurMixed[_loc7_[_loc11_]].Type);
  935.             _loc11_ = _loc11_ + 1;
  936.          }
  937.          trace("pListeREEL_MIN = " + _loc5_);
  938.          trace("pListeVIRTUEL_MIN = " + _loc8_);
  939.          if(_loc5_.length > 0)
  940.          {
  941.             trace("test chrono");
  942.             _loc22_ = 0;
  943.             _loc23_ = 0;
  944.             _loc11_ = 0;
  945.             while(_loc11_ < _loc5_.length)
  946.             {
  947.                trace("pListeREEL_MIN[i] = " + _loc5_[_loc11_]);
  948.                trace("gListeJoueurMixed[pListeREEL_MIN[i]].TempsReponse = " + gListeJoueurMixed[_loc5_[_loc11_]].TempsReponse);
  949.                if(_loc22_ == 0)
  950.                {
  951.                   _loc23_ = gListeJoueurMixed[_loc5_[_loc11_]].TempsReponse;
  952.                   gDer = _loc5_[_loc11_];
  953.                   _loc2_.push(_loc5_[_loc11_]);
  954.                   trace("___ pListeOrdre MIN 2 = " + _loc2_);
  955.                   _loc22_ = 1;
  956.                }
  957.                else if(gListeJoueurMixed[_loc5_[_loc11_]].TempsReponse > _loc23_)
  958.                {
  959.                   _loc2_.push(_loc5_[_loc11_]);
  960.                   trace("___ pListeOrdre MIN 3 = " + _loc2_);
  961.                   gDer = _loc5_[_loc11_];
  962.                }
  963.                else
  964.                {
  965.                   _loc2_.splice(getPos(_loc2_,gDer),0,_loc5_[_loc11_]);
  966.                   trace("___ pListeOrdre MIN 5 = " + _loc2_);
  967.                }
  968.                _loc11_ = _loc11_ + 1;
  969.             }
  970.             _loc28_ = true;
  971.             _loc13_ = _loc8_.length;
  972.             if(_loc13_ > 0)
  973.             {
  974.                _loc9_ = 0;
  975.                while(_loc9_ < _loc13_)
  976.                {
  977.                   _loc2_.push(_loc8_[_loc9_]);
  978.                   gDer = _loc8_[_loc9_];
  979.                   trace("--- pListeOrdre MIN AJOUT VIRTUEL(S) 2 = " + _loc2_);
  980.                   _loc9_ = _loc9_ + 1;
  981.                }
  982.             }
  983.          }
  984.          else if(_loc8_.length > 0)
  985.          {
  986.             var _loc10_ = 0;
  987.             while(_loc10_ < _loc8_.length)
  988.             {
  989.                gDer = _loc8_[_loc10_];
  990.                _loc2_.push(_loc8_[_loc10_]);
  991.                trace("___ pListeOrdre MIN 1 = " + _loc2_);
  992.                _loc10_ = _loc10_ + 1;
  993.             }
  994.          }
  995.       }
  996.       else
  997.       {
  998.          gDer = _loc7_[0];
  999.          _loc2_.push(_loc7_[0]);
  1000.          trace("___ pListeOrdre MIN 4 = " + _loc2_);
  1001.       }
  1002.    }
  1003.    else
  1004.    {
  1005.       gDer = _loc2_[_loc2_.length - 1];
  1006.       _loc28_ = true;
  1007.    }
  1008.    trace("gDer = " + gDer);
  1009.    trace("gListeJoueurMixed[gDer].Score = " + gListeJoueurMixed[gDer].Score);
  1010.    trace("AJOUT ");
  1011.    _loc11_ = 0;
  1012.    while(_loc11_ < gNbJoueurs_M[gManche - 1])
  1013.    {
  1014.       var _loc15_ = getPos(_loc2_,_loc11_);
  1015.       trace("pListeOrdre = " + _loc2_);
  1016.       trace("i = " + _loc11_);
  1017.       trace("pPos = " + _loc15_);
  1018.       if(_loc15_ == -1)
  1019.       {
  1020.          _loc13_ = _loc2_.length;
  1021.          trace("pLength = " + _loc13_);
  1022.          var _loc3_ = 0;
  1023.          while(_loc3_ < _loc13_)
  1024.          {
  1025.             trace("gListeJoueurMixed[i].Score = " + gListeJoueurMixed[_loc11_].Score);
  1026.             trace("j = " + _loc3_);
  1027.             trace("pListeOrdre[j] = " + _loc2_[_loc3_]);
  1028.             trace("gListeJoueurMixed[pListeOrdre[j]].Score = " + gListeJoueurMixed[_loc2_[_loc3_]].Score);
  1029.             if(gListeJoueurMixed[_loc11_].Score >= gListeJoueurMixed[_loc2_[_loc3_]].Score)
  1030.             {
  1031.                if(gListeJoueurMixed[_loc11_].Score == gListeJoueurMixed[_loc2_[_loc3_]].Score)
  1032.                {
  1033.                   if(gListeJoueurMixed[_loc11_].Type == "REEL" && gListeJoueurMixed[_loc2_[_loc3_]].Type == "VIRTUEL")
  1034.                   {
  1035.                      var _loc12_ = _loc3_;
  1036.                   }
  1037.                   else
  1038.                   {
  1039.                      _loc12_ = _loc3_ + 1;
  1040.                   }
  1041.                }
  1042.                else
  1043.                {
  1044.                   _loc12_ = _loc3_;
  1045.                }
  1046.                _loc2_.splice(_loc12_,0,_loc11_);
  1047.                trace("___ pListeOrdre AJOUT = " + _loc2_);
  1048.                break;
  1049.             }
  1050.             _loc3_ = _loc3_ + 1;
  1051.          }
  1052.       }
  1053.       _loc11_ = _loc11_ + 1;
  1054.    }
  1055.    trace("pListePosMin = " + _loc7_);
  1056.    trace("pListePosMax = " + _loc6_);
  1057.    trace("+++ pListeOrdre = " + _loc2_);
  1058.    trace("gDer = " + gDer);
  1059.    trace("gFirst = " + gFirst);
  1060.    _loc11_ = 0;
  1061.    while(_loc11_ < gNbJoueurs_M[gManche - 1])
  1062.    {
  1063.       var _loc16_ = this["JOUEUR_" + (_loc11_ + 1)].AVATAR;
  1064.       var _loc21_ = this["BORNE_" + (_loc11_ + 1)].LETTRE;
  1065.       _loc21_.gotoAndPlay("E1");
  1066.       var _loc20_ = this["BORNE_" + (_loc11_ + 1)].LETTRE.texte_LETTRE;
  1067.       _loc20_.text = "";
  1068.       if(_loc11_ !== gDer && gListeJoueurMixed[_loc11_].Score !== 0)
  1069.       {
  1070.          _loc16_.gotoAndPlay("E5");
  1071.       }
  1072.       else
  1073.       {
  1074.          _loc16_.gotoAndPlay("E6");
  1075.       }
  1076.       _loc11_ = _loc11_ + 1;
  1077.    }
  1078.    var _loc14_ = [];
  1079.    _loc11_ = 0;
  1080.    while(_loc11_ < _loc2_.length - 1)
  1081.    {
  1082.       if(gListeJoueurMixed[_loc2_[_loc11_]].Score !== 0)
  1083.       {
  1084.          trace("gListeJoueurMixed[pListeOrdre[i]].Type = " + gListeJoueurMixed[_loc2_[_loc11_]].Type);
  1085.          trace("gListeJoueurMixed[pListeOrdre[i]].Pseudo = " + gListeJoueurMixed[_loc2_[_loc11_]].Pseudo);
  1086.          trace("pListeOrdre[i] = " + _loc2_[_loc11_]);
  1087.          _loc14_[_loc11_] = gListeJoueurMixed[_loc2_[_loc11_]];
  1088.       }
  1089.       _loc11_ = _loc11_ + 1;
  1090.    }
  1091.    var _loc27_ = 0;
  1092.    var _loc26_ = 0;
  1093.    _loc11_ = 0;
  1094.    while(_loc11_ < _loc14_.length)
  1095.    {
  1096.       trace("pNewList[i].Type = " + _loc14_[_loc11_].Type);
  1097.       if(_loc14_[_loc11_].Type == "VIRTUEL")
  1098.       {
  1099.          _loc27_ += 1;
  1100.       }
  1101.       else
  1102.       {
  1103.          _loc26_ += 1;
  1104.       }
  1105.       _loc11_ = _loc11_ + 1;
  1106.    }
  1107.    switch(_loc26_)
  1108.    {
  1109.       case 0:
  1110.          var _loc29_ = "M2_C1_E";
  1111.          CAPITAINE.gotoAndPlay("E4");
  1112.          joueSon({nomSon:_loc29_,actionFin:"finPartie"});
  1113.          var _loc30_ = 1;
  1114.          break;
  1115.       case 1:
  1116.          _loc29_ = "M2_C1_S";
  1117.          CAPITAINE.gotoAndPlay("E3");
  1118.          joueSon({nomSon:_loc29_,actionFin:"finManche"});
  1119.          break;
  1120.       case 2:
  1121.          if(_loc28_ == true)
  1122.          {
  1123.             _loc29_ = "M2_C2_FIN2";
  1124.          }
  1125.          else
  1126.          {
  1127.             _loc29_ = "M2_C2_FIN";
  1128.          }
  1129.          CAPITAINE.gotoAndPlay("E3");
  1130.          joueSon({nomSon:_loc29_,actionFin:"finManche"});
  1131.    }
  1132.    if(_loc30_ == undefined)
  1133.    {
  1134.       gListeJoueurMixed = _loc14_;
  1135.    }
  1136. }
  1137. function finManche()
  1138. {
  1139.    if(gTypePartie == 1)
  1140.    {
  1141.       var _loc2_ = 0;
  1142.       while(_loc2_ < gNbJoueurs_M[gManche - 1])
  1143.       {
  1144.          if(gListeJoueurMixed[_loc2_].Type == "REEL")
  1145.          {
  1146.             coupeBruitPerso(_loc2_);
  1147.          }
  1148.          _loc2_ = _loc2_ + 1;
  1149.       }
  1150.    }
  1151.    this["JOUEUR_" + gJoueur].AVATAR.gotoAndPlay("E1");
  1152.    gereTextes.videLM();
  1153.    CAPITAINE.gotoAndPlay("E1");
  1154.    gManche += 1;
  1155.    gotoAndPlay("TRANSIT_0" + gManche);
  1156. }
  1157. function desactiveTOUT()
  1158. {
  1159.    Key.removeListener(KeyListener);
  1160.    var _loc4_ = this["TABLEAU_M" + gManche];
  1161.    var _loc5_ = _loc4_.ZAP;
  1162.    desactiveClip(_loc5_);
  1163.    var _loc2_ = 0;
  1164.    while(_loc2_ < gListeReponse.length)
  1165.    {
  1166.       var _loc3_ = _loc4_["REPONSE_" + gimme2digits(_loc2_ + 1)];
  1167.       desactiveClip(_loc3_);
  1168.       _loc2_ = _loc2_ + 1;
  1169.    }
  1170.    _loc5_ = _loc4_.ZAP;
  1171.    desactiveClip(_loc3_);
  1172. }
  1173. function initAfficheManche()
  1174. {
  1175.    this["BORNE_" + gJoueur].BARIL.gotoAndPlay("E2");
  1176.    if(gListeJoueurMixed[gJoueur - 1].Type == "REEL")
  1177.    {
  1178.       this["BORNE_" + gJoueur].BARIL.PICTO_ORDI._visible = false;
  1179.    }
  1180.    lanceQuestion();
  1181. }
  1182. function initLanceManche()
  1183. {
  1184.    CAPITAINE.gotoAndPlay("E1");
  1185.    var _loc4_ = this["TABLEAU_M" + gManche];
  1186.    var _loc2_ = 1;
  1187.    while(_loc2_ <= 5)
  1188.    {
  1189.       var _loc3_ = _loc4_["ROND_" + _loc2_];
  1190.       if(_loc2_ <= gListeNbQ_M[gManche - 1])
  1191.       {
  1192.          _loc3_.gotoAndPlay("E1");
  1193.       }
  1194.       else
  1195.       {
  1196.          _loc3_._visible = false;
  1197.       }
  1198.       _loc2_ = _loc2_ + 1;
  1199.    }
  1200.    if(gJoueur > 1)
  1201.    {
  1202.       if(gListeJoueurMixed[gJoueur - 2].Type == "REEL")
  1203.       {
  1204.          coupeBruitPerso(gJoueur - 2);
  1205.       }
  1206.       this["JOUEUR_" + (gJoueur - 2)].AVATAR.gotoAndPlay("E1");
  1207.    }
  1208.    this["JOUEUR_" + (gJoueur - 1)].AVATAR.gotoAndPlay("E1");
  1209.    gListeJoueurMixed[gJoueur - 1].gListeReponseManche = [];
  1210.    gListeJoueurMixed[gJoueur - 1].gListePosReponseManche = [];
  1211.    gListeJoueurMixed[gJoueur - 1].gListeTirageReponseManche = [];
  1212.    initAfficheManche();
  1213. }
  1214. KeyListener = new Object();
  1215. KeyListener.onKeyDown = function()
  1216. {
  1217.    var _loc3_ = -1;
  1218.    if(gKeyDown == undefined)
  1219.    {
  1220.       switch(Key.getCode())
  1221.       {
  1222.          case 65:
  1223.             trace("A");
  1224.             _loc3_ = 0;
  1225.             break;
  1226.          case 66:
  1227.             trace("B");
  1228.             _loc3_ = 1;
  1229.             break;
  1230.          case 67:
  1231.             if(gListeReponse.length > 2)
  1232.             {
  1233.                trace("C");
  1234.                _loc3_ = 2;
  1235.             }
  1236.       }
  1237.       if(_loc3_ !== -1)
  1238.       {
  1239.          gRemplisBarreOK = undefined;
  1240.          clearAllInterval();
  1241.          gKeyDown = 1;
  1242.          var _loc4_ = _root["TABLEAU_M" + gManche];
  1243.          desactiveTOUT();
  1244.          var _loc2_ = 1;
  1245.          while(_loc2_ <= 3)
  1246.          {
  1247.             var _loc5_ = _loc4_["REPONSE_" + gimme2digits(_loc2_)];
  1248.             _loc5_.mcBouton.gotoAndPlay("E1");
  1249.             _loc2_ = _loc2_ + 1;
  1250.          }
  1251.          _loc5_ = _loc4_["REPONSE_" + gimme2digits(_loc3_ + 1)];
  1252.          _loc5_.mcBouton.gotoAndPlay("E2");
  1253.          trace("________REPONSE__________________ " + gListeReponse[_loc3_]);
  1254.          trace("_________POS_________________ " + pLettre);
  1255.          gListeJoueurMixed[gJoueur - 1].gListeReponseManche.push(gListeReponse[_loc3_]);
  1256.          gListeJoueurMixed[gJoueur - 1].gListePosReponseManche.push(_loc3_);
  1257.          joueBruitage({nomSon:"B_LETTRE",actionFin:"testeReponseDone"});
  1258.       }
  1259.    }
  1260. };
  1261. KeyListener.onKeyUp = function()
  1262. {
  1263.    gKeyDown = undefined;
  1264. };
  1265.