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

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