home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 136 / MOBICLIC136.ISO / pc / DATA / BLA136 / BLA136_00 / BLA136_00.swf / scripts / frame_1 / DoAction.as
Text File  |  2011-07-20  |  54KB  |  2,088 lines

  1. function xtrace(p)
  2. {
  3.    var _loc3_ = typeof p != "string" ? "" + p.mess : "" + p;
  4.    var _loc5_ = p.group != undefined ? p.group : "tous";
  5.    if(xtraceGroups[_loc5_] == 1)
  6.    {
  7.       trace(_loc3_);
  8.       if(_global.xtrace_mode != "on")
  9.       {
  10.          return undefined;
  11.       }
  12.       var _loc4_ = new LocalConnection();
  13.       _loc4_.allowDomain = function(sendingDomain)
  14.       {
  15.          return true;
  16.       };
  17.       _loc4_.send("lc_name","AfficherTexte",_loc3_);
  18.    }
  19. }
  20. function xtrace_raz()
  21. {
  22.    if(_global.xtrace_mode != "on")
  23.    {
  24.       return undefined;
  25.    }
  26.    var _loc2_ = new LocalConnection();
  27.    _loc2_.send("lc_name","RazTexte",mess);
  28. }
  29. function xlisteObj(p)
  30. {
  31.    if(xlisteObj_mode != "on")
  32.    {
  33.       return undefined;
  34.    }
  35.    var _loc1_ = p.obj != undefined ? p.obj : p;
  36.    p.mess = p.mess != undefined ? p.mess : "";
  37.    xtrace({mess:"\r____________________" + p.mess + " " + _loc1_._name + "______________________",group:p.group});
  38.    for(props in _loc1_)
  39.    {
  40.       xtrace({mess:props + " = " + _loc1_[props],group:p.group});
  41.    }
  42.    xtrace({mess:"_________________________________________________\r",group:p.group});
  43. }
  44. function IncString(str, seuil)
  45. {
  46.    var _loc2_ = str.split("_");
  47.    var _loc1_ = _loc2_.length - 1;
  48.    var _loc3_ = Number(_loc2_[_loc1_]) + 1;
  49.    while(_loc3_ > seuil)
  50.    {
  51.       _loc2_[_loc1_] = gimme2digits(0);
  52.       _loc1_ = _loc1_ - 1;
  53.       _loc3_ = Number(_loc2_[_loc1_]) + 1;
  54.    }
  55.    _loc2_[_loc1_] = gimme2digits(_loc3_);
  56.    return _loc2_.join("_");
  57. }
  58. function DecString(str)
  59. {
  60.    var _loc1_ = str.split("_");
  61.    trace(_loc1_);
  62.    var _loc2_ = _loc1_.length - 1;
  63.    trace(Number(_loc1_[_loc2_]));
  64.    _loc1_[_loc2_] = gimme2digits(Number(_loc1_[_loc2_]) - 1);
  65.    return _loc1_.join("_");
  66. }
  67. function xGetConfig()
  68. {
  69.    _root.xConfig = new Object();
  70.    _root.xConfig.Set = function(p)
  71.    {
  72.       if(_root.xConfig[p.nom] == undefined)
  73.       {
  74.          if(p.defaut != "OBLIGATOIRE")
  75.          {
  76.             _root.xConfig[p.nom] = p.defaut;
  77.             if(p.type == "number")
  78.             {
  79.                _root.xConfig[p.nom] = Number(_root.xConfig[p.nom]);
  80.             }
  81.          }
  82.       }
  83.    };
  84.    _root.xConfig._name = "xConfig";
  85.    var _loc2_ = _root.moduleInfo.returnNodeByPath("Module.Config.Params").childNodes;
  86.    for(props in _loc2_)
  87.    {
  88.       _root.xConfig[_loc2_[props].attributes.nom] = _loc2_[props].attributes.valeur;
  89.    }
  90. }
  91. function GetFilePath(fichier)
  92. {
  93.    var _loc2_ = AntiSlashToSlash(fichier);
  94.    var _loc1_ = _loc2_.split("/");
  95.    _loc1_.pop();
  96.    return _loc1_.join("/");
  97. }
  98. function AntiSlashToSlash(chaine)
  99. {
  100.    return str_replace(chaine,"\\","/");
  101. }
  102. function str_replace(str, search, replace)
  103. {
  104.    return str.split(search).join(replace);
  105. }
  106. function JoindreObjets(objects)
  107. {
  108.    var _loc2_ = new Object();
  109.    var _loc1_ = 0;
  110.    while(_loc1_ < objects.length)
  111.    {
  112.       p1 = objects[_loc1_];
  113.       for(props in p1)
  114.       {
  115.          _loc2_[props] = p1[props];
  116.       }
  117.       _loc1_ = _loc1_ + 1;
  118.    }
  119.    return _loc2_;
  120. }
  121. function GetOriginalSize(mc)
  122. {
  123.    var _loc2_ = mc._rotation;
  124.    mc._rotation = 0;
  125.    var _loc3_ = {w:mc._width * mc._xscale / 100,h:mc._height * mc._yscale / 100};
  126.    mc._rotation = _loc2_;
  127.    return _loc3_;
  128. }
  129. function GetOriginalWidth(mc)
  130. {
  131.    var _loc2_ = mc._rotation;
  132.    mc._rotation = 0;
  133.    var _loc3_ = mc._width * mc._xscale / 100;
  134.    var _loc4_ = mc._height * mc._yscale / 100;
  135.    mc._rotation = _loc2_;
  136.    return _loc3_;
  137. }
  138. function GetOriginalHeight(mc)
  139. {
  140.    var _loc2_ = mc._rotation;
  141.    mc._rotation = 0;
  142.    var _loc4_ = mc._width * mc._xscale / 100;
  143.    var _loc3_ = mc._height * mc._yscale / 100;
  144.    mc._rotation = _loc2_;
  145.    return _loc3_;
  146. }
  147. function CreerCache(p)
  148. {
  149.    var _loc4_ = p.level != undefined ? p.level : _global.Levels.cache;
  150.    var _loc2_ = p.mc.createEmptyMovieClip("CACHE",_loc4_);
  151.    _loc2_.beginFill(65280,50);
  152.    _loc2_.moveTo(0,0);
  153.    _loc2_.lineTo(p.width,0);
  154.    _loc2_.lineTo(p.width,p.height);
  155.    _loc2_.lineTo(0,p.height);
  156.    _loc2_.lineTo(0,0);
  157.    _loc2_.endFill();
  158.    p.mc.setMask(_loc2_);
  159. }
  160. function ConvertCoord(mc_src, mc_dest)
  161. {
  162.    var _loc1_ = {x:0,y:0};
  163.    mc_src.localToGlobal(_loc1_);
  164.    mc_dest.globalToLocal(_loc1_);
  165.    return _loc1_;
  166. }
  167. function getGlobalCoord(xc, yc, mc)
  168. {
  169.    var _loc1_ = {x:xc * 100 / mc._xscale,y:yc * 100 / mc._yscale};
  170.    mc.localToGlobal(_loc1_);
  171.    return _loc1_;
  172. }
  173. function getLocalCoord(xc, yc, mc)
  174. {
  175.    var _loc1_ = new Object({x:xc,y:yc});
  176.    mc.globalToLocal(_loc1_);
  177.    _loc1_.x = _loc1_.x / 100 * mc._xscale;
  178.    _loc1_.y = _loc1_.y / 100 * mc._yscale;
  179.    return _loc1_;
  180. }
  181. function length_ass(arr)
  182. {
  183.    var _loc1_ = 0;
  184.    for(prop in arr)
  185.    {
  186.       _loc1_ = _loc1_ + 1;
  187.    }
  188.    return _loc1_;
  189. }
  190. function ExplodeString(chaine)
  191. {
  192.    var _loc3_ = new Array();
  193.    var _loc1_ = 0;
  194.    while(_loc1_ < chaine.length)
  195.    {
  196.       _loc3_.push(chaine.charAt(_loc1_));
  197.       _loc1_ = _loc1_ + 1;
  198.    }
  199.    return _loc3_;
  200. }
  201. function BloquerActives()
  202. {
  203.    if(_global.ClipBloquant == undefined)
  204.    {
  205.       var _loc0_ = null;
  206.       var _loc2_ = _global.ClipBloquant = _MOD_.createEmptyMovieClip("ClipBloquant",10123);
  207.       _loc2_.attachMovie("ClipInvisible","ClipInvisible",2);
  208.       _loc2_._width = Stage.width;
  209.       _loc2_._height = Stage.height;
  210.       _loc2_._x = 0;
  211.       _loc2_._y = 0;
  212.       _loc2_.useHandCursor = false;
  213.       _loc2_.onPress = function()
  214.       {
  215.       };
  216.    }
  217. }
  218. function DebloquerActives()
  219. {
  220.    if(_global.ClipBloquant != undefined)
  221.    {
  222.       removeMovieClip(_global.ClipBloquant);
  223.       _global.ClipBloquant = undefined;
  224.    }
  225. }
  226. function afficheLM_x2(p)
  227. {
  228.    viderLM_x2();
  229.    _root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x,Y:p.LMrep._y,width:p.LMrep._width,height:p.LMrep._height});
  230.    LMaVider2.push(p);
  231. }
  232. function viderLM_x2()
  233. {
  234.    var _loc3_ = 0;
  235.    while(_loc3_ < _global.LMaVider2.length)
  236.    {
  237.       _root.gereTextes.masqueLM(_global.LMaVider2[_loc3_]);
  238.       _loc3_ = _loc3_ + 1;
  239.    }
  240. }
  241. function afficheLM_x(p)
  242. {
  243.    _root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x - p.width / 2,Y:p.LMrep._y - p.height / 2,width:p.width,height:p.height});
  244.    _global.LMaVider.push(p);
  245. }
  246. function viderLM_x()
  247. {
  248.    var _loc3_ = 0;
  249.    while(_loc3_ < _global.LMaVider.length)
  250.    {
  251.       _root.gereTextes.masqueLM(_global.LMaVider[_loc3_]);
  252.       _loc3_ = _loc3_ + 1;
  253.    }
  254. }
  255. function InitMC(p)
  256. {
  257.    trace("initMC " + p.mc);
  258.    var mc = typeof p != "movieclip" ? p.mc : p;
  259.    if(p.level != undefined)
  260.    {
  261.       var ceMC_name_old = mc._name + "_old";
  262.       var ceMC_name = mc._name;
  263.       mc._name = ceMC_name_old;
  264.       mc.duplicateMovieClip(ceMC_name,p.level);
  265.       mc._visible = false;
  266.       mc = this[ceMC_name];
  267.    }
  268.    var fonction = p.fonction != undefined ? eval("InitMC_" + p.fonction) : InitMC_standart;
  269.    mc.InitMC = fonction;
  270.    mc.InitMC(p);
  271. }
  272. function InitMC_standart(p)
  273. {
  274.    if(p.IB != undefined)
  275.    {
  276.       if(typeof p.IBrep == "movieclip")
  277.       {
  278.          var IBrepere = p.IBrep;
  279.       }
  280.       else if(p.IBrep == true)
  281.       {
  282.          var IBrepere = _MOD_["IBrep_" + p.IB];
  283.       }
  284.       else
  285.       {
  286.          var IBrepere = p.mc;
  287.       }
  288.       this.afficheIB = function()
  289.       {
  290.          _MOD_.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  291.       };
  292.       this.masqueIB = function()
  293.       {
  294.          _MOD_.gereTextes.masqueIB();
  295.       };
  296.    }
  297.    this.reposFrame = p.reposFrame != undefined ? p.reposFrame : "E1";
  298.    this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E2";
  299.    this.overFrame = p.overFrame != undefined ? p.overFrame : "E2";
  300.    this.outFrame = p.outFrame != undefined ? p.outFrame : "E1";
  301.    this.releaseFrame = p.releaseFrame != undefined ? p.releaseFrame : "E1";
  302.    this.releaseOutFrame = p.releaseOutFrame != undefined ? p.releaseOutFrame : "E1";
  303.    this.activeFrame = p.activeFrame != undefined ? p.activeFrame : undefined;
  304.    this.desactiveFrame = p.desactiveFrame != undefined ? p.desactiveFrame : undefined;
  305.    if(p.reposFrame != undefined)
  306.    {
  307.       this.gotoAndStop(p.reposFrame);
  308.    }
  309.    this.p = p;
  310.    ┬º┬ºpush(this);
  311.    ┬º┬ºpush("joueson");
  312.    if(p.son == undefined)
  313.    {
  314.       ┬º┬ºpush(undefined);
  315.    }
  316.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  317.    ┬º┬ºpush(this);
  318.    ┬º┬ºpush("stopson");
  319.    if(p.nostop != undefined)
  320.    {
  321.       ┬º┬ºpush(undefined);
  322.    }
  323.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  324.    if(p.sonOnPress != undefined)
  325.    {
  326.       this.sonOnPress = p.sonOnPress;
  327.       this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
  328.       this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
  329.       this.jouesonOnPress = function()
  330.       {
  331.          joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
  332.       };
  333.       this.stopsonOnPress = function()
  334.       {
  335.          stopBruitage({nomSon:this.sonOnPress});
  336.       };
  337.    }
  338.    else
  339.    {
  340.       this.jouesonOnMove = undefined;
  341.       this.stopsonOnMove = undefined;
  342.    }
  343.    this.curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
  344.    this.curseur_after_press = p.curseurAfterPress != undefined ? p.curseurAfterPress : "doigt";
  345.    this.goto = p.goto;
  346.    this.Activer = function()
  347.    {
  348.       if(this.Actif == true)
  349.       {
  350.          return undefined;
  351.       }
  352.       this.enabled = true;
  353.       this.BTN.enabled = true;
  354.       this.Actif = true;
  355.       this.gotoAndStop(this.activeFrame);
  356.    };
  357.    this.Desactiver = function()
  358.    {
  359.       if(this.Actif == false)
  360.       {
  361.          return undefined;
  362.       }
  363.       this.enabled = false;
  364.       this.BTN.enabled = false;
  365.       this.Actif = false;
  366.       this.stopsonOnPress();
  367.       this.masqueIB();
  368.       this.gotoAndStop(this.desactiveFrame);
  369.    };
  370.    this.Activer();
  371.    this.GS = this.gotoAndStop;
  372.    this.MConPress = function()
  373.    {
  374.       if(this.p.blockOnPress == true)
  375.       {
  376.          this.enabled = false;
  377.       }
  378.       this.stopson();
  379.       this.jouesonOnPress();
  380.       this.masqueIB();
  381.       this.gotoAndStop(this.pressFrame);
  382.       gereCursor(this.curseur_after_press);
  383.       _root.gotoAndStop(this.goto);
  384.       var p = this.OnPress();
  385.    };
  386.    this.MConRollOver = function()
  387.    {
  388.       this.joueson();
  389.       this.afficheIB();
  390.       this.gotoAndStop(this.overFrame);
  391.       gereCursor("doigt");
  392.       var _loc2_ = this.OnRollOver();
  393.    };
  394.    this.MConRollOut = function()
  395.    {
  396.       this.stopson();
  397.       this.masqueIB();
  398.       this.gotoAndStop(this.outFrame);
  399.       gereCursor("fleche");
  400.       var _loc2_ = this.OnRollOut();
  401.    };
  402.    this.MConRelease = function()
  403.    {
  404.       this.gotoAndStop(this.releaseFrame);
  405.       gereCursor("doigt");
  406.       var _loc2_ = this.OnRelease();
  407.    };
  408.    this.MConReleaseOutside = function()
  409.    {
  410.       this.gotoAndStop(this.releaseOutFrame);
  411.       gereCursor("fleche");
  412.       var _loc2_ = this.OnReleaseOutside();
  413.    };
  414.    if(p.BTN != true)
  415.    {
  416.       this.onPress = this.MConPress;
  417.       this.onRollOver = this.MConRollOver;
  418.       this.onRollOut = this.MConRollOut;
  419.       this.onRelease = this.MConRelease;
  420.       this.onReleaseOutside = this.MConReleaseOutside;
  421.    }
  422.    else
  423.    {
  424.       this.BTN.onPress = function()
  425.       {
  426.          this._parent.MConPress();
  427.       };
  428.       this.BTN.onRollOver = function()
  429.       {
  430.          this._parent.MConRollOver();
  431.       };
  432.       this.BTN.onRollOut = function()
  433.       {
  434.          this._parent.MConRollOut();
  435.       };
  436.       this.BTN.onRelease = function()
  437.       {
  438.          this._parent.MConRelease();
  439.       };
  440.       this.BTN.onReleaseOutside = function()
  441.       {
  442.          this._parent.MConReleaseOutside();
  443.       };
  444.    }
  445. }
  446. function InitMC_BTN(p)
  447. {
  448.    if(p.IB != undefined)
  449.    {
  450.       if(p.IBrep == true)
  451.       {
  452.          var IBrepere = _MOD_["IBrep_" + p.IB];
  453.       }
  454.       else
  455.       {
  456.          var IBrepere = p.mc;
  457.       }
  458.       this.afficheIB = function()
  459.       {
  460.          gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  461.       };
  462.       this.masqueIB = function()
  463.       {
  464.          gereTextes.masqueIB();
  465.       };
  466.    }
  467.    this.enabled = true;
  468.    ┬º┬ºpush(this);
  469.    ┬º┬ºpush("joueson");
  470.    if(p.son == undefined)
  471.    {
  472.       ┬º┬ºpush(undefined);
  473.    }
  474.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  475.    ┬º┬ºpush(this);
  476.    ┬º┬ºpush("stopson");
  477.    if(p.nostop != undefined)
  478.    {
  479.       ┬º┬ºpush(undefined);
  480.    }
  481.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  482.    var curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
  483.    this.goto = p.goto;
  484.    this.BTN.onPress = function()
  485.    {
  486.       this._parent.stopson();
  487.       this._parent.masqueIB();
  488.       this._parent.gotoAndStop("E3");
  489.       gereCursor(curseur_after_press);
  490.       _root.gotoAndStop(this.goto);
  491.       var _loc3_ = this._parent.OnPress();
  492.    };
  493.    this.BTN.onRollOver = function()
  494.    {
  495.       this._parent.joueson();
  496.       this._parent.afficheIB();
  497.       this._parent.gotoAndStop("E2");
  498.       gereCursor("doigt");
  499.       var _loc2_ = this._parent.OnRollOver();
  500.    };
  501.    this.BTN.onRollOut = function()
  502.    {
  503.       this._parent.stopson();
  504.       this._parent.masqueIB();
  505.       this._parent.gotoAndStop("E1");
  506.       gereCursor("fleche");
  507.       var _loc2_ = this._parent.OnRollOut();
  508.    };
  509.    this.BTN.onRelease = function()
  510.    {
  511.       this._parent.gotoAndStop("E2");
  512.       gereCursor("doigt");
  513.       var _loc2_ = this._parent.OnRelease();
  514.    };
  515.    this.BTN.onReleaseOutside = function()
  516.    {
  517.       this._parent.gotoAndStop("E1");
  518.       gereCursor("fleche");
  519.       var _loc2_ = this._parent.OnReleaseOutside();
  520.    };
  521. }
  522. function InitMC_dragdrop(p)
  523. {
  524.    xtrace("InitMC");
  525.    if(p.IB != undefined)
  526.    {
  527.       if(p.IBrep == true)
  528.       {
  529.          var IBrepere = _MOD_["IBrep_" + p.IB];
  530.       }
  531.       else
  532.       {
  533.          var IBrepere = p.mc;
  534.       }
  535.       this.afficheIB = function()
  536.       {
  537.          gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  538.       };
  539.       this.masqueIB = function()
  540.       {
  541.          gereTextes.masqueIB();
  542.       };
  543.    }
  544.    this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E3";
  545.    ┬º┬ºpush(this);
  546.    ┬º┬ºpush("joueson");
  547.    if(p.son == undefined)
  548.    {
  549.       ┬º┬ºpush(undefined);
  550.    }
  551.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  552.    ┬º┬ºpush(this);
  553.    ┬º┬ºpush("stopson");
  554.    if(p.son == undefined)
  555.    {
  556.       ┬º┬ºpush(undefined);
  557.    }
  558.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  559.    ┬º┬ºpush(this);
  560.    ┬º┬ºpush("jouesonOnPress");
  561.    if(p.son == undefined)
  562.    {
  563.       ┬º┬ºpush(undefined);
  564.    }
  565.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  566.    ┬º┬ºpush(this);
  567.    ┬º┬ºpush("stopsonOnPress");
  568.    if(p.son == undefined)
  569.    {
  570.       ┬º┬ºpush(undefined);
  571.    }
  572.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  573.    ┬º┬ºpush(this);
  574.    ┬º┬ºpush("jouesonOnOverCible");
  575.    if(p.son == undefined)
  576.    {
  577.       ┬º┬ºpush(undefined);
  578.    }
  579.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  580.    ┬º┬ºpush(this);
  581.    ┬º┬ºpush("stopsonOnOverCible");
  582.    if(p.son == undefined)
  583.    {
  584.       ┬º┬ºpush(undefined);
  585.    }
  586.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  587.    var _loc5_ = p.goto != undefined ? "fleche" : "doigt";
  588.    this.goto = p.goto;
  589.    this.DetectDrag = function()
  590.    {
  591.       this._x = _xmouse - this.ecart_mousex;
  592.       this._y = _ymouse - this.ecart_mousey;
  593.       this.CiblesTouchees = [];
  594.       var _loc2_ = 0;
  595.       while(_loc2_ < this.CiblesDrag.length)
  596.       {
  597.          if(this.hitTest(this.CiblesDrag[_loc2_]))
  598.          {
  599.             this.CiblesDrag[_loc2_].gotoAndStop("E2");
  600.             this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
  601.             this.touche = this.touche + 1;
  602.          }
  603.          else
  604.          {
  605.             this.CiblesDrag[_loc2_].gotoAndStop("E1");
  606.          }
  607.          _loc2_ = _loc2_ + 1;
  608.       }
  609.       if(this.touche == 1)
  610.       {
  611.          this.jouesonOnOverCible();
  612.       }
  613.       if(this.CiblesTouchees.length <= 0)
  614.       {
  615.          this.touche = 0;
  616.          this.stopsonOnOverCible();
  617.       }
  618.       this.PendantDrag();
  619.    };
  620.    this.StartDrag = function()
  621.    {
  622.       this.ecart_mousex = _xmouse - this._x;
  623.       this.ecart_mousey = _ymouse - this._y;
  624.       this.IntervalId = setInterval(mx.utils.Delegate.create(this,this.DetectDrag),10);
  625.    };
  626.    this.ComeBack = function()
  627.    {
  628.       this._x = this.xOri;
  629.       this._y = this.yOri;
  630.       this.gotoAndStop("E1");
  631.    };
  632.    this.onPress = function()
  633.    {
  634.       this.jouesonOnPress();
  635.       this.xOri = this._x;
  636.       this.yOri = this._y;
  637.       this.masqueIB();
  638.       this.gotoAndStop(this.pressFrame);
  639.       gereCursor("mainF");
  640.       this.StartDrag();
  641.       var _loc2_ = this.OnPress();
  642.    };
  643.    this.onRollOver = function()
  644.    {
  645.       this.joueson();
  646.       this.afficheIB();
  647.       this.gotoAndStop("E2");
  648.       gereCursor("mainO");
  649.       var _loc2_ = this.OnRollOver();
  650.    };
  651.    this.onRollOut = function()
  652.    {
  653.       this.stopson();
  654.       this.gotoAndStop("E1");
  655.       this.masqueIB();
  656.       gereCursor("fleche");
  657.       var _loc2_ = this.OnRollOut();
  658.    };
  659.    this.onRelease = function()
  660.    {
  661.       gereCursor("mainO");
  662.       this.stopsonOnPress();
  663.       this.gotoAndStop("E2");
  664.       clearInterval(this.IntervalId);
  665.       this.CiblesTouchees = [];
  666.       var _loc2_ = 0;
  667.       while(_loc2_ < this.CiblesDrag.length)
  668.       {
  669.          if(this.hitTest(this.CiblesDrag[_loc2_]))
  670.          {
  671.             _;
  672.             this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
  673.          }
  674.          _loc2_ = _loc2_ + 1;
  675.       }
  676.       this.ApresDrag();
  677.       var _loc3_ = this.OnRelease();
  678.    };
  679.    this.onReleaseOutside = this.onRelease;
  680. }
  681. function InitMC_slider(p)
  682. {
  683.    if(p.IB != undefined)
  684.    {
  685.       if(p.IBrep == true)
  686.       {
  687.          var IBrepere = _MOD_["IBrep_" + p.IB];
  688.       }
  689.       else
  690.       {
  691.          var IBrepere = p.mc;
  692.       }
  693.       this.afficheIB = function()
  694.       {
  695.          gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  696.       };
  697.       this.masqueIB = function()
  698.       {
  699.          gereTextes.masqueIB();
  700.       };
  701.    }
  702.    ┬º┬ºpush(this);
  703.    ┬º┬ºpush("joueson");
  704.    if(p.son == undefined)
  705.    {
  706.       ┬º┬ºpush(undefined);
  707.    }
  708.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  709.    ┬º┬ºpush(this);
  710.    ┬º┬ºpush("stopson");
  711.    if(p.son == undefined)
  712.    {
  713.       ┬º┬ºpush(undefined);
  714.    }
  715.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  716.    var _loc6_ = p.goto != undefined ? "fleche" : "doigt";
  717.    this.goto = p.goto;
  718.    this.EnMouvement = false;
  719.    if(p.sonOnMove != undefined)
  720.    {
  721.       this.sonOnMove = p.sonOnMove;
  722.       this.sonOnMove_offset = p.sonOnMove_offset != undefined ? Number(p.sonOnMove_offset) : 0;
  723.       this.sonOnMove_loopSon = p.sonOnMove_loopSon != undefined ? Number(p.sonOnMove_loopSon) : 0;
  724.       this.jouesonOnMove = function()
  725.       {
  726.          joueBruitage({nomSon:this.sonOnMove,offset:this.sonOnMove_offset,loopSon:this.sonOnMove_loopSon});
  727.       };
  728.       this.stopsonOnMove = function()
  729.       {
  730.          stopBruitage({nomSon:this.sonOnMove});
  731.       };
  732.    }
  733.    else
  734.    {
  735.       this.jouesonOnMove = undefined;
  736.       this.stopsonOnMove = undefined;
  737.    }
  738.    if(p.sonOnPress != undefined)
  739.    {
  740.       this.sonOnPress = p.sonOnPress;
  741.       this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
  742.       this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
  743.       this.jouesonOnPress = function()
  744.       {
  745.          joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
  746.       };
  747.       this.stopsonOnPress = function()
  748.       {
  749.          stopBruitage({nomSon:this.sonOnPress});
  750.       };
  751.    }
  752.    else
  753.    {
  754.       this.jouesonOnMove = undefined;
  755.       this.stopsonOnMove = undefined;
  756.    }
  757.    this.DragZone = {left:this._x,right:this._x + p.DragZoneLargeur,top:this._y,bottom:this._y};
  758.    this.DragZoneLargeur = p.DragZoneLargeur;
  759.    this.DragZoneLargeur_pourcent = p.DragZoneLargeur / 100;
  760.    this.SetPosition = function(pourcent)
  761.    {
  762.       this._x = this.DragZone.left + this.DragZoneLargeur_pourcent * pourcent;
  763.    };
  764.    this.GetPosition = function()
  765.    {
  766.       return (this._x - this.DragZone.left) / this.DragZoneLargeur_pourcent;
  767.    };
  768.    this.DetectDrag = function()
  769.    {
  770.       this._x = _root._xmouse - this.ecart_mousex;
  771.       this._y = _root._ymouse - this.ecart_mousey;
  772.       if(this._x <= this.DragZone.left)
  773.       {
  774.          this._x = this.DragZone.left;
  775.       }
  776.       if(this._y < this.DragZone.top)
  777.       {
  778.          this._y = this.DragZone.top;
  779.       }
  780.       if(this._x >= this.DragZone.right)
  781.       {
  782.          this._x = this.DragZone.right;
  783.       }
  784.       if(this._y > this.DragZone.bottom)
  785.       {
  786.          this._y = this.DragZone.bottom;
  787.       }
  788.       updateAfterEvent();
  789.       if(this._x == this.lastx && this._y == this.lasty)
  790.       {
  791.          if(this.EnMouvement == true)
  792.          {
  793.             this.EnMouvement = false;
  794.             this.stopsonOnMove();
  795.          }
  796.       }
  797.       else if(this.EnMouvement == false)
  798.       {
  799.          this.EnMouvement = true;
  800.          this.jouesonOnMove();
  801.       }
  802.       this.lastx = this._x;
  803.       this.lasty = this._y;
  804.       this.PendantSlide();
  805.    };
  806.    this.StartDrag = function()
  807.    {
  808.       this.ecart_mousex = _root._xmouse - this._x;
  809.       this.ecart_mousey = _root._ymouse - this._y;
  810.       this.lastx = this._x;
  811.       this.lasty = this._y;
  812.       this.IntervalId = setInterval(mx.utils.Delegate.create(this,this.DetectDrag),1);
  813.    };
  814.    this.onPress = function()
  815.    {
  816.       this.jouesonOnPress();
  817.       this.masqueIB();
  818.       this.gotoAndStop("E3");
  819.       gereCursor("mainF");
  820.       this.StartDrag();
  821.       var _loc2_ = this.OnPress();
  822.    };
  823.    this.onRollOver = function()
  824.    {
  825.       this.joueson();
  826.       this.afficheIB();
  827.       this.gotoAndStop("E2");
  828.       gereCursor("mainO");
  829.       var _loc2_ = this.OnRollOver();
  830.    };
  831.    this.onRollOut = function()
  832.    {
  833.       this.stopson();
  834.       this.stopsonOnPress();
  835.       this.stopsonOnMove();
  836.       this.gotoAndStop("E1");
  837.       this.masqueIB();
  838.       gereCursor("fleche");
  839.       var _loc2_ = this.OnRollOut();
  840.    };
  841.    this.onRelease = function()
  842.    {
  843.       this.gotoAndStop("E2");
  844.       clearInterval(this.IntervalId);
  845.       this.stopson();
  846.       this.stopsonOnPress();
  847.       this.stopsonOnMove();
  848.       gereCursor("mainO");
  849.       var _loc2_ = this.OnRelease();
  850.    };
  851.    this.onReleaseOutside = function()
  852.    {
  853.       this.onRelease();
  854.       gereCursor("fleche");
  855.       var _loc2_ = this.OnReleaseOutside();
  856.    };
  857. }
  858. function InitMC_titre(p)
  859. {
  860.    this.LMaVider = [];
  861.    this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
  862.    this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
  863.    this.ChangeTexte = function(p)
  864.    {
  865.       this.viderLM();
  866.       _root.gereTextes.afficheLM({codeLM:p.codeLM,X:this._x + this.offsetx,Y:this._y + this.offsety,width:this._width,height:this._height});
  867.       this.LMaVider.push(p);
  868.    };
  869.    this.viderLM = function()
  870.    {
  871.       var _loc3_ = 0;
  872.       while(_loc3_ < this.LMaVider.length)
  873.       {
  874.          _root.gereTextes.masqueLM(this.LMaVider[_loc3_]);
  875.          _loc3_ = _loc3_ + 1;
  876.       }
  877.    };
  878. }
  879. function initKeyPause()
  880. {
  881.    gPauseOn = 0;
  882.    gPauseSpaceOn = 0;
  883.    gPauseSpaceEnCours = 0;
  884. }
  885. function initGen()
  886. {
  887.    this._lockroot = true;
  888.    _global.gClipGen = this;
  889.    Stage.showMenu = false;
  890.    gLangue = "FR";
  891.    gMusicOn = 1;
  892.    gSousTitre = 0;
  893.    gST = 0;
  894.    gVolume = 100;
  895.    gWidth = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.width;
  896.    gHeight = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.height;
  897.    if(gWidth == undefined)
  898.    {
  899.       gWidth = 800;
  900.    }
  901.    else
  902.    {
  903.       gWidth = Number(gWidth);
  904.    }
  905.    if(gHeight == undefined)
  906.    {
  907.       gHeight = 600;
  908.    }
  909.    else
  910.    {
  911.       gHeight = Number(gHeight);
  912.    }
  913.    initKeyPause();
  914. }
  915. function testeDebutCommentSpecial()
  916. {
  917.    switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
  918.    {
  919.       case "bz":
  920.       case "BZ":
  921.          trace("-------  BZ on-----------");
  922.          DesactiveBZ();
  923.          if(BT_BZ.gEtat !== 3)
  924.          {
  925.             BT_BZ.gotoAndPlay("E3");
  926.          }
  927.          else
  928.          {
  929.             BT_BZ.BZ_P.gotoAndPlay("parle");
  930.          }
  931.    }
  932. }
  933. function testeFinCommentSpecial()
  934. {
  935.    switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
  936.    {
  937.       case "bz":
  938.       case "BZ":
  939.          trace("-------  BZ off-----------");
  940.          ActiveBZ();
  941.          BT_BZ.BZ_P.gotoAndPlay("rentre");
  942.          BT_BZ.gClicOn = undefined;
  943.    }
  944. }
  945. function stopComment()
  946. {
  947.    if(gCommentOn !== undefined)
  948.    {
  949.       testeFinCommentSpecial();
  950.       delete gCommentOn.onSoundComplete;
  951.       gCommentOn.stop();
  952.       gCommentOn = undefined;
  953.       if(gPauseOn == undefined || gPauseOn == 0)
  954.       {
  955.          removeMovieClip("mcClicZap");
  956.       }
  957.       gBlockST = undefined;
  958.       gereTextes.masqueST();
  959.       if(gClipTarget !== undefined)
  960.       {
  961.          gClipTarget.gotoAndStop(gClipTargetLabel);
  962.          gClipTarget = undefined;
  963.          gClipTargetLabel = undefined;
  964.       }
  965.    }
  966. }
  967. function pauseComment()
  968. {
  969.    trace("pauseComment " + gCommentOn);
  970.    if(gCommentOn !== undefined)
  971.    {
  972.       gCommentOn.stop();
  973.       mcClicZap._visible = false;
  974.    }
  975. }
  976. function continueComment()
  977. {
  978.    trace("continueComment " + gCommentOn);
  979.    if(gCommentOn !== undefined)
  980.    {
  981.       gCommentOn.start(gCommentOn.position / 1000);
  982.       mcClicZap._visible = true;
  983.    }
  984. }
  985. function joueSon(p)
  986. {
  987.    var _loc4_ = p.nomSon;
  988.    gSoundString = _loc4_;
  989.    if(p.mc !== undefined)
  990.    {
  991.       gClipRef = p.mc;
  992.    }
  993.    else
  994.    {
  995.       gClipRef = _root;
  996.    }
  997.    if(p.zapBlock !== undefined)
  998.    {
  999.       gClicZap = p.zapBlock;
  1000.    }
  1001.    else
  1002.    {
  1003.       gClicZap = "ZAP_BLOCK";
  1004.    }
  1005.    if(p.actionFin !== undefined)
  1006.    {
  1007.       gActionFinSon = p.actionFin;
  1008.    }
  1009.    else
  1010.    {
  1011.       gActionFinSon = "PLAY";
  1012.    }
  1013.    if(p.mcCible !== undefined)
  1014.    {
  1015.       if(typeof p.mcCible == "movieclip")
  1016.       {
  1017.          gClipTarget = p.mcCible;
  1018.       }
  1019.       else
  1020.       {
  1021.          gClipTarget = gClipRef[p.mcCible];
  1022.       }
  1023.       if(p.mcLabelOut !== undefined)
  1024.       {
  1025.          gClipTargetLabel = p.mcLabelOut;
  1026.       }
  1027.       else
  1028.       {
  1029.          gClipTargetLabel = gClipTarget._currentframe;
  1030.       }
  1031.       if(p.mcLabelIn !== undefined)
  1032.       {
  1033.          gClipTarget.gotoAndPlay(p.mcLabelIn);
  1034.       }
  1035.       else
  1036.       {
  1037.          gClipTarget.gotoAndPlay("parle");
  1038.       }
  1039.    }
  1040.    stopComment();
  1041.    mySound = soundObjects[gCommentName + _loc4_];
  1042.    if(mySound !== undefined)
  1043.    {
  1044.       gCommentOn = mySound;
  1045.       gCommentOn.p = p;
  1046.       gCommentOn.id = gCommentName + _loc4_;
  1047.       testeDebutCommentSpecial();
  1048.       if(gMusicOn == 1 && gMusic !== undefined)
  1049.       {
  1050.          soundObjects[gMusic].setVolume(gVolume * 40 / 100);
  1051.       }
  1052.       mySound.setVolume(gVolume);
  1053.       if(gCommentOnPausePos !== undefined)
  1054.       {
  1055.          mySound.start(gCommentOnPausePos / 1000);
  1056.       }
  1057.       else
  1058.       {
  1059.          mySound.start();
  1060.       }
  1061.    }
  1062.    else
  1063.    {
  1064.       trace("______" + getSoundByID(gCommentName + _loc4_));
  1065.       var _loc5_ = getSoundByID(gCommentName + _loc4_);
  1066.       if(_loc5_ !== undefined)
  1067.       {
  1068.          mySound = new Sound();
  1069.          mySound.loadSound(_global.gModulePath + _loc5_.attributes.src,true);
  1070.          gCommentOn = mySound;
  1071.          gCommentOn.p = p;
  1072.          gCommentOn.id = gCommentName + _loc4_;
  1073.          testeDebutCommentSpecial();
  1074.          if(gMusicOn == 1 && gMusic !== undefined)
  1075.          {
  1076.             soundObjects[gMusic].setVolume(gVolume * 40 / 100);
  1077.          }
  1078.       }
  1079.    }
  1080.    if(mySound == undefined)
  1081.    {
  1082.       return undefined;
  1083.    }
  1084.    mySound.onSoundComplete = commentFini;
  1085.    if(gClicZap !== "NOZAP_NOBLOCK")
  1086.    {
  1087.       mcClicZap = creerRectangle({nom:"mcClicZap",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  1088.       switch(gClicZap.split("_")[0])
  1089.       {
  1090.          case "ZAP":
  1091.             mcClicZap.useHandCursor = false;
  1092.             mcClicZap.onPress = function()
  1093.             {
  1094.                trace("clic zap son");
  1095.                stopSon();
  1096.             };
  1097.             break;
  1098.          case "NOZAP":
  1099.             mcClicZap.useHandCursor = false;
  1100.             mcClicZap.onPress = function()
  1101.             {
  1102.                trace("no clic allowed");
  1103.             };
  1104.       }
  1105.       mcClicZap._visible = true;
  1106.    }
  1107.    if(gST == 1 && gBlockST == undefined)
  1108.    {
  1109.       gereTextes.afficheST(gCommentName + _loc4_);
  1110.    }
  1111. }
  1112. function creerClicZap(p)
  1113. {
  1114.    if(_global.mcClicZap2 != undefined)
  1115.    {
  1116.       removeMovieClip(_root.mcClicZap2);
  1117.    }
  1118.    var _loc0_ = null;
  1119.    var _loc4_ = _global.mcClicZap2 = creerRectangle({nom:"mcClicZap2",pere:_root,level:15001,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  1120.    _loc4_.p = p;
  1121.    _loc4_.useHandCursor = false;
  1122.    _loc4_.onPress = function()
  1123.    {
  1124.       trace("clic zap " + this.p);
  1125.       this.p.retour.call(this.p.ecouteur);
  1126.       removeMovieClip(this);
  1127.       _global.mcClicZap2 = undefined;
  1128.    };
  1129.    _loc4_._visible = true;
  1130. }
  1131. function creerRectangle(p)
  1132. {
  1133.    var _loc3_ = p.level != undefined ? p.level : 15000;
  1134.    var _loc4_ = p.nom != undefined ? p.nom : "ClipSansNom";
  1135.    var _loc5_ = p.alpha != undefined ? p.alpha : 100;
  1136.    var _loc2_ = p.pere.createEmptyMovieClip(_loc4_,_loc3_);
  1137.    _loc2_.beginFill(65280,_loc5_);
  1138.    _loc2_.moveTo(p.x,p.y);
  1139.    _loc2_.lineTo(p.x + p.width,p.y);
  1140.    _loc2_.lineTo(p.x + p.width,p.y + p.height);
  1141.    _loc2_.lineTo(p.x,p.y + p.height);
  1142.    _loc2_.lineTo(p.x,p.y);
  1143.    _loc2_.endFill();
  1144.    return _loc2_;
  1145. }
  1146. function stopSon()
  1147. {
  1148.    gCommentOn.stop();
  1149.    commentFini();
  1150. }
  1151. function commentFini()
  1152. {
  1153.    testeFinCommentSpecial();
  1154.    if(gClicZap !== "NOZAP_NOBLOCK")
  1155.    {
  1156.       removeMovieClip("mcClicZap");
  1157.    }
  1158.    gCommentOn = undefined;
  1159.    gBlockST = undefined;
  1160.    gereTextes.masqueST();
  1161.    if(gMusicOn == 1 && gMusic !== undefined)
  1162.    {
  1163.       soundObjects[gMusic].setVolume(gVolume);
  1164.    }
  1165.    if(gClipTarget !== undefined)
  1166.    {
  1167.       gClipTarget.gotoAndStop(gClipTargetLabel);
  1168.       gClipTarget = undefined;
  1169.       gClipTargetLabel = undefined;
  1170.    }
  1171.    switch(gActionFinSon)
  1172.    {
  1173.       case "RIEN":
  1174.          break;
  1175.       case "PLAY":
  1176.          if(_root.gNextLabel == undefined)
  1177.          {
  1178.             if(gLineaireOn != undefined)
  1179.             {
  1180.                if((_loc0_ = gLineaireOn) !== "_")
  1181.                {
  1182.                   lSonSuivant = gLineaireOn + gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
  1183.                   lLabel = lSonSuivant;
  1184.                }
  1185.                else
  1186.                {
  1187.                   lSonSuivant = gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
  1188.                   lLabel = gLineaireOn + lSonSuivant;
  1189.                }
  1190.                joueSon({mc:gClipRef,nomSon:lSonSuivant,zapBlock:gClicZap,actionFin:gActionFinSon});
  1191.                gClipRef.gotoAndStop(lLabel);
  1192.             }
  1193.             else
  1194.             {
  1195.                gClipRef.play();
  1196.             }
  1197.          }
  1198.          else
  1199.          {
  1200.             gClipRef.gotoAndPlay(_root.gNextLabel);
  1201.             _root.gNextLabel = undefined;
  1202.             gLineaireOn = undefined;
  1203.          }
  1204.          break;
  1205.       default:
  1206.          _root[gActionFinSon]();
  1207.    }
  1208. }
  1209. function joueBruitage(p)
  1210. {
  1211.    trace("joueBruitage " + p.nomSon + " " + gVolume);
  1212.    var _loc2_ = soundObjects[gBruitageName + p.nomSon];
  1213.    if(gListeBruitage == undefined)
  1214.    {
  1215.       gListeBruitage = [];
  1216.       gListeA_fin_Bruitage = [];
  1217.       gListeLoop_Bruitage = [];
  1218.    }
  1219.    _loc2_.setVolume(gVolume);
  1220.    _loc2_.id = p.nomSon;
  1221.    gListeBruitage.push(_loc2_.id);
  1222.    if(p.actionFin !== undefined)
  1223.    {
  1224.       gActionFinBruitage = p.actionFin;
  1225.       gListeA_fin_Bruitage.push(gActionFinBruitage);
  1226.    }
  1227.    else
  1228.    {
  1229.       gActionFinBruitage = undefined;
  1230.       gListeA_fin_Bruitage.push("");
  1231.    }
  1232.    _loc2_.p = p;
  1233.    _loc2_.onSoundComplete = mx.utils.Delegate.create(_loc2_,finBruitage);
  1234.    if(p.loopSon == undefined)
  1235.    {
  1236.       _loc2_.start(p.offset);
  1237.       gListeLoop_Bruitage.push("");
  1238.    }
  1239.    else
  1240.    {
  1241.       _loc2_.start(p.offset,p.loopSon);
  1242.       gListeLoop_Bruitage.push(p.loopSon);
  1243.    }
  1244. }
  1245. function stopBruitage(p)
  1246. {
  1247.    var _loc1_ = soundObjects[gBruitageName + p.nomSon];
  1248.    finBruitage(p.nomSon);
  1249.    _loc1_.stop();
  1250. }
  1251. function finBruitage(lSon)
  1252. {
  1253.    if(lSon == undefined)
  1254.    {
  1255.       lSon = this.id;
  1256.    }
  1257.    if(gListeBruitage !== undefined)
  1258.    {
  1259.       if(getPos(gListeBruitage,lSon) !== -1)
  1260.       {
  1261.          if(gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)] !== "")
  1262.          {
  1263.             if(typeof gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)] == "string")
  1264.             {
  1265.                gClipGen[gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)]]();
  1266.             }
  1267.             else
  1268.             {
  1269.                gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)].call(this.p.MC);
  1270.             }
  1271.          }
  1272.          gListeA_fin_Bruitage.splice(getPos(gListeBruitage,lSon),1);
  1273.          gListeLoop_Bruitage.splice(getPos(gListeBruitage,lSon),1);
  1274.          gListeBruitage.splice(getPos(gListeBruitage,lSon),1);
  1275.          if(gListeBruitage.length == 0)
  1276.          {
  1277.             gListeBruitage = undefined;
  1278.             gListeA_fin_Bruitage = undefined;
  1279.             gListeLoop_Bruitage = undefined;
  1280.          }
  1281.       }
  1282.    }
  1283. }
  1284. function getPos(myList, myValue)
  1285. {
  1286.    lPresent = -1;
  1287.    maPosition = 0;
  1288.    while(maPosition <= myList.length)
  1289.    {
  1290.       if(myList[maPosition] == myValue)
  1291.       {
  1292.          lPresent = maPosition;
  1293.          break;
  1294.       }
  1295.       maPosition++;
  1296.    }
  1297.    return lPresent;
  1298. }
  1299. function trouvePosMax(myList)
  1300. {
  1301.    lMax = myList[0];
  1302.    lPosMax = 0;
  1303.    i = 1;
  1304.    while(i <= myList.length)
  1305.    {
  1306.       if(myList[i] > lMax)
  1307.       {
  1308.          lMax = myList[i];
  1309.          lPosMax = i;
  1310.       }
  1311.       i++;
  1312.    }
  1313.    return lPosMax;
  1314. }
  1315. function duplicate(myList)
  1316. {
  1317.    newList = [];
  1318.    i = 0;
  1319.    while(i <= myList.length - 1)
  1320.    {
  1321.       newList.push(myList[i]);
  1322.       i++;
  1323.    }
  1324.    return newList;
  1325. }
  1326. function randomiseList(myList)
  1327. {
  1328.    var _loc3_ = duplicate(myList);
  1329.    var _loc4_ = [];
  1330.    var _loc5_ = _loc3_.length;
  1331.    var _loc2_ = 0;
  1332.    while(_loc2_ < _loc5_)
  1333.    {
  1334.       var _loc1_ = randomValue(0,_loc3_.length - 1);
  1335.       _loc4_.push(_loc3_[_loc1_]);
  1336.       _loc3_.splice(_loc1_,1);
  1337.       _loc2_ = _loc2_ + 1;
  1338.    }
  1339.    return _loc4_;
  1340. }
  1341. function returnNodeByPathRandomise(nodeSent)
  1342. {
  1343.    var _loc4_ = new XML();
  1344.    var _loc5_ = nodeSent.childNodes.length;
  1345.    var _loc1_ = 0;
  1346.    while(_loc1_ < _loc5_)
  1347.    {
  1348.       var _loc2_ = randomValue(0,nodeSent.childNodes.length - 1);
  1349.       _loc4_.appendChild(nodeSent.childNodes[_loc2_]);
  1350.       _loc1_ = _loc1_ + 1;
  1351.    }
  1352.    return _loc4_;
  1353. }
  1354. function zapIntro(myLabel)
  1355. {
  1356.    mcClicZapIntro = creerRectangle({nom:"mcClicZapIntro",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  1357.    mcClicZapIntro.useHandCursor = false;
  1358.    mcClicZapIntro.onPress = function()
  1359.    {
  1360.       stopComment();
  1361.       gotoAndPlay(myLabel);
  1362.       removeZapIntro();
  1363.    };
  1364. }
  1365. function removeZapIntro()
  1366. {
  1367.    removeMovieClip(mcClicZapIntro);
  1368. }
  1369. function onMcOut(myMc)
  1370. {
  1371.    gereCursor(1);
  1372.    if(myMc.pLabelOut == undefined)
  1373.    {
  1374.       myMc.gotoAndPlay("E1");
  1375.    }
  1376.    else
  1377.    {
  1378.       myMc.gotoAndPlay(myMc.pLabelOut);
  1379.    }
  1380.    if(myMc.pSon.split("")[0] == "B")
  1381.    {
  1382.       stopBruitage({nomSon:myMc.pSon});
  1383.    }
  1384.    else
  1385.    {
  1386.       stopComment();
  1387.    }
  1388.    if(myMc.pIB !== undefined)
  1389.    {
  1390.       gereTextes.masqueIB();
  1391.    }
  1392. }
  1393. function onMcOver(p)
  1394. {
  1395.    var myMc = p.mc;
  1396.    myMc.pIB = p.codeIB;
  1397.    if(p.nomSon == undefined)
  1398.    {
  1399.       if(p.nomSonC == undefined)
  1400.       {
  1401.          myMc.pSon = "B_" + myMc._name.split("_")[1];
  1402.       }
  1403.       else
  1404.       {
  1405.          myMc.pSon = p.nomSonC;
  1406.       }
  1407.    }
  1408.    else
  1409.    {
  1410.       myMc.pSon = p.nomSon;
  1411.    }
  1412.    if(p.actionFin == undefined)
  1413.    {
  1414.       myMc.actionFin = "RIEN";
  1415.    }
  1416.    else
  1417.    {
  1418.       myMc.actionFin = p.actionFin;
  1419.    }
  1420.    myMc.pLabelOut = p.mcLabelOut;
  1421.    myMc.onRollOver = function()
  1422.    {
  1423.       gereCursor(2);
  1424.       if(p.mcLabelIn == undefined)
  1425.       {
  1426.          this.gotoAndPlay("E2");
  1427.       }
  1428.       else
  1429.       {
  1430.          this.gotoAndPlay(p.mcLabelIn);
  1431.       }
  1432.       if(this.pSon.split("")[0] == "B")
  1433.       {
  1434.          joueBruitage({nomSon:this.pSon});
  1435.       }
  1436.       else
  1437.       {
  1438.          joueSon({nomSon:this.pSon,zapBlock:"NOZAP_NOBLOCK",actionFin:this.actionFin});
  1439.       }
  1440.       if(this.pIB !== undefined)
  1441.       {
  1442.          gereTextes.afficheIB({mc:this,codeIB:this.pIB});
  1443.       }
  1444.    };
  1445.    myMc.onRollOut = myMc.onDragOut = function()
  1446.    {
  1447.       onMcOut(myMc);
  1448.    };
  1449. }
  1450. function desactiveClip(pClip)
  1451. {
  1452.    trace(pClip);
  1453.    delete pClip.onRollOver;
  1454.    delete pClip.onRollOut;
  1455.    delete pClip.onDragOut;
  1456.    delete pClip.onPress;
  1457.    delete pClip.onRelease;
  1458.    delete pClip.onReleaseOutside;
  1459. }
  1460. function afficheClipPos(myMc, myX, myY)
  1461. {
  1462.    myMc._x = myX;
  1463.    myMc._y = myY;
  1464.    myMc._visible = true;
  1465. }
  1466. function gimme2digits(X)
  1467. {
  1468.    if(Number(X) < 10)
  1469.    {
  1470.       lX = "0" + Number(X);
  1471.    }
  1472.    else
  1473.    {
  1474.       lX = String(X);
  1475.    }
  1476.    return lX;
  1477. }
  1478. function randomValue(min, max)
  1479. {
  1480.    var _loc1_ = Math.floor(Math.random() * (max - min + 1)) + min;
  1481.    return _loc1_;
  1482. }
  1483. function chercheDepthPlus(myMc, myDepth)
  1484. {
  1485.    var _loc1_ = myDepth;
  1486.    while(_loc1_ < 17000)
  1487.    {
  1488.       if(myMc.getInstanceAtDepth(_loc1_) == undefined)
  1489.       {
  1490.          break;
  1491.       }
  1492.       _loc1_ = _loc1_ + 1;
  1493.    }
  1494.    return _loc1_;
  1495. }
  1496. function chercheDepthMoins(myMc, myDepth)
  1497. {
  1498.    var _loc1_ = myDepth;
  1499.    while(_loc1_ > -16383)
  1500.    {
  1501.       if(myMc.getInstanceAtDepth(_loc1_) == undefined)
  1502.       {
  1503.          break;
  1504.       }
  1505.       _loc1_ = _loc1_ - 1;
  1506.    }
  1507.    return _loc1_;
  1508. }
  1509. function changeST(myST)
  1510. {
  1511.    trace("changeST   : " + myST);
  1512.    if(myST == "1")
  1513.    {
  1514.       gST = 1;
  1515.       if(gCommentOn !== undefined)
  1516.       {
  1517.          gereTextes.afficheST(gCommentOn.id);
  1518.       }
  1519.    }
  1520.    else
  1521.    {
  1522.       sousTitre = 0;
  1523.       gST = 0;
  1524.       gereTextes.masqueST(this);
  1525.    }
  1526. }
  1527. function changeMusicOn(myChangeMusicOn)
  1528. {
  1529.    trace("changeMusicOn   : " + myChangeMusicOn);
  1530.    switch(String(myChangeMusicOn))
  1531.    {
  1532.       case "1":
  1533.          gMusicOn = 1;
  1534.          if(gMusic == undefined)
  1535.          {
  1536.             gMusic = gBruitageName + "MU";
  1537.          }
  1538.          trace("changeMusicOn2   : " + gMusic + " - " + gVolume);
  1539.          if(gCommentOn !== undefined)
  1540.          {
  1541.             soundObjects[gMusic].setVolume(gVolume * 0.4);
  1542.          }
  1543.          else
  1544.          {
  1545.             soundObjects[gMusic].setVolume(gVolume);
  1546.          }
  1547.          soundObjects[gMusic].start(0,1000);
  1548.          break;
  1549.       case "0":
  1550.          soundObjects[gMusic].stop();
  1551.          gMusicOn = 0;
  1552.          break;
  1553.       default:
  1554.          if(gMusic !== undefined)
  1555.          {
  1556.             soundObjects[gMusic].stop();
  1557.          }
  1558.          gMusic = gBruitageName + myChangeMusicOn;
  1559.          if(gMusicOn == 1)
  1560.          {
  1561.             if(gCommentOn !== undefined)
  1562.             {
  1563.                soundObjects[gMusic].setVolume(gVolume * 0.4);
  1564.             }
  1565.             else
  1566.             {
  1567.                soundObjects[gMusic].setVolume(gVolume);
  1568.             }
  1569.             soundObjects[gMusic].start(0,1000);
  1570.          }
  1571.    }
  1572. }
  1573. function changeVolume(myChangeVolume)
  1574. {
  1575.    trace("changeVolume   : " + myChangeVolume);
  1576.    gVolume = Number(myChangeVolume);
  1577.    if(gCommentOn !== undefined)
  1578.    {
  1579.       gCommentOn.setVolume(gVolume);
  1580.       if(gMusicOn == 1)
  1581.       {
  1582.          soundObjects[gMusic].setVolume(gVolume * 0.4);
  1583.       }
  1584.    }
  1585.    else if(gMusicOn == 1)
  1586.    {
  1587.       soundObjects[gMusic].setVolume(gVolume);
  1588.    }
  1589. }
  1590. function DesactiveBZ()
  1591. {
  1592.    BT_BZ.useHandCursor = false;
  1593.    BT_BZ.gBZactif = 0;
  1594. }
  1595. function ActiveBZ()
  1596. {
  1597.    BT_BZ.useHandCursor = true;
  1598.    BT_BZ.gBZactif = 1;
  1599. }
  1600. function getSoundByID(attributeValue)
  1601. {
  1602.    var _loc2_ = this.moduleInfo.filterNode(this.moduleInfo.returnNodeByPath("Resources.ResourcesZip"),"type","mp3");
  1603.    mySound = undefined;
  1604.    mySound = this.recusiveGetSoundByAttribute(_loc2_,"id",attributeValue);
  1605.    if(mySound == undefined)
  1606.    {
  1607.       trace(attributeValue + " n\'existe pas dans XML");
  1608.    }
  1609.    return mySound;
  1610. }
  1611. function recusiveGetSoundByAttribute(node, attribute, attributeValue)
  1612. {
  1613.    var _loc2_ = 0;
  1614.    while(_loc2_ < node.childNodes.length)
  1615.    {
  1616.       if(node.childNodes[_loc2_].attributes[attribute] == attributeValue)
  1617.       {
  1618.          mySound = node.childNodes[_loc2_];
  1619.          break;
  1620.       }
  1621.       if(node.childNodes[_loc2_].hasChildNodes())
  1622.       {
  1623.          this.recusiveGetSoundByAttribute(node.childNodes[_loc2_],attribute,attributeValue);
  1624.       }
  1625.       _loc2_ = _loc2_ + 1;
  1626.    }
  1627.    return mySound;
  1628. }
  1629. function gereCursor(myCursor)
  1630. {
  1631.    switch(myCursor)
  1632.    {
  1633.       case -1:
  1634.       case 1:
  1635.       case "fleche":
  1636.          lNum = 1;
  1637.          lNumMobi = -1;
  1638.          myCursor = "fleche";
  1639.          break;
  1640.       case 280:
  1641.       case 2:
  1642.       case "doigt":
  1643.          lNum = 2;
  1644.          lNumMobi = 280;
  1645.          myCursor = "doigt";
  1646.          break;
  1647.       case 260:
  1648.       case 3:
  1649.       case "mainO":
  1650.          lNumMobi = 260;
  1651.          lNum = 3;
  1652.          myCursor = "mainO";
  1653.          break;
  1654.       case 290:
  1655.       case 4:
  1656.       case "mainF":
  1657.          lNum = 4;
  1658.          lNumMobi = 290;
  1659.          myCursor = "mainF";
  1660.          break;
  1661.       case 200:
  1662.       case 0:
  1663.       case "O":
  1664.          lNum = 0;
  1665.          lNumMobi = 200;
  1666.          myCursor = "O";
  1667.    }
  1668.    trace("cursor " + myCursor);
  1669.    if(gClipGen.gOnDir == 1)
  1670.    {
  1671.       _global.CURSEUR.Action(myCursor);
  1672.       getURL("6",lNumMobi);
  1673.       getURL("lingo:gerecursor(" + lNum + ")","");
  1674.    }
  1675.    else
  1676.    {
  1677.       _global.CURSEUR.Action(myCursor);
  1678.    }
  1679. }
  1680. function ConvertCoord(mc_src, mc_dest)
  1681. {
  1682.    var _loc1_ = {x:0,y:0};
  1683.    mc_src.localToGlobal(_loc1_);
  1684.    mc_dest.globalToLocal(_loc1_);
  1685.    return _loc1_;
  1686. }
  1687. function activePause()
  1688. {
  1689.    "active pause";
  1690.    if(gCommentOn !== undefined)
  1691.    {
  1692.       gCommentOnPause = gCommentOn;
  1693.       gCommentOnPause.p = gCommentOn.p;
  1694.       xtrace("++++++++ " + gCommentOn.p);
  1695.       gCommentOnPausePos = gCommentOn.position;
  1696.       stopComment();
  1697.    }
  1698.    if(gListeBruitage !== undefined)
  1699.    {
  1700.       gListePosBruitage = [];
  1701.       gListeBruitageP = [];
  1702.       i = gListeBruitage.length - 1;
  1703.       while(i >= 0)
  1704.       {
  1705.          var _loc1_ = gListePosBruitage.push[soundObjects[gBruitageName + gListeBruitage[i]].position];
  1706.          gListeBruitageP.push[soundObjects[gBruitageName + gListeBruitage[i]].p];
  1707.          stopBruitage(soundObjects[gBruitageName + gListeBruitage[i]].p);
  1708.          i--;
  1709.       }
  1710.    }
  1711.    if(gMusicOn)
  1712.    {
  1713.       gPosMusic = soundObjects[gMusic].position;
  1714.       soundObjects[gMusic].stop();
  1715.    }
  1716. }
  1717. function desactivePause()
  1718. {
  1719.    if(gCommentOnPausePos !== undefined)
  1720.    {
  1721.       if(gCommentOnPause.duration / 1000 !== gCommentOnPausePos / 1000)
  1722.       {
  1723.          joueSon(gCommentOnPause.p);
  1724.       }
  1725.       gCommentOnPause = undefined;
  1726.       gCommentOnPausePos = undefined;
  1727.    }
  1728.    if(gMusicOn)
  1729.    {
  1730.       if(soundObjects[gMusic].duration / 1000 == gPosMusic / 1000)
  1731.       {
  1732.          soundObjects[gMusic].start(0,2000);
  1733.       }
  1734.       else
  1735.       {
  1736.          soundObjects[gMusic].start(gPosMusic / 1000,2000);
  1737.       }
  1738.       gPosMusic = undefined;
  1739.    }
  1740. }
  1741. function spacePause()
  1742. {
  1743.    if(gPauseOn == undefined)
  1744.    {
  1745.       activePause();
  1746.       gPauseOn = 1;
  1747.    }
  1748.    else
  1749.    {
  1750.       desactivePause();
  1751.       gPauseOn = undefined;
  1752.    }
  1753. }
  1754. function onlocalConfigLoaded(success)
  1755. {
  1756.    if(success)
  1757.    {
  1758.       moduleXmlRoot = gModulePath + this.firstChild.attributes.src;
  1759.       Main();
  1760.    }
  1761. }
  1762. function Main()
  1763. {
  1764.    this.moduleInfo = new prod.moteur_v1_0.V000_ChargementXML(this,moduleXmlRoot,moduleOnline);
  1765. }
  1766. function xmlLoaded()
  1767. {
  1768.    _global.MCs.preloader.mc.onLoading(70);
  1769.    initGen();
  1770.    gModuleName = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.id;
  1771.    gCommentName = "S_" + gLangue + "_" + gModuleName + "_";
  1772.    gBruitageName = "B_" + gModuleName + "_";
  1773.    var _loc3_ = gModuleName.split("_");
  1774.    gModuleNumber = Number(_loc3_[_loc3_.length - 1]);
  1775.    mediaChargeur = new prod.moteur_v1_0.V002_ChargementMedias(this,this.moduleInfo,this.moduleOnline);
  1776.    gereTextes = new prod.moteur_v1_0.V006_GereTextes(this.CIBLE,this.moduleInfo);
  1777.    _global.afficheIB = gereTextes.afficheIB;
  1778.    _global.afficheLM = gereTextes.afficheLM;
  1779. }
  1780. function mediaLoaded()
  1781. {
  1782.    if(typeof mediaChargeur == "undefined")
  1783.    {
  1784.       OnlySoundExterneHack = setInterval(mediaLoaded,20);
  1785.    }
  1786.    else
  1787.    {
  1788.       soundObjects = mediaChargeur.returnSoundObject();
  1789.       clearInterval(OnlySoundExterneHack);
  1790.       initModule();
  1791.    }
  1792. }
  1793. function initModule()
  1794. {
  1795.    _global.MCs.preloader.mc.onLoading(90);
  1796.    trace("_initModule() ________________________");
  1797.    this.CIBLE.XmlStocker = this.XmlStocker;
  1798.    this.CIBLE.swfStocker = this.swfStocker;
  1799.    this.CIBLE.photoStocker = this.photoStocker;
  1800.    this.CIBLE.moduleXmlRoot = this.moduleXmlRoot;
  1801.    this.CIBLE.moduleInfo = this.moduleInfo;
  1802.    this.CIBLE.ConvertCoord = _global.ConvertCoord = ConvertCoord;
  1803.    this.CIBLE.gModuleName = this.gModuleName;
  1804.    this.CIBLE.gCommentName = this.gCommentName;
  1805.    this.CIBLE.gBruitageName = this.gBruitageName;
  1806.    this.CIBLE.gModuleNumber = this.gModuleNumber;
  1807.    this.CIBLE.mediaChargeur = this.mediaChargeur;
  1808.    this.CIBLE.gereTextes = this.gereTextes;
  1809.    this.CIBLE.soundObjects = this.soundObjects;
  1810.    this.CIBLE.testeDebutCommentSpecial = testeDebutCommentSpecial;
  1811.    this.CIBLE.testeFinCommentSpecial = testeFinCommentSpecial;
  1812.    this.CIBLE.stopComment = stopComment;
  1813.    this.CIBLE.joueSon = _global.joueSon = joueSon;
  1814.    this.CIBLE.stopSon = stopSon;
  1815.    this.CIBLE.commentFini = commentFini;
  1816.    this.CIBLE.joueBruitage = _global.joueBruitage = joueBruitage;
  1817.    this.CIBLE.stopBruitage = _global.stopBruitage = stopBruitage;
  1818.    this.CIBLE.finBruitage = finBruitage;
  1819.    this.CIBLE.getPos = getPos;
  1820.    this.CIBLE.trouvePosMax = trouvePosMax;
  1821.    this.CIBLE.duplicate = duplicate;
  1822.    this.CIBLE.randomiseList = randomiseList;
  1823.    this.CIBLE.returnNodeByPathRandomise = returnNodeByPathRandomise;
  1824.    this.CIBLE.zapIntro = zapIntro;
  1825.    this.CIBLE.removeZapIntro = removeZapIntro;
  1826.    this.CIBLE.onMcOut = onMcOut;
  1827.    this.CIBLE.onMcOver = onMcOver;
  1828.    this.CIBLE.desactiveClip = desactiveClip;
  1829.    this.CIBLE.afficheClipPos = afficheClipPos;
  1830.    this.CIBLE.gimme2digits = gimme2digits;
  1831.    this.CIBLE.randomValue = randomValue;
  1832.    this.CIBLE.chercheDepthPlus = _global.chercheDepthPlus = chercheDepthPlus;
  1833.    this.CIBLE.chercheDepthMoins = chercheDepthMoins;
  1834.    this.CIBLE.changeST = changeST;
  1835.    this.CIBLE.changeMusicOn = changeMusicOn;
  1836.    this.CIBLE.changeVolume = changeVolume;
  1837.    this.CIBLE.gereCursor = _global.gereCursor = gereCursor;
  1838.    this.CIBLE.ChangeModule = _global.ChangeModule = ChangeModule;
  1839.    this.CIBLE.xPauseOn = this.xPauseOn;
  1840.    this.CIBLE.xPauseOff = this.xPauseOff;
  1841.    _global.pauseComment = mx.utils.Delegate.create(this.CIBLE,this.pauseComment);
  1842.    _global.continueComment = mx.utils.Delegate.create(this.CIBLE,this.continueComment);
  1843.    this.CIBLE.gLangue = gLangue;
  1844.    this.CIBLE.gMusicOn = gMusicOn;
  1845.    this.CIBLE.gSousTitre = gSousTitre;
  1846.    this.CIBLE.gST = gST;
  1847.    this.CIBLE.gVolume = gVolume;
  1848.    this.CIBLE.gWidth = gWidth;
  1849.    this.CIBLE.gHeight = gHeight;
  1850.    initVariables();
  1851. }
  1852. function initInterfaceBZ()
  1853. {
  1854.    gNiveau = 0;
  1855.    Interface = Interface["A_" + gModuleName + "_interface"];
  1856.    Interface.gotoAndPlay("E3");
  1857.    Interface._visible = 1;
  1858.    _global.BT_BZ = Interface.BT_BZ;
  1859.    _global.BT_NIV = Interface.BT_NIV;
  1860.    _global.BT_SOM = Interface.BT_SOM;
  1861.    BT_NIV._visible = 0;
  1862. }
  1863. function goChoixNiveau()
  1864. {
  1865.    coupeAnim._visible = false;
  1866.    BT_NIV._visible = 0;
  1867.    gNextLabel == undefined;
  1868.    gNiveau = undefined;
  1869.    stopComment();
  1870.    gotoAndStop("NIVEAUX");
  1871.    BT_BZ.gBZactif = 1;
  1872. }
  1873. function playConsignes()
  1874. {
  1875.    DesactiveBZ();
  1876.    if(gNiveau == undefined)
  1877.    {
  1878.       _global.joueSon({nomSon:"0b_bz",actionFin:"ActiveBZ"});
  1879.    }
  1880.    else
  1881.    {
  1882.       _global.joueSon({nomSon:gNiveau + "b_bz",actionFin:"ActiveBZ"});
  1883.    }
  1884. }
  1885. stop();
  1886. this._lockroot = 1;
  1887. _global._MOD_ = this;
  1888. this.CIBLE = this;
  1889. _global.xtraceGroups = [];
  1890. xtraceGroups.tous = 1;
  1891. xtraceGroups.doc = 1;
  1892. xtraceGroups.debug = 0;
  1893. xtraceGroups.route = 0;
  1894. xtraceGroups.error = 0;
  1895. _global.xtrace = xtrace;
  1896. _global.xtrace_raz = xtrace_raz;
  1897. _global.xlisteObj = xlisteObj;
  1898. _global.xtrace_mode = _global.xtrace_mode != undefined ? _global.xtrace_mode : "off";
  1899. _global.xlisteObj_mode = _global.xlisteObj_mode != undefined ? _global.xlisteObj_mode : "off";
  1900. this.ChargeMoteur = function(p)
  1901. {
  1902.    this.initVariables();
  1903. };
  1904. this.ChargeMoteur = function(p)
  1905. {
  1906.    trace("Charge Moteur xlib");
  1907.    this.initVariables();
  1908. };
  1909. _global.LMaVider = new Array();
  1910. _global.LMaVider2 = new Array();
  1911. _global.InitMC = InitMC;
  1912. _global.InitMC_standart = InitMC_standart;
  1913. _global.InitMC_BTN = InitMC_BTN;
  1914. _global.InitMC_dragdrop = InitMC_dragdrop;
  1915. _global.InitMC_slider = InitMC_slider;
  1916. _global.InitMC_titre = InitMC_titre;
  1917. _global.IncString = IncString;
  1918. _global.DecString = DecString;
  1919. _global.GetFilePath = GetFilePath;
  1920. _global.AntiSlashToSlash = AntiSlashToSlash;
  1921. _global.str_replace = str_replace;
  1922. _global.JoindreObjets = JoindreObjets;
  1923. _global.xGetConfig = xGetConfig;
  1924. _global.GetOriginalSize = GetOriginalSize;
  1925. _global.GetOriginalHeight = GetOriginalHeight;
  1926. _global.CreerCache = CreerCache;
  1927. _global.ConvertCoord = ConvertCoord;
  1928. _global.getGlobalCoord = getGlobalCoord;
  1929. _global.getLocalCoord = getLocalCoord;
  1930. _global.length_ass = length_ass;
  1931. _global.ExplodeString = ExplodeString;
  1932. _global.BloquerActives = BloquerActives;
  1933. _global.DebloquerActives = DebloquerActives;
  1934. _global.afficheLM_x = afficheLM_x;
  1935. _global.viderLM_x = viderLM_x;
  1936. _global.afficheLM_x2 = afficheLM_x2;
  1937. _global.viderLM_x2 = viderLM_x2;
  1938. _global.stopComment = stopComment;
  1939. _global.joueSon = joueSon;
  1940. _root.creerClicZap = creerClicZap;
  1941. _global.gimme2digits = gimme2digits;
  1942. this.randRange = randomValue;
  1943. _global.chercheDepthPlus = chercheDepthPlus;
  1944. _global.chercheDepthMoins = chercheDepthMoins;
  1945. _global.DesactiveBZ = DesactiveBZ;
  1946. _root.DesactiveBZ = DesactiveBZ;
  1947. _global.ActiveBZ = ActiveBZ;
  1948. _root.ActiveBZ = ActiveBZ;
  1949. this.xPauseOn = function()
  1950. {
  1951.    trace("xPauseOn " + this + " " + _global.pauseComment);
  1952.    _global.pauseComment();
  1953.    this.moteur.PauseMCs = [];
  1954.    this.moteur.xPause_rec({clipref:_root});
  1955. };
  1956. this.xPauseOff = function()
  1957. {
  1958.    trace("xPauseOff " + this);
  1959.    this.moteur.PauseDesactive();
  1960.    _global.continueComment();
  1961. };
  1962. this.PAUSEINTFUNC = function()
  1963. {
  1964.    var _loc3_ = getTimer();
  1965.    if(_loc3_ - this.firstTime >= 100)
  1966.    {
  1967.       clearInterval(this.PAUSEINT);
  1968.       this.xPause_rec2({clipref:_root});
  1969.    }
  1970. };
  1971. this.xPause_rec = function(p)
  1972. {
  1973.    for(prop in p.clipref)
  1974.    {
  1975.       if(typeof p.clipref[prop] == "movieclip" && p.clipref[prop] != _root && p.clipref[prop].NoPause != true)
  1976.       {
  1977.          p.clipref[prop].DetectFrameFirst = p.clipref[prop]._currentframe;
  1978.          this.xPause_rec({clipref:p.clipref[prop]});
  1979.       }
  1980.    }
  1981.    if(p.clipref == _root)
  1982.    {
  1983.       this.firstTime = getTimer();
  1984.       this.PAUSEINT = setInterval(this,"PAUSEINTFUNC",10);
  1985.    }
  1986. };
  1987. this.xPause_rec2 = function(p)
  1988. {
  1989.    for(prop in p.clipref)
  1990.    {
  1991.       if(typeof p.clipref[prop] == "movieclip" && p.clipref[prop] != _root && p.clipref[prop].NoPause != true)
  1992.       {
  1993.          p.clipref[prop].DetectFrameLast = p.clipref[prop]._currentframe;
  1994.          if(p.clipref[prop].DetectFrameLast != p.clipref[prop].DetectFrameFirst)
  1995.          {
  1996.             this.PauseMCs.push(p.clipref[prop]);
  1997.          }
  1998.          this.xPause_rec2({clipref:p.clipref[prop]});
  1999.       }
  2000.    }
  2001.    if(p.clipref == _root)
  2002.    {
  2003.       this.PauseActive();
  2004.    }
  2005. };
  2006. this.PauseActive = function()
  2007. {
  2008.    trace("PAUSEACTIVE " + this.PauseMCs.length);
  2009.    for(prop in this.PauseMCs)
  2010.    {
  2011.       trace(this.PauseMCs[prop]);
  2012.       this.PauseMCs[prop].stop();
  2013.    }
  2014. };
  2015. this.PauseDesactive = function()
  2016. {
  2017.    trace("PAUSEDESACTIVE " + this.PauseMCs.length);
  2018.    for(prop in this.PauseMCs)
  2019.    {
  2020.       trace(this.PauseMCs[prop]);
  2021.       this.PauseMCs[prop].play();
  2022.    }
  2023. };
  2024. stop();
  2025. _global._MOD_ = this;
  2026. this.ChargeMoteur = function(p)
  2027. {
  2028.    trace("_ChargeMoteur()");
  2029.    if(gModulePath == undefined)
  2030.    {
  2031.       gModulePath = "";
  2032.    }
  2033.    if(!moduleOnline)
  2034.    {
  2035.       this.XmlStocker = new XML();
  2036.       this.XmlStocker.ignoreWhite = true;
  2037.       this.XmlStocker.load(gModulePath + "localConfig.xml");
  2038.       this.XmlStocker.onLoad = onlocalConfigLoaded;
  2039.    }
  2040.    else
  2041.    {
  2042.       Main();
  2043.    }
  2044. };
  2045. _global.xtrace_mode = "on";
  2046. _global.xlisteObj_mode = "on";
  2047. this.initVariables = function()
  2048. {
  2049.    this.gotoAndStop("INIT");
  2050.    trace("init.as");
  2051. };
  2052. this.Init = function()
  2053. {
  2054.    this.ChargeMoteur();
  2055. };
  2056. this.InitOk = function()
  2057. {
  2058.    trace("InitOk");
  2059.    if(HOTE == undefined)
  2060.    {
  2061.       this.Start();
  2062.    }
  2063.    else
  2064.    {
  2065.       HOTE.InitFin(this);
  2066.    }
  2067. };
  2068. this.Start = function()
  2069. {
  2070.    gereCursor("fleche");
  2071.    this.gotoAndStop("START");
  2072.    trace("start.as");
  2073. };
  2074. if(HOTE == undefined)
  2075. {
  2076.    this.onEnterFrame = function()
  2077.    {
  2078.       var _loc2_ = this.getBytesLoaded();
  2079.       var _loc3_ = this.getBytesTotal();
  2080.       if(_loc2_ >= _loc3_)
  2081.       {
  2082.          this.Init();
  2083.          delete this.onEnterFrame;
  2084.       }
  2085.    };
  2086. }
  2087. stop();
  2088.