home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 166 / MOBICLIC166.ISO / mac / DATA / GEN166 / GEN166_00 / GENERATEUR_TC_LANCEUR.swf / scripts / frame_1 / DoAction_2.as
Text File  |  2014-08-01  |  72KB  |  2,674 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 initKAParoles()
  880. {
  881.    nodeAnimsParams = moduleInfo.returnNodeByPath("Module.Config.AnimsParams");
  882.    animsWidth = nodeAnimsParams.attributes.Width != undefined ? Number(nodeAnimsParams.attributes.Width) : 800;
  883.    animsHeight = nodeAnimsParams.attributes.Height != undefined ? Number(nodeAnimsParams.attributes.Height) : 600;
  884.    animsX = nodeAnimsParams.attributes.X != undefined ? Number(nodeAnimsParams.attributes.X) : 0;
  885.    animsY = nodeAnimsParams.attributes.Y != undefined ? Number(nodeAnimsParams.attributes.Y) : 0;
  886.    nodeMelodieAide = moduleInfo.returnNodeByPath("Module.Config.MelodieAide");
  887.    aide = Number(nodeMelodieAide.attributes.Aide);
  888.    nodePartition = moduleInfo.returnNodeByPath("Module.Config.Partition");
  889.    part = Number(nodePartition.attributes.Part);
  890.    nodeScrollLimit = moduleInfo.returnNodeByPath("Module.Config.ScrollLimit");
  891.    lowerScrollLimit = Number(nodeScrollLimit.attributes.Debut);
  892.    upperScrollLimit = Number(nodeScrollLimit.attributes.Fin);
  893.    nodeEnAvance = moduleInfo.returnNodeByPath("Module.Config.EnAvance");
  894.    avance = Number(nodeEnAvance.attributes.Avance);
  895.    nodeAnimTimeCodes = moduleInfo.returnNodeByPath("Module.Config.Anims");
  896.    listAnimTimeCodes = [];
  897.    listAnim = [];
  898.    actualAnim = undefined;
  899.    i = 0;
  900.    while(i < 100)
  901.    {
  902.       if(nodeAnimTimeCodes.childNodes[i] === undefined)
  903.       {
  904.          break;
  905.       }
  906.       listAnimTimeCodes.push(nodeAnimTimeCodes.childNodes[i].attributes.TCAnim);
  907.       listAnim.push(nodeAnimTimeCodes.childNodes[i].attributes.anim);
  908.       i++;
  909.    }
  910.    trace("listAnim " + listAnim);
  911.    trace("listAnimTimeCodes " + listAnimTimeCodes);
  912.    nodeParoleTimeCodes = moduleInfo.returnNodeByPath("Module.Config.Paroles");
  913.    listParolesTimeCodes = [];
  914.    listParoles = [];
  915.    listLignes = [];
  916.    i = 0;
  917.    while(i < 100)
  918.    {
  919.       if(nodeParoleTimeCodes.childNodes[i] === undefined)
  920.       {
  921.          break;
  922.       }
  923.       listParolesTimeCodes.push(nodeParoleTimeCodes.childNodes[i].attributes.TCParole);
  924.       listParoles.push(nodeParoleTimeCodes.childNodes[i].attributes.parole);
  925.       listLignes.push(nodeParoleTimeCodes.childNodes[i].attributes.ligne);
  926.       i++;
  927.    }
  928.    totalTextV = undefined;
  929.    actualParole = undefined;
  930.    parolesOrigY = clipParoles.paroles._y;
  931.    initParoles();
  932.    clipParoles.swapDepths(16001);
  933.    clipParoles._visible = 0;
  934.    jpgPartition = _root.photoStocker["I_" + _root.gModuleName];
  935. }
  936. function initKABoutonsVars()
  937. {
  938.    lectureEtat = 0;
  939.    listMusicKA = [gCommentName + "01_KA",gCommentName + "02_KA"];
  940. }
  941. function playMusic()
  942. {
  943.    var _loc2_ = soundObjects[listMusicKA[0]].position / 1000;
  944.    changeMusicOn(0);
  945.    clipParoles._visible = 1;
  946.    gereTextes.masqueLM({codeLM:"LM00"});
  947.    i = 0;
  948.    while(i < listMusicKA.length)
  949.    {
  950.       trace("PLAY     " + listMusicKA[i]);
  951.       if(lectureEtat == 0)
  952.       {
  953.          soundObjects[listMusicKA[i]].start(0);
  954.          if(i == 0)
  955.          {
  956.             intervalScrollbar = setInterval(this,"checkSound",80);
  957.          }
  958.       }
  959.       if(gMusicKA == i)
  960.       {
  961.          soundObjects[listMusicKA[i]].setVolume(100);
  962.       }
  963.       else
  964.       {
  965.          soundObjects[listMusicKA[i]].setVolume(0);
  966.       }
  967.       if(gListeBruitage == undefined)
  968.       {
  969.          gListeBruitage = [];
  970.          gListeBruitage.push(soundObjects[listMusicKA[i]]);
  971.       }
  972.       else
  973.       {
  974.          gListeBruitage.push(soundObjects[listMusicKA[i]]);
  975.       }
  976.       i++;
  977.    }
  978.    trace(gListeBruitage);
  979.    lectureEtat = 1;
  980.    soundObjects[listMusicKA[0]].onSoundComplete = mx.utils.Delegate.create(this,stopKar);
  981. }
  982. function checkSound()
  983. {
  984.    gereAnims();
  985.    if(actualParole !== paroleTC())
  986.    {
  987.       gereParoles();
  988.    }
  989.    scrollParole();
  990. }
  991. function stopKar()
  992. {
  993.    ActiveOEIL();
  994.    hideAnims();
  995.    anim00();
  996.    _root.musicChoix = undefined;
  997.    lectureEtat = 0;
  998.    Interface.ECOUTE_01.gotoAndStop("E1");
  999.    Interface.CHANTE_01.gotoAndStop("E1");
  1000.    changeMusicOn(1);
  1001.    clipParoles.paroles._y = parolesOrigY;
  1002.    clipParoles._visible = 0;
  1003.    gereTextes.afficheLM({codeLM:"LM00"});
  1004.    LM00.swapDepths(16000);
  1005. }
  1006. function anim00()
  1007. {
  1008.    gAnimKar = "A_" + gModuleName + "_ANIMKAR_AT";
  1009.    this.ANIMKAR.swfStocker[gAnimKar]._visible = true;
  1010. }
  1011. function hideAnims()
  1012. {
  1013.    var _loc2_ = undefined;
  1014.    _loc2_ = 0;
  1015.    while(_loc2_ < listAnimKAR.length)
  1016.    {
  1017.       this.ANIMKAR.swfStocker[listAnimKAR[_loc2_]]._visible = false;
  1018.       _loc2_ = _loc2_ + 1;
  1019.    }
  1020. }
  1021. function gereAnims()
  1022. {
  1023.    var _loc3_ = soundObjects[listMusicKA[0]].position / 1000;
  1024.    lAnim = undefined;
  1025.    var _loc2_ = undefined;
  1026.    _loc2_ = 0;
  1027.    while(_loc2_ < listAnimTimeCodes.length)
  1028.    {
  1029.       if(_loc3_ > listAnimTimeCodes[_loc2_])
  1030.       {
  1031.          if(_loc2_ == listAnimTimeCodes.length - 1)
  1032.          {
  1033.             lAnim = _loc2_;
  1034.             break;
  1035.          }
  1036.          if(_loc3_ <= listAnimTimeCodes[_loc2_ + 1])
  1037.          {
  1038.             lAnim = _loc2_;
  1039.             break;
  1040.          }
  1041.       }
  1042.       _loc2_ = _loc2_ + 1;
  1043.    }
  1044.    if(lAnim !== actualAnim)
  1045.    {
  1046.       trace("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  1047.       trace("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  1048.       trace(this.ANIMKAR.swfStocker[gAnimKar]._totalframes + "      " + this.ANIMKAR.swfStocker[gAnimKar]._currentframe);
  1049.       trace("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  1050.       trace("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  1051.       trace("ANIM " + _loc2_ + "  :  " + _loc3_ + "  :  " + listAnimTimeCodes[_loc2_]);
  1052.       actualAnim = lAnim;
  1053.       hideAnims();
  1054.       gAnimKar = listAnim[lAnim];
  1055.       trace(_loc3_ + "     " + listAnimTimeCodes[_loc2_]);
  1056.       trace("CHANGE ANIM     " + lAnim + "     " + gAnimKar);
  1057.       this.ANIMKAR.swfStocker[gAnimKar]._visible = true;
  1058.       this.ANIMKAR.swfStocker[gAnimKar].gotoAndPlay(1);
  1059.       this.ANIMKAR.swfStocker[gAnimKar].ANIM.gotoAndPlay(1);
  1060.       this.ANIMKAR.swfStocker[gAnimKar].ANIM.ANIM.gotoAndPlay(1);
  1061.    }
  1062.    else if(this.ANIMKAR.swfStocker[gAnimKar]._currentframe % 3 == 0)
  1063.    {
  1064.       this.ANIMKAR.swfStocker[gAnimKar].gotoAndPlay(this.ANIMKAR.swfStocker[gAnimKar]._currentframe + 1);
  1065.    }
  1066. }
  1067. function initParolesStyle()
  1068. {
  1069.    var _loc4_ = "LM_KAR";
  1070.    var _loc3_ = this.moduleInfo.returnNodeByPath("Module.StylesTextes.StylesLM");
  1071.    var _loc2_ = 0;
  1072.    while(_loc2_ < _loc3_.childNodes.length)
  1073.    {
  1074.       if(_loc3_.childNodes[_loc2_].attributes.id == _loc4_)
  1075.       {
  1076.          nodeKAR = _loc3_.childNodes[_loc2_];
  1077.          break;
  1078.       }
  1079.       _loc2_ = _loc2_ + 1;
  1080.    }
  1081.    boldKA = "0";
  1082.    _loc2_ = 0;
  1083.    while(_loc2_ < nodeKAR.childNodes.length)
  1084.    {
  1085.       switch(nodeKAR.childNodes[_loc2_].nodeName)
  1086.       {
  1087.          case "police":
  1088.             policeKA = nodeKAR.childNodes[_loc2_].firstChild.nodeValue;
  1089.             break;
  1090.          case "corps":
  1091.             corpsKA = nodeKAR.childNodes[_loc2_].firstChild.nodeValue;
  1092.             break;
  1093.          case "bold":
  1094.             boldKA = nodeKAR.childNodes[_loc2_].firstChild.nodeValue;
  1095.             break;
  1096.          case "leading":
  1097.             leadingKA = nodeKAR.childNodes[_loc2_].firstChild.nodeValue;
  1098.       }
  1099.       _loc2_ = _loc2_ + 1;
  1100.    }
  1101.    if(boldKA == "1")
  1102.    {
  1103.       policeKA += "_b";
  1104.    }
  1105.    else
  1106.    {
  1107.       policeKA += "_p";
  1108.    }
  1109.    clipParoles.paroles.embedFonts = true;
  1110.    var _loc5_ = new TextFormat();
  1111.    _loc5_.font = policeKA;
  1112.    _loc5_.size = corpsKA;
  1113.    _loc5_.leading = leadingKA;
  1114.    _loc5_.color = 10053324;
  1115.    clipParoles.paroles.setTextFormat(_loc5_);
  1116. }
  1117. function initParoles()
  1118. {
  1119.    listChars = [];
  1120.    clipParoles.paroles.text = "";
  1121.    var _loc2_ = "";
  1122.    var _loc1_ = 0;
  1123.    while(_loc1_ < listLignes.length)
  1124.    {
  1125.       var _loc3_ = Number(listLignes[_loc1_]);
  1126.       if(_loc3_ != listLignes[_loc1_ + 1])
  1127.       {
  1128.          if(listParoles[_loc1_] != "sautDeLigne")
  1129.          {
  1130.             if(_loc2_ != "")
  1131.             {
  1132.                _loc2_ += " " + listParoles[_loc1_];
  1133.             }
  1134.             else
  1135.             {
  1136.                _loc2_ += listParoles[_loc1_];
  1137.             }
  1138.          }
  1139.          clipParoles.paroles.text += _loc2_ + "\r";
  1140.          listChars.push(clipParoles.paroles.length);
  1141.          _loc2_ = "";
  1142.       }
  1143.       else
  1144.       {
  1145.          if(_loc2_ != "")
  1146.          {
  1147.             _loc2_ += " " + listParoles[_loc1_];
  1148.          }
  1149.          else
  1150.          {
  1151.             _loc2_ += listParoles[_loc1_];
  1152.          }
  1153.          listChars.push(clipParoles.paroles.length + _loc2_.length);
  1154.       }
  1155.       _loc1_ = _loc1_ + 1;
  1156.    }
  1157.    initParolesStyle();
  1158.    if(totalTextV == undefined)
  1159.    {
  1160.       totalTextV = clipParoles.paroles.textHeight - clipParoles.paroles._height;
  1161.       clipParoles.paroles._height = clipParoles.paroles.textHeight;
  1162.    }
  1163.    trace("totalTextV " + totalTextV);
  1164.    myColorFormat = new TextFormat();
  1165.    ColorFormat = clipParoles.paroles.getTextFormat();
  1166.    Selection.setFocus(clipParoles.paroles);
  1167.    Selection.setSelection(0,0);
  1168. }
  1169. function changeColor()
  1170. {
  1171.    Selection.setSelection(listChars[tcNb - 1],listChars[tcNb]);
  1172.    myColorFormat = ColorFormat;
  1173.    myColorFormat.color = "0x9966CC";
  1174.    clipParoles.paroles.setTextFormat(ColorFormat);
  1175.    myColorFormat.color = "0x4c2771";
  1176.    clipParoles.paroles.setTextFormat(listChars[tcNb - 1],listChars[tcNb],myColorFormat);
  1177.    Selection.setSelection(0,0);
  1178. }
  1179. function gereParoles()
  1180. {
  1181.    tcNb = paroleTC();
  1182.    changeColor();
  1183. }
  1184. function ExgereParoles()
  1185. {
  1186.    clipParoles.paroles.htmlText = "";
  1187.    var _loc2_ = "";
  1188.    var _loc1_ = 0;
  1189.    while(_loc1_ < listLignes.length)
  1190.    {
  1191.       var _loc3_ = Number(listLignes[_loc1_]);
  1192.       if(_loc3_ != listLignes[_loc1_ + 1])
  1193.       {
  1194.          if(listParoles[_loc1_] == "sautDeLigne")
  1195.          {
  1196.             _loc2_ = "\r";
  1197.          }
  1198.          else if(_loc2_ != "")
  1199.          {
  1200.             if(_loc1_ == paroleTC())
  1201.             {
  1202.                _loc2_ += " <font color=\'#FFFFFE\'>" + listParoles[_loc1_] + "</font>";
  1203.             }
  1204.             else
  1205.             {
  1206.                _loc2_ += " <font color=\'#009999\'>" + listParoles[_loc1_] + "</font>";
  1207.             }
  1208.          }
  1209.          else if(_loc1_ == paroleTC())
  1210.          {
  1211.             _loc2_ += "<font color=\'#FFFFFE\'>" + listParoles[_loc1_] + "</font>";
  1212.          }
  1213.          else
  1214.          {
  1215.             _loc2_ += "<font color=\'#009999\'>" + listParoles[_loc1_] + "</font>";
  1216.          }
  1217.          clipParoles.paroles.text += _loc2_;
  1218.          _loc2_ = "";
  1219.       }
  1220.       else if(_loc2_ != "")
  1221.       {
  1222.          if(_loc1_ == paroleTC())
  1223.          {
  1224.             _loc2_ += " <font color=\'#FFFFFE\'>" + listParoles[_loc1_] + "</font>";
  1225.          }
  1226.          else
  1227.          {
  1228.             _loc2_ += " <font color=\'#009999\'>" + listParoles[_loc1_] + "</font>";
  1229.          }
  1230.       }
  1231.       else if(_loc1_ == paroleTC())
  1232.       {
  1233.          _loc2_ += "<font color=\'#FFFFFE\'>" + listParoles[_loc1_] + "</font>";
  1234.       }
  1235.       else
  1236.       {
  1237.          _loc2_ += "<font color=\'#009999\'>" + listParoles[_loc1_] + "</font>";
  1238.       }
  1239.       _loc1_ = _loc1_ + 1;
  1240.    }
  1241.    actualParole = paroleTC();
  1242.    initParolesStyle();
  1243.    if(totalTextV == undefined)
  1244.    {
  1245.       totalTextV = clipParoles.paroles.textHeight - clipParoles.paroles._height;
  1246.       clipParoles.paroles._height = clipParoles.paroles.textHeight;
  1247.    }
  1248. }
  1249. function paroleTC()
  1250. {
  1251.    var _loc2_ = soundObjects[listMusicKA[0]].position / 1000;
  1252.    lParole = undefined;
  1253.    var _loc1_ = undefined;
  1254.    _loc1_ = 0;
  1255.    while(_loc1_ < listParolesTimeCodes.length)
  1256.    {
  1257.       if(_loc2_ > listParolesTimeCodes[_loc1_])
  1258.       {
  1259.          if(_loc1_ == listParolesTimeCodes.length - 1)
  1260.          {
  1261.             lParole = _loc1_;
  1262.             break;
  1263.          }
  1264.          temps = listParolesTimeCodes[_loc1_ + 1] - avance;
  1265.          if(temps < 0)
  1266.          {
  1267.             temps = 0;
  1268.          }
  1269.          if(_loc2_ < temps)
  1270.          {
  1271.             lParole = _loc1_;
  1272.             break;
  1273.          }
  1274.       }
  1275.       _loc1_ = _loc1_ + 1;
  1276.    }
  1277.    return lParole;
  1278. }
  1279. function scrollParole()
  1280. {
  1281.    var _loc1_ = soundObjects[listMusicKA[0]].position / 1000;
  1282.    percentMusic = _loc1_ / (soundObjects[listMusicKA[0]].duration / 1000) * 100;
  1283.    totalScrollRange = upperScrollLimit - lowerScrollLimit;
  1284.    if(percentMusic > lowerScrollLimit & percentMusic < upperScrollLimit)
  1285.    {
  1286.       limitPercent = percentMusic - lowerScrollLimit;
  1287.       percentScroll = limitPercent / totalScrollRange * 100;
  1288.       clipParoles.paroles._y = parolesOrigY - totalTextV / 100 * percentScroll;
  1289.    }
  1290.    else
  1291.    {
  1292.       if(percentMusic <= lowerScrollLimit)
  1293.       {
  1294.          percentScroll = 0;
  1295.       }
  1296.       else
  1297.       {
  1298.          percentScroll = 100;
  1299.       }
  1300.       clipParoles.paroles._y = parolesOrigY - totalTextV / 100 * percentScroll;
  1301.    }
  1302. }
  1303. function initKABoutons()
  1304. {
  1305.    onDemo = 1;
  1306.    _root.musicChoix = undefined;
  1307.    initKABoutonsVars();
  1308.    listKABoutons = ["ECOUTE_01","CHANTE_01"];
  1309.    i = 0;
  1310.    while(i < listKABoutons.length)
  1311.    {
  1312.       this.Interface[listKABoutons[i]].pName = this.Interface[listKABoutons[i]]._name;
  1313.       this.Interface[listKABoutons[i]].onRollOver = function()
  1314.       {
  1315.          if(!onDemo)
  1316.          {
  1317.             if(_root.musicChoix != this.pName)
  1318.             {
  1319.                gereCursor(2);
  1320.                this.useHandCursor = 1;
  1321.                this.gotoAndStop("e2");
  1322.             }
  1323.             else
  1324.             {
  1325.                this.useHandCursor = 0;
  1326.             }
  1327.          }
  1328.          else
  1329.          {
  1330.             this.useHandCursor = 0;
  1331.          }
  1332.       };
  1333.       this.Interface[listKABoutons[i]].onRollOut = function()
  1334.       {
  1335.          gereCursor(1);
  1336.          if(!onDemo)
  1337.          {
  1338.             if(_root.musicChoix != this.pName)
  1339.             {
  1340.                this.gotoAndStop("e1");
  1341.             }
  1342.          }
  1343.       };
  1344.       this.Interface[listKABoutons[i]].onPress = function()
  1345.       {
  1346.          if(!onDemo)
  1347.          {
  1348.             if(_root.musicChoix != this.pName)
  1349.             {
  1350.                DesactiveOEIL();
  1351.                gereCursor(1);
  1352.                if(_root.musicChoix != undefined)
  1353.                {
  1354.                   _root[_root.musicChoix].gotoAndStop("E1");
  1355.                }
  1356.                _root.sgMusicChoix = _root.musicChoix;
  1357.                _root.musicChoix = this.pName;
  1358.                this.useHandCursor = 0;
  1359.                switch(_root.musicChoix)
  1360.                {
  1361.                   case "ECOUTE_01":
  1362.                      _root.Interface.CHANTE_01.gotoAndStop("E1");
  1363.                      gMusicKA = 0;
  1364.                      playMusic();
  1365.                      break;
  1366.                   case "CHANTE_01":
  1367.                      _root.Interface.ECOUTE_01.gotoAndStop("E1");
  1368.                      gMusicKA = 1;
  1369.                      playMusic();
  1370.                }
  1371.             }
  1372.          }
  1373.       };
  1374.       i++;
  1375.    }
  1376. }
  1377. function allumeKABoutons()
  1378. {
  1379.    var _loc2_ = 0;
  1380.    while(_loc2_ < listKABoutons.length)
  1381.    {
  1382.       this.Interface[listKABoutons[_loc2_]].gotoAndStop("E1");
  1383.       _loc2_ = _loc2_ + 1;
  1384.    }
  1385. }
  1386. function eteindreKABoutons()
  1387. {
  1388.    var _loc2_ = 0;
  1389.    while(_loc2_ < listKABoutons.length)
  1390.    {
  1391.       this.Interface[listKABoutons[_loc2_]].gotoAndStop("E0");
  1392.       _loc2_ = _loc2_ + 1;
  1393.    }
  1394. }
  1395. function initPrintBoutons()
  1396. {
  1397.    Interface.BT_PRINT.onRollOver = function()
  1398.    {
  1399.       if(!onDemo)
  1400.       {
  1401.          gereCursor(2);
  1402.          this.gotoAndStop("E2");
  1403.          this.useHandCursor = 1;
  1404.       }
  1405.       else
  1406.       {
  1407.          this.useHandCursor = 0;
  1408.       }
  1409.    };
  1410.    Interface.BT_PRINT.onRollOut = function()
  1411.    {
  1412.       gereCursor(2);
  1413.       this.gotoAndStop("E1");
  1414.    };
  1415.    Interface.BT_PRINT.onPress = function()
  1416.    {
  1417.       if(!onDemo)
  1418.       {
  1419.          gereCursor(1);
  1420.          this.gotoAndStop("E1");
  1421.          oldDepth = partition.getDepth();
  1422.          partition.swapDepths(20000);
  1423.          partition._alpha = 100;
  1424.          Interface._visible = false;
  1425.          if(_global.HOTE.ImprimerEcran())
  1426.          {
  1427.             partition._alpha = 0;
  1428.             partition.swapDepths(oldDepth);
  1429.             Interface._visible = true;
  1430.          }
  1431.          else
  1432.          {
  1433.             partition._alpha = 0;
  1434.             partition.swapDepths(oldDepth);
  1435.             Interface._visible = true;
  1436.          }
  1437.       }
  1438.    };
  1439. }
  1440. function StopAll()
  1441. {
  1442.    trace("STOP####################################################################################################################");
  1443.    soundObjects[listMusicKA[0]].stop();
  1444.    soundObjects[listMusicKA[1]].stop();
  1445. }
  1446. function initKeyPause()
  1447. {
  1448.    gPauseOn = 0;
  1449.    gPauseSpaceOn = 0;
  1450.    gPauseSpaceEnCours = 0;
  1451. }
  1452. function initGen()
  1453. {
  1454.    this._lockroot = true;
  1455.    _global.gClipGen = this;
  1456.    Stage.showMenu = false;
  1457.    gLangue = "FR";
  1458.    gMusicOn = 1;
  1459.    gSousTitre = 0;
  1460.    gST = 0;
  1461.    gVolume = 100;
  1462.    gWidth = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.width;
  1463.    gHeight = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.height;
  1464.    if(gWidth == undefined)
  1465.    {
  1466.       gWidth = 800;
  1467.    }
  1468.    else
  1469.    {
  1470.       gWidth = Number(gWidth);
  1471.    }
  1472.    if(gHeight == undefined)
  1473.    {
  1474.       gHeight = 600;
  1475.    }
  1476.    else
  1477.    {
  1478.       gHeight = Number(gHeight);
  1479.    }
  1480.    initKeyPause();
  1481. }
  1482. function testeDebutCommentSpecial()
  1483. {
  1484.    switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
  1485.    {
  1486.       case "bz":
  1487.       case "BZ":
  1488.          trace("-------  BZ on-----------");
  1489.          DesactiveBZ();
  1490.          if(BT_BZ.gEtat !== 3)
  1491.          {
  1492.             BT_BZ.gotoAndPlay("E3");
  1493.          }
  1494.          else
  1495.          {
  1496.             BT_BZ.BZ_P.gotoAndPlay("parle");
  1497.          }
  1498.          break;
  1499.       case "ze":
  1500.       case "ZE":
  1501.          trace("-------  ZE on-----------");
  1502.          DesactiveOEIL();
  1503.          if(BT_OEIL.gEtat !== 3)
  1504.          {
  1505.             BT_OEIL.gotoAndPlay("E3");
  1506.          }
  1507.          else
  1508.          {
  1509.             BT_OEIL.OEIL_P.gotoAndPlay("parle");
  1510.          }
  1511.          afficherRolls();
  1512.    }
  1513. }
  1514. function testeFinCommentSpecial()
  1515. {
  1516.    switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
  1517.    {
  1518.       case "bz":
  1519.       case "BZ":
  1520.          trace("-------  BZ off-----------");
  1521.          ActiveBZ();
  1522.          BT_BZ.BZ_P.gotoAndPlay("rentre");
  1523.          BT_BZ.gClicOn = undefined;
  1524.          break;
  1525.       case "ze":
  1526.       case "ZE":
  1527.          trace("-------  ZE off-----------");
  1528.          ActiveOEIL();
  1529.          BT_OEIL.OEIL_P.gotoAndPlay("rentre");
  1530.          BT_OEIL.gClicOn = undefined;
  1531.          masquerRolls();
  1532.    }
  1533. }
  1534. function stopComment()
  1535. {
  1536.    trace("STOP COMMENT");
  1537.    trace("gCommentOn " + gCommentOn);
  1538.    if(gCommentOn !== undefined)
  1539.    {
  1540.       testeFinCommentSpecial();
  1541.       delete gCommentOn.onSoundComplete;
  1542.       gCommentOn.stop();
  1543.       gCommentOn = undefined;
  1544.       if(gPauseOn == undefined || gPauseOn == 0)
  1545.       {
  1546.          removeMovieClip("mcClicZap");
  1547.       }
  1548.       gBlockST = undefined;
  1549.       gereTextes.masqueST();
  1550.       trace("gClipTarget " + gClipTarget);
  1551.       trace("gClipTargetLabel " + gClipTargetLabel);
  1552.       if(gClipTarget !== undefined)
  1553.       {
  1554.          gClipTarget.gotoAndStop(gClipTargetLabel);
  1555.          gClipTarget = undefined;
  1556.          gClipTargetLabel = undefined;
  1557.       }
  1558.    }
  1559. }
  1560. function pauseComment()
  1561. {
  1562.    trace("pauseComment " + gCommentOn);
  1563.    if(gCommentOn !== undefined)
  1564.    {
  1565.       gCommentOn.stop();
  1566.       mcClicZap._visible = false;
  1567.    }
  1568. }
  1569. function continueComment()
  1570. {
  1571.    trace("continueComment " + gCommentOn);
  1572.    if(gCommentOn !== undefined)
  1573.    {
  1574.       gCommentOn.start(gCommentOn.position / 1000);
  1575.       mcClicZap._visible = true;
  1576.    }
  1577. }
  1578. function joueSon(p)
  1579. {
  1580.    var _loc4_ = p.nomSon;
  1581.    gSoundString = _loc4_;
  1582.    if(p.mc !== undefined)
  1583.    {
  1584.       gClipRef = p.mc;
  1585.    }
  1586.    else
  1587.    {
  1588.       gClipRef = _root;
  1589.    }
  1590.    if(p.zapBlock !== undefined)
  1591.    {
  1592.       gClicZap = p.zapBlock;
  1593.    }
  1594.    else
  1595.    {
  1596.       gClicZap = "ZAP_BLOCK";
  1597.    }
  1598.    if(p.actionFin !== undefined)
  1599.    {
  1600.       gActionFinSon = p.actionFin;
  1601.    }
  1602.    else
  1603.    {
  1604.       gActionFinSon = "PLAY";
  1605.    }
  1606.    if(p.mcCible !== undefined)
  1607.    {
  1608.       if(typeof p.mcCible == "movieclip")
  1609.       {
  1610.          gClipTarget = p.mcCible;
  1611.       }
  1612.       else
  1613.       {
  1614.          gClipTarget = gClipRef[p.mcCible];
  1615.       }
  1616.       if(p.mcLabelOut !== undefined)
  1617.       {
  1618.          gClipTargetLabel = p.mcLabelOut;
  1619.       }
  1620.       else
  1621.       {
  1622.          gClipTargetLabel = gClipTarget._currentframe;
  1623.       }
  1624.       if(p.mcLabelIn !== undefined)
  1625.       {
  1626.          gClipTarget.gotoAndPlay(p.mcLabelIn);
  1627.       }
  1628.       else
  1629.       {
  1630.          gClipTarget.gotoAndPlay("parle");
  1631.       }
  1632.    }
  1633.    stopComment();
  1634.    mySound = soundObjects[gCommentName + _loc4_];
  1635.    trace("joueSon " + mySound);
  1636.    if(mySound !== undefined)
  1637.    {
  1638.       gCommentOn = mySound;
  1639.       trace("GCO " + gCommentOn);
  1640.       gCommentOn.p = p;
  1641.       gCommentOn.id = gCommentName + _loc4_;
  1642.       testeDebutCommentSpecial();
  1643.       if(gMusicOn == 1 && gMusic !== undefined)
  1644.       {
  1645.          soundObjects[gMusic].setVolume(gVolume * 40 / 100);
  1646.       }
  1647.       mySound.setVolume(gVolume);
  1648.       if(gCommentOnPausePos !== undefined)
  1649.       {
  1650.          mySound.start(gCommentOnPausePos / 1000);
  1651.       }
  1652.       else
  1653.       {
  1654.          mySound.start();
  1655.       }
  1656.    }
  1657.    else
  1658.    {
  1659.       trace("______" + getSoundByID(gCommentName + _loc4_));
  1660.       var _loc5_ = getSoundByID(gCommentName + _loc4_);
  1661.       if(_loc5_ !== undefined)
  1662.       {
  1663.          mySound = new Sound();
  1664.          mySound.loadSound(_global.gModulePath + _loc5_.attributes.src,true);
  1665.          gCommentOn = mySound;
  1666.          gCommentOn.p = p;
  1667.          gCommentOn.id = gCommentName + _loc4_;
  1668.          testeDebutCommentSpecial();
  1669.          if(gMusicOn == 1 && gMusic !== undefined)
  1670.          {
  1671.             soundObjects[gMusic].setVolume(gVolume * 40 / 100);
  1672.          }
  1673.       }
  1674.    }
  1675.    if(mySound == undefined)
  1676.    {
  1677.       return undefined;
  1678.    }
  1679.    mySound.onSoundComplete = commentFini;
  1680.    if(gClicZap !== "NOZAP_NOBLOCK")
  1681.    {
  1682.       mcClicZap = creerRectangle({nom:"mcClicZap",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  1683.       switch(gClicZap.split("_")[0])
  1684.       {
  1685.          case "ZAP":
  1686.             mcClicZap.useHandCursor = false;
  1687.             mcClicZap.onPress = function()
  1688.             {
  1689.                trace("clic zap son");
  1690.                stopSon();
  1691.             };
  1692.             break;
  1693.          case "NOZAP":
  1694.             mcClicZap.useHandCursor = false;
  1695.             mcClicZap.onPress = function()
  1696.             {
  1697.                trace("no clic allowed");
  1698.             };
  1699.       }
  1700.       mcClicZap._visible = true;
  1701.    }
  1702.    if(gST == 1 && gBlockST == undefined)
  1703.    {
  1704.       gereTextes.afficheST(gCommentName + _loc4_);
  1705.    }
  1706. }
  1707. function creerClicZap(p)
  1708. {
  1709.    if(_global.mcClicZap2 != undefined)
  1710.    {
  1711.       removeMovieClip(_root.mcClicZap2);
  1712.    }
  1713.    var _loc0_ = null;
  1714.    var _loc4_ = _global.mcClicZap2 = creerRectangle({nom:"mcClicZap2",pere:_root,level:15001,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  1715.    _loc4_.p = p;
  1716.    _loc4_.useHandCursor = false;
  1717.    _loc4_.onPress = function()
  1718.    {
  1719.       trace("clic zap " + this.p);
  1720.       this.p.retour.call(this.p.ecouteur);
  1721.       removeMovieClip(this);
  1722.       _global.mcClicZap2 = undefined;
  1723.    };
  1724.    _loc4_._visible = true;
  1725. }
  1726. function creerRectangle(p)
  1727. {
  1728.    var _loc3_ = p.level != undefined ? p.level : 15000;
  1729.    var _loc4_ = p.nom != undefined ? p.nom : "ClipSansNom";
  1730.    var _loc5_ = p.alpha != undefined ? p.alpha : 100;
  1731.    var _loc2_ = p.pere.createEmptyMovieClip(_loc4_,_loc3_);
  1732.    _loc2_.beginFill(65280,_loc5_);
  1733.    _loc2_.moveTo(p.x,p.y);
  1734.    _loc2_.lineTo(p.x + p.width,p.y);
  1735.    _loc2_.lineTo(p.x + p.width,p.y + p.height);
  1736.    _loc2_.lineTo(p.x,p.y + p.height);
  1737.    _loc2_.lineTo(p.x,p.y);
  1738.    _loc2_.endFill();
  1739.    return _loc2_;
  1740. }
  1741. function stopSon()
  1742. {
  1743.    gCommentOn.stop();
  1744.    commentFini();
  1745. }
  1746. function commentFini()
  1747. {
  1748.    testeFinCommentSpecial();
  1749.    if(gClicZap !== "NOZAP_NOBLOCK")
  1750.    {
  1751.       removeMovieClip("mcClicZap");
  1752.    }
  1753.    gCommentOn = undefined;
  1754.    gBlockST = undefined;
  1755.    gereTextes.masqueST();
  1756.    if(gMusicOn == 1 && gMusic !== undefined)
  1757.    {
  1758.       soundObjects[gMusic].setVolume(gVolume);
  1759.    }
  1760.    if(gClipTarget !== undefined)
  1761.    {
  1762.       gClipTarget.gotoAndStop(gClipTargetLabel);
  1763.       gClipTarget = undefined;
  1764.       gClipTargetLabel = undefined;
  1765.    }
  1766.    switch(gActionFinSon)
  1767.    {
  1768.       case "RIEN":
  1769.          break;
  1770.       case "PLAY":
  1771.          trace("_root.gNextLabel +++++++++ " + _root.gNextLabel);
  1772.          if(_root.gNextLabel == undefined)
  1773.          {
  1774.             if(gLineaireOn != undefined)
  1775.             {
  1776.                if((_loc0_ = gLineaireOn) !== "_")
  1777.                {
  1778.                   lSonSuivant = gLineaireOn + gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
  1779.                   lLabel = lSonSuivant;
  1780.                }
  1781.                else
  1782.                {
  1783.                   lSonSuivant = gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
  1784.                   lLabel = gLineaireOn + lSonSuivant;
  1785.                }
  1786.                joueSon({mc:gClipRef,nomSon:lSonSuivant,zapBlock:gClicZap,actionFin:gActionFinSon});
  1787.                gClipRef.gotoAndStop(lLabel);
  1788.             }
  1789.             else
  1790.             {
  1791.                gClipRef.play();
  1792.             }
  1793.          }
  1794.          else
  1795.          {
  1796.             trace(gClipRef);
  1797.             gClipRef.gotoAndPlay(_root.gNextLabel);
  1798.             _root.gNextLabel = undefined;
  1799.             gLineaireOn = undefined;
  1800.          }
  1801.          break;
  1802.       default:
  1803.          _root[gActionFinSon]();
  1804.    }
  1805. }
  1806. function joueBruitage(p)
  1807. {
  1808.    trace("joueBruitage " + p.nomSon + " " + gVolume);
  1809.    var _loc2_ = soundObjects[gBruitageName + p.nomSon];
  1810.    if(gListeBruitage == undefined)
  1811.    {
  1812.       gListeBruitage = [];
  1813.       gListeA_fin_Bruitage = [];
  1814.       gListeLoop_Bruitage = [];
  1815.    }
  1816.    _loc2_.setVolume(gVolume);
  1817.    _loc2_.id = p.nomSon;
  1818.    gListeBruitage.push(_loc2_.id);
  1819.    if(p.actionFin !== undefined)
  1820.    {
  1821.       gActionFinBruitage = p.actionFin;
  1822.       gListeA_fin_Bruitage.push(gActionFinBruitage);
  1823.    }
  1824.    else
  1825.    {
  1826.       gActionFinBruitage = undefined;
  1827.       gListeA_fin_Bruitage.push("");
  1828.    }
  1829.    _loc2_.p = p;
  1830.    _loc2_.onSoundComplete = mx.utils.Delegate.create(_loc2_,finBruitage);
  1831.    if(p.loopSon == undefined)
  1832.    {
  1833.       _loc2_.start(p.offset);
  1834.       gListeLoop_Bruitage.push("");
  1835.    }
  1836.    else
  1837.    {
  1838.       _loc2_.start(p.offset,p.loopSon);
  1839.       gListeLoop_Bruitage.push(p.loopSon);
  1840.    }
  1841. }
  1842. function stopBruitage(p)
  1843. {
  1844.    var _loc1_ = soundObjects[gBruitageName + p.nomSon];
  1845.    finBruitage(p.nomSon);
  1846.    _loc1_.stop();
  1847. }
  1848. function finBruitage(lSon)
  1849. {
  1850.    if(lSon == undefined)
  1851.    {
  1852.       lSon = this.id;
  1853.    }
  1854.    if(gListeBruitage !== undefined)
  1855.    {
  1856.       if(getPos(gListeBruitage,lSon) !== -1)
  1857.       {
  1858.          if(gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)] !== "")
  1859.          {
  1860.             if(typeof gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)] == "string")
  1861.             {
  1862.                gClipGen[gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)]]();
  1863.             }
  1864.             else
  1865.             {
  1866.                gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)].call(this.p.MC);
  1867.             }
  1868.          }
  1869.          gListeA_fin_Bruitage.splice(getPos(gListeBruitage,lSon),1);
  1870.          gListeLoop_Bruitage.splice(getPos(gListeBruitage,lSon),1);
  1871.          gListeBruitage.splice(getPos(gListeBruitage,lSon),1);
  1872.          if(gListeBruitage.length == 0)
  1873.          {
  1874.             gListeBruitage = undefined;
  1875.             gListeA_fin_Bruitage = undefined;
  1876.             gListeLoop_Bruitage = undefined;
  1877.          }
  1878.       }
  1879.    }
  1880. }
  1881. function getPos(myList, myValue)
  1882. {
  1883.    lPresent = -1;
  1884.    maPosition = 0;
  1885.    while(maPosition <= myList.length)
  1886.    {
  1887.       if(myList[maPosition] == myValue)
  1888.       {
  1889.          lPresent = maPosition;
  1890.          break;
  1891.       }
  1892.       maPosition++;
  1893.    }
  1894.    return lPresent;
  1895. }
  1896. function trouvePosMax(myList)
  1897. {
  1898.    lMax = myList[0];
  1899.    lPosMax = 0;
  1900.    i = 1;
  1901.    while(i <= myList.length)
  1902.    {
  1903.       if(myList[i] > lMax)
  1904.       {
  1905.          lMax = myList[i];
  1906.          lPosMax = i;
  1907.       }
  1908.       i++;
  1909.    }
  1910.    return lPosMax;
  1911. }
  1912. function duplicate(myList)
  1913. {
  1914.    newList = [];
  1915.    i = 0;
  1916.    while(i <= myList.length - 1)
  1917.    {
  1918.       newList.push(myList[i]);
  1919.       i++;
  1920.    }
  1921.    return newList;
  1922. }
  1923. function randomiseList(myList)
  1924. {
  1925.    var _loc3_ = duplicate(myList);
  1926.    var _loc4_ = [];
  1927.    var _loc5_ = _loc3_.length;
  1928.    var _loc2_ = 0;
  1929.    while(_loc2_ < _loc5_)
  1930.    {
  1931.       var _loc1_ = randomValue(0,_loc3_.length - 1);
  1932.       _loc4_.push(_loc3_[_loc1_]);
  1933.       _loc3_.splice(_loc1_,1);
  1934.       _loc2_ = _loc2_ + 1;
  1935.    }
  1936.    return _loc4_;
  1937. }
  1938. function returnNodeByPathRandomise(nodeSent)
  1939. {
  1940.    var _loc4_ = new XML();
  1941.    var _loc5_ = nodeSent.childNodes.length;
  1942.    var _loc1_ = 0;
  1943.    while(_loc1_ < _loc5_)
  1944.    {
  1945.       var _loc2_ = randomValue(0,nodeSent.childNodes.length - 1);
  1946.       _loc4_.appendChild(nodeSent.childNodes[_loc2_]);
  1947.       _loc1_ = _loc1_ + 1;
  1948.    }
  1949.    return _loc4_;
  1950. }
  1951. function zapIntro(myLabel)
  1952. {
  1953.    mcClicZapIntro = creerRectangle({nom:"mcClicZapIntro",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
  1954.    mcClicZapIntro.useHandCursor = false;
  1955.    mcClicZapIntro.onPress = function()
  1956.    {
  1957.       stopComment();
  1958.       gotoAndPlay(myLabel);
  1959.       removeZapIntro();
  1960.    };
  1961. }
  1962. function removeZapIntro()
  1963. {
  1964.    removeMovieClip(mcClicZapIntro);
  1965. }
  1966. function onMcOut(myMc)
  1967. {
  1968.    gereCursor(1);
  1969.    if(myMc.pLabelOut == undefined)
  1970.    {
  1971.       myMc.gotoAndPlay("E1");
  1972.    }
  1973.    else
  1974.    {
  1975.       myMc.gotoAndPlay(myMc.pLabelOut);
  1976.    }
  1977.    if(myMc.pSon.split("")[0] == "B")
  1978.    {
  1979.       stopBruitage({nomSon:myMc.pSon});
  1980.    }
  1981.    else
  1982.    {
  1983.       stopComment();
  1984.    }
  1985.    if(myMc.pIB !== undefined)
  1986.    {
  1987.       gereTextes.masqueIB();
  1988.    }
  1989. }
  1990. function onMcOver(p)
  1991. {
  1992.    var myMc = p.mc;
  1993.    myMc.pIB = p.codeIB;
  1994.    if(p.nomSon == undefined)
  1995.    {
  1996.       if(p.nomSonC == undefined)
  1997.       {
  1998.          myMc.pSon = "B_" + myMc._name.split("_")[1];
  1999.       }
  2000.       else
  2001.       {
  2002.          myMc.pSon = p.nomSonC;
  2003.       }
  2004.    }
  2005.    else
  2006.    {
  2007.       myMc.pSon = p.nomSon;
  2008.    }
  2009.    if(p.actionFin == undefined)
  2010.    {
  2011.       myMc.actionFin = "RIEN";
  2012.    }
  2013.    else
  2014.    {
  2015.       myMc.actionFin = p.actionFin;
  2016.    }
  2017.    myMc.pLabelOut = p.mcLabelOut;
  2018.    myMc.onRollOver = function()
  2019.    {
  2020.       gereCursor(2);
  2021.       if(p.mcLabelIn == undefined)
  2022.       {
  2023.          this.gotoAndPlay("E2");
  2024.       }
  2025.       else
  2026.       {
  2027.          this.gotoAndPlay(p.mcLabelIn);
  2028.       }
  2029.       if(this.pSon.split("")[0] == "B")
  2030.       {
  2031.          joueBruitage({nomSon:this.pSon});
  2032.       }
  2033.       else
  2034.       {
  2035.          joueSon({nomSon:this.pSon,zapBlock:"NOZAP_NOBLOCK",actionFin:this.actionFin});
  2036.       }
  2037.       if(this.pIB !== undefined)
  2038.       {
  2039.          gereTextes.afficheIB({mc:this,codeIB:this.pIB});
  2040.       }
  2041.    };
  2042.    myMc.onRollOut = myMc.onDragOut = function()
  2043.    {
  2044.       onMcOut(myMc);
  2045.    };
  2046. }
  2047. function desactiveClip(pClip)
  2048. {
  2049.    trace(pClip);
  2050.    delete pClip.onRollOver;
  2051.    delete pClip.onRollOut;
  2052.    delete pClip.onDragOut;
  2053.    delete pClip.onPress;
  2054.    delete pClip.onRelease;
  2055.    delete pClip.onReleaseOutside;
  2056. }
  2057. function afficheClipPos(myMc, myX, myY)
  2058. {
  2059.    trace("mymc   " + myMc);
  2060.    myMc._x = myX;
  2061.    myMc._y = myY;
  2062.    myMc._visible = true;
  2063. }
  2064. function gimme2digits(X)
  2065. {
  2066.    if(Number(X) < 10)
  2067.    {
  2068.       lX = "0" + Number(X);
  2069.    }
  2070.    else
  2071.    {
  2072.       lX = String(X);
  2073.    }
  2074.    return lX;
  2075. }
  2076. function randomValue(min, max)
  2077. {
  2078.    var _loc1_ = Math.floor(Math.random() * (max - min + 1)) + min;
  2079.    return _loc1_;
  2080. }
  2081. function chercheDepthPlus(myMc, myDepth)
  2082. {
  2083.    var _loc1_ = myDepth;
  2084.    while(_loc1_ < 17000)
  2085.    {
  2086.       if(myMc.getInstanceAtDepth(_loc1_) == undefined)
  2087.       {
  2088.          break;
  2089.       }
  2090.       _loc1_ = _loc1_ + 1;
  2091.    }
  2092.    return _loc1_;
  2093. }
  2094. function chercheDepthMoins(myMc, myDepth)
  2095. {
  2096.    var _loc1_ = myDepth;
  2097.    while(_loc1_ > -16383)
  2098.    {
  2099.       if(myMc.getInstanceAtDepth(_loc1_) == undefined)
  2100.       {
  2101.          break;
  2102.       }
  2103.       _loc1_ = _loc1_ - 1;
  2104.    }
  2105.    return _loc1_;
  2106. }
  2107. function changeST(myST)
  2108. {
  2109.    trace("changeST   : " + myST);
  2110.    if(myST == "1")
  2111.    {
  2112.       gST = 1;
  2113.       if(gCommentOn !== undefined)
  2114.       {
  2115.          gereTextes.afficheST(gCommentOn.id);
  2116.       }
  2117.    }
  2118.    else
  2119.    {
  2120.       sousTitre = 0;
  2121.       gST = 0;
  2122.       gereTextes.masqueST(this);
  2123.    }
  2124. }
  2125. function changeMusicOn(myChangeMusicOn)
  2126. {
  2127.    trace("changeMusicOn   : " + myChangeMusicOn);
  2128.    switch(String(myChangeMusicOn))
  2129.    {
  2130.       case "1":
  2131.          gMusicOn = 1;
  2132.          if(gMusic == undefined)
  2133.          {
  2134.             gMusic = gBruitageName + "MU";
  2135.          }
  2136.          trace("changeMusicOn2   : " + gMusic + " - " + gVolume);
  2137.          if(gCommentOn !== undefined)
  2138.          {
  2139.             soundObjects[gMusic].setVolume(gVolume * 0.4);
  2140.          }
  2141.          else
  2142.          {
  2143.             soundObjects[gMusic].setVolume(gVolume);
  2144.          }
  2145.          soundObjects[gMusic].start(0,1000);
  2146.          break;
  2147.       case "0":
  2148.          soundObjects[gMusic].stop();
  2149.          gMusicOn = 0;
  2150.          break;
  2151.       default:
  2152.          if(gMusic !== undefined)
  2153.          {
  2154.             soundObjects[gMusic].stop();
  2155.          }
  2156.          gMusic = gBruitageName + myChangeMusicOn;
  2157.          if(gMusicOn == 1)
  2158.          {
  2159.             if(gCommentOn !== undefined)
  2160.             {
  2161.                soundObjects[gMusic].setVolume(gVolume * 0.4);
  2162.             }
  2163.             else
  2164.             {
  2165.                soundObjects[gMusic].setVolume(gVolume);
  2166.             }
  2167.             soundObjects[gMusic].start(0,1000);
  2168.          }
  2169.    }
  2170. }
  2171. function changeVolume(myChangeVolume)
  2172. {
  2173.    trace("changeVolume   : " + myChangeVolume);
  2174.    gVolume = Number(myChangeVolume);
  2175.    if(gCommentOn !== undefined)
  2176.    {
  2177.       gCommentOn.setVolume(gVolume);
  2178.       if(gMusicOn == 1)
  2179.       {
  2180.          soundObjects[gMusic].setVolume(gVolume * 0.4);
  2181.       }
  2182.    }
  2183.    else if(gMusicOn == 1)
  2184.    {
  2185.       soundObjects[gMusic].setVolume(gVolume);
  2186.    }
  2187. }
  2188. function DesactiveBZ()
  2189. {
  2190.    BT_BZ.useHandCursor = false;
  2191.    BT_BZ.gBZactif = 0;
  2192. }
  2193. function ActiveBZ()
  2194. {
  2195.    BT_BZ.useHandCursor = true;
  2196.    BT_BZ.gBZactif = 1;
  2197. }
  2198. function getSoundByID(attributeValue)
  2199. {
  2200.    var _loc2_ = this.moduleInfo.filterNode(this.moduleInfo.returnNodeByPath("Resources.ResourcesZip"),"type","mp3");
  2201.    mySound = undefined;
  2202.    mySound = this.recusiveGetSoundByAttribute(_loc2_,"id",attributeValue);
  2203.    if(mySound == undefined)
  2204.    {
  2205.       trace(attributeValue + " n\'existe pas dans XML");
  2206.    }
  2207.    return mySound;
  2208. }
  2209. function recusiveGetSoundByAttribute(node, attribute, attributeValue)
  2210. {
  2211.    var _loc2_ = 0;
  2212.    while(_loc2_ < node.childNodes.length)
  2213.    {
  2214.       if(node.childNodes[_loc2_].attributes[attribute] == attributeValue)
  2215.       {
  2216.          mySound = node.childNodes[_loc2_];
  2217.          break;
  2218.       }
  2219.       if(node.childNodes[_loc2_].hasChildNodes())
  2220.       {
  2221.          this.recusiveGetSoundByAttribute(node.childNodes[_loc2_],attribute,attributeValue);
  2222.       }
  2223.       _loc2_ = _loc2_ + 1;
  2224.    }
  2225.    return mySound;
  2226. }
  2227. function gereCursor(myCursor)
  2228. {
  2229.    switch(myCursor)
  2230.    {
  2231.       case -1:
  2232.       case 1:
  2233.       case "fleche":
  2234.          lNum = 1;
  2235.          lNumMobi = -1;
  2236.          myCursor = "fleche";
  2237.          break;
  2238.       case 280:
  2239.       case 2:
  2240.       case "doigt":
  2241.          lNum = 2;
  2242.          lNumMobi = 280;
  2243.          myCursor = "doigt";
  2244.          break;
  2245.       case 260:
  2246.       case 3:
  2247.       case "mainO":
  2248.          lNumMobi = 260;
  2249.          lNum = 3;
  2250.          myCursor = "mainO";
  2251.          break;
  2252.       case 290:
  2253.       case 4:
  2254.       case "mainF":
  2255.          lNum = 4;
  2256.          lNumMobi = 290;
  2257.          myCursor = "mainF";
  2258.          break;
  2259.       case 200:
  2260.       case 0:
  2261.       case "O":
  2262.          lNum = 0;
  2263.          lNumMobi = 200;
  2264.          myCursor = "O";
  2265.    }
  2266.    trace("cursor " + myCursor);
  2267.    if(gClipGen.gOnDir == 1)
  2268.    {
  2269.       _global.CURSEUR.Action(myCursor);
  2270.       getURL("6",lNumMobi);
  2271.       getURL("lingo:gerecursor(" + lNum + ")","");
  2272.    }
  2273.    else
  2274.    {
  2275.       _global.CURSEUR.Action(myCursor);
  2276.    }
  2277. }
  2278. function ConvertCoord(mc_src, mc_dest)
  2279. {
  2280.    var _loc1_ = {x:0,y:0};
  2281.    mc_src.localToGlobal(_loc1_);
  2282.    mc_dest.globalToLocal(_loc1_);
  2283.    return _loc1_;
  2284. }
  2285. function activePause()
  2286. {
  2287.    "active pause";
  2288.    if(gCommentOn !== undefined)
  2289.    {
  2290.       gCommentOnPause = gCommentOn;
  2291.       gCommentOnPause.p = gCommentOn.p;
  2292.       xtrace("++++++++ " + gCommentOn.p);
  2293.       gCommentOnPausePos = gCommentOn.position;
  2294.       stopComment();
  2295.    }
  2296.    if(gListeBruitage !== undefined)
  2297.    {
  2298.       gListePosBruitage = [];
  2299.       gListeBruitageP = [];
  2300.       i = gListeBruitage.length - 1;
  2301.       while(i >= 0)
  2302.       {
  2303.          var _loc1_ = gListePosBruitage.push[soundObjects[gBruitageName + gListeBruitage[i]].position];
  2304.          gListeBruitageP.push[soundObjects[gBruitageName + gListeBruitage[i]].p];
  2305.          stopBruitage(soundObjects[gBruitageName + gListeBruitage[i]].p);
  2306.          i--;
  2307.       }
  2308.    }
  2309.    if(gMusicOn)
  2310.    {
  2311.       gPosMusic = soundObjects[gMusic].position;
  2312.       soundObjects[gMusic].stop();
  2313.    }
  2314. }
  2315. function desactivePause()
  2316. {
  2317.    if(gCommentOnPausePos !== undefined)
  2318.    {
  2319.       if(gCommentOnPause.duration / 1000 !== gCommentOnPausePos / 1000)
  2320.       {
  2321.          joueSon(gCommentOnPause.p);
  2322.       }
  2323.       gCommentOnPause = undefined;
  2324.       gCommentOnPausePos = undefined;
  2325.    }
  2326.    if(gMusicOn)
  2327.    {
  2328.       if(soundObjects[gMusic].duration / 1000 == gPosMusic / 1000)
  2329.       {
  2330.          soundObjects[gMusic].start(0,2000);
  2331.       }
  2332.       else
  2333.       {
  2334.          soundObjects[gMusic].start(gPosMusic / 1000,2000);
  2335.       }
  2336.       gPosMusic = undefined;
  2337.    }
  2338. }
  2339. function spacePause()
  2340. {
  2341.    if(gPauseOn == undefined)
  2342.    {
  2343.       activePause();
  2344.       gPauseOn = 1;
  2345.    }
  2346.    else
  2347.    {
  2348.       desactivePause();
  2349.       gPauseOn = undefined;
  2350.    }
  2351. }
  2352. function chercheStocker(lID)
  2353. {
  2354.    if(lID.split("ANIMKAR").length > 1)
  2355.    {
  2356.       if(getPos(listAnimKAR,lID) == -1)
  2357.       {
  2358.          listAnimKAR.push(lID);
  2359.       }
  2360.       return this.ANIMKAR;
  2361.    }
  2362.    return undefined;
  2363. }
  2364. function onlocalConfigLoaded(success)
  2365. {
  2366.    if(success)
  2367.    {
  2368.       moduleXmlRoot = gModulePath + this.firstChild.attributes.src;
  2369.       Main();
  2370.    }
  2371. }
  2372. function Main()
  2373. {
  2374.    this.moduleInfo = new prod.moteur_v1_0.V000_ChargementXML(this,moduleXmlRoot,moduleOnline);
  2375. }
  2376. function xmlLoaded()
  2377. {
  2378.    _global.MCs.preloader.mc.onLoading(70);
  2379.    initGen();
  2380.    gModuleName = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.id;
  2381.    gCommentName = "S_" + gLangue + "_" + gModuleName + "_";
  2382.    gBruitageName = "B_" + gModuleName + "_";
  2383.    var _loc3_ = gModuleName.split("_");
  2384.    gModuleNumber = Number(_loc3_[_loc3_.length - 1]);
  2385.    mediaChargeur = new prod.moteur_v1_0.V002_ChargementMedias_KAR(this,this.moduleInfo,this.moduleOnline);
  2386.    gereTextes = new prod.moteur_v1_0.V006_GereTextes(this.CIBLE,this.moduleInfo);
  2387.    _global.afficheIB = gereTextes.afficheIB;
  2388.    _global.afficheLM = gereTextes.afficheLM;
  2389. }
  2390. function mediaLoaded()
  2391. {
  2392.    if(typeof mediaChargeur == "undefined")
  2393.    {
  2394.       OnlySoundExterneHack = setInterval(mediaLoaded,20);
  2395.    }
  2396.    else
  2397.    {
  2398.       soundObjects = mediaChargeur.returnSoundObject();
  2399.       clearInterval(OnlySoundExterneHack);
  2400.       initModule();
  2401.    }
  2402. }
  2403. function initModule()
  2404. {
  2405.    _global.MCs.preloader.mc.onLoading(90);
  2406.    trace("_initModule() ________________________");
  2407.    this.CIBLE.XmlStocker = this.XmlStocker;
  2408.    this.CIBLE.swfStocker = this.swfStocker;
  2409.    this.CIBLE.photoStocker = this.photoStocker;
  2410.    this.CIBLE.moduleXmlRoot = this.moduleXmlRoot;
  2411.    this.CIBLE.moduleInfo = this.moduleInfo;
  2412.    this.CIBLE.ConvertCoord = _global.ConvertCoord = ConvertCoord;
  2413.    this.CIBLE.gModuleName = this.gModuleName;
  2414.    this.CIBLE.gCommentName = this.gCommentName;
  2415.    this.CIBLE.gBruitageName = this.gBruitageName;
  2416.    this.CIBLE.gModuleNumber = this.gModuleNumber;
  2417.    this.CIBLE.mediaChargeur = this.mediaChargeur;
  2418.    this.CIBLE.gereTextes = this.gereTextes;
  2419.    this.CIBLE.soundObjects = this.soundObjects;
  2420.    this.CIBLE.testeDebutCommentSpecial = testeDebutCommentSpecial;
  2421.    this.CIBLE.testeFinCommentSpecial = testeFinCommentSpecial;
  2422.    this.CIBLE.stopComment = stopComment;
  2423.    this.CIBLE.joueSon = _global.joueSon = joueSon;
  2424.    this.CIBLE.stopSon = stopSon;
  2425.    this.CIBLE.commentFini = commentFini;
  2426.    this.CIBLE.joueBruitage = _global.joueBruitage = joueBruitage;
  2427.    this.CIBLE.stopBruitage = _global.stopBruitage = stopBruitage;
  2428.    this.CIBLE.finBruitage = finBruitage;
  2429.    this.CIBLE.getPos = getPos;
  2430.    this.CIBLE.trouvePosMax = trouvePosMax;
  2431.    this.CIBLE.duplicate = duplicate;
  2432.    this.CIBLE.randomiseList = randomiseList;
  2433.    this.CIBLE.returnNodeByPathRandomise = returnNodeByPathRandomise;
  2434.    this.CIBLE.zapIntro = zapIntro;
  2435.    this.CIBLE.removeZapIntro = removeZapIntro;
  2436.    this.CIBLE.onMcOut = onMcOut;
  2437.    this.CIBLE.onMcOver = onMcOver;
  2438.    this.CIBLE.desactiveClip = desactiveClip;
  2439.    this.CIBLE.afficheClipPos = afficheClipPos;
  2440.    this.CIBLE.gimme2digits = gimme2digits;
  2441.    this.CIBLE.randomValue = randomValue;
  2442.    this.CIBLE.chercheDepthPlus = _global.chercheDepthPlus = chercheDepthPlus;
  2443.    this.CIBLE.chercheDepthMoins = chercheDepthMoins;
  2444.    this.CIBLE.changeST = changeST;
  2445.    this.CIBLE.changeMusicOn = changeMusicOn;
  2446.    this.CIBLE.changeVolume = changeVolume;
  2447.    this.CIBLE.gereCursor = _global.gereCursor = gereCursor;
  2448.    this.CIBLE.ChangeModule = _global.ChangeModule = ChangeModule;
  2449.    this.CIBLE.xPauseOn = this.xPauseOn;
  2450.    this.CIBLE.xPauseOff = this.xPauseOff;
  2451.    _global.pauseComment = mx.utils.Delegate.create(this.CIBLE,this.pauseComment);
  2452.    _global.continueComment = mx.utils.Delegate.create(this.CIBLE,this.continueComment);
  2453.    this.CIBLE.gLangue = gLangue;
  2454.    this.CIBLE.gMusicOn = gMusicOn;
  2455.    this.CIBLE.gSousTitre = gSousTitre;
  2456.    this.CIBLE.gST = gST;
  2457.    this.CIBLE.gVolume = gVolume;
  2458.    this.CIBLE.gWidth = gWidth;
  2459.    this.CIBLE.gHeight = gHeight;
  2460.    initVariables();
  2461. }
  2462. this._lockroot = 1;
  2463. _global._MOD_ = this;
  2464. this.CIBLE = this;
  2465. _global.xtraceGroups = [];
  2466. xtraceGroups.tous = 1;
  2467. xtraceGroups.doc = 1;
  2468. xtraceGroups.debug = 0;
  2469. xtraceGroups.route = 0;
  2470. xtraceGroups.error = 0;
  2471. _global.xtrace = xtrace;
  2472. _global.xtrace_raz = xtrace_raz;
  2473. _global.xlisteObj = xlisteObj;
  2474. _global.xtrace_mode = _global.xtrace_mode != undefined ? _global.xtrace_mode : "off";
  2475. _global.xlisteObj_mode = _global.xlisteObj_mode != undefined ? _global.xlisteObj_mode : "off";
  2476. this.ChargeMoteur = function(p)
  2477. {
  2478.    this.initVariables();
  2479. };
  2480. this.ChargeMoteur = function(p)
  2481. {
  2482.    trace("Charge Moteur xlib");
  2483.    this.initVariables();
  2484. };
  2485. _global.LMaVider = new Array();
  2486. _global.LMaVider2 = new Array();
  2487. _global.InitMC = InitMC;
  2488. _global.InitMC_standart = InitMC_standart;
  2489. _global.InitMC_BTN = InitMC_BTN;
  2490. _global.InitMC_dragdrop = InitMC_dragdrop;
  2491. _global.InitMC_slider = InitMC_slider;
  2492. _global.InitMC_titre = InitMC_titre;
  2493. _global.IncString = IncString;
  2494. _global.DecString = DecString;
  2495. _global.GetFilePath = GetFilePath;
  2496. _global.AntiSlashToSlash = AntiSlashToSlash;
  2497. _global.str_replace = str_replace;
  2498. _global.JoindreObjets = JoindreObjets;
  2499. _global.xGetConfig = xGetConfig;
  2500. _global.GetOriginalSize = GetOriginalSize;
  2501. _global.GetOriginalHeight = GetOriginalHeight;
  2502. _global.CreerCache = CreerCache;
  2503. _global.ConvertCoord = ConvertCoord;
  2504. _global.getGlobalCoord = getGlobalCoord;
  2505. _global.getLocalCoord = getLocalCoord;
  2506. _global.length_ass = length_ass;
  2507. _global.ExplodeString = ExplodeString;
  2508. _global.BloquerActives = BloquerActives;
  2509. _global.DebloquerActives = DebloquerActives;
  2510. _global.afficheLM_x = afficheLM_x;
  2511. _global.viderLM_x = viderLM_x;
  2512. _global.afficheLM_x2 = afficheLM_x2;
  2513. _global.viderLM_x2 = viderLM_x2;
  2514. trace("FONCTIONS : KARAOKE");
  2515. _global.stopComment = stopComment;
  2516. _global.joueSon = joueSon;
  2517. _root.creerClicZap = creerClicZap;
  2518. _global.gimme2digits = gimme2digits;
  2519. this.randRange = randomValue;
  2520. _global.chercheDepthPlus = chercheDepthPlus;
  2521. _global.chercheDepthMoins = chercheDepthMoins;
  2522. _global.DesactiveBZ = DesactiveBZ;
  2523. _root.DesactiveBZ = DesactiveBZ;
  2524. _global.ActiveBZ = ActiveBZ;
  2525. _root.ActiveBZ = ActiveBZ;
  2526. this.xPauseOn = function()
  2527. {
  2528.    trace("xPauseOn " + this + " " + _global.pauseComment);
  2529.    _global.pauseComment();
  2530.    this.moteur.PauseMCs = [];
  2531.    this.moteur.xPause_rec({clipref:_root});
  2532. };
  2533. this.xPauseOff = function()
  2534. {
  2535.    trace("xPauseOff " + this);
  2536.    this.moteur.PauseDesactive();
  2537.    _global.continueComment();
  2538. };
  2539. this.PAUSEINTFUNC = function()
  2540. {
  2541.    var _loc3_ = getTimer();
  2542.    if(_loc3_ - this.firstTime >= 100)
  2543.    {
  2544.       clearInterval(this.PAUSEINT);
  2545.       this.xPause_rec2({clipref:_root});
  2546.    }
  2547. };
  2548. this.xPause_rec = function(p)
  2549. {
  2550.    for(prop in p.clipref)
  2551.    {
  2552.       if(typeof p.clipref[prop] == "movieclip" && p.clipref[prop] != _root && p.clipref[prop].NoPause != true)
  2553.       {
  2554.          p.clipref[prop].DetectFrameFirst = p.clipref[prop]._currentframe;
  2555.          this.xPause_rec({clipref:p.clipref[prop]});
  2556.       }
  2557.    }
  2558.    if(p.clipref == _root)
  2559.    {
  2560.       this.firstTime = getTimer();
  2561.       this.PAUSEINT = setInterval(this,"PAUSEINTFUNC",10);
  2562.    }
  2563. };
  2564. this.xPause_rec2 = function(p)
  2565. {
  2566.    for(prop in p.clipref)
  2567.    {
  2568.       if(typeof p.clipref[prop] == "movieclip" && p.clipref[prop] != _root && p.clipref[prop].NoPause != true)
  2569.       {
  2570.          p.clipref[prop].DetectFrameLast = p.clipref[prop]._currentframe;
  2571.          if(p.clipref[prop].DetectFrameLast != p.clipref[prop].DetectFrameFirst)
  2572.          {
  2573.             this.PauseMCs.push(p.clipref[prop]);
  2574.          }
  2575.          this.xPause_rec2({clipref:p.clipref[prop]});
  2576.       }
  2577.    }
  2578.    if(p.clipref == _root)
  2579.    {
  2580.       this.PauseActive();
  2581.    }
  2582. };
  2583. this.PauseActive = function()
  2584. {
  2585.    trace("PAUSEACTIVE " + this.PauseMCs.length);
  2586.    for(prop in this.PauseMCs)
  2587.    {
  2588.       trace(this.PauseMCs[prop]);
  2589.       this.PauseMCs[prop].stop();
  2590.    }
  2591. };
  2592. this.PauseDesactive = function()
  2593. {
  2594.    trace("PAUSEDESACTIVE " + this.PauseMCs.length);
  2595.    for(prop in this.PauseMCs)
  2596.    {
  2597.       trace(this.PauseMCs[prop]);
  2598.       this.PauseMCs[prop].play();
  2599.    }
  2600. };
  2601. stop();
  2602. _global._MOD_ = this;
  2603. this.ANIMKAR.createEmptyMovieClip("swfStocker",200);
  2604. listAnimKAR = [];
  2605. this.ChargeMoteur = function(p)
  2606. {
  2607.    trace("_ChargeMoteur()");
  2608.    if(gModulePath == undefined)
  2609.    {
  2610.       gModulePath = "";
  2611.    }
  2612.    if(!moduleOnline)
  2613.    {
  2614.       this.XmlStocker = new XML();
  2615.       this.XmlStocker.ignoreWhite = true;
  2616.       this.XmlStocker.load(gModulePath + "localConfig.xml");
  2617.       this.XmlStocker.onLoad = onlocalConfigLoaded;
  2618.    }
  2619.    else
  2620.    {
  2621.       Main();
  2622.    }
  2623. };
  2624. _global.xtrace_mode = "on";
  2625. _global.xlisteObj_mode = "on";
  2626. this.initVariables = function()
  2627. {
  2628.    this.gotoAndStop("INIT");
  2629.    trace("init.as");
  2630.    _global.xGetConfig();
  2631.    this.xConfig.Set({nom:"AnimsWidth",defaut:"556",type:"number"});
  2632.    this.xConfig.Set({nom:"AnimsHeight",defaut:"346",type:"number"});
  2633.    this.xConfig.Set({nom:"AnimsX",defaut:"-4",type:"number"});
  2634.    this.xConfig.Set({nom:"Animsy",defaut:"-4",type:"number"});
  2635. };
  2636. this.Init = function()
  2637. {
  2638.    this.ChargeMoteur();
  2639. };
  2640. this.InitOk = function()
  2641. {
  2642.    trace("InitOk");
  2643.    if(HOTE == undefined)
  2644.    {
  2645.       this.Start();
  2646.    }
  2647.    else
  2648.    {
  2649.       HOTE.InitFin(this);
  2650.    }
  2651. };
  2652. this.Start = function()
  2653. {
  2654.    gereCursor("fleche");
  2655.    this.gotoAndStop("START");
  2656.    trace("start.as");
  2657. };
  2658. if(HOTE == undefined)
  2659. {
  2660.    this.onEnterFrame = function()
  2661.    {
  2662.       var _loc2_ = this.getBytesLoaded();
  2663.       var _loc3_ = this.getBytesTotal();
  2664.       if(_loc2_ >= _loc3_)
  2665.       {
  2666.          this.Init();
  2667.          delete this.onEnterFrame;
  2668.       }
  2669.    };
  2670. }
  2671. stop();
  2672. _global.MODY = this;
  2673. stop();
  2674.