home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 159 / MOBICLIC159.ISO / mac / DATA / HOTE / libs / xlib1 / xlib1.swf / scripts / frame_1 / DoAction.as
Text File  |  2013-11-19  |  44KB  |  1,528 lines

  1. function IncString(str, seuil)
  2. {
  3.    var _loc2_ = str.split("_");
  4.    var _loc1_ = _loc2_.length - 1;
  5.    var _loc3_ = Number(_loc2_[_loc1_]) + 1;
  6.    while(_loc3_ > seuil)
  7.    {
  8.       _loc2_[_loc1_] = gimme2digits(0);
  9.       _loc1_ = _loc1_ - 1;
  10.       _loc3_ = Number(_loc2_[_loc1_]) + 1;
  11.    }
  12.    _loc2_[_loc1_] = gimme2digits(_loc3_);
  13.    return _loc2_.join("_");
  14. }
  15. function DecString(str)
  16. {
  17.    var _loc1_ = str.split("_");
  18.    var _loc2_ = _loc1_.length - 1;
  19.    _loc1_[_loc2_] = gimme2digits(Number(_loc1_[_loc2_]) - 1);
  20.    return _loc1_.join("_");
  21. }
  22. function RetourneLettreAlphabet(no)
  23. {
  24.    var _loc1_ = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
  25.    return _loc1_[no - 1];
  26. }
  27. function xGetConfig()
  28. {
  29.    _root.xConfig = {};
  30.    _root.xConfig.Params = {};
  31.    _root.xConfig.Set = function(p)
  32.    {
  33.       if(this[p.nom] == undefined)
  34.       {
  35.          if(p.defaut != "OBLIGATOIRE")
  36.          {
  37.             this[p.nom] = p.defaut;
  38.             if(p.type == "number")
  39.             {
  40.                this[p.nom] = Number(this[p.nom]);
  41.             }
  42.             if(p.type == "boolean")
  43.             {
  44.                this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
  45.             }
  46.          }
  47.       }
  48.       else
  49.       {
  50.          if(p.type == "number")
  51.          {
  52.             this[p.nom] = Number(this[p.nom]);
  53.          }
  54.          if(p.type == "boolean")
  55.          {
  56.             this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
  57.          }
  58.       }
  59.       this.Params[p.nom] = {nom:p.nom,type:p.type,desc:p.desc,valeur:this[p.nom]};
  60.    };
  61.    _root.xConfig.ToXml = function()
  62.    {
  63.       var _loc3_ = "";
  64.       for(var _loc4_ in this.Params)
  65.       {
  66.          this.Params[_loc4_].desc = this.Params[_loc4_].desc != undefined ? this.Params[_loc4_].desc : "";
  67.          _loc3_ = "<Param nom=\"" + _loc4_ + "\" valeur=\"" + this.Params[_loc4_].valeur + "\" /> <!-- " + this.Params[_loc4_].desc + " -->\r" + _loc3_;
  68.       }
  69.    };
  70.    _root.xConfig._name = "xConfig";
  71.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.Config.Params").childNodes;
  72.    for(props in _loc3_)
  73.    {
  74.       _root.xConfig[_loc3_[props].attributes.nom] = _loc3_[props].attributes.valeur;
  75.    }
  76. }
  77. function GetFilePath(fichier)
  78. {
  79.    var _loc2_ = AntiSlashToSlash(fichier);
  80.    var _loc1_ = _loc2_.split("/");
  81.    _loc1_.pop();
  82.    return _loc1_.join("/");
  83. }
  84. function AntiSlashToSlash(chaine)
  85. {
  86.    return str_replace(chaine,"\\","/");
  87. }
  88. function DistancePoints(p)
  89. {
  90.    return Math.sqrt(Math.pow(p.x2 - p.x1,2) + Math.pow(p.y2 - p.y1,2));
  91. }
  92. function SetInterval(p)
  93. {
  94.    if(_root.INTERVAL_IDS == undefined)
  95.    {
  96.       _root.INTERVAL_IDS = [];
  97.    }
  98.    if(p.mcRef == undefined)
  99.    {
  100.       p.mcRef = _root;
  101.    }
  102.    if(p.methode == undefined)
  103.    {
  104.       return false;
  105.    }
  106.    if(p.interval == undefined)
  107.    {
  108.       return false;
  109.    }
  110.    if(p.params == undefined)
  111.    {
  112.       p.params = {};
  113.    }
  114.    var _loc3_ = setInterval(p.mcRef,p.methode,p.interval,p.params);
  115.    _root.INTERVAL_IDS.push(_loc3_);
  116.    return _loc3_;
  117. }
  118. function ClearInterval(id)
  119. {
  120.    clearInterval(id);
  121.    var _loc2_ = 0;
  122.    while(_loc2_ < _root.INTERVAL_IDS.length)
  123.    {
  124.       if(_root.INTERVAL_IDS[_loc2_] == id)
  125.       {
  126.          _root.INTERVAL_IDS.splice(_loc2_,1);
  127.          return undefined;
  128.       }
  129.       _loc2_ = _loc2_ + 1;
  130.    }
  131. }
  132. function ClearAllIntervals()
  133. {
  134.    var _loc2_ = 0;
  135.    while(_loc2_ < _root.INTERVAL_IDS.length)
  136.    {
  137.       clearInterval(_root.INTERVAL_IDS[_loc2_]);
  138.       _loc2_ = _loc2_ + 1;
  139.    }
  140.    _root.INTERVAL_IDS = [];
  141. }
  142. function ExecuterApresDelai(p)
  143. {
  144.    var tdep = getTimer();
  145.    var tfin;
  146.    var _loc3_ = "ExecuterApresDelai" + Number(++_root.ExecuterApresDelaiNo);
  147.    var id;
  148.    var delai = p.delai * 1000;
  149.    var _loc4_ = p.mcRef[p.methode];
  150.    var mcRef = p.mcRef;
  151.    var methode = p.methode;
  152.    var params = p.params;
  153.    _root[_loc3_] = function()
  154.    {
  155.       tfin = getTimer();
  156.       if(tfin - tdep >= delai)
  157.       {
  158.          ClearInterval(id);
  159.          mcRef[methode](params);
  160.       }
  161.    };
  162.    id = SetInterval({methode:_loc3_,interval:p.delai});
  163.    return id;
  164. }
  165. function str_replace(str, search, replace)
  166. {
  167.    return str.split(search).join(replace);
  168. }
  169. function JoindreObjets(objects)
  170. {
  171.    var _loc2_ = new Object();
  172.    var _loc1_ = 0;
  173.    while(_loc1_ < objects.length)
  174.    {
  175.       p1 = objects[_loc1_];
  176.       for(props in p1)
  177.       {
  178.          _loc2_[props] = p1[props];
  179.       }
  180.       _loc1_ = _loc1_ + 1;
  181.    }
  182.    return _loc2_;
  183. }
  184. function GetOriginalSize(mc)
  185. {
  186.    var _loc2_ = mc._rotation;
  187.    mc._rotation = 0;
  188.    var _loc3_ = {w:mc._width * mc._xscale / 100,h:mc._height * mc._yscale / 100};
  189.    mc._rotation = _loc2_;
  190.    return _loc3_;
  191. }
  192. function GetOriginalWidth(mc)
  193. {
  194.    var _loc2_ = mc._rotation;
  195.    mc._rotation = 0;
  196.    var _loc3_ = mc._width * mc._xscale / 100;
  197.    var _loc4_ = mc._height * mc._yscale / 100;
  198.    mc._rotation = _loc2_;
  199.    return _loc3_;
  200. }
  201. function GetOriginalHeight(mc)
  202. {
  203.    var _loc2_ = mc._rotation;
  204.    mc._rotation = 0;
  205.    var _loc4_ = mc._width * mc._xscale / 100;
  206.    var _loc3_ = mc._height * mc._yscale / 100;
  207.    mc._rotation = _loc2_;
  208.    return _loc3_;
  209. }
  210. function CreerCache(p)
  211. {
  212.    var _loc4_ = p.level != undefined ? p.level : _global.Levels.cache;
  213.    var _loc2_ = p.mc.createEmptyMovieClip("CACHE",_loc4_);
  214.    _loc2_.beginFill(65280,50);
  215.    _loc2_.moveTo(0,0);
  216.    _loc2_.lineTo(p.width,0);
  217.    _loc2_.lineTo(p.width,p.height);
  218.    _loc2_.lineTo(0,p.height);
  219.    _loc2_.lineTo(0,0);
  220.    _loc2_.endFill();
  221.    p.mc.setMask(_loc2_);
  222. }
  223. function ConvertCoord(mc_src, mc_dest)
  224. {
  225.    var _loc1_ = {x:0,y:0};
  226.    mc_src.localToGlobal(_loc1_);
  227.    mc_dest.globalToLocal(_loc1_);
  228.    return _loc1_;
  229. }
  230. function getGlobalCoord(xc, yc, mc)
  231. {
  232.    var _loc1_ = {x:xc * 100 / mc._xscale,y:yc * 100 / mc._yscale};
  233.    mc.localToGlobal(_loc1_);
  234.    return _loc1_;
  235. }
  236. function getLocalCoord(xc, yc, mc)
  237. {
  238.    var _loc1_ = new Object({x:xc,y:yc});
  239.    mc.globalToLocal(_loc1_);
  240.    _loc1_.x = _loc1_.x / 100 * mc._xscale;
  241.    _loc1_.y = _loc1_.y / 100 * mc._yscale;
  242.    return _loc1_;
  243. }
  244. function length_ass(arr)
  245. {
  246.    var _loc1_ = 0;
  247.    for(prop in arr)
  248.    {
  249.       _loc1_ = _loc1_ + 1;
  250.    }
  251.    return _loc1_;
  252. }
  253. function ExplodeString(chaine)
  254. {
  255.    var _loc3_ = new Array();
  256.    var _loc1_ = 0;
  257.    while(_loc1_ < chaine.length)
  258.    {
  259.       _loc3_.push(chaine.charAt(_loc1_));
  260.       _loc1_ = _loc1_ + 1;
  261.    }
  262.    return _loc3_;
  263. }
  264. function TrimString(chaine)
  265. {
  266.    var _loc3_ = "";
  267.    var _loc5_ = "";
  268.    var _loc2_ = false;
  269.    var _loc1_ = 0;
  270.    while(_loc1_ < chaine.length)
  271.    {
  272.       if(chaine.charAt(_loc1_) != " ")
  273.       {
  274.          _loc2_ = true;
  275.       }
  276.       if(_loc2_ == true)
  277.       {
  278.          _loc3_ += chaine.charAt(_loc1_);
  279.       }
  280.       _loc1_ = _loc1_ + 1;
  281.    }
  282.    _loc2_ = false;
  283.    _loc1_ = _loc3_.length - 1;
  284.    while(_loc1_ >= 0)
  285.    {
  286.       if(_loc3_.charAt(_loc1_) != " ")
  287.       {
  288.          _loc2_ = true;
  289.       }
  290.       if(_loc2_ == true)
  291.       {
  292.          _loc5_ = _loc3_.charAt(_loc1_) + _loc5_;
  293.       }
  294.       _loc1_ = _loc1_ - 1;
  295.    }
  296.    return _loc5_;
  297. }
  298. function BloquerActives()
  299. {
  300.    if(_global.ClipBloquant == undefined)
  301.    {
  302.       var _loc0_ = null;
  303.       var _loc3_ = _global.ClipBloquant = _root.createEmptyMovieClip("ClipBloquant",10123);
  304.       _loc3_.attachMovie("ClipInvisible","ClipInvisible",2);
  305.       _loc3_._width = Stage.width;
  306.       _loc3_._height = Stage.height;
  307.       _loc3_._x = 0;
  308.       _loc3_._y = 0;
  309.       _loc3_.useHandCursor = false;
  310.       _loc3_.onPress = function()
  311.       {
  312.       };
  313.    }
  314. }
  315. function DebloquerActives()
  316. {
  317.    if(_global.ClipBloquant != undefined)
  318.    {
  319.       _global.ClipBloquant.removeMovieClip();
  320.       _global.ClipBloquant = undefined;
  321.    }
  322. }
  323. function afficheLM_x2(p)
  324. {
  325.    viderLM_x2();
  326.    _root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x,Y:p.LMrep._y,width:p.LMrep._width,height:p.LMrep._height});
  327.    LMaVider2.push(p);
  328. }
  329. function viderLM_x2()
  330. {
  331.    var _loc3_ = 0;
  332.    while(_loc3_ < _global.LMaVider2.length)
  333.    {
  334.       _root.gereTextes.masqueLM(_global.LMaVider2[_loc3_]);
  335.       _loc3_ = _loc3_ + 1;
  336.    }
  337. }
  338. function afficheLM_x(p)
  339. {
  340.    _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});
  341.    _global.LMaVider.push(p);
  342. }
  343. function viderLM_x()
  344. {
  345.    var _loc3_ = 0;
  346.    while(_loc3_ < _global.LMaVider.length)
  347.    {
  348.       _root.gereTextes.masqueLM(_global.LMaVider[_loc3_]);
  349.       _loc3_ = _loc3_ + 1;
  350.    }
  351. }
  352. function ConvertMcToArray(p)
  353. {
  354.    xtrace("Convertion du bitmap en tableau de nombres");
  355.    var _loc3_ = p.mc;
  356.    var _loc5_ = _loc3_._rotation;
  357.    _loc3_._rotation = 0;
  358.    var _loc1_ = _loc3_._width * 100 / _loc3_._xscale;
  359.    var _loc4_ = _loc3_._height * 100 / _loc3_._yscale;
  360.    _loc3_._rotation = _loc5_;
  361.    _loc3_.MCwidth = _loc1_;
  362.    _loc3_.MCheight = _loc4_;
  363.    xtrace("WH " + _loc1_ + " " + _loc4_);
  364.    var _loc2_ = new flash.display.BitmapData(_loc1_,_loc4_,true,0);
  365.    _loc2_.draw(_loc3_);
  366.    var _loc6_ = new Array();
  367.    lv = new LoadVars();
  368.    lv.tab = new Array();
  369.    i = 0;
  370.    while(i < _loc4_)
  371.    {
  372.       j = 0;
  373.       while(j < _loc1_)
  374.       {
  375.          lv.tab.push(_loc2_.getPixel(j,i));
  376.          j++;
  377.       }
  378.       i++;
  379.    }
  380.    return lv.tab;
  381. }
  382. function ConvertMcToBitmap(p)
  383. {
  384.    var _loc1_ = p.mc;
  385.    var _loc2_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16777215);
  386.    _loc2_.draw(_loc1_,_loc1_.transform.matrix);
  387.    _loc1_._parent.createEmptyMovieClip(_loc1_._name,_loc1_.getDepth());
  388.    _loc1_.attachBitmap(_loc2_,2,"always",true);
  389. }
  390. function CloneMcToBitmap(p)
  391. {
  392.    var _loc1_ = p.mc;
  393.    var _loc9_ = p.pere;
  394.    var _loc8_ = p.nom;
  395.    var _loc5_ = p.level;
  396.    var _loc7_ = _loc1_._x;
  397.    var _loc6_ = _loc1_._y;
  398.    _loc1_._x = 0;
  399.    _loc1_._y = 0;
  400.    var _loc4_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16755370);
  401.    var _loc2_ = _loc9_.createEmptyMovieClip(_loc8_,_loc5_);
  402.    _loc2_._visible = false;
  403.    _loc2_.attachBitmap(_loc4_,2,"auto",true);
  404.    _loc4_.draw(_loc1_,_loc1_.transform.matrix);
  405.    _loc1_._x = _loc7_;
  406.    _loc1_._y = _loc6_;
  407.    return _loc2_;
  408. }
  409. function InitMC(p)
  410. {
  411.    var mc = typeof p != "movieclip" ? p.mc : p;
  412.    if(p.level != undefined)
  413.    {
  414.       var ceMC_name_old = mc._name + "_old";
  415.       var ceMC_name = mc._name;
  416.       mc._name = ceMC_name_old;
  417.       mc.duplicateMovieClip(ceMC_name,p.level);
  418.       mc._visible = false;
  419.       mc = this[ceMC_name];
  420.    }
  421.    if(mc.OriginalMC == undefined)
  422.    {
  423.       mc.OriginalMC = {};
  424.       mc.OriginalMC._x = mc._x;
  425.       mc.OriginalMC._y = mc._y;
  426.       mc.OriginalMC._xscale = mc._xscale;
  427.       mc.OriginalMC._yscale = mc._yscale;
  428.       mc.OriginalMC._width = mc._width;
  429.    }
  430.    var fonction = p.fonction != undefined ? eval("InitMC_" + p.fonction) : InitMC_standart;
  431.    mc.InitMC = fonction;
  432.    InitMC_reccurent(mc);
  433.    mc.InitMC(p);
  434. }
  435. function InitMC_reccurent(mc)
  436. {
  437.    mc.oriX = mc._x;
  438.    mc.oriY = mc._y;
  439.    mc.oriW = mc._width;
  440.    mc.oriH = mc._height;
  441.    mc.BackToInitialPos = function()
  442.    {
  443.       this._x = this.oriX;
  444.       this._y = this.oriY;
  445.    };
  446.    mc.BackToInitialSize = function()
  447.    {
  448.       this._width = this.oriW;
  449.       this._height = this.oriH;
  450.    };
  451. }
  452. function ResetMC(p)
  453. {
  454.    var _loc1_ = p.mc;
  455.    delete _loc1_.onPress;
  456.    delete _loc1_.onRollOver;
  457.    delete _loc1_.onRollOut;
  458.    delete _loc1_.onRelease;
  459.    delete _loc1_.onReleaseOutside;
  460.    delete _loc1_.BTN.onPress;
  461.    delete _loc1_.BTN.onRollOver;
  462.    delete _loc1_.BTN.onRollOut;
  463.    delete _loc1_.BTN.onRelease;
  464.    delete _loc1_.BTN.onReleaseOutside;
  465. }
  466. function InitMC_standart(p)
  467. {
  468.    if(p.IB != undefined)
  469.    {
  470.       if(typeof p.IBrep == "movieclip")
  471.       {
  472.          var IBrepere = p.IBrep;
  473.       }
  474.       else if(typeof _MOD_["IBrep_" + p.IB] == "movieclip" && p.IBrep != false)
  475.       {
  476.          var IBrepere = _MOD_["IBrep_" + p.IB];
  477.       }
  478.       else
  479.       {
  480.          var IBrepere = p.mc;
  481.       }
  482.       this.afficheIB = function()
  483.       {
  484.          _root.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  485.       };
  486.       this.masqueIB = function()
  487.       {
  488.          _root.gereTextes.masqueIB();
  489.       };
  490.    }
  491.    if(p.UseLabels != false)
  492.    {
  493.       this.reposFrame = p.reposFrame != undefined ? p.reposFrame : "E1";
  494.       this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E2";
  495.       this.overFrame = p.overFrame != undefined ? p.overFrame : "E2";
  496.       this.outFrame = p.outFrame != undefined ? p.outFrame : "E1";
  497.       this.releaseFrame = p.releaseFrame != undefined ? p.releaseFrame : "E1";
  498.       this.releaseOutFrame = p.releaseOutFrame != undefined ? p.releaseOutFrame : "E1";
  499.       this.activeFrame = p.activeFrame != undefined ? p.activeFrame : undefined;
  500.       this.desactiveFrame = p.desactiveFrame != undefined ? p.desactiveFrame : undefined;
  501.    }
  502.    if(p.reposFrame != undefined)
  503.    {
  504.       this.gotoAndStop(p.reposFrame);
  505.    }
  506.    this.p = p;
  507.    ┬º┬ºpush(this);
  508.    ┬º┬ºpush("joueson");
  509.    if(p.son == undefined)
  510.    {
  511.       ┬º┬ºpush(undefined);
  512.    }
  513.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  514.    ┬º┬ºpush(this);
  515.    ┬º┬ºpush("stopson");
  516.    if(p.nostop != undefined)
  517.    {
  518.       ┬º┬ºpush(undefined);
  519.    }
  520.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  521.    if(p.sonOnPress != undefined)
  522.    {
  523.       this.sonOnPress = p.sonOnPress;
  524.       this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
  525.       this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
  526.       this.jouesonOnPress = function()
  527.       {
  528.          joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
  529.       };
  530.       this.stopsonOnPress = function()
  531.       {
  532.          stopBruitage({nomSon:this.sonOnPress});
  533.       };
  534.    }
  535.    else
  536.    {
  537.       this.jouesonOnMove = undefined;
  538.       this.stopsonOnMove = undefined;
  539.    }
  540.    this.UseHandCursor = p.useHandCursor != undefined ? p.useHandCursor : true;
  541.    if(p.UseCurseur != false)
  542.    {
  543.       this.curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
  544.       this.curseur_on_roll = p.curseurOnRoll != undefined ? p.curseurOnRoll : "doigt";
  545.       this.curseur_onRollOut = p.curseur_onRollOut != undefined ? p.curseur_onRollOut : "fleche";
  546.       this.curseur_after_press = p.curseurAfterPress != undefined ? p.curseurAfterPress : "doigt";
  547.       this.curseur_onRelease = p.curseur_onRelease != undefined ? p.curseur_onRelease : "doigt";
  548.       this.curseur_onReleaseOutside = p.curseur_onReleaseOutside != undefined ? p.curseur_onReleaseOutside : "fleche";
  549.    }
  550.    this.goto = p.goto;
  551.    this.Activer = function()
  552.    {
  553.       if(this.Actif == true)
  554.       {
  555.          return undefined;
  556.       }
  557.       this.enabled = true;
  558.       this.BTN.enabled = true;
  559.       this.Actif = true;
  560.       this.gotoAndStop(this.activeFrame);
  561.    };
  562.    this.Desactiver = function()
  563.    {
  564.       if(this.Actif == false)
  565.       {
  566.          return undefined;
  567.       }
  568.       this.enabled = false;
  569.       this.BTN.enabled = false;
  570.       this.Actif = false;
  571.       this.stopsonOnPress();
  572.       this.masqueIB();
  573.       this.gotoAndStop(this.desactiveFrame);
  574.    };
  575.    this.SetUseHandCursor = function(flag)
  576.    {
  577.       this.UseHandCursor = flag;
  578.       this.useHandCursor = this.UseHandCursor;
  579.       this.BTN.useHandCursor = this.UseHandCursor;
  580.    };
  581.    this.Activer();
  582.    this.GS = this.gotoAndStop;
  583.    this.MConPress = function()
  584.    {
  585.       if(this.p.blockOnPress == true)
  586.       {
  587.          this.enabled = false;
  588.          this.BTN.enabled = false;
  589.       }
  590.       this.stopson();
  591.       this.jouesonOnPress();
  592.       this.masqueIB();
  593.       this.gotoAndStop(this.pressFrame);
  594.       gereCursor(this.curseur_after_press);
  595.       _root.gotoAndStop(this.goto);
  596.       var p = this.OnPress();
  597.    };
  598.    this.MConRollOver = function()
  599.    {
  600.       this.joueson();
  601.       this.afficheIB();
  602.       this.gotoAndStop(this.overFrame);
  603.       gereCursor(this.curseur_on_roll);
  604.       var _loc2_ = this.OnRollOver();
  605.    };
  606.    this.MConRollOut = function()
  607.    {
  608.       this.stopson();
  609.       this.masqueIB();
  610.       this.gotoAndStop(this.outFrame);
  611.       gereCursor(this.curseur_onRollOut);
  612.       var _loc2_ = this.OnRollOut();
  613.    };
  614.    this.MConRelease = function()
  615.    {
  616.       this.gotoAndStop(this.releaseFrame);
  617.       gereCursor(this.curseur_onRelease);
  618.       var _loc2_ = this.OnRelease();
  619.    };
  620.    this.MConReleaseOutside = function()
  621.    {
  622.       this.gotoAndStop(this.releaseOutFrame);
  623.       gereCursor(this.curseur_onReleaseOutside);
  624.       var _loc2_ = this.OnReleaseOutside();
  625.    };
  626.    if(this.BTN == undefined || p.BTN == false)
  627.    {
  628.       this.useHandCursor = this.UseHandCursor;
  629.       this.onPress = this.MConPress;
  630.       this.onRollOver = this.MConRollOver;
  631.       this.onRollOut = this.MConRollOut;
  632.       this.onRelease = this.MConRelease;
  633.       this.onReleaseOutside = this.MConReleaseOutside;
  634.    }
  635.    else
  636.    {
  637.       this.BTN.useHandCursor = this.UseHandCursor;
  638.       this.BTN.onPress = function()
  639.       {
  640.          this._parent.MConPress();
  641.       };
  642.       this.BTN.onRollOver = function()
  643.       {
  644.          this._parent.MConRollOver();
  645.       };
  646.       this.BTN.onRollOut = function()
  647.       {
  648.          this._parent.MConRollOut();
  649.       };
  650.       this.BTN.onRelease = function()
  651.       {
  652.          this._parent.MConRelease();
  653.       };
  654.       this.BTN.onReleaseOutside = function()
  655.       {
  656.          this._parent.MConReleaseOutside();
  657.       };
  658.    }
  659.    this.Refresh();
  660. }
  661. function InitMC_BTN(p)
  662. {
  663.    if(p.IB != undefined)
  664.    {
  665.       if(p.IBrep == true)
  666.       {
  667.          var IBrepere = _MOD_["IBrep_" + p.IB];
  668.       }
  669.       else
  670.       {
  671.          var IBrepere = p.mc;
  672.       }
  673.       this.afficheIB = function()
  674.       {
  675.          gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  676.       };
  677.       this.masqueIB = function()
  678.       {
  679.          gereTextes.masqueIB();
  680.       };
  681.    }
  682.    this.enabled = true;
  683.    ┬º┬ºpush(this);
  684.    ┬º┬ºpush("joueson");
  685.    if(p.son == undefined)
  686.    {
  687.       ┬º┬ºpush(undefined);
  688.    }
  689.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  690.    ┬º┬ºpush(this);
  691.    ┬º┬ºpush("stopson");
  692.    if(p.nostop != undefined)
  693.    {
  694.       ┬º┬ºpush(undefined);
  695.    }
  696.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  697.    var curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
  698.    this.goto = p.goto;
  699.    this.BTN.onPress = function()
  700.    {
  701.       this._parent.stopson();
  702.       this._parent.masqueIB();
  703.       this._parent.gotoAndStop("E3");
  704.       gereCursor(curseur_after_press);
  705.       _root.gotoAndStop(this.goto);
  706.       var _loc3_ = this._parent.OnPress();
  707.    };
  708.    this.BTN.onRollOver = function()
  709.    {
  710.       this._parent.joueson();
  711.       this._parent.afficheIB();
  712.       this._parent.gotoAndStop("E2");
  713.       gereCursor("doigt");
  714.       var _loc2_ = this._parent.OnRollOver();
  715.    };
  716.    this.BTN.onRollOut = function()
  717.    {
  718.       this._parent.stopson();
  719.       this._parent.masqueIB();
  720.       this._parent.gotoAndStop("E1");
  721.       gereCursor("fleche");
  722.       var _loc2_ = this._parent.OnRollOut();
  723.    };
  724.    this.BTN.onRelease = function()
  725.    {
  726.       this._parent.gotoAndStop("E2");
  727.       gereCursor("doigt");
  728.       var _loc2_ = this._parent.OnRelease();
  729.    };
  730.    this.BTN.onReleaseOutside = function()
  731.    {
  732.       this._parent.gotoAndStop("E1");
  733.       gereCursor("fleche");
  734.       var _loc2_ = this._parent.OnReleaseOutside();
  735.    };
  736. }
  737. function InitMC_dragdrop(p)
  738. {
  739.    if(p.IB != undefined)
  740.    {
  741.       if(p.IBrep == true)
  742.       {
  743.          var IBrepere = _MOD_["IBrep_" + p.IB];
  744.       }
  745.       else
  746.       {
  747.          var IBrepere = p.mc;
  748.       }
  749.       this.afficheIB = function()
  750.       {
  751.          _root.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  752.       };
  753.       this.masqueIB = function()
  754.       {
  755.          _root.gereTextes.masqueIB();
  756.       };
  757.    }
  758.    this.BTN = typeof p.BTN != "movieclip" ? this.BTN : p.BTN;
  759.    this.pDepth = this.getDepth();
  760.    this.PressLevel = p.PressLevel != undefined ? p.PressLevel : 15832;
  761.    this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E3";
  762.    this.overFrame = p.overFrame != undefined ? p.overFrame : "E2";
  763.    this.CibleOverFrame = p.CibleOverFrame != undefined ? p.CibleOverFrame : "E3";
  764.    this.CibleOutFrame = p.CibleOutFrame != undefined ? p.CibleOutFrame : "E1";
  765.    ┬º┬ºpush(this);
  766.    ┬º┬ºpush("joueson");
  767.    if(p.son == undefined)
  768.    {
  769.       ┬º┬ºpush(undefined);
  770.    }
  771.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  772.    ┬º┬ºpush(this);
  773.    ┬º┬ºpush("stopson");
  774.    if(p.son == undefined)
  775.    {
  776.       ┬º┬ºpush(undefined);
  777.    }
  778.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  779.    ┬º┬ºpush(this);
  780.    ┬º┬ºpush("jouesonOnPress");
  781.    if(p.sonOnPress == undefined)
  782.    {
  783.       ┬º┬ºpush(undefined);
  784.    }
  785.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  786.    ┬º┬ºpush(this);
  787.    ┬º┬ºpush("stopsonOnPress");
  788.    if(p.sonOnPress == undefined)
  789.    {
  790.       ┬º┬ºpush(undefined);
  791.    }
  792.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  793.    ┬º┬ºpush(this);
  794.    ┬º┬ºpush("jouesonOnOverCible");
  795.    if(p.sonOnOverCible == undefined)
  796.    {
  797.       ┬º┬ºpush(undefined);
  798.    }
  799.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  800.    ┬º┬ºpush(this);
  801.    ┬º┬ºpush("stopsonOnOverCible");
  802.    if(p.sonOnOverCible == undefined)
  803.    {
  804.       ┬º┬ºpush(undefined);
  805.    }
  806.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  807.    var _loc16_ = p.goto != undefined ? "fleche" : "doigt";
  808.    this.goto = p.goto;
  809.    this.ModeDrag = p.ModeDrag != undefined ? p.ModeDrag : "lache_au_rollout";
  810.    this.CentrerOnStartDrag = p.CentrerOnStartDrag != undefined ? p.CentrerOnStartDrag : false;
  811.    this.ModeHitTest = p.ModeHitTest != undefined ? p.ModeHitTest : "bounds";
  812.    this.ZoneDragLimites = p.ZoneDragLimites != undefined ? p.ZoneDragLimites : {x:0,y:0,w:800,h:600};
  813.    this.MethodeDetecteDrag = this.ModeHitTest != "mouse" ? "DetectDrag" : "DetectDrag2";
  814.    this.DragEnCours = false;
  815.    this.DetectDrag = function()
  816.    {
  817.       this._x = _xmouse - this.ecart_mousex;
  818.       this._y = _ymouse - this.ecart_mousey;
  819.       if(this._x < this.ZoneDragLimites.x)
  820.       {
  821.          this._x = this.ZoneDragLimites.x;
  822.       }
  823.       if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
  824.       {
  825.          this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
  826.       }
  827.       if(this._y < this.ZoneDragLimites.y)
  828.       {
  829.          this._y = this.ZoneDragLimites.y;
  830.       }
  831.       if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
  832.       {
  833.          this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
  834.       }
  835.       this.CiblesTouchees = [];
  836.       var _loc2_ = 0;
  837.       while(_loc2_ < this.CiblesDrag.length)
  838.       {
  839.          if(this.hitTest(this.CiblesDrag[_loc2_]))
  840.          {
  841.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOverFrame);
  842.             this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
  843.             this.touche = this.touche + 1;
  844.          }
  845.          else
  846.          {
  847.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOutFrame);
  848.          }
  849.          _loc2_ = _loc2_ + 1;
  850.       }
  851.       if(this.touche == 1)
  852.       {
  853.          this.jouesonOnOverCible();
  854.       }
  855.       if(this.CiblesTouchees.length <= 0)
  856.       {
  857.          this.touche = 0;
  858.          this.stopsonOnOverCible();
  859.       }
  860.       this.PendantDrag();
  861.       updateAfterEvent();
  862.    };
  863.    this.DetectDrag2 = function()
  864.    {
  865.       this._x = _xmouse - this.ecart_mousex;
  866.       this._y = _ymouse - this.ecart_mousey;
  867.       this.CiblesTouchees = [];
  868.       var _loc2_ = 0;
  869.       while(_loc2_ < this.CiblesDrag.length)
  870.       {
  871.          if(this.CiblesDrag[_loc2_].hitTest(_xmouse,_ymouse,true))
  872.          {
  873.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOverFrame);
  874.             this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
  875.             this.touche = this.touche + 1;
  876.          }
  877.          else
  878.          {
  879.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOutFrame);
  880.          }
  881.          _loc2_ = _loc2_ + 1;
  882.       }
  883.       if(this.touche == 1)
  884.       {
  885.          this.jouesonOnOverCible();
  886.       }
  887.       if(this.CiblesTouchees.length <= 0)
  888.       {
  889.          this.touche = 0;
  890.          this.stopsonOnOverCible();
  891.       }
  892.       this.PendantDrag();
  893.       updateAfterEvent();
  894.    };
  895.    this.StartDrag = function()
  896.    {
  897.       if(this.CentrerOnStartDrag != true)
  898.       {
  899.          this.ecart_mousex = _xmouse - this._x;
  900.          this.ecart_mousey = _ymouse - this._y;
  901.       }
  902.       else
  903.       {
  904.          this._x = _xmouse;
  905.          this._y = _ymouse;
  906.          this.ecart_mousex = _xmouse - this._x;
  907.          this.ecart_mousey = _ymouse - this._y;
  908.       }
  909.       this.IntervalId = _global.SetInterval({mcRef:this,methode:this.MethodeDetecteDrag,interval:10});
  910.       this.swapDepths(this.PressLevel);
  911.       this.DragEnCours = true;
  912.    };
  913.    this.ContinueDrag = function()
  914.    {
  915.       this.gotoAndStop(this.pressFrame);
  916.       gereCursor("mainF");
  917.       this.ecart_mousex = _xmouse - this._x;
  918.       this.ecart_mousey = _ymouse - this._y;
  919.       if(this.IntervalId != undefined)
  920.       {
  921.          _global.ClearInterval(this.IntervalId);
  922.       }
  923.       this.IntervalId = _global.SetInterval({mcRef:this,methode:this.MethodeDetecteDrag,interval:10});
  924.       this.swapDepths(this.PressLevel);
  925.       this.DragEnCours = true;
  926.    };
  927.    this.StopDrag = function()
  928.    {
  929.       _global.ClearInterval(this.IntervalId);
  930.       this.swapDepths(this.pDepth);
  931.       this.DragEnCours = false;
  932.    };
  933.    this.ComeBack = function()
  934.    {
  935.       this._x = this.xOri;
  936.       this._y = this.yOri;
  937.       this.gotoAndStop("E1");
  938.       this.DragEnCours = false;
  939.    };
  940.    this.Activer = function()
  941.    {
  942.       this.enabled = true;
  943.       this.BTN.enabled = true;
  944.    };
  945.    this.Desactiver = function()
  946.    {
  947.       this.enabled = false;
  948.       this.BTN.enabled = false;
  949.    };
  950.    this.CibleLaPlusProche = function(p)
  951.    {
  952.       if(this.CiblesTouchees.length == 0)
  953.       {
  954.          return null;
  955.       }
  956.       var _loc3_ = undefined;
  957.       var _loc9_ = this.CiblesTouchees[0];
  958.       var _loc8_ = undefined;
  959.       var _loc6_ = undefined;
  960.       if(p.mcRef == undefined)
  961.       {
  962.          _loc8_ = _xmouse;
  963.          _loc6_ = _ymouse;
  964.       }
  965.       else if(p.mcRef == "center")
  966.       {
  967.          _loc8_ = this._x + this._width / 2;
  968.          _loc6_ = this._y + this._height / 2;
  969.       }
  970.       else
  971.       {
  972.          var _loc10_ = new flash.geom.Point(p.mcRef._x,p.mcRef._y);
  973.          mcRef.localToGlobal(_loc10_);
  974.          _loc8_ = _loc10_.x;
  975.          _loc6_ = _loc10_.y;
  976.       }
  977.       var _loc4_ = DistancePoints({x1:_loc8_,y1:_loc6_,x2:this.CiblesTouchees[0]._x,y2:this.CiblesTouchees[0]._y});
  978.       var _loc2_ = 1;
  979.       while(_loc2_ < this.CiblesTouchees.length)
  980.       {
  981.          _loc3_ = DistancePoints({x1:_loc8_,y1:_loc6_,x2:this.CiblesTouchees[_loc2_]._x,y2:this.CiblesTouchees[_loc2_]._y});
  982.          if(_loc3_ < _loc4_)
  983.          {
  984.             _loc4_ = _loc3_;
  985.             _loc9_ = this.CiblesTouchees[_loc2_];
  986.          }
  987.          _loc2_ = _loc2_ + 1;
  988.       }
  989.       return _loc9_;
  990.    };
  991.    this.MConPress = function()
  992.    {
  993.       if(this.ModeDrag == "lache_au_clic" && this.DragEnCours == true)
  994.       {
  995.          this.FirstPress = false;
  996.          this.DragEnCours = false;
  997.          gereCursor("mainO");
  998.          this.stopsonOnPress();
  999.          this.gotoAndStop("E2");
  1000.          _global.ClearInterval(this.IntervalId);
  1001.          this.CiblesTouchees = [];
  1002.          if(this.ModeHitTest == "mouse")
  1003.          {
  1004.             var _loc3_ = 0;
  1005.             while(_loc3_ < this.CiblesDrag.length)
  1006.             {
  1007.                if(this.CiblesDrag[_loc3_].hitTest(_xmouse,_ymouse,true))
  1008.                {
  1009.                   this.CiblesTouchees.push(this.CiblesDrag[_loc3_]);
  1010.                }
  1011.                _loc3_ = _loc3_ + 1;
  1012.             }
  1013.          }
  1014.          else
  1015.          {
  1016.             _loc3_ = 0;
  1017.             while(_loc3_ < this.CiblesDrag.length)
  1018.             {
  1019.                if(this.hitTest(this.CiblesDrag[_loc3_]))
  1020.                {
  1021.                   this.CiblesTouchees.push(this.CiblesDrag[_loc3_]);
  1022.                }
  1023.                _loc3_ = _loc3_ + 1;
  1024.             }
  1025.          }
  1026.          this.swapDepths(this.pDepth);
  1027.          this.ApresDrag();
  1028.       }
  1029.       else
  1030.       {
  1031.          this.FirstPress = true;
  1032.          this.jouesonOnPress();
  1033.          this.xOri = this._x;
  1034.          this.yOri = this._y;
  1035.          this.masqueIB();
  1036.          this.gotoAndStop(this.pressFrame);
  1037.          gereCursor("mainF");
  1038.          this.StartDrag();
  1039.          var _loc4_ = this.OnPress();
  1040.       }
  1041.    };
  1042.    this.MConRollOver = function()
  1043.    {
  1044.       if(this.DragEnCours == true)
  1045.       {
  1046.          return undefined;
  1047.       }
  1048.       this.joueson();
  1049.       this.afficheIB();
  1050.       this.gotoAndStop(this.overFrame);
  1051.       gereCursor("mainO");
  1052.       var _loc2_ = this.OnRollOver();
  1053.    };
  1054.    this.MConRollOut = function()
  1055.    {
  1056.       if(this.DragEnCours == true)
  1057.       {
  1058.          return undefined;
  1059.       }
  1060.       this.stopson();
  1061.       this.gotoAndStop("E1");
  1062.       this.masqueIB();
  1063.       gereCursor("fleche");
  1064.       var _loc2_ = this.OnRollOut();
  1065.    };
  1066.    this.MConRelease = function()
  1067.    {
  1068.       if(this.ModeDrag != "lache_au_rollout")
  1069.       {
  1070.          return undefined;
  1071.       }
  1072.       this.DragEnCours = false;
  1073.       gereCursor("mainO");
  1074.       this.stopsonOnPress();
  1075.       this.gotoAndStop("E2");
  1076.       _global.ClearInterval(this.IntervalId);
  1077.       this.CiblesTouchees = [];
  1078.       if(this.ModeHitTest == "mouse")
  1079.       {
  1080.          var _loc3_ = 0;
  1081.          while(_loc3_ < this.CiblesDrag.length)
  1082.          {
  1083.             if(this.CiblesDrag[_loc3_].hitTest(_xmouse,_ymouse,true))
  1084.             {
  1085.                this.CiblesTouchees.push(this.CiblesDrag[_loc3_]);
  1086.             }
  1087.             _loc3_ = _loc3_ + 1;
  1088.          }
  1089.       }
  1090.       else
  1091.       {
  1092.          _loc3_ = 0;
  1093.          while(_loc3_ < this.CiblesDrag.length)
  1094.          {
  1095.             if(this.hitTest(this.CiblesDrag[_loc3_]))
  1096.             {
  1097.                this.CiblesTouchees.push(this.CiblesDrag[_loc3_]);
  1098.             }
  1099.             _loc3_ = _loc3_ + 1;
  1100.          }
  1101.       }
  1102.       this.swapDepths(this.pDepth);
  1103.       this.ApresDrag();
  1104.       var _loc4_ = this.OnRelease();
  1105.    };
  1106.    this.MConReleaseOutside = this.MConRelease;
  1107.    if(this.BTN == undefined || p.BTN == false)
  1108.    {
  1109.       this.onPress = this.MConPress;
  1110.       this.onRollOver = this.MConRollOver;
  1111.       this.onRollOut = this.MConRollOut;
  1112.       this.onRelease = this.MConRelease;
  1113.       this.onReleaseOutside = this.MConReleaseOutside;
  1114.    }
  1115.    else
  1116.    {
  1117.       this.BTN.onPress = function()
  1118.       {
  1119.          this._parent.MConPress();
  1120.       };
  1121.       this.BTN.onRollOver = function()
  1122.       {
  1123.          this._parent.MConRollOver();
  1124.       };
  1125.       this.BTN.onRollOut = function()
  1126.       {
  1127.          this._parent.MConRollOut();
  1128.       };
  1129.       this.BTN.onRelease = function()
  1130.       {
  1131.          this._parent.MConRelease();
  1132.       };
  1133.       this.BTN.onReleaseOutside = function()
  1134.       {
  1135.          this._parent.MConReleaseOutside();
  1136.       };
  1137.    }
  1138. }
  1139. function InitMC_slider(p)
  1140. {
  1141.    if(p.IB != undefined)
  1142.    {
  1143.       if(p.IBrep == true)
  1144.       {
  1145.          var IBrepere = _MOD_["IBrep_" + p.IB];
  1146.       }
  1147.       else
  1148.       {
  1149.          var IBrepere = p.mc;
  1150.       }
  1151.       this.afficheIB = function()
  1152.       {
  1153.          gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  1154.       };
  1155.       this.masqueIB = function()
  1156.       {
  1157.          gereTextes.masqueIB();
  1158.       };
  1159.    }
  1160.    ┬º┬ºpush(this);
  1161.    ┬º┬ºpush("joueson");
  1162.    if(p.son == undefined)
  1163.    {
  1164.       ┬º┬ºpush(undefined);
  1165.    }
  1166.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  1167.    ┬º┬ºpush(this);
  1168.    ┬º┬ºpush("stopson");
  1169.    if(p.son == undefined)
  1170.    {
  1171.       ┬º┬ºpush(undefined);
  1172.    }
  1173.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  1174.    var _loc7_ = p.goto != undefined ? "fleche" : "doigt";
  1175.    this.goto = p.goto;
  1176.    this.EnMouvement = false;
  1177.    if(p.sonOnMove != undefined)
  1178.    {
  1179.       this.sonOnMove = p.sonOnMove;
  1180.       this.sonOnMove_offset = p.sonOnMove_offset != undefined ? Number(p.sonOnMove_offset) : 0;
  1181.       this.sonOnMove_loopSon = p.sonOnMove_loopSon != undefined ? Number(p.sonOnMove_loopSon) : 0;
  1182.       this.jouesonOnMove = function()
  1183.       {
  1184.          joueBruitage({nomSon:this.sonOnMove,offset:this.sonOnMove_offset,loopSon:this.sonOnMove_loopSon});
  1185.       };
  1186.       this.stopsonOnMove = function()
  1187.       {
  1188.          stopBruitage({nomSon:this.sonOnMove});
  1189.       };
  1190.    }
  1191.    else
  1192.    {
  1193.       this.jouesonOnMove = undefined;
  1194.       this.stopsonOnMove = undefined;
  1195.    }
  1196.    if(p.sonOnPress != undefined)
  1197.    {
  1198.       this.sonOnPress = p.sonOnPress;
  1199.       this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
  1200.       this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
  1201.       this.jouesonOnPress = function()
  1202.       {
  1203.          joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
  1204.       };
  1205.       this.stopsonOnPress = function()
  1206.       {
  1207.          stopBruitage({nomSon:this.sonOnPress});
  1208.       };
  1209.    }
  1210.    else
  1211.    {
  1212.       this.jouesonOnMove = undefined;
  1213.       this.stopsonOnMove = undefined;
  1214.    }
  1215.    this.DragZoneLargeur = p.DragZoneLargeur != undefined ? p.DragZoneLargeur : 0;
  1216.    this.DragZoneHauteur = p.DragZoneHauteur != undefined ? p.DragZoneHauteur : 0;
  1217.    this.DragZoneLargeur_pourcent = p.DragZoneLargeur / 100;
  1218.    this.DragZoneHauteur_pourcent = p.DragZoneHauteur / 100;
  1219.    this.DragZone = {left:this._x,right:this._x + this.DragZoneLargeur,top:this._y,bottom:this._y + this.DragZoneHauteur};
  1220.    this.Activer = function()
  1221.    {
  1222.       this.enabled = true;
  1223.    };
  1224.    this.Desactiver = function()
  1225.    {
  1226.       this.enabled = false;
  1227.    };
  1228.    this.SetPosition = this.SetPositionX = function(pourcent)
  1229.    {
  1230.       this._x = this.DragZone.left + this.DragZoneLargeur_pourcent * pourcent;
  1231.    };
  1232.    this.SetPositionY = function(pourcent)
  1233.    {
  1234.       this._y = this.DragZone.top + this.DragZoneHauteur_pourcent * pourcent;
  1235.    };
  1236.    this.GetPosition = this.GetPositionX = function()
  1237.    {
  1238.       return (this._x - this.DragZone.left) / this.DragZoneLargeur_pourcent;
  1239.    };
  1240.    this.GetPositionY = function()
  1241.    {
  1242.       return (this._y - this.DragZone.top) / this.DragZoneHauteur_pourcent;
  1243.    };
  1244.    this.DetectDrag = function()
  1245.    {
  1246.       this._x = _root._xmouse - this.ecart_mousex;
  1247.       this._y = _root._ymouse - this.ecart_mousey;
  1248.       if(this._x <= this.DragZone.left)
  1249.       {
  1250.          this._x = this.DragZone.left;
  1251.       }
  1252.       if(this._y < this.DragZone.top)
  1253.       {
  1254.          this._y = this.DragZone.top;
  1255.       }
  1256.       if(this._x >= this.DragZone.right)
  1257.       {
  1258.          this._x = this.DragZone.right;
  1259.       }
  1260.       if(this._y > this.DragZone.bottom)
  1261.       {
  1262.          this._y = this.DragZone.bottom;
  1263.       }
  1264.       updateAfterEvent();
  1265.       if(this._x == this.lastx && this._y == this.lasty)
  1266.       {
  1267.          if(this.EnMouvement == true)
  1268.          {
  1269.             this.EnMouvement = false;
  1270.             this.stopsonOnMove();
  1271.          }
  1272.       }
  1273.       else if(this.EnMouvement == false)
  1274.       {
  1275.          this.EnMouvement = true;
  1276.          this.jouesonOnMove();
  1277.       }
  1278.       this.lastx = this._x;
  1279.       this.lasty = this._y;
  1280.       this.PendantSlide();
  1281.    };
  1282.    this.StartDrag = function()
  1283.    {
  1284.       this.ecart_mousex = _root._xmouse - this._x;
  1285.       this.ecart_mousey = _root._ymouse - this._y;
  1286.       this.lastx = this._x;
  1287.       this.lasty = this._y;
  1288.       this.IntervalId = _global.SetInterval({mcRef:this,methode:"DetectDrag",interval:1});
  1289.    };
  1290.    this.onPress = function()
  1291.    {
  1292.       this.jouesonOnPress();
  1293.       this.masqueIB();
  1294.       this.gotoAndStop("E3");
  1295.       gereCursor("mainF");
  1296.       this.StartDrag();
  1297.       var _loc2_ = this.OnPress();
  1298.    };
  1299.    this.onRollOver = function()
  1300.    {
  1301.       this.joueson();
  1302.       this.afficheIB();
  1303.       this.gotoAndStop("E2");
  1304.       gereCursor("mainO");
  1305.       var _loc2_ = this.OnRollOver();
  1306.    };
  1307.    this.onRollOut = function()
  1308.    {
  1309.       this.stopson();
  1310.       this.stopsonOnPress();
  1311.       this.stopsonOnMove();
  1312.       this.gotoAndStop("E1");
  1313.       this.masqueIB();
  1314.       gereCursor("fleche");
  1315.       var _loc2_ = this.OnRollOut();
  1316.    };
  1317.    this.onRelease = function()
  1318.    {
  1319.       this.gotoAndStop("E2");
  1320.       _global.ClearInterval(this.IntervalId);
  1321.       this.stopson();
  1322.       this.stopsonOnPress();
  1323.       this.stopsonOnMove();
  1324.       gereCursor("mainO");
  1325.       var _loc3_ = this.OnRelease();
  1326.    };
  1327.    this.onReleaseOutside = function()
  1328.    {
  1329.       this.onRelease();
  1330.       gereCursor("fleche");
  1331.       var _loc2_ = this.OnReleaseOutside();
  1332.    };
  1333. }
  1334. function InitMC_titre(p)
  1335. {
  1336.    this.LMaVider = [];
  1337.    this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
  1338.    this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
  1339.    this.ChangeTexte = function(p)
  1340.    {
  1341.       this.viderLM();
  1342.       _root.gereTextes.afficheLM({codeLM:p.codeLM,X:this._x + this.offsetx,Y:this._y + this.offsety,width:this._width,height:this._height});
  1343.       this.LMaVider.push(p);
  1344.    };
  1345.    this.viderLM = function()
  1346.    {
  1347.       var _loc3_ = 0;
  1348.       while(_loc3_ < this.LMaVider.length)
  1349.       {
  1350.          _root.gereTextes.masqueLM(this.LMaVider[_loc3_]);
  1351.          _loc3_ = _loc3_ + 1;
  1352.       }
  1353.    };
  1354. }
  1355. function InitMC_texte(p)
  1356. {
  1357.    xlisteObj(p);
  1358.    this.LMaVider = [];
  1359.    this.pere = p.pere != undefined ? Number(p.pere) : _root;
  1360.    this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
  1361.    this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
  1362.    this.level = p.level != undefined ? Number(p.level) : this.pere.getNextHighestDepth();
  1363.    this.texte = p.texte != undefined ? p.texte : "";
  1364.    this.MC = p.mc;
  1365.    this.MC._visible = false;
  1366.    if(p.style == undefined)
  1367.    {
  1368.       this.Style = {};
  1369.    }
  1370.    else
  1371.    {
  1372.       this.Style = p.style;
  1373.    }
  1374.    this.Style.multiline = this.Style.multiline != undefined ? this.Style.multiline : true;
  1375.    this.Style.wordWrap = this.Style.wordWrap != undefined ? this.Style.wordWrap : true;
  1376.    this.Style.border = this.Style.border != undefined ? this.Style.border : false;
  1377.    this.Style.color = this.Style.color != undefined ? this.Style.color : 16711680;
  1378.    this.Style.size = this.Style.size != undefined ? this.Style.size : 12;
  1379.    this.Style.font = this.Style.font != undefined ? this.Style.font : "Comic Sans MS";
  1380.    this.Style.align = this.Style.align != undefined ? this.Style.align : "center";
  1381.    this.Style.underline = this.Style.underline != undefined ? this.Style.underline : false;
  1382.    this.Style.selectable = this.Style.selectable != undefined ? this.Style.selectable : false;
  1383.    var _loc4_ = this.pere.createTextField(this.MC._name + "_txt",this.level,this.MC._x,this.MC._y,this.MC._width,this.MC._height);
  1384.    _loc4_.multiline = this.Style.multiline;
  1385.    _loc4_.wordWrap = this.Style.wordWrap;
  1386.    _loc4_.border = this.Style.border;
  1387.    _loc4_.selectable = this.Style.selectable;
  1388.    _loc4_.embedFonts = true;
  1389.    var my_fmt = new TextFormat();
  1390.    my_fmt.font = this.Style.font;
  1391.    my_fmt.size = this.Style.size;
  1392.    my_fmt.color = this.Style.color;
  1393.    my_fmt.align = this.Style.align;
  1394.    my_fmt.underline = this.Style.underline;
  1395.    _loc4_.text = this.texte;
  1396.    _loc4_.setTextFormat(my_fmt);
  1397.    this.TexteMC = _loc4_;
  1398.    this.ChangeTexte = function(p)
  1399.    {
  1400.       this.texte = p.texte;
  1401.       this.TexteMC.text = p.texte;
  1402.       this.TexteMC.setTextFormat(my_fmt);
  1403.    };
  1404. }
  1405. function TexteFxGo(p)
  1406. {
  1407.    var _loc15_ = p.vitesse != undefined ? Number(p.vitesse) : 50;
  1408.    var _loc4_ = _root.moduleInfo.returnNodeByPath("Module.StylesTextes.StylesLM");
  1409.    var _loc14_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  1410.    var _loc13_ = {};
  1411.    var _loc17_ = p.texte;
  1412.    _loc17_ = _root.gereTextes.getTextById(_loc14_,"LM00");
  1413.    var texte_arr = ExplodeString(_loc17_);
  1414.    var cible = p.mc;
  1415.    var no_lettre = 0;
  1416.    var texte_up = "";
  1417.    var _loc9_ = [];
  1418.    var retour_func = p.retour;
  1419.    var _loc11_ = "LM00";
  1420.    var _loc10_ = "LM";
  1421.    var _loc22_ = 0;
  1422.    gFmtBase = new TextFormat();
  1423.    var _loc8_ = new XML();
  1424.    var _loc20_ = "00";
  1425.    var _loc3_ = 0;
  1426.    while(_loc3_ < _loc4_.childNodes.length)
  1427.    {
  1428.       if(_loc4_.childNodes[_loc3_].attributes.id == _loc10_)
  1429.       {
  1430.          var _loc7_ = 0;
  1431.          while(_loc7_ < _loc4_.childNodes[_loc3_].childNodes.length)
  1432.          {
  1433.             var _loc6_ = _loc4_.childNodes[_loc3_].childNodes[_loc7_].nodeName;
  1434.             var _loc5_ = _loc4_.childNodes[_loc3_].childNodes[_loc7_].firstChild.nodeValue;
  1435.             _loc9_[_loc6_] = _loc5_;
  1436.             _loc7_ = _loc7_ + 1;
  1437.          }
  1438.       }
  1439.       else
  1440.       {
  1441.          if(_loc4_.childNodes[_loc3_].attributes.id == _loc11_)
  1442.          {
  1443.             _loc8_ = _loc4_.childNodes[_loc3_];
  1444.             break;
  1445.          }
  1446.          if(_loc4_.childNodes[_loc3_].attributes.id == myStyle)
  1447.          {
  1448.             _loc8_ = _loc4_.childNodes[_loc3_];
  1449.             break;
  1450.          }
  1451.       }
  1452.       _loc3_ = _loc3_ + 1;
  1453.    }
  1454.    if(_loc8_.childNodes.length !== 0)
  1455.    {
  1456.       _loc7_ = 0;
  1457.       while(_loc7_ < _loc8_.childNodes.length)
  1458.       {
  1459.          _loc6_ = _loc8_.childNodes[_loc7_].nodeName;
  1460.          _loc5_ = _loc8_.childNodes[_loc7_].firstChild.nodeValue;
  1461.          _loc9_[_loc6_] = _loc5_;
  1462.          _loc7_ = _loc7_ + 1;
  1463.       }
  1464.    }
  1465.    InitMC({mc:p.mc,fonction:"texte",texte:"",style:{align:_loc9_.justify,size:_loc9_.corps,color:_loc9_.couleurT,font:_loc9_.police}});
  1466.    _loc13_.Boucle = function()
  1467.    {
  1468.       texte_up += texte_arr[no_lettre];
  1469.       cible.ChangeTexte({texte:texte_up});
  1470.       no_lettre++;
  1471.       if(texte_arr[no_lettre] == undefined)
  1472.       {
  1473.          clearInterval(this.BoucleID);
  1474.          retour_func.call();
  1475.       }
  1476.    };
  1477.    _loc13_.BoucleID = setInterval(_loc13_,"Boucle",_loc15_);
  1478. }
  1479. function Liste(p)
  1480. {
  1481.    var _loc1_ = new xb.classes.Liste(p);
  1482.    return _loc1_;
  1483. }
  1484. function CompteurTemps(p)
  1485. {
  1486.    var _loc1_ = new xb.classes.CompteurTemps(p);
  1487.    return _loc1_;
  1488. }
  1489. _global.DistancePoints = DistancePoints;
  1490. _global.SetInterval = SetInterval;
  1491. _global.ClearInterval = ClearInterval;
  1492. _global.ClearAllIntervals = ClearAllIntervals;
  1493. _root.ExecuterApresDelaiNo = 0;
  1494. _global.ExecuterApresDelai = ExecuterApresDelai;
  1495. _global.LMaVider = new Array();
  1496. _global.LMaVider2 = new Array();
  1497. _global.InitMC = InitMC;
  1498. _global.InitMC_reccurent = InitMC_reccurent;
  1499. _global.ResetMC = ResetMC;
  1500. _global.InitMC_standart = InitMC_standart;
  1501. _global.InitMC_BTN = InitMC_BTN;
  1502. _global.InitMC_dragdrop = InitMC_dragdrop;
  1503. _global.InitMC_slider = InitMC_slider;
  1504. _global.InitMC_titre = InitMC_titre;
  1505. _global.InitMC_texte = InitMC_texte;
  1506. MovieClip.prototype._xlib1_ = this;
  1507. _global.IncString = IncString;
  1508. _global.DecString = DecString;
  1509. _global.GetFilePath = GetFilePath;
  1510. _global.AntiSlashToSlash = AntiSlashToSlash;
  1511. _global.str_replace = str_replace;
  1512. _global.JoindreObjets = JoindreObjets;
  1513. _global.xGetConfig = xGetConfig;
  1514. _global.GetOriginalSize = GetOriginalSize;
  1515. _global.GetOriginalHeight = GetOriginalHeight;
  1516. _global.CreerCache = CreerCache;
  1517. _global.ConvertCoord = ConvertCoord;
  1518. _global.getGlobalCoord = getGlobalCoord;
  1519. _global.getLocalCoord = getLocalCoord;
  1520. _global.length_ass = length_ass;
  1521. _global.ExplodeString = ExplodeString;
  1522. _global.BloquerActives = BloquerActives;
  1523. _global.DebloquerActives = DebloquerActives;
  1524. _global.afficheLM_x = afficheLM_x;
  1525. _global.viderLM_x = viderLM_x;
  1526. _global.afficheLM_x2 = afficheLM_x2;
  1527. _global.viderLM_x2 = viderLM_x2;
  1528.