home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 164 / MOBICLIC164.ISO / pc / DATA / TST164 / TST164_00 / TST164_00.swf / scripts / frame_1 / DoAction.as
Text File  |  2014-05-13  |  36KB  |  1,419 lines

  1. function initKeyPause()
  2. {
  3.    gPauseOn = 0;
  4.    gPauseSpaceOn = 0;
  5.    gPauseSpaceEnCours = 0;
  6. }
  7. function initGen()
  8. {
  9.    this._lockroot = true;
  10.    gClipGen = this;
  11.    Stage.showMenu = false;
  12.    gLangue = "FR";
  13.    gMusicOn = 1;
  14.    gSousTitre = 0;
  15.    gST = 0;
  16.    gVolume = 100;
  17.    gWidth = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.width;
  18.    gHeight = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.height;
  19.    if(gWidth == undefined)
  20.    {
  21.       gWidth = 800;
  22.    }
  23.    else
  24.    {
  25.       gWidth = Number(gWidth);
  26.    }
  27.    if(gHeight == undefined)
  28.    {
  29.       gHeight = 600;
  30.    }
  31.    else
  32.    {
  33.       gHeight = Number(gHeight);
  34.    }
  35.    initKeyPause();
  36. }
  37. function testeDebutCommentSpecial()
  38. {
  39.    switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
  40.    {
  41.       case "bz":
  42.       case "BZ":
  43.          trace("-------  BZ on-----------");
  44.          startMascotte();
  45.          break;
  46.       case "ze":
  47.       case "ZE":
  48.          trace("-------  ZE on-----------");
  49.          DesactiveOEIL();
  50.          if(BT_OEIL.gEtat !== 3)
  51.          {
  52.             BT_OEIL.gotoAndPlay("E3");
  53.          }
  54.          else
  55.          {
  56.             BT_OEIL.OEIL_P.gotoAndPlay("parle");
  57.          }
  58.          afficherRolls();
  59.          break;
  60.       case "bi":
  61.       case "BI":
  62.          trace("-------  BI on-----------");
  63.          BT_AIDE.BT_AIDE.gotoAndPlay("E2");
  64.    }
  65. }
  66. function testeFinCommentSpecial()
  67. {
  68.    switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
  69.    {
  70.       case "bz":
  71.       case "BZ":
  72.          trace("-------  BZ off-----------");
  73.          stopMascotte();
  74.          break;
  75.       case "ze":
  76.       case "ZE":
  77.          trace("-------  ZE off-----------");
  78.          ActiveOEIL();
  79.          BT_OEIL.OEIL_P.gotoAndPlay("rentre");
  80.          BT_OEIL.gClicOn = undefined;
  81.          masquerRolls();
  82.          break;
  83.       case "bi":
  84.       case "BI":
  85.          trace("-------  BI off-----------");
  86.          BT_AIDE.BT_AIDE.gotoAndPlay("E1");
  87.    }
  88. }
  89. function stopComment()
  90. {
  91.    if(gCommentOn !== undefined)
  92.    {
  93.       testeFinCommentSpecial();
  94.       delete gCommentOn.onSoundComplete;
  95.       gCommentOn.stop();
  96.       gCommentOn = undefined;
  97.       if(gMusicOn == 1 && gMusic !== undefined && gBlockMusic == undefined)
  98.       {
  99.          soundObjects[gMusic].setVolume(gVolume);
  100.       }
  101.       if(gPauseOn == undefined || gPauseOn == 0)
  102.       {
  103.          removeMovieClip("mcClicZap");
  104.       }
  105.       gBlockST = undefined;
  106.       gereTextes.masqueST();
  107.       if(gClipTarget !== undefined)
  108.       {
  109.          gClipTarget.gotoAndStop(gClipTargetLabel);
  110.          gClipTarget = undefined;
  111.          gClipTargetLabel = undefined;
  112.       }
  113.    }
  114. }
  115. function pauseComment()
  116. {
  117.    trace("pauseComment " + gCommentOn);
  118.    if(gCommentOn !== undefined)
  119.    {
  120.       gCommentOn.stop();
  121.       mcClicZap._visible = false;
  122.    }
  123. }
  124. function continueComment()
  125. {
  126.    trace("continueComment " + gCommentOn);
  127.    if(gCommentOn !== undefined)
  128.    {
  129.       gCommentOn.start(gCommentOn.position / 1000);
  130.       mcClicZap._visible = true;
  131.    }
  132. }
  133. function joueSon(p)
  134. {
  135.    var _loc4_ = p.nomSon;
  136.    gSoundString = _loc4_;
  137.    if(p.mc !== undefined)
  138.    {
  139.       gClipRef = p.mc;
  140.    }
  141.    else
  142.    {
  143.       gClipRef = _root;
  144.    }
  145.    if(p.zapBlock !== undefined)
  146.    {
  147.       gClicZap = p.zapBlock;
  148.    }
  149.    else
  150.    {
  151.       gClicZap = "ZAP_BLOCK";
  152.    }
  153.    if(p.actionFin !== undefined)
  154.    {
  155.       gActionFinSon = p.actionFin;
  156.    }
  157.    else
  158.    {
  159.       gActionFinSon = "PLAY";
  160.    }
  161.    stopComment();
  162.    if(p.mcCible !== undefined)
  163.    {
  164.       if(typeof p.mcCible == "movieclip")
  165.       {
  166.          gClipTarget = p.mcCible;
  167.       }
  168.       else
  169.       {
  170.          gClipTarget = gClipRef[p.mcCible];
  171.       }
  172.       if(p.mcLabelOut !== undefined)
  173.       {
  174.          gClipTargetLabel = p.mcLabelOut;
  175.       }
  176.       else
  177.       {
  178.          gClipTargetLabel = gClipTarget._currentframe;
  179.       }
  180.       if(p.mcLabelIn !== undefined)
  181.       {
  182.          gClipTarget.gotoAndPlay(p.mcLabelIn);
  183.       }
  184.       else
  185.       {
  186.          gClipTarget.gotoAndPlay("parle");
  187.       }
  188.    }
  189.    gCommentName = "S_" + gLangue + "_" + gModuleName + "_";
  190.    trace("joueSon " + gCommentName + _loc4_);
  191.    mySound = soundObjects[gCommentName + _loc4_];
  192.    if(mySound !== undefined)
  193.    {
  194.       gCommentOn = mySound;
  195.       gCommentOn.p = p;
  196.       gCommentOn.id = gCommentName + _loc4_;
  197.       testeDebutCommentSpecial();
  198.       if(gMusicOn == 1 && gMusic !== undefined && gBlockMusic == undefined)
  199.       {
  200.          soundObjects[gMusic].setVolume(gVolume * 40 / 100);
  201.       }
  202.       mySound.setVolume(gVolume);
  203.       if(gCommentOnPausePos !== undefined)
  204.       {
  205.          mySound.start(gCommentOnPausePos / 1000);
  206.          gCommentOnPause = undefined;
  207.          gCommentOnPausePos = undefined;
  208.       }
  209.       else
  210.       {
  211.          mySound.start();
  212.       }
  213.    }
  214.    else
  215.    {
  216.       trace("______" + getSoundByID(gCommentName + _loc4_) + gCommentName);
  217.       var _loc5_ = getSoundByID(gCommentName + _loc4_);
  218.       if(_loc5_ !== undefined)
  219.       {
  220.          mySound = new Sound();
  221.          mySound.onLoad = function(success)
  222.          {
  223.             if(success)
  224.             {
  225.                if(gCommentOnPausePos !== undefined)
  226.                {
  227.                   mySound.start(gCommentOnPausePos / 1000);
  228.                   gCommentOnPause = undefined;
  229.                   gCommentOnPausePos = undefined;
  230.                }
  231.                else
  232.                {
  233.                   mySound.start();
  234.                }
  235.             }
  236.          };
  237.          mySound.loadSound(this.gModulePath + _loc5_.attributes.src,true);
  238.          gCommentOn = mySound;
  239.          gCommentOn.p = p;
  240.          gCommentOn.id = gCommentName + _loc4_;
  241.          testeDebutCommentSpecial();
  242.          if(gMusicOn == 1 && gMusic !== undefined && gBlockMusic == undefined)
  243.          {
  244.             soundObjects[gMusic].setVolume(gVolume * 40 / 100);
  245.          }
  246.       }
  247.    }
  248.    if(mySound == undefined)
  249.    {
  250.       return undefined;
  251.    }
  252.    mySound.onSoundComplete = commentFini;
  253.    if(gClicZap !== "NOZAP_NOBLOCK")
  254.    {
  255.       mcClicZap = creerRectangle({nom:"mcClicZap",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  256.       switch(gClicZap.split("_")[0])
  257.       {
  258.          case "ZAP":
  259.             mcClicZap.useHandCursor = false;
  260.             mcClicZap.onPress = function()
  261.             {
  262.                if(gCommentOn.position !== gCommentOn.duration)
  263.                {
  264.                   trace("clic zap son");
  265.                   stopSon();
  266.                }
  267.             };
  268.             break;
  269.          case "NOZAP":
  270.             mcClicZap.useHandCursor = false;
  271.             mcClicZap.onPress = function()
  272.             {
  273.                trace("no clic allowed");
  274.             };
  275.       }
  276.       mcClicZap._visible = true;
  277.    }
  278.    if(gST == 1 && gBlockST == undefined)
  279.    {
  280.       gereTextes.afficheST(gCommentName + _loc4_);
  281.    }
  282. }
  283. function creerClicZap(p)
  284. {
  285.    if(_global.mcClicZap2 != undefined)
  286.    {
  287.       removeMovieClip(_root.mcClicZap2);
  288.    }
  289.    var _loc0_ = null;
  290.    var _loc4_ = _global.mcClicZap2 = creerRectangle({nom:"mcClicZap2",pere:_root,level:15001,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  291.    _loc4_.p = p;
  292.    _loc4_.useHandCursor = false;
  293.    _loc4_.onPress = function()
  294.    {
  295.       trace("clic zap " + this.p);
  296.       this.p.retour.call(this.p.ecouteur);
  297.       removeMovieClip(this);
  298.       _global.mcClicZap2 = undefined;
  299.    };
  300.    _loc4_._visible = true;
  301. }
  302. function creerRectangle(p)
  303. {
  304.    var _loc15_ = p.x != undefined ? p.x : 0;
  305.    var _loc13_ = p.y != undefined ? p.y : 0;
  306.    if(p.w != undefined)
  307.    {
  308.       var _loc16_ = p.w;
  309.    }
  310.    else if(p.width != undefined)
  311.    {
  312.       _loc16_ = p.width;
  313.    }
  314.    if(p.h != undefined)
  315.    {
  316.       var _loc14_ = p.h;
  317.    }
  318.    else if(p.height != undefined)
  319.    {
  320.       _loc14_ = p.height;
  321.    }
  322.    var _loc11_ = p.pere != undefined ? p.pere : _root;
  323.    var _loc9_ = p.level != undefined ? p.level : 10;
  324.    var _loc12_ = p.couleur != undefined ? p.couleur : 0;
  325.    var _loc10_ = p.nom != undefined ? p.nom : "ClipSansNom";
  326.    var _loc4_ = p.courbure != undefined ? p.courbure : 0;
  327.    var _loc17_ = p.alpha != undefined ? p.alpha : 100;
  328.    var _loc6_ = 0;
  329.    var _loc7_ = 0;
  330.    var _loc8_ = _loc16_;
  331.    var _loc5_ = _loc14_;
  332.    var _loc3_ = _loc11_.createEmptyMovieClip(_loc10_,_loc9_);
  333.    _loc3_.beginFill(_loc12_,_loc17_);
  334.    _loc3_.moveTo(_loc6_,_loc5_ - _loc4_);
  335.    _loc3_.lineTo(_loc6_,_loc7_ + _loc4_);
  336.    _loc3_.curveTo(_loc6_,_loc7_,_loc6_ + _loc4_,_loc7_);
  337.    _loc3_.lineTo(_loc8_ - _loc4_,_loc7_);
  338.    _loc3_.curveTo(_loc8_,_loc7_,_loc8_,_loc7_ + _loc4_);
  339.    _loc3_.lineTo(_loc8_,_loc5_ - _loc4_);
  340.    _loc3_.curveTo(_loc8_,_loc5_,_loc8_ - _loc4_,_loc5_);
  341.    _loc3_.lineTo(_loc6_ + _loc4_,_loc5_);
  342.    _loc3_.curveTo(_loc6_,_loc5_,_loc6_,_loc5_ - _loc4_);
  343.    _loc3_.endFill();
  344.    _loc3_._x = _loc15_;
  345.    _loc3_._y = _loc13_;
  346.    return _loc3_;
  347. }
  348. function stopSon()
  349. {
  350.    gCommentOn.stop();
  351.    commentFini();
  352. }
  353. function commentFini()
  354. {
  355.    testeFinCommentSpecial();
  356.    gCommentOn = undefined;
  357.    if(gClicZap !== "NOZAP_NOBLOCK")
  358.    {
  359.       removeMovieClip("mcClicZap");
  360.    }
  361.    gBlockST = undefined;
  362.    gereTextes.masqueST();
  363.    if(gMusicOn == 1 && gMusic !== undefined && gBlockMusic == undefined)
  364.    {
  365.       soundObjects[gMusic].setVolume(gVolume);
  366.    }
  367.    if(gClipTarget !== undefined)
  368.    {
  369.       gClipTarget.gotoAndStop(gClipTargetLabel);
  370.       gClipTarget = undefined;
  371.       gClipTargetLabel = undefined;
  372.    }
  373.    switch(gActionFinSon)
  374.    {
  375.       case "RIEN":
  376.          break;
  377.       case "PLAY":
  378.          if(_root.gNextLabel == undefined)
  379.          {
  380.             if(gLineaireOn !== undefined)
  381.             {
  382.                if((_loc0_ = gLineaireOn) !== "_")
  383.                {
  384.                   lSonSuivant = gLineaireOn + gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
  385.                   lLabel = lSonSuivant;
  386.                }
  387.                else
  388.                {
  389.                   lSonSuivant = gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
  390.                   lLabel = gLineaireOn + lSonSuivant;
  391.                }
  392.                gClipRef.gotoAndStop(lLabel);
  393.                joueSon({mc:gClipRef,nomSon:lSonSuivant,zapBlock:gClicZap,actionFin:gActionFinSon});
  394.             }
  395.             else
  396.             {
  397.                gClipRef.play();
  398.             }
  399.          }
  400.          else
  401.          {
  402.             gClipRef.gotoAndPlay(_root.gNextLabel);
  403.             _root.gNextLabel = undefined;
  404.             gLineaireOn = undefined;
  405.          }
  406.          break;
  407.       default:
  408.          gClipRef[gActionFinSon]();
  409.    }
  410. }
  411. function joueBruitage(p)
  412. {
  413.    var _loc2_ = soundObjects[gBruitageName + p.nomSon];
  414.    trace("joueBruitage : " + p.nomSon + " : " + _loc2_ + " A " + p.actionFin);
  415.    if(gListeBruitage == undefined)
  416.    {
  417.       gListeBruitage = [];
  418.       gListeA_fin_Bruitage = [];
  419.       gListeLoop_Bruitage = [];
  420.    }
  421.    _loc2_.setVolume(gVolume);
  422.    _loc2_.id = p.nomSon;
  423.    gListeBruitage.push(_loc2_.id);
  424.    if(p.actionFin !== undefined)
  425.    {
  426.       gActionFinBruitage = p.actionFin;
  427.       gListeA_fin_Bruitage.push(gActionFinBruitage);
  428.    }
  429.    else
  430.    {
  431.       gActionFinBruitage = undefined;
  432.       gListeA_fin_Bruitage.push("");
  433.    }
  434.    _loc2_.p = p;
  435.    _loc2_.onSoundComplete = mx.utils.Delegate.create(_loc2_,finBruitage);
  436.    if(p.loopSon == undefined)
  437.    {
  438.       _loc2_.start(p.offset);
  439.       gListeLoop_Bruitage.push("");
  440.    }
  441.    else
  442.    {
  443.       _loc2_.start(p.offset,p.loopSon);
  444.       gListeLoop_Bruitage.push(p.loopSon);
  445.    }
  446.    if(_loc2_ == undefined)
  447.    {
  448.       trace("joueBruitage : " + p.nomSon + " : " + _loc2_);
  449.    }
  450. }
  451. function stopBruitage(p)
  452. {
  453.    var _loc1_ = soundObjects[gBruitageName + p.nomSon];
  454.    finBruitage(p.nomSon);
  455.    _loc1_.stop();
  456. }
  457. function finBruitage(lSon)
  458. {
  459.    if(lSon == undefined)
  460.    {
  461.       lSon = this.id;
  462.    }
  463.    if(gListeBruitage !== undefined)
  464.    {
  465.       var _loc2_ = getPos(gListeBruitage,lSon);
  466.       if(_loc2_ !== -1)
  467.       {
  468.          if(gListeA_fin_Bruitage[_loc2_] !== "")
  469.          {
  470.             if(typeof gListeA_fin_Bruitage[_loc2_] == "string")
  471.             {
  472.                gClipGen[gListeA_fin_Bruitage[_loc2_]]();
  473.             }
  474.             else
  475.             {
  476.                gListeA_fin_Bruitage[_loc2_].call(this.p.MC);
  477.             }
  478.          }
  479.          gListeA_fin_Bruitage.splice(_loc2_,1);
  480.          gListeLoop_Bruitage.splice(_loc2_,1);
  481.          gListeBruitage.splice(_loc2_,1);
  482.          if(gListeBruitage.length == 0)
  483.          {
  484.             gListeBruitage = undefined;
  485.             gListeA_fin_Bruitage = undefined;
  486.             gListeLoop_Bruitage = undefined;
  487.          }
  488.       }
  489.    }
  490. }
  491. function stopBruit(p)
  492. {
  493.    if(gListeBruitage !== undefined)
  494.    {
  495.       if(getPos(gListeBruitage,p.nomSon) !== -1)
  496.       {
  497.          var _loc1_ = soundObjects[gBruitageName + p.nomSon];
  498.          delete _loc1_.onSoundComplete;
  499.          lSon = p.nomSon;
  500.          gListeA_fin_Bruitage.splice(getPos(gListeBruitage,lSon),1);
  501.          gListeLoop_Bruitage.splice(getPos(gListeBruitage,lSon),1);
  502.          gListeBruitage.splice(getPos(gListeBruitage,lSon),1);
  503.          if(gListeBruitage.length == 0)
  504.          {
  505.             gListeBruitage = undefined;
  506.             gListeA_fin_Bruitage = undefined;
  507.             gListeLoop_Bruitage = undefined;
  508.          }
  509.          _loc1_.stop();
  510.       }
  511.    }
  512. }
  513. function stopAllBruitages(lFinBruitage)
  514. {
  515.    if(gListeBruitage !== undefined)
  516.    {
  517.       var _loc3_ = gListeBruitage.length;
  518.       var _loc1_ = _loc3_ - 1;
  519.       while(_loc1_ >= 0)
  520.       {
  521.          if(lFinBruitage == 1)
  522.          {
  523.             stopBruitage({nomSon:gListeBruitage[_loc1_]});
  524.          }
  525.          else
  526.          {
  527.             stopBruit({nomSon:gListeBruitage[_loc1_]});
  528.          }
  529.          _loc1_ = _loc1_ - 1;
  530.       }
  531.    }
  532. }
  533. function getPos(myList, myValue)
  534. {
  535.    lPresent = -1;
  536.    maPosition = 0;
  537.    while(maPosition < myList.length)
  538.    {
  539.       if(myList[maPosition] == myValue)
  540.       {
  541.          lPresent = maPosition;
  542.          break;
  543.       }
  544.       maPosition++;
  545.    }
  546.    return lPresent;
  547. }
  548. function trouvePosMax(myList)
  549. {
  550.    lMax = myList[0];
  551.    lPosMax = 0;
  552.    i = 1;
  553.    while(i < myList.length)
  554.    {
  555.       if(myList[i] > lMax)
  556.       {
  557.          lMax = myList[i];
  558.          lPosMax = i;
  559.       }
  560.       i++;
  561.    }
  562.    return lPosMax;
  563. }
  564. function duplicate(myList)
  565. {
  566.    newList = [];
  567.    i = 0;
  568.    while(i <= myList.length - 1)
  569.    {
  570.       newList.push(myList[i]);
  571.       i++;
  572.    }
  573.    return newList;
  574. }
  575. function randomiseList(myList)
  576. {
  577.    var _loc3_ = duplicate(myList);
  578.    trace("lList = " + _loc3_);
  579.    var _loc4_ = [];
  580.    var _loc5_ = _loc3_.length;
  581.    var _loc2_ = 0;
  582.    while(_loc2_ < _loc5_)
  583.    {
  584.       var _loc1_ = randomValue(0,_loc3_.length - 1);
  585.       _loc4_.push(_loc3_[_loc1_]);
  586.       _loc3_.splice(_loc1_,1);
  587.       _loc2_ = _loc2_ + 1;
  588.    }
  589.    return _loc4_;
  590. }
  591. function returnNodeByPathRandomise(nodeSent)
  592. {
  593.    var _loc4_ = new XML();
  594.    var _loc5_ = nodeSent.childNodes.length;
  595.    var _loc1_ = 0;
  596.    while(_loc1_ < _loc5_)
  597.    {
  598.       var _loc2_ = randomValue(0,nodeSent.childNodes.length - 1);
  599.       _loc4_.appendChild(nodeSent.childNodes[_loc2_]);
  600.       _loc1_ = _loc1_ + 1;
  601.    }
  602.    return _loc4_;
  603. }
  604. function zapIntro(myLabel)
  605. {
  606.    mcClicZapIntro = this.createEmptyMovieClip("mcClicZapIntro",16031);
  607.    mcClicZapIntro.attachMovie("ClipInvisible","ClipInvisible",2);
  608.    mcClicZapIntro._width = gClipGen._width;
  609.    mcClicZapIntro._height = gClipGen._height;
  610.    mcClicZapIntro._x = 0;
  611.    mcClicZapIntro._y = 0;
  612.    mcClicZapIntro.useHandCursor = false;
  613.    mcClicZapIntro.onPress = function()
  614.    {
  615.       trace("clic zappIntro " + this);
  616.       stopComment();
  617.       gotoAndPlay(myLabel);
  618.       removeZapIntro();
  619.    };
  620. }
  621. function removeZapIntro()
  622. {
  623.    trace("mcClicZapIntrO " + mcClicZapIntro._name + " " + this);
  624.    if(mcClicZapIntro._x != undefined)
  625.    {
  626.       trace("suppression");
  627.       removeMovieClip(mcClicZapIntro);
  628.    }
  629. }
  630. function onMcOut(myMc)
  631. {
  632.    gereCursor(1);
  633.    if(myMc.pLabelOut == undefined)
  634.    {
  635.       myMc.gotoAndPlay("E1");
  636.    }
  637.    else
  638.    {
  639.       myMc.gotoAndPlay(myMc.pLabelOut);
  640.    }
  641.    if(myMc.pSon.split("")[0] == "B")
  642.    {
  643.       stopBruitage({nomSon:myMc.pSon});
  644.    }
  645.    else
  646.    {
  647.       stopComment();
  648.    }
  649.    if(myMc.pIB !== undefined)
  650.    {
  651.       gereTextes.masqueIB();
  652.    }
  653. }
  654. function onMcOver(p)
  655. {
  656.    var myMc = p.mc;
  657.    myMc.pIB = p.codeIB;
  658.    if(p.nomSon == undefined)
  659.    {
  660.       if(p.nomSonC == undefined)
  661.       {
  662.          myMc.pSon = "B_" + myMc._name.split("_")[1];
  663.       }
  664.       else
  665.       {
  666.          myMc.pSon = p.nomSonC;
  667.       }
  668.    }
  669.    else
  670.    {
  671.       myMc.pSon = p.nomSon;
  672.    }
  673.    if(p.actionFin == undefined)
  674.    {
  675.       myMc.actionFin = "RIEN";
  676.    }
  677.    else
  678.    {
  679.       myMc.actionFin = p.actionFin;
  680.    }
  681.    myMc.pLabelOut = p.mcLabelOut;
  682.    myMc.onRollOver = function()
  683.    {
  684.       gereCursor(2);
  685.       if(p.mcLabelIn == undefined)
  686.       {
  687.          this.gotoAndPlay("E2");
  688.       }
  689.       else
  690.       {
  691.          this.gotoAndPlay(p.mcLabelIn);
  692.       }
  693.       if(this.pSon.split("")[0] == "B")
  694.       {
  695.          joueBruitage({nomSon:this.pSon});
  696.       }
  697.       else
  698.       {
  699.          joueSon({nomSon:this.pSon,zapBlock:"NOZAP_NOBLOCK",actionFin:this.actionFin});
  700.       }
  701.       if(this.pIB !== undefined)
  702.       {
  703.          gereTextes.afficheIB({mc:this,codeIB:this.pIB});
  704.       }
  705.    };
  706.    myMc.onRollOut = myMc.onDragOut = function()
  707.    {
  708.       onMcOut(myMc);
  709.    };
  710. }
  711. function desactiveClip(pClip)
  712. {
  713.    delete pClip.onRollOver;
  714.    delete pClip.onRollOut;
  715.    delete pClip.onDragOut;
  716.    delete pClip.onPress;
  717.    delete pClip.onRelease;
  718.    delete pClip.onReleaseOutside;
  719. }
  720. function afficheClipPos(myMc, myX, myY)
  721. {
  722.    myMc._x = myX;
  723.    myMc._y = myY;
  724.    myMc._visible = true;
  725. }
  726. function gimme2digits(X)
  727. {
  728.    if(Number(X) < 10)
  729.    {
  730.       lX = "0" + Number(X);
  731.    }
  732.    else
  733.    {
  734.       lX = String(X);
  735.    }
  736.    return lX;
  737. }
  738. function randomValue(min, max)
  739. {
  740.    var _loc1_ = Math.floor(Math.random() * (max - min + 1)) + min;
  741.    return _loc1_;
  742. }
  743. function chercheDepthPlus(myMc, myDepth)
  744. {
  745.    var _loc1_ = myDepth;
  746.    while(_loc1_ < 17000)
  747.    {
  748.       if(myMc.getInstanceAtDepth(_loc1_) == undefined)
  749.       {
  750.          break;
  751.       }
  752.       _loc1_ = _loc1_ + 1;
  753.    }
  754.    return _loc1_;
  755. }
  756. function chercheDepthMoins(myMc, myDepth)
  757. {
  758.    var _loc1_ = myDepth;
  759.    while(_loc1_ > -16383)
  760.    {
  761.       if(myMc.getInstanceAtDepth(_loc1_) == undefined)
  762.       {
  763.          break;
  764.       }
  765.       _loc1_ = _loc1_ - 1;
  766.    }
  767.    return _loc1_;
  768. }
  769. function changeST(myST)
  770. {
  771.    trace("changeST   : " + myST);
  772.    if(myST == "1")
  773.    {
  774.       gST = 1;
  775.       if(gCommentOn !== undefined)
  776.       {
  777.          gereTextes.afficheST(gCommentOn.id);
  778.       }
  779.    }
  780.    else
  781.    {
  782.       sousTitre = 0;
  783.       gST = 0;
  784.       gereTextes.masqueST(this);
  785.    }
  786. }
  787. function changeMusicOn(myChangeMusicOn)
  788. {
  789.    trace("changeMusicOn   : " + myChangeMusicOn);
  790.    switch(String(myChangeMusicOn))
  791.    {
  792.       case "1":
  793.          gMusicOn = 1;
  794.          if(gMusic == undefined)
  795.          {
  796.             gMusic = gBruitageName + "MU";
  797.          }
  798.          trace("changeMusicOn2   : " + gMusic + " - " + gVolume);
  799.          if(gBlockMusic == undefined)
  800.          {
  801.             if(gCommentOn !== undefined)
  802.             {
  803.                soundObjects[gMusic].setVolume(gVolume * 0.4);
  804.             }
  805.             else
  806.             {
  807.                soundObjects[gMusic].setVolume(gVolume);
  808.             }
  809.          }
  810.          else
  811.          {
  812.             soundObjects[gMusic].setVolume(0);
  813.          }
  814.          soundObjects[gMusic].start(0,1000);
  815.          break;
  816.       case "0":
  817.          soundObjects[gMusic].stop();
  818.          gMusicOn = 0;
  819.          break;
  820.       default:
  821.          if(gMusic !== undefined)
  822.          {
  823.             soundObjects[gMusic].stop();
  824.          }
  825.          gMusic = gBruitageName + myChangeMusicOn;
  826.          if(gMusicOn == 1)
  827.          {
  828.             if(gBlockMusic == undefined)
  829.             {
  830.                if(gCommentOn !== undefined)
  831.                {
  832.                   soundObjects[gMusic].setVolume(gVolume * 0.4);
  833.                }
  834.                else
  835.                {
  836.                   soundObjects[gMusic].setVolume(gVolume);
  837.                }
  838.             }
  839.             else
  840.             {
  841.                soundObjects[gMusic].setVolume(0);
  842.             }
  843.             soundObjects[gMusic].start(0,1000);
  844.          }
  845.    }
  846. }
  847. function changeVolume(myChangeVolume)
  848. {
  849.    trace("changeVolume   : " + myChangeVolume);
  850.    gVolume = Number(myChangeVolume);
  851.    if(gCommentOn !== undefined)
  852.    {
  853.       gCommentOn.setVolume(gVolume);
  854.       if(gMusicOn == 1)
  855.       {
  856.          soundObjects[gMusic].setVolume(gVolume * 0.4);
  857.       }
  858.    }
  859.    else if(gMusicOn == 1)
  860.    {
  861.       soundObjects[gMusic].setVolume(gVolume);
  862.    }
  863. }
  864. function DesactiveBZ()
  865. {
  866.    BT_BZ.useHandCursor = false;
  867.    BT_BZ.gBZactif = 0;
  868. }
  869. function ActiveBZ()
  870. {
  871.    BT_BZ.useHandCursor = true;
  872.    BT_BZ.gBZactif = 1;
  873. }
  874. function getRessourceByID(attributeValue, typeRessource)
  875. {
  876.    var _loc2_ = this.moduleInfo.filterNode(this.moduleInfo.returnNodeByPath("Resources.ResourcesZip"),"type",typeRessource);
  877.    mySound = undefined;
  878.    mySound = this.recusiveGetSoundByAttribute(_loc2_,"id",attributeValue);
  879.    if(mySound == undefined)
  880.    {
  881.       trace(attributeValue + " n\'existe pas dans XML");
  882.    }
  883.    return mySound;
  884. }
  885. function getSoundByID(attributeValue)
  886. {
  887.    var _loc2_ = this.moduleInfo.filterNode(this.moduleInfo.returnNodeByPath("Resources.ResourcesZip"),"type","mp3");
  888.    mySound = undefined;
  889.    mySound = this.recusiveGetSoundByAttribute(_loc2_,"id",attributeValue);
  890.    if(mySound == undefined)
  891.    {
  892.       trace(attributeValue + " n\'existe pas dans XML");
  893.    }
  894.    return mySound;
  895. }
  896. function recusiveGetSoundByAttribute(node, attribute, attributeValue)
  897. {
  898.    var _loc2_ = 0;
  899.    while(_loc2_ < node.childNodes.length)
  900.    {
  901.       if(node.childNodes[_loc2_].attributes[attribute] == attributeValue)
  902.       {
  903.          mySound = node.childNodes[_loc2_];
  904.          break;
  905.       }
  906.       if(node.childNodes[_loc2_].hasChildNodes())
  907.       {
  908.          this.recusiveGetSoundByAttribute(node.childNodes[_loc2_],attribute,attributeValue);
  909.       }
  910.       _loc2_ = _loc2_ + 1;
  911.    }
  912.    return mySound;
  913. }
  914. function gereCursor(myCursor)
  915. {
  916.    switch(myCursor)
  917.    {
  918.       case 1:
  919.       case "fleche":
  920.          myCursor = "fleche";
  921.          break;
  922.       case 2:
  923.       case "doigt":
  924.          myCursor = "doigt";
  925.          break;
  926.       case 3:
  927.       case "mainO":
  928.          myCursor = "mainO";
  929.          break;
  930.       case 4:
  931.       case "mainF":
  932.          myCursor = "mainF";
  933.          break;
  934.       case 0:
  935.       case "O":
  936.          myCursor = "O";
  937.    }
  938.    _global.CURSEUR.Action(myCursor);
  939. }
  940. function ConvertCoord(mc_src, mc_dest)
  941. {
  942.    var _loc1_ = {x:0,y:0};
  943.    mc_src.localToGlobal(_loc1_);
  944.    mc_dest.globalToLocal(_loc1_);
  945.    return _loc1_;
  946. }
  947. function OnPadRollOver()
  948. {
  949.    if(gDrag !== undefined)
  950.    {
  951.    }
  952. }
  953. function OnPadRollOut()
  954. {
  955.    if(gDrag !== undefined)
  956.    {
  957.    }
  958. }
  959. function ModulePause()
  960. {
  961.    trace("pause ModulePause");
  962.    gBlockSTPause = gBlockST;
  963.    if(gListeInterval !== undefined)
  964.    {
  965.       pauseIntervals();
  966.    }
  967.    _global.pauseOnMod = true;
  968.    _moteur_.activePause(this);
  969. }
  970. function ModuleResume()
  971. {
  972.    trace("pause ModuleResume");
  973.    if(gListeInterval !== undefined)
  974.    {
  975.       repriseIntervals();
  976.    }
  977.    gBlockST = gBlockSTPause;
  978.    _global.pauseOnMod = undefined;
  979.    _moteur_.desactivePause(this);
  980.    if(actionAfterPause !== undefined)
  981.    {
  982.       actionAfterPause();
  983.       actionAfterPause = undefined;
  984.    }
  985. }
  986. function _setInterval(p)
  987. {
  988.    trace("cree  interval " + p.nomInterval);
  989.    if(gListeInterval == undefined)
  990.    {
  991.       gListeInterval = [];
  992.       gListeIntervalNom = [];
  993.       gListeIntervalTime = [];
  994.    }
  995.    gListeInterval.push(p);
  996.    gListeIntervalNom.push(p.nomInterval);
  997.    gListeIntervalTime.push(getTimer());
  998.    p.mc[p.nomInterval] = setInterval(p.mc,p.fonction,p.duree,p.reprise);
  999.    trace("p.mc = " + p.mc);
  1000. }
  1001. function _clearInterval(lNom)
  1002. {
  1003.    trace("virer " + lNom + " dans gListeIntervalNom = " + gListeIntervalNom);
  1004.    var _loc1_ = getPos(gListeIntervalNom,lNom);
  1005.    if(_loc1_ !== -1)
  1006.    {
  1007.       trace("myPos = " + _loc1_);
  1008.       var _loc2_ = gListeInterval[_loc1_].mc;
  1009.       trace("il y est " + _loc2_);
  1010.       clearInterval(_loc2_[lNom]);
  1011.       gListeInterval.splice(_loc1_,1);
  1012.       gListeIntervalNom.splice(_loc1_,1);
  1013.       gListeIntervalTime.splice(_loc1_,1);
  1014.       if(gListeInterval.length == 0)
  1015.       {
  1016.          gListeInterval = undefined;
  1017.          gListeIntervalNom = undefined;
  1018.          gListeIntervalTime = undefined;
  1019.       }
  1020.    }
  1021. }
  1022. function pauseIntervals()
  1023. {
  1024.    trace("pauseIntervals");
  1025.    var _loc3_ = gListeInterval.length;
  1026.    if(_loc3_ > 0)
  1027.    {
  1028.       gListePauseInterval = [];
  1029.       var _loc1_ = 0;
  1030.       while(_loc1_ < _loc3_)
  1031.       {
  1032.          var _loc2_ = gListeInterval[_loc1_].mc;
  1033.          gListePauseInterval.push(getTimer() - gListeIntervalTime[_loc1_]);
  1034.          trace("IntervalNom = " + gListeIntervalNom[_loc1_]);
  1035.          clearInterval(_loc2_[gListeIntervalNom[_loc1_]]);
  1036.          _loc1_ = _loc1_ + 1;
  1037.       }
  1038.    }
  1039.    gDureePause = 0;
  1040.    gTopPause = getTimer();
  1041. }
  1042. function repriseIntervals()
  1043. {
  1044.    trace("repriseIntervals");
  1045.    gDureePause += getTimer() - gTopPause;
  1046.    trace("gDureePause = " + gDureePause);
  1047.    var _loc6_ = gListeInterval.length;
  1048.    if(_loc6_ > 0)
  1049.    {
  1050.       var _loc1_ = 0;
  1051.       while(_loc1_ < _loc6_)
  1052.       {
  1053.          var _loc4_ = gListeInterval[_loc1_];
  1054.          var _loc3_ = _loc4_.duree;
  1055.          var _loc2_ = _loc3_ - gListePauseInterval[_loc1_];
  1056.          trace("myDureeRestant = " + _loc2_);
  1057.          gListeInterval[_loc1_].duree = _loc2_;
  1058.          gListeIntervalTime[_loc1_] = getTimer();
  1059.          var _loc5_ = gListeInterval[_loc1_].mc;
  1060.          _loc5_[gListeIntervalNom[_loc1_]] = setInterval(gListeInterval[_loc1_].mc,gListeInterval[_loc1_].fonction,gListeInterval[_loc1_].duree,1);
  1061.          _loc1_ = _loc1_ + 1;
  1062.       }
  1063.    }
  1064. }
  1065. function INIT_INTERFACE(intLabel)
  1066. {
  1067.    Interface = Interface["A_" + gModuleName + "_INTERFACE_DDB"];
  1068.    Interface.gotoAndPlay(intLabel);
  1069.    Interface._visible = 1;
  1070.    _global.BT_OEIL = Interface.BT_OEIL;
  1071.    _global.BT_SOM = Interface.BT_SOM;
  1072.    _global.ActiveOEIL = ActiveOEIL;
  1073.    _root.ActiveOEIL = ActiveOEIL;
  1074.    _global.DesactiveOEIL = DesactiveOEIL;
  1075.    _root.DesactiveOEIL = DesactiveOEIL;
  1076.    _root.OEILCLIC = 0;
  1077. }
  1078. function DesactiveOEIL()
  1079. {
  1080.    trace("DesactiveOEIL");
  1081.    BT_OEIL.useHandCursor = false;
  1082.    BT_OEIL.gOEILactif = 0;
  1083. }
  1084. function ActiveOEIL()
  1085. {
  1086.    trace("ActiveOEIL");
  1087.    BT_OEIL.useHandCursor = true;
  1088.    BT_OEIL.gOEILactif = 1;
  1089. }
  1090. function MASCOTTE_SORT(p)
  1091. {
  1092.    trace(_root.swfStocker["A_" + gModuleName + "_" + p.mascotte]);
  1093.    _root.swfStocker["A_" + gModuleName + "_" + p.mascotte].gotoAndPlay("E1");
  1094.    _root.swfStocker["A_" + gModuleName + "_" + p.mascotte]._visible = true;
  1095.    _root.cMascotte = p.cMascotte;
  1096.    _root.bMascotte = p.bMascotte;
  1097.    _root.mNextLabel = p.nextLabel;
  1098. }
  1099. function initRelance(p)
  1100. {
  1101.    intervalRel = setInterval(this,"oeilRelance",p.tempsRel * 1000,p.sonRel);
  1102. }
  1103. function oeilRelance(sonRel)
  1104. {
  1105.    joueSon({nomSon:sonRel});
  1106.    _root.gotoAndStop(_root._currentframe - 1);
  1107. }
  1108. function clearRelance()
  1109. {
  1110.    clearInterval(intervalRel);
  1111. }
  1112. function playConsignes()
  1113. {
  1114.    trace("playConsigne");
  1115.    DesactiveOEIL();
  1116.    if(_root.OEILCLIC == 0)
  1117.    {
  1118.       _root.OEILCLIC = 1;
  1119.       joueSon({nomSon:"00_ZE",actionFin:"ActiveOEIL"});
  1120.    }
  1121.    else
  1122.    {
  1123.       joueSon({nomSon:"01_ZE",actionFin:"ActiveOEIL"});
  1124.    }
  1125. }
  1126. function afficherRolls()
  1127. {
  1128.    if(nbZones !== undefined)
  1129.    {
  1130.       var _loc3_ = 1;
  1131.       while(_loc3_ <= _root.nbZones)
  1132.       {
  1133.          this["ROLL_" + gimme2digits(_loc3_)]._visible = 1;
  1134.          _loc3_ = _loc3_ + 1;
  1135.       }
  1136.    }
  1137. }
  1138. function masquerRolls()
  1139. {
  1140.    if(nbZones !== undefined)
  1141.    {
  1142.       var _loc3_ = 1;
  1143.       while(_loc3_ <= _root.nbZones)
  1144.       {
  1145.          this["ROLL_" + gimme2digits(_loc3_)]._visible = 0;
  1146.          _loc3_ = _loc3_ + 1;
  1147.       }
  1148.    }
  1149. }
  1150. function animChangeEtat(etat)
  1151. {
  1152.    trace("animChangeEtat : " + activeZone + " - " + etat);
  1153.    this["ANIM_" + activeZone].gotoAndStop(etat);
  1154. }
  1155. function initLib(p)
  1156. {
  1157.    trace(" ____ __ initLib _ __ _");
  1158.    var _loc3_ = this;
  1159.    var _loc4_ = _loc3_.createEmptyMovieClip("_" + p.nom + "_",this.getNextHighestDepth());
  1160.    var _loc5_ = gLibsPath + "/" + nom_lib + "/" + nom_lib + ".swf";
  1161.    this.mclR = new MovieClipLoader();
  1162.    this.mclR.loadClip(p.url,_loc4_);
  1163.    this.mclR.onLoadInit = function(myClip)
  1164.    {
  1165.       trace("onLoadInit " + myClip._name);
  1166.       myClip.ChargeMoteur();
  1167.       _root.Init();
  1168.    };
  1169. }
  1170. function initVariables_TST()
  1171. {
  1172.    gNbQuestionsTotal = [];
  1173.    var _loc3_ = this.moduleInfo.returnNodeByPath("Module." + gLangue + ".LegendesMedias");
  1174.    i = 1;
  1175.    while(i < 1000)
  1176.    {
  1177.       var _loc2_ = gereTextes.getTextById(_loc3_,"LM_Q" + gimme2digits(i));
  1178.       if(_loc2_ == undefined)
  1179.       {
  1180.          break;
  1181.       }
  1182.       i++;
  1183.    }
  1184.    gNbQuestionsTotal = i - 1;
  1185.    this.photoStocker.swapDepths(300);
  1186.    initFONDS();
  1187. }
  1188. function initFONDS()
  1189. {
  1190.    var _loc5_ = this.swfStocker["A_" + gModuleName + "_FOND01"];
  1191.    FOND1 = FOND.createEmptyMovieClip("FOND01",chercheDepthPlus(FOND,0));
  1192.    var _loc3_ = new MovieClipLoader();
  1193.    _loc3_.loadClip(_loc5_._url,FOND1);
  1194.    _loc3_.onLoadInit = function(myClip)
  1195.    {
  1196.    };
  1197.    var _loc4_ = this.swfStocker["A_" + gModuleName + "_FOND02"];
  1198.    if(_loc4_ !== undefined)
  1199.    {
  1200.       FOND2 = FOND.createEmptyMovieClip("FOND02",chercheDepthPlus(FOND,0));
  1201.       var _loc2_ = new MovieClipLoader();
  1202.       _loc2_.loadClip(_loc4_._url,FOND2);
  1203.       _loc2_.onLoadInit = function(myClip)
  1204.       {
  1205.          myClip._visible = false;
  1206.       };
  1207.    }
  1208. }
  1209. function activeBT_SUITE()
  1210. {
  1211.    BT_SUITE.gotoAndPlay("E1");
  1212.    onMcOver({mc:BT_SUITE});
  1213.    BT_SUITE.onPress = function()
  1214.    {
  1215.       onMcOut(this);
  1216.       removeMovieClip(ANIM["swfHolder_" + gListeReponseTest[gNoQuestion - 1]]);
  1217.       ANIM.swfHolder._alpha = 100;
  1218.       gNoQuestion += 1;
  1219.       gereTextes.videLM(gClipGen);
  1220.       gotoAndStop("relance");
  1221.       play();
  1222.    };
  1223. }
  1224. function activeBT_OK()
  1225. {
  1226.    var _loc2_ = "E3";
  1227.    if(gTestFini == 0)
  1228.    {
  1229.       gTestFini = 1;
  1230.       joueBruitage({nomSon:"B_OK1"});
  1231.    }
  1232.    var _loc3_ = "E4";
  1233.    BT_SUITE.gotoAndPlay(_loc2_);
  1234.    onMcOver({mc:BT_SUITE,mcLabelIn:_loc3_,mcLabelOut:_loc2_,nomSon:"B_OK",codeIB:"IB93"});
  1235.    BT_SUITE.onPress = function()
  1236.    {
  1237.       onMcOut(this);
  1238.       gereTextes.videLM(gClipGen);
  1239.       testeFin();
  1240.       gBlockMusic = undefined;
  1241.       trace("downnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ");
  1242.       gotoAndPlay("CONCLU_" + gNbReponses);
  1243.       if(FOND2 !== undefined)
  1244.       {
  1245.          FOND2._visible = true;
  1246.          FOND1._visible = false;
  1247.       }
  1248.    };
  1249. }
  1250. function doneReponse(myReponse)
  1251. {
  1252.    if(gListeReponseTest[gNoQuestion - 1] == "O")
  1253.    {
  1254.       activeBT_SUITE();
  1255.    }
  1256.    gListeReponseTest[gNoQuestion - 1] = myReponse;
  1257.    if(gNoQuestion == gNbQuestionsTotal)
  1258.    {
  1259.       activeBT_OK();
  1260.    }
  1261.    trace(gListeReponseTest);
  1262. }
  1263. function testeQuestionSuivante()
  1264. {
  1265.    gNoQuestion += 1;
  1266.    gotoAndStop("QUIZ");
  1267.    play();
  1268. }
  1269. function testeFin()
  1270. {
  1271.    gTestFini = 1;
  1272.    trace("__________ gListeReponseTest " + gListeReponseTest);
  1273.    lList = ["A","B","C","D","E"];
  1274.    lListeResult = [];
  1275.    i = lList.length - 1;
  1276.    while(i >= 0)
  1277.    {
  1278.       if(i > gNbReponses - 1)
  1279.       {
  1280.          lList.splice(i,1);
  1281.       }
  1282.       else
  1283.       {
  1284.          lListeResult.push(0);
  1285.       }
  1286.       i--;
  1287.    }
  1288.    trace("___lList___ " + lList);
  1289.    i = 0;
  1290.    while(i < gListeReponseTest.length)
  1291.    {
  1292.       j = 0;
  1293.       while(j < lList.length)
  1294.       {
  1295.          if(gListeReponseTest[i] == lList[j])
  1296.          {
  1297.             lListeResult[j] += 1;
  1298.             break;
  1299.          }
  1300.          j++;
  1301.       }
  1302.       i++;
  1303.    }
  1304.    trace("____________ lListeResult __________________ " + lListeResult);
  1305.    gListPCent = [];
  1306.    var i = 0;
  1307.    while(i < lListeResult.length)
  1308.    {
  1309.       gListPCent[i] = Math.round(lListeResult[i] * 100 / gNbQuestionsTotal);
  1310.       i++;
  1311.    }
  1312.    trace("____________ gListPCent _______------______ " + gListPCent);
  1313. }
  1314. this._lockroot = true;
  1315. this.prodVersion = "prod_gen_ED";
  1316. if(_global.gModulePath == undefined)
  1317. {
  1318.    this.gModulePath = _global.gModulePath = "";
  1319. }
  1320. else
  1321. {
  1322.    this.gModulePath = _global.gModulePath;
  1323. }
  1324. _global._MOD_ = this;
  1325. this.CIBLE = this;
  1326. if(_global.HOTE != undefined)
  1327. {
  1328.    MovieClip.prototype.gHotePath = _global.gPARAMS.HOTE_DIR + "/DATA/HOTE";
  1329. }
  1330. else
  1331. {
  1332.    MovieClip.prototype.gHotePath = "../../HOTE";
  1333. }
  1334. this.prodPath = gHotePath + "/" + this.prodVersion;
  1335. MovieClip.prototype.gLibsPath = gHotePath + "/libs";
  1336. _global.stopComment = stopComment;
  1337. _global.joueSon = joueSon;
  1338. _root.creerClicZap = creerClicZap;
  1339. _global.joueBruitage = joueBruitage;
  1340. _global.stopBruitage = stopBruitage;
  1341. _global.stopBruit = stopBruit;
  1342. _global.gimme2digits = gimme2digits;
  1343. _global.randomValue = randomValue;
  1344. this.randRange = randomValue;
  1345. _global.chercheDepthPlus = chercheDepthPlus;
  1346. _global.chercheDepthMoins = chercheDepthMoins;
  1347. _global.DesactiveBZ = DesactiveBZ;
  1348. _root.DesactiveBZ = DesactiveBZ;
  1349. _global.ActiveBZ = ActiveBZ;
  1350. _root.ActiveBZ = ActiveBZ;
  1351. _global.gereCursor = gereCursor;
  1352. trace("FUNCTIONS : COMMUN_DEC");
  1353. this.initVariables = function()
  1354. {
  1355.    trace("initVariables()");
  1356.    this.gotoAndStop("INIT");
  1357. };
  1358. _global._o_ = new Object();
  1359. MovieClip.prototype._o_ = _o_;
  1360. MovieClip.prototype._xlib1_ = undefined;
  1361. this.Init = function()
  1362. {
  1363.    trace("<<<<<<<<<<<<< Init() >>>>>>>>>>>");
  1364.    if(_xlib1_ == undefined)
  1365.    {
  1366.       initLib({nom:"xlib1",url:gLibsPath + "/xlib1/xlib1.swf"});
  1367.       return undefined;
  1368.    }
  1369.    if(_ed_ == undefined)
  1370.    {
  1371.       initLib({nom:"ed",url:gLibsPath + "/o/ed.swf"});
  1372.       return undefined;
  1373.    }
  1374.    if(_xb_ == undefined)
  1375.    {
  1376.       initLib({nom:"xb",url:gLibsPath + "/o/xb.swf"});
  1377.       return undefined;
  1378.    }
  1379.    if(_moteur_ == undefined)
  1380.    {
  1381.       initLib({nom:"moteur",url:this.prodPath + "/moteur.swf"});
  1382.       return undefined;
  1383.    }
  1384. };
  1385. this.InitOk = function()
  1386. {
  1387.    trace("<<<<<<<<<<<<< InitOk() >>>>>>>>>>>");
  1388.    if(HOTE == undefined)
  1389.    {
  1390.       this.Start();
  1391.    }
  1392.    else
  1393.    {
  1394.       HOTE.InitFin(this);
  1395.    }
  1396. };
  1397. this.Start = function()
  1398. {
  1399.    trace("<<<<<<<<<<<<< Start() >>>>>>>>>>>");
  1400.    gereCursor("fleche");
  1401.    this.gotoAndStop("START");
  1402. };
  1403. if(HOTE == undefined)
  1404. {
  1405.    this.onEnterFrame = function()
  1406.    {
  1407.       var _loc2_ = this.getBytesLoaded();
  1408.       var _loc3_ = this.getBytesTotal();
  1409.       if(_loc2_ >= _loc3_)
  1410.       {
  1411.          this.Init();
  1412.          delete this.onEnterFrame;
  1413.       }
  1414.    };
  1415. }
  1416. stop();
  1417. _quality = "BEST";
  1418. stop();
  1419.