home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 136 / MOBICLIC136.ISO / pc / DATA / FAB136 / FAB136_00 / mod.swf / scripts / frame_1 / DoAction.as
Text File  |  2011-07-20  |  90KB  |  2,934 lines

  1. function InitMC(p)
  2. {
  3.    trace("InitMC() " + p.mc);
  4.    var mc = typeof p != "movieclip" ? p.mc : p;
  5.    if(p.level != undefined)
  6.    {
  7.       var ceMC_name_old = mc._name + "_old";
  8.       var ceMC_name = mc._name;
  9.       mc._name = ceMC_name_old;
  10.       mc.duplicateMovieClip(ceMC_name,p.level);
  11.       mc._visible = false;
  12.       mc = this[ceMC_name];
  13.    }
  14.    if(mc.OriginalMC == undefined)
  15.    {
  16.       mc.OriginalMC = {};
  17.       mc.OriginalMC._x = mc._x;
  18.       mc.OriginalMC._y = mc._y;
  19.       mc.OriginalMC._xscale = mc._xscale;
  20.       mc.OriginalMC._yscale = mc._yscale;
  21.       mc.OriginalMC._width = mc._width;
  22.    }
  23.    var fonction = p.fonction != undefined ? eval("InitMC_" + p.fonction) : InitMC_standart;
  24.    mc.InitMC = fonction;
  25.    InitMC_reccurent(mc);
  26.    mc.InitMC(p);
  27. }
  28. function InitMC_reccurent(mc)
  29. {
  30.    mc.oriX = mc._x;
  31.    mc.oriY = mc._y;
  32.    mc.oriW = mc._width;
  33.    mc.oriH = mc._height;
  34.    mc.BackToInitialPos = function()
  35.    {
  36.       this._x = this.oriX;
  37.       this._y = this.oriY;
  38.    };
  39.    mc.BackToInitialSize = function()
  40.    {
  41.       this._width = this.oriW;
  42.       this._height = this.oriH;
  43.    };
  44. }
  45. function ResetMC(p)
  46. {
  47.    var _loc1_ = p.mc;
  48.    delete _loc1_.onPress;
  49.    delete _loc1_.onRollOver;
  50.    delete _loc1_.onRollOut;
  51.    delete _loc1_.onRelease;
  52.    delete _loc1_.onReleaseOutside;
  53.    delete _loc1_.BTN.onPress;
  54.    delete _loc1_.BTN.onRollOver;
  55.    delete _loc1_.BTN.onRollOut;
  56.    delete _loc1_.BTN.onRelease;
  57.    delete _loc1_.BTN.onReleaseOutside;
  58. }
  59. function InitMC_standart(p)
  60. {
  61.    trace("InitMC_standart : " + InitMC_standart);
  62.    this.p = p;
  63.    for(var _loc3_ in p)
  64.    {
  65.       this[_loc3_] = p[_loc3_];
  66.    }
  67.    if(this.IB != undefined)
  68.    {
  69.       if(typeof this.IBrep == "movieclip")
  70.       {
  71.          var IBrepere = this.IBrep;
  72.       }
  73.       else if(typeof _MOD_["IBrep_" + this.IB] == "movieclip" && this.IBrep != false)
  74.       {
  75.          var IBrepere = _MOD_["IBrep_" + this.IB];
  76.       }
  77.       else
  78.       {
  79.          var IBrepere = p.mc;
  80.       }
  81.       this.afficheIB = function()
  82.       {
  83.          _root.gereTextes.afficheIB({codeIB:this.IB,mc:IBrepere});
  84.       };
  85.       this.masqueIB = function()
  86.       {
  87.          _root.IB.removeMovieClip();
  88.       };
  89.    }
  90.    if(this.UseLabels != false)
  91.    {
  92.       if(this.reposFrame == undefined)
  93.       {
  94.          this.reposFrame = "E1";
  95.       }
  96.       if(this.pressFrame == undefined)
  97.       {
  98.          this.pressFrame = "E2";
  99.       }
  100.       if(this.overFrame == undefined)
  101.       {
  102.          this.overFrame = "E2";
  103.       }
  104.       if(this.outFrame == undefined)
  105.       {
  106.          this.outFrame = "E1";
  107.       }
  108.       if(this.releaseFrame == undefined)
  109.       {
  110.          this.releaseFrame = "E1";
  111.       }
  112.       if(this.releaseOutFrame == undefined)
  113.       {
  114.          this.releaseOutFrame = "E1";
  115.       }
  116.       if(this.activeFrame == undefined)
  117.       {
  118.          this.activeFrame = undefined;
  119.       }
  120.       if(this.desactiveFrame == undefined)
  121.       {
  122.          this.desactiveFrame = undefined;
  123.       }
  124.    }
  125.    this.gotoAndStop(p.reposFrame);
  126.    ┬º┬ºpush(this);
  127.    ┬º┬ºpush("joueson");
  128.    if(this.son == undefined)
  129.    {
  130.       ┬º┬ºpush(undefined);
  131.    }
  132.    ┬º┬ºpop()[┬º┬ºenumeration()] = ┬º┬ºpop();
  133.    ┬º┬ºpush(this);
  134.    ┬º┬ºpush("stopson");
  135.    if(this.nostop != undefined)
  136.    {
  137.       ┬º┬ºpush(undefined);
  138.    }
  139.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  140.    if(this.sonOnPress != undefined)
  141.    {
  142.       if(this.sonOnPress_offset == undefined)
  143.       {
  144.          this.sonOnPress_offset = 0;
  145.       }
  146.       if(this.sonOnPress_loopSon == undefined)
  147.       {
  148.          this.sonOnPress_loopSon = 0;
  149.       }
  150.       this.jouesonOnPress = function()
  151.       {
  152.          joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
  153.       };
  154.       this.stopsonOnPress = function()
  155.       {
  156.          stopBruitage({nomSon:this.sonOnPress});
  157.       };
  158.    }
  159.    else
  160.    {
  161.       this.jouesonOnMove = undefined;
  162.       this.stopsonOnMove = undefined;
  163.    }
  164.    if(this.UseHandCursor == undefined)
  165.    {
  166.       this.UseHandCursor = true;
  167.    }
  168.    if(this.UseCurseur != false)
  169.    {
  170.       this.curseur_after_press = this.goto != undefined ? "fleche" : "doigt";
  171.       if(this.curseur_on_roll == undefined)
  172.       {
  173.          this.curseur_on_roll = "doigt";
  174.       }
  175.       if(this.curseur_onRollOut == undefined)
  176.       {
  177.          this.curseur_onRollOut = "fleche";
  178.       }
  179.       if(this.curseur_after_press == undefined)
  180.       {
  181.          this.curseur_after_press = "doigt";
  182.       }
  183.       if(this.curseur_onRelease == undefined)
  184.       {
  185.          this.curseur_onRelease = "doigt";
  186.       }
  187.       if(this.curseur_onReleaseOutside == undefined)
  188.       {
  189.          this.curseur_onReleaseOutside = "fleche";
  190.       }
  191.    }
  192.    this.Activer = function()
  193.    {
  194.       if(this.Actif == true)
  195.       {
  196.          return undefined;
  197.       }
  198.       this.enabled = true;
  199.       this.BTN.enabled = true;
  200.       this.Actif = true;
  201.       this.gotoAndStop(this.activeFrame);
  202.    };
  203.    this.Desactiver = function()
  204.    {
  205.       if(this.Actif == false)
  206.       {
  207.          return undefined;
  208.       }
  209.       this.enabled = false;
  210.       this.BTN.enabled = false;
  211.       this.Actif = false;
  212.       this.stopsonOnPress();
  213.       this.masqueIB();
  214.       this.gotoAndStop(this.desactiveFrame);
  215.    };
  216.    this.SetUseHandCursor = function(flag)
  217.    {
  218.       this.UseHandCursor = flag;
  219.       this.useHandCursor = this.UseHandCursor;
  220.       this.BTN.useHandCursor = this.UseHandCursor;
  221.    };
  222.    this.Activer();
  223.    this.GS = this.gotoAndStop;
  224.    this.MConPress = function()
  225.    {
  226.       if(this.p.blockOnPress == true)
  227.       {
  228.          this.enabled = false;
  229.          this.BTN.enabled = false;
  230.       }
  231.       this.stopson();
  232.       this.jouesonOnPress();
  233.       this.masqueIB();
  234.       this.gotoAndStop(this.pressFrame);
  235.       gereCursor(this.curseur_after_press);
  236.       _root.gotoAndStop(this.goto);
  237.       var p = this.OnPress();
  238.    };
  239.    this.MConRollOver = function()
  240.    {
  241.       this.joueson();
  242.       this.afficheIB();
  243.       this.gotoAndStop(this.overFrame);
  244.       gereCursor(this.curseur_on_roll);
  245.       var _loc2_ = this.OnRollOver();
  246.    };
  247.    this.MConRollOut = function()
  248.    {
  249.       trace("MConRollOut : " + this.masqueIB);
  250.       this.stopson();
  251.       this.masqueIB();
  252.       this.gotoAndStop(this.outFrame);
  253.       gereCursor(this.curseur_onRollOut);
  254.       var _loc2_ = this.OnRollOut();
  255.    };
  256.    this.MConRelease = function()
  257.    {
  258.       this.gotoAndStop(this.releaseFrame);
  259.       gereCursor(this.curseur_onRelease);
  260.       var _loc2_ = this.OnRelease();
  261.    };
  262.    this.MConReleaseOutside = function()
  263.    {
  264.       this.gotoAndStop(this.releaseOutFrame);
  265.       gereCursor(this.curseur_onReleaseOutside);
  266.       var _loc2_ = this.OnReleaseOutside();
  267.    };
  268.    if(this.BTN == undefined || this.BTN == false)
  269.    {
  270.       this.useHandCursor = this.UseHandCursor;
  271.       this.onPress = this.MConPress;
  272.       this.onRollOver = this.MConRollOver;
  273.       this.onRollOut = this.MConRollOut;
  274.       this.onRelease = this.MConRelease;
  275.       this.onReleaseOutside = this.MConReleaseOutside;
  276.    }
  277.    else
  278.    {
  279.       this.BTN.useHandCursor = this.UseHandCursor;
  280.       this.BTN.onPress = function()
  281.       {
  282.          this._parent.MConPress();
  283.       };
  284.       this.BTN.onRollOver = function()
  285.       {
  286.          this._parent.MConRollOver();
  287.       };
  288.       this.BTN.onRollOut = function()
  289.       {
  290.          this._parent.MConRollOut();
  291.       };
  292.       this.BTN.onRelease = function()
  293.       {
  294.          this._parent.MConRelease();
  295.       };
  296.       this.BTN.onReleaseOutside = function()
  297.       {
  298.          this._parent.MConReleaseOutside();
  299.       };
  300.    }
  301.    this.Refresh();
  302. }
  303. function InitMC_BTN(p)
  304. {
  305.    if(p.IB != undefined)
  306.    {
  307.       if(p.IBrep == true)
  308.       {
  309.          var IBrepere = _MOD_["IBrep_" + p.IB];
  310.       }
  311.       else
  312.       {
  313.          var IBrepere = p.mc;
  314.       }
  315.       this.afficheIB = function()
  316.       {
  317.          gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  318.       };
  319.       this.masqueIB = function()
  320.       {
  321.          gereTextes.masqueIB();
  322.       };
  323.    }
  324.    this.enabled = true;
  325.    ┬º┬ºpush(this);
  326.    ┬º┬ºpush("joueson");
  327.    if(p.son == undefined)
  328.    {
  329.       ┬º┬ºpush(undefined);
  330.    }
  331.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  332.    ┬º┬ºpush(this);
  333.    ┬º┬ºpush("stopson");
  334.    if(p.nostop != undefined)
  335.    {
  336.       ┬º┬ºpush(undefined);
  337.    }
  338.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  339.    var curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
  340.    this.goto = p.goto;
  341.    this.BTN.onPress = function()
  342.    {
  343.       this._parent.stopson();
  344.       this._parent.masqueIB();
  345.       this._parent.gotoAndStop("E3");
  346.       gereCursor(curseur_after_press);
  347.       _root.gotoAndStop(this.goto);
  348.       var _loc3_ = this._parent.OnPress();
  349.    };
  350.    this.BTN.onRollOver = function()
  351.    {
  352.       this._parent.joueson();
  353.       this._parent.afficheIB();
  354.       this._parent.gotoAndStop("E2");
  355.       gereCursor("doigt");
  356.       var _loc2_ = this._parent.OnRollOver();
  357.    };
  358.    this.BTN.onRollOut = function()
  359.    {
  360.       this._parent.stopson();
  361.       this._parent.masqueIB();
  362.       this._parent.gotoAndStop("E1");
  363.       gereCursor("fleche");
  364.       var _loc2_ = this._parent.OnRollOut();
  365.    };
  366.    this.BTN.onRelease = function()
  367.    {
  368.       this._parent.gotoAndStop("E2");
  369.       gereCursor("doigt");
  370.       var _loc2_ = this._parent.OnRelease();
  371.    };
  372.    this.BTN.onReleaseOutside = function()
  373.    {
  374.       this._parent.gotoAndStop("E1");
  375.       gereCursor("fleche");
  376.       var _loc2_ = this._parent.OnReleaseOutside();
  377.    };
  378. }
  379. function InitMC_dragdrop(p)
  380. {
  381.    trace("InitMC_dragdrop_z");
  382.    if(p.IB != undefined)
  383.    {
  384.       if(p.IBrep == true)
  385.       {
  386.          var IBrepere = _MOD_["IBrep_" + p.IB];
  387.       }
  388.       else
  389.       {
  390.          var IBrepere = p.mc;
  391.       }
  392.       this.afficheIB = function()
  393.       {
  394.          _root.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  395.       };
  396.       this.masqueIB = function()
  397.       {
  398.          _root.gereTextes.masqueIB();
  399.       };
  400.    }
  401.    this.pDepth = this.getDepth();
  402.    this.UseHandCursor = p.useHandCursor != undefined ? p.useHandCursor : true;
  403.    this.PressLevel = p.PressLevel != undefined ? p.PressLevel : 15832;
  404.    this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E3";
  405.    this.overFrame = p.overFrame != undefined ? p.overFrame : "E2";
  406.    this.CibleOverFrame = p.CibleOverFrame != undefined ? p.CibleOverFrame : "E3";
  407.    this.CibleOutFrame = p.CibleOutFrame != undefined ? p.CibleOutFrame : "E1";
  408.    this.outFrame = p.outFrame != undefined ? p.outFrame : "E1";
  409.    this.releaseFrame = p.releaseFrame != undefined ? p.releaseFrame : "E1";
  410.    ┬º┬ºpush(this);
  411.    ┬º┬ºpush("joueson");
  412.    if(p.son == undefined)
  413.    {
  414.       ┬º┬ºpush(undefined);
  415.    }
  416.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  417.    ┬º┬ºpush(this);
  418.    ┬º┬ºpush("stopson");
  419.    if(p.son == undefined)
  420.    {
  421.       ┬º┬ºpush(undefined);
  422.    }
  423.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  424.    ┬º┬ºpush(this);
  425.    ┬º┬ºpush("jouesonOnPress");
  426.    if(p.sonOnPress == undefined)
  427.    {
  428.       ┬º┬ºpush(undefined);
  429.    }
  430.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  431.    ┬º┬ºpush(this);
  432.    ┬º┬ºpush("stopsonOnPress");
  433.    if(p.sonOnPress == undefined)
  434.    {
  435.       ┬º┬ºpush(undefined);
  436.    }
  437.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  438.    ┬º┬ºpush(this);
  439.    ┬º┬ºpush("jouesonOnOverCible");
  440.    if(p.sonOnOverCible == undefined)
  441.    {
  442.       ┬º┬ºpush(undefined);
  443.    }
  444.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  445.    ┬º┬ºpush(this);
  446.    ┬º┬ºpush("stopsonOnOverCible");
  447.    if(p.sonOnOverCible == undefined)
  448.    {
  449.       ┬º┬ºpush(undefined);
  450.    }
  451.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  452.    var _loc19_ = p.goto != undefined ? "fleche" : "doigt";
  453.    this.goto = p.goto;
  454.    this.ModeDrag = p.ModeDrag != undefined ? p.ModeDrag : "lache_au_rollout";
  455.    this.CentrerOnStartDrag = p.CentrerOnStartDrag != undefined ? p.CentrerOnStartDrag : false;
  456.    this.ModeHitTest = p.ModeHitTest != undefined ? p.ModeHitTest : "bounds";
  457.    this.DistanceTouche = p.DistanceTouche != undefined ? p.DistanceTouche : 50;
  458.    this.DistanceToucheRatio = p.DistanceToucheRatio != undefined ? p.DistanceToucheRatio : 1;
  459.    this.ZoneDragLimites = p.ZoneDragLimites != undefined ? p.ZoneDragLimites : {x:0,y:0,w:800,h:600};
  460.    this.MethodeDetecteDrag = "DetectDrag_" + this.ModeHitTest;
  461.    trace("this[\"DetectDrag_\" + this.ModeHitTest] : " + this["DetectDrag_" + this.ModeHitTest]);
  462.    this.DragEnCours = false;
  463.    this.DetectDrag_bounds = function()
  464.    {
  465.       this._x = _xmouse - this.ecart_mousex;
  466.       this._y = _ymouse - this.ecart_mousey;
  467.       if(this._x < this.ZoneDragLimites.x)
  468.       {
  469.          this._x = this.ZoneDragLimites.x;
  470.       }
  471.       if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
  472.       {
  473.          this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
  474.       }
  475.       if(this._y < this.ZoneDragLimites.y)
  476.       {
  477.          this._y = this.ZoneDragLimites.y;
  478.       }
  479.       if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
  480.       {
  481.          this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
  482.       }
  483.       this.CiblesTouchees = [];
  484.       var _loc3_ = this.CibleLaPlusProche();
  485.       var _loc2_ = 0;
  486.       while(_loc2_ < this.CiblesDrag.length)
  487.       {
  488.          if(this.hitTest(this.CiblesDrag[_loc2_]))
  489.          {
  490.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOverFrame);
  491.             this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
  492.             this.touche = this.touche + 1;
  493.          }
  494.          else
  495.          {
  496.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOutFrame);
  497.          }
  498.          _loc2_ = _loc2_ + 1;
  499.       }
  500.       if(this.touche == 1)
  501.       {
  502.          this.jouesonOnOverCible();
  503.       }
  504.       if(this.CiblesTouchees.length <= 0)
  505.       {
  506.          this.touche = 0;
  507.          this.stopsonOnOverCible();
  508.       }
  509.       this.PendantDrag();
  510.       updateAfterEvent();
  511.    };
  512.    this.DetectDrag_mouse = function()
  513.    {
  514.       this._x = _xmouse - this.ecart_mousex;
  515.       this._y = _ymouse - this.ecart_mousey;
  516.       if(this._x < this.ZoneDragLimites.x)
  517.       {
  518.          this._x = this.ZoneDragLimites.x;
  519.       }
  520.       if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
  521.       {
  522.          this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
  523.       }
  524.       if(this._y < this.ZoneDragLimites.y)
  525.       {
  526.          this._y = this.ZoneDragLimites.y;
  527.       }
  528.       if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
  529.       {
  530.          this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
  531.       }
  532.       this.CiblesTouchees = [];
  533.       var _loc2_ = 0;
  534.       while(_loc2_ < this.CiblesDrag.length)
  535.       {
  536.          if(this.CiblesDrag[_loc2_].hitTest(_xmouse,_ymouse,true))
  537.          {
  538.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOverFrame);
  539.             this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
  540.             this.touche = this.touche + 1;
  541.          }
  542.          else
  543.          {
  544.             this.CiblesDrag[_loc2_].gotoAndStop(this.CibleOutFrame);
  545.          }
  546.          _loc2_ = _loc2_ + 1;
  547.       }
  548.       if(this.touche == 1)
  549.       {
  550.          this.jouesonOnOverCible();
  551.       }
  552.       if(this.CiblesTouchees.length <= 0)
  553.       {
  554.          this.touche = 0;
  555.          this.stopsonOnOverCible();
  556.       }
  557.       this.PendantDrag();
  558.       updateAfterEvent();
  559.    };
  560.    this.DetectDrag_distance = function()
  561.    {
  562.       this._x = _xmouse - this.ecart_mousex;
  563.       this._y = _ymouse - this.ecart_mousey;
  564.       if(this._x < this.ZoneDragLimites.x)
  565.       {
  566.          this._x = this.ZoneDragLimites.x;
  567.       }
  568.       if(this._x > this.ZoneDragLimites.x + this.ZoneDragLimites.w)
  569.       {
  570.          this._x = this.ZoneDragLimites.x + this.ZoneDragLimites.w;
  571.       }
  572.       if(this._y < this.ZoneDragLimites.y)
  573.       {
  574.          this._y = this.ZoneDragLimites.y;
  575.       }
  576.       if(this._y > this.ZoneDragLimites.y + this.ZoneDragLimites.h)
  577.       {
  578.          this._y = this.ZoneDragLimites.y + this.ZoneDragLimites.h;
  579.       }
  580.       _global.CURSEUR._x = this._x;
  581.       _global.CURSEUR._y = this._y;
  582.       Mouse.hide();
  583.       gereCursor("mainF");
  584.       var _loc4_ = this.CibleLaPlusProche({mode:"toutes"});
  585.       var _loc5_ = Math.sqrt(Math.pow(_loc4_._x - this._x,2) + Math.pow(_loc4_._y - this._y,2));
  586.       var _loc6_ = (_loc4_._width / 2 + this._width / 2) * this.DistanceToucheRatio;
  587.       if(_loc5_ > _loc6_)
  588.       {
  589.          _loc4_ = undefined;
  590.       }
  591.       this.CiblesTouchees = [];
  592.       var _loc3_ = 0;
  593.       while(_loc3_ < this.CiblesDrag.length)
  594.       {
  595.          if(this.CiblesDrag[_loc3_] == _loc4_)
  596.          {
  597.             this.CiblesDrag[_loc3_].gotoAndStop(this.CibleOverFrame);
  598.             this.CiblesTouchees.push(this.CiblesDrag[_loc3_]);
  599.             this.touche = this.touche + 1;
  600.          }
  601.          else
  602.          {
  603.             this.CiblesDrag[_loc3_].gotoAndStop(this.CibleOutFrame);
  604.          }
  605.          _loc3_ = _loc3_ + 1;
  606.       }
  607.       if(this.touche == 1)
  608.       {
  609.          this.jouesonOnOverCible();
  610.       }
  611.       if(this.CiblesTouchees.length <= 0)
  612.       {
  613.          this.touche = 0;
  614.          this.stopsonOnOverCible();
  615.       }
  616.       this.PendantDrag();
  617.       updateAfterEvent();
  618.    };
  619.    this.StartDrag = function()
  620.    {
  621.       trace("StartDrag : " + StartDrag);
  622.       if(this.CentrerOnStartDrag != true)
  623.       {
  624.          this.ecart_mousex = _xmouse - this._x;
  625.          this.ecart_mousey = _ymouse - this._y;
  626.       }
  627.       else
  628.       {
  629.          this._x = _xmouse;
  630.          this._y = _ymouse;
  631.          this.ecart_mousex = _xmouse - this._x;
  632.          this.ecart_mousey = _ymouse - this._y;
  633.       }
  634.       _global.CURSEUR.Verrouiller();
  635.       this.IntervalId = _global.SetInterval({mcRef:this,methode:this.MethodeDetecteDrag,interval:10});
  636.       trace("this.MethodeDetecteDrag : " + this.MethodeDetecteDrag);
  637.       this.swapDepths(this.PressLevel);
  638.       this.DragEnCours = true;
  639.       if(this.ModeDrag == "lache_au_clic")
  640.       {
  641.          var me = this;
  642.          _root.onMouseDown = function()
  643.          {
  644.             me.FirstPress = false;
  645.             me.DragEnCours = false;
  646.             gereCursor("mainO");
  647.             me.stopsonOnPress();
  648.             me.gotoAndStop("E2");
  649.             _global.ClearInterval(me.IntervalId);
  650.             _global.CURSEUR.Deverrouiller();
  651.             me.swapDepths(me.pDepth);
  652.             me.ApresDrag();
  653.             delete _root.onMouseDown;
  654.          };
  655.       }
  656.    };
  657.    this.ContinueDrag = function()
  658.    {
  659.       this.gotoAndStop(this.pressFrame);
  660.       gereCursor("mainF");
  661.       this.ecart_mousex = _xmouse - this._x;
  662.       this.ecart_mousey = _ymouse - this._y;
  663.       if(this.IntervalId != undefined)
  664.       {
  665.          _global.ClearInterval(this.IntervalId);
  666.       }
  667.       this.IntervalId = _global.SetInterval({mcRef:this,methode:this.MethodeDetecteDrag,interval:10});
  668.       this.swapDepths(this.PressLevel);
  669.       this.DragEnCours = true;
  670.    };
  671.    this.StopDrag = function()
  672.    {
  673.       _global.ClearInterval(this.IntervalId);
  674.       this.swapDepths(this.pDepth);
  675.       this.DragEnCours = false;
  676.       _global.CURSEUR.Deverrouiller();
  677.    };
  678.    this.ComeBack = function()
  679.    {
  680.       this._x = this.xOri;
  681.       this._y = this.yOri;
  682.       this.gotoAndStop("E1");
  683.       this.DragEnCours = false;
  684.    };
  685.    this.Activer = function()
  686.    {
  687.       trace("Activer : " + this);
  688.       this.enabled = true;
  689.       this.BTN.enabled = true;
  690.       this.useHandCursor = this.UseHandCursor;
  691.       this.BTN.useHandCursor = this.UseHandCursor;
  692.    };
  693.    this.Desactiver = function()
  694.    {
  695.       trace("Desactiver : " + this);
  696.       this.enabled = false;
  697.       this.BTN.enabled = false;
  698.       this.useHandCursor = false;
  699.       this.BTN.useHandCursor = false;
  700.    };
  701.    this.CibleLaPlusProche = function(p)
  702.    {
  703.       var _loc3_ = p.mode != "toutes" ? this.CiblesTouchees : this.CiblesDrag;
  704.       if(_loc3_.length == 0)
  705.       {
  706.          return null;
  707.       }
  708.       var _loc4_ = undefined;
  709.       var _loc10_ = null;
  710.       var _loc9_ = undefined;
  711.       var _loc7_ = undefined;
  712.       if(p.mcRef == undefined)
  713.       {
  714.          _loc9_ = _xmouse;
  715.          _loc7_ = _ymouse;
  716.       }
  717.       else if(p.mcRef == "center")
  718.       {
  719.          _loc9_ = this._x + this._width / 2;
  720.          _loc7_ = this._y + this._height / 2;
  721.       }
  722.       else
  723.       {
  724.          var _loc12_ = new flash.geom.Point(p.mcRef._x,p.mcRef._y);
  725.          mcRef.localToGlobal(_loc12_);
  726.          _loc9_ = _loc12_.x;
  727.          _loc7_ = _loc12_.y;
  728.       }
  729.       var _loc5_ = 100000;
  730.       var _loc2_ = 0;
  731.       while(_loc2_ < _loc3_.length)
  732.       {
  733.          if(_loc3_[_loc2_] !== this)
  734.          {
  735.             _loc4_ = DistancePoints({x1:_loc9_,y1:_loc7_,x2:_loc3_[_loc2_]._x,y2:_loc3_[_loc2_]._y});
  736.             if(_loc4_ < _loc5_)
  737.             {
  738.                _loc5_ = _loc4_;
  739.                _loc10_ = _loc3_[_loc2_];
  740.             }
  741.          }
  742.          _loc2_ = _loc2_ + 1;
  743.       }
  744.       return _loc10_;
  745.    };
  746.    this.MConPress = function()
  747.    {
  748.       if(!(this.ModeDrag == "lache_au_clic" && this.DragEnCours == true))
  749.       {
  750.          this.FirstPress = true;
  751.          this.jouesonOnPress();
  752.          this.xOri = this._x;
  753.          this.yOri = this._y;
  754.          this.masqueIB();
  755.          this.gotoAndStop(this.pressFrame);
  756.          gereCursor("mainF");
  757.          this.StartDrag();
  758.          var _loc2_ = this.OnPress();
  759.       }
  760.    };
  761.    this.MConRollOver = function()
  762.    {
  763.       trace("MConRollOver : " + this);
  764.       if(this.DragEnCours == true)
  765.       {
  766.          return undefined;
  767.       }
  768.       this.joueson();
  769.       this.afficheIB();
  770.       this.gotoAndStop(this.overFrame);
  771.       gereCursor("mainO");
  772.       var _loc2_ = this.OnRollOver();
  773.    };
  774.    this.MConRollOut = function()
  775.    {
  776.       if(this.DragEnCours == true)
  777.       {
  778.          return undefined;
  779.       }
  780.       this.stopson();
  781.       this.gotoAndStop(this.outFrame);
  782.       this.masqueIB();
  783.       gereCursor("fleche");
  784.       var _loc2_ = this.OnRollOut();
  785.    };
  786.    this.MConRelease = function()
  787.    {
  788.       if(this.ModeDrag != "lache_au_rollout")
  789.       {
  790.          return undefined;
  791.       }
  792.       this.DragEnCours = false;
  793.       _global.CURSEUR.Deverrouiller();
  794.       gereCursor("mainO");
  795.       this.stopsonOnPress();
  796.       this.gotoAndStop(this.releaseFrame);
  797.       _global.ClearInterval(this.IntervalId);
  798.       this.swapDepths(this.pDepth);
  799.       this.ApresDrag();
  800.       var _loc3_ = this.OnRelease();
  801.    };
  802.    this.MConReleaseOutside = this.MConRelease;
  803.    if(this.BTN == undefined || p.BTN == false)
  804.    {
  805.       this.onPress = this.MConPress;
  806.       this.onRollOver = this.MConRollOver;
  807.       this.onRollOut = this.MConRollOut;
  808.       this.onRelease = this.MConRelease;
  809.       this.onReleaseOutside = this.MConReleaseOutside;
  810.    }
  811.    else
  812.    {
  813.       this.BTN.onPress = function()
  814.       {
  815.          this._parent.MConPress();
  816.       };
  817.       this.BTN.onRollOver = function()
  818.       {
  819.          this._parent.MConRollOver();
  820.       };
  821.       this.BTN.onRollOut = function()
  822.       {
  823.          this._parent.MConRollOut();
  824.       };
  825.       this.BTN.onRelease = function()
  826.       {
  827.          this._parent.MConRelease();
  828.       };
  829.       this.BTN.onReleaseOutside = function()
  830.       {
  831.          this._parent.MConReleaseOutside();
  832.       };
  833.    }
  834. }
  835. function InitMC_slider(p)
  836. {
  837.    if(p.IB != undefined)
  838.    {
  839.       if(typeof p.IBrep == "movieclip")
  840.       {
  841.          var IBrepere = p.IBrep;
  842.       }
  843.       else if(typeof _MOD_["IBrep_" + p.IB] == "movieclip" && p.IBrep != false)
  844.       {
  845.          var IBrepere = _MOD_["IBrep_" + p.IB];
  846.       }
  847.       else
  848.       {
  849.          var IBrepere = p.mc;
  850.       }
  851.       this.afficheIB = function()
  852.       {
  853.          _root.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
  854.       };
  855.       this.masqueIB = function()
  856.       {
  857.          _root.IB.removeMovieClip();
  858.       };
  859.    }
  860.    ┬º┬ºpush(this);
  861.    ┬º┬ºpush("joueson");
  862.    if(p.son == undefined)
  863.    {
  864.       ┬º┬ºpush(undefined);
  865.    }
  866.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  867.    ┬º┬ºpush(this);
  868.    ┬º┬ºpush("stopson");
  869.    if(p.son == undefined)
  870.    {
  871.       ┬º┬ºpush(undefined);
  872.    }
  873.    ┬º┬ºpop()[┬º┬ºpop()] = ┬º┬ºpop();
  874.    var _loc7_ = p.goto != undefined ? "fleche" : "doigt";
  875.    this.goto = p.goto;
  876.    this.EnMouvement = false;
  877.    if(p.sonOnMove != undefined)
  878.    {
  879.       this.sonOnMove = p.sonOnMove;
  880.       this.sonOnMove_offset = p.sonOnMove_offset != undefined ? Number(p.sonOnMove_offset) : 0;
  881.       this.sonOnMove_loopSon = p.sonOnMove_loopSon != undefined ? Number(p.sonOnMove_loopSon) : 0;
  882.       this.jouesonOnMove = function()
  883.       {
  884.          joueBruitage({nomSon:this.sonOnMove,offset:this.sonOnMove_offset,loopSon:this.sonOnMove_loopSon});
  885.       };
  886.       this.stopsonOnMove = function()
  887.       {
  888.          stopBruitage({nomSon:this.sonOnMove});
  889.       };
  890.    }
  891.    else
  892.    {
  893.       this.jouesonOnMove = undefined;
  894.       this.stopsonOnMove = undefined;
  895.    }
  896.    if(p.sonOnPress != undefined)
  897.    {
  898.       this.sonOnPress = p.sonOnPress;
  899.       this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
  900.       this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
  901.       this.jouesonOnPress = function()
  902.       {
  903.          joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
  904.       };
  905.       this.stopsonOnPress = function()
  906.       {
  907.          stopBruitage({nomSon:this.sonOnPress});
  908.       };
  909.    }
  910.    else
  911.    {
  912.       this.jouesonOnPress = undefined;
  913.       this.stopsonOnPress = undefined;
  914.    }
  915.    this.DragZoneLargeur = p.DragZoneLargeur != undefined ? p.DragZoneLargeur : 0;
  916.    this.DragZoneHauteur = p.DragZoneHauteur != undefined ? p.DragZoneHauteur : 0;
  917.    this.DragZoneLargeur_pourcent = p.DragZoneLargeur / 100;
  918.    this.DragZoneHauteur_pourcent = p.DragZoneHauteur / 100;
  919.    this.DragZone = {left:this._x,right:this._x + this.DragZoneLargeur,top:this._y,bottom:this._y + this.DragZoneHauteur};
  920.    this.Activer = function()
  921.    {
  922.       this.enabled = true;
  923.    };
  924.    this.Desactiver = function()
  925.    {
  926.       this.enabled = false;
  927.    };
  928.    this.SetPosition = this.SetPositionX = function(pourcent)
  929.    {
  930.       this._x = this.DragZone.left + this.DragZoneLargeur_pourcent * pourcent;
  931.    };
  932.    this.SetPositionY = function(pourcent)
  933.    {
  934.       this._y = this.DragZone.top + this.DragZoneHauteur_pourcent * pourcent;
  935.    };
  936.    this.GetPosition = this.GetPositionX = function()
  937.    {
  938.       return (this._x - this.DragZone.left) / this.DragZoneLargeur_pourcent;
  939.    };
  940.    this.GetPositionY = function()
  941.    {
  942.       return (this._y - this.DragZone.top) / this.DragZoneHauteur_pourcent;
  943.    };
  944.    this.DetectDrag = function()
  945.    {
  946.       this._x = _root._xmouse - this.ecart_mousex;
  947.       this._y = _root._ymouse - this.ecart_mousey;
  948.       if(this._x <= this.DragZone.left)
  949.       {
  950.          this._x = this.DragZone.left;
  951.       }
  952.       if(this._y < this.DragZone.top)
  953.       {
  954.          this._y = this.DragZone.top;
  955.       }
  956.       if(this._x >= this.DragZone.right)
  957.       {
  958.          this._x = this.DragZone.right;
  959.       }
  960.       if(this._y > this.DragZone.bottom)
  961.       {
  962.          this._y = this.DragZone.bottom;
  963.       }
  964.       updateAfterEvent();
  965.       if(this._x == this.lastx && this._y == this.lasty)
  966.       {
  967.          if(this.EnMouvement == true)
  968.          {
  969.             this.EnMouvement = false;
  970.             this.stopsonOnMove();
  971.          }
  972.       }
  973.       else if(this.EnMouvement == false)
  974.       {
  975.          this.EnMouvement = true;
  976.          this.jouesonOnMove();
  977.       }
  978.       this.lastx = this._x;
  979.       this.lasty = this._y;
  980.       this.PendantSlide();
  981.    };
  982.    this.StartDrag = function()
  983.    {
  984.       this.ecart_mousex = _root._xmouse - this._x;
  985.       this.ecart_mousey = _root._ymouse - this._y;
  986.       this.lastx = this._x;
  987.       this.lasty = this._y;
  988.       this.IntervalId = _global.SetInterval({mcRef:this,methode:"DetectDrag",interval:1});
  989.    };
  990.    this.onPress = function()
  991.    {
  992.       this.jouesonOnPress();
  993.       this.masqueIB();
  994.       this.gotoAndStop("E3");
  995.       gereCursor("mainF");
  996.       this.StartDrag();
  997.       var _loc2_ = this.OnPress();
  998.    };
  999.    this.onRollOver = function()
  1000.    {
  1001.       this.joueson();
  1002.       this.afficheIB();
  1003.       this.gotoAndStop("E2");
  1004.       gereCursor("mainO");
  1005.       var _loc2_ = this.OnRollOver();
  1006.    };
  1007.    this.onRollOut = function()
  1008.    {
  1009.       this.stopson();
  1010.       this.stopsonOnPress();
  1011.       this.stopsonOnMove();
  1012.       this.gotoAndStop("E1");
  1013.       this.masqueIB();
  1014.       gereCursor("fleche");
  1015.       var _loc2_ = this.OnRollOut();
  1016.    };
  1017.    this.onRelease = function()
  1018.    {
  1019.       this.gotoAndStop("E2");
  1020.       _global.ClearInterval(this.IntervalId);
  1021.       this.stopson();
  1022.       this.stopsonOnPress();
  1023.       this.stopsonOnMove();
  1024.       gereCursor("mainO");
  1025.       var _loc3_ = this.OnRelease();
  1026.    };
  1027.    this.onReleaseOutside = function()
  1028.    {
  1029.       this.onRelease();
  1030.       gereCursor("fleche");
  1031.       var _loc2_ = this.OnReleaseOutside();
  1032.    };
  1033. }
  1034. function InitMC_titre(p)
  1035. {
  1036.    this.LMaVider = [];
  1037.    this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
  1038.    this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
  1039.    this.ChangeTexte = function(p)
  1040.    {
  1041.       this.viderLM();
  1042.       _root.gereTextes.afficheLM({codeLM:p.codeLM,X:this._x + this.offsetx,Y:this._y + this.offsety,width:this._width,height:this._height});
  1043.       this.LMaVider.push(p);
  1044.    };
  1045.    this.viderLM = function()
  1046.    {
  1047.       var _loc3_ = 0;
  1048.       while(_loc3_ < this.LMaVider.length)
  1049.       {
  1050.          _root.gereTextes.masqueLM(this.LMaVider[_loc3_]);
  1051.          _loc3_ = _loc3_ + 1;
  1052.       }
  1053.    };
  1054. }
  1055. function InitMC_texte(p)
  1056. {
  1057.    trace("InitMC_titre()");
  1058.    xlisteObj(p);
  1059.    this.LMaVider = [];
  1060.    this.pere = p.pere != undefined ? Number(p.pere) : _root;
  1061.    this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
  1062.    this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
  1063.    this.level = p.level != undefined ? Number(p.level) : this.pere.getNextHighestDepth();
  1064.    this.texte = p.texte != undefined ? p.texte : "";
  1065.    this.MC = p.mc;
  1066.    this.MC._visible = false;
  1067.    if(p.style == undefined)
  1068.    {
  1069.       this.Style = {};
  1070.    }
  1071.    else
  1072.    {
  1073.       this.Style = p.style;
  1074.    }
  1075.    this.Style.multiline = this.Style.multiline != undefined ? this.Style.multiline : true;
  1076.    this.Style.wordWrap = this.Style.wordWrap != undefined ? this.Style.wordWrap : true;
  1077.    this.Style.border = this.Style.border != undefined ? this.Style.border : false;
  1078.    this.Style.color = this.Style.color != undefined ? this.Style.color : 16711680;
  1079.    this.Style.size = this.Style.size != undefined ? this.Style.size : 12;
  1080.    this.Style.font = this.Style.font != undefined ? this.Style.font : "Comic Sans MS";
  1081.    this.Style.align = this.Style.align != undefined ? this.Style.align : "center";
  1082.    this.Style.underline = this.Style.underline != undefined ? this.Style.underline : false;
  1083.    this.Style.selectable = this.Style.selectable != undefined ? this.Style.selectable : false;
  1084.    var _loc4_ = this.pere.createTextField(this.MC._name + "_txt",this.level,this.MC._x,this.MC._y,this.MC._width,this.MC._height);
  1085.    _loc4_.multiline = this.Style.multiline;
  1086.    _loc4_.wordWrap = this.Style.wordWrap;
  1087.    _loc4_.border = this.Style.border;
  1088.    _loc4_.selectable = this.Style.selectable;
  1089.    _loc4_.embedFonts = true;
  1090.    var my_fmt = new TextFormat();
  1091.    my_fmt.font = this.Style.font;
  1092.    my_fmt.size = this.Style.size;
  1093.    my_fmt.color = this.Style.color;
  1094.    my_fmt.align = this.Style.align;
  1095.    my_fmt.underline = this.Style.underline;
  1096.    _loc4_.text = this.texte;
  1097.    _loc4_.setTextFormat(my_fmt);
  1098.    this.TexteMC = _loc4_;
  1099.    this.ChangeTexte = function(p)
  1100.    {
  1101.       this.texte = p.texte;
  1102.       this.TexteMC.text = p.texte;
  1103.       this.TexteMC.setTextFormat(my_fmt);
  1104.    };
  1105. }
  1106. function DistancePoints(p)
  1107. {
  1108.    return Math.sqrt(Math.pow(p.x2 - p.x1,2) + Math.pow(p.y2 - p.y1,2));
  1109. }
  1110. function getLMById(codeLM)
  1111. {
  1112.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  1113.    myLM = this.recusivegetLMById(_loc3_,"id",codeLM);
  1114.    if(myLM == undefined)
  1115.    {
  1116.       myLM(attributeValue + " n\'existe pas dans XML");
  1117.    }
  1118.    return myLM;
  1119. }
  1120. function recusivegetLMById(node, attribute, attributeValue)
  1121. {
  1122.    var _loc1_ = 0;
  1123.    while(_loc1_ < node.childNodes.length)
  1124.    {
  1125.       if(node.childNodes[_loc1_].attributes[attribute] == attributeValue)
  1126.       {
  1127.          myText = node.childNodes[_loc1_].firstChild.nodeValue;
  1128.          var _loc7_ = [];
  1129.          for(var _loc5_ in node.childNodes[_loc1_].attributes)
  1130.          {
  1131.             _loc7_[_loc5_] = node.childNodes[_loc1_].attributes[_loc5_];
  1132.          }
  1133.          break;
  1134.       }
  1135.       if(node.childNodes[_loc1_].hasChildNodes())
  1136.       {
  1137.          recusivegetLMById(node.childNodes[_loc1_],attribute,attributeValue);
  1138.       }
  1139.       _loc1_ = _loc1_ + 1;
  1140.    }
  1141.    return {texte:myText,attributs:_loc7_};
  1142. }
  1143. function getStyleLM(codeLM)
  1144. {
  1145.    var _loc8_ = "LM";
  1146.    var _loc12_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  1147.    var _loc10_ = getLMById(codeLM);
  1148.    var _loc11_ = _loc10_.texte;
  1149.    myStyle = _loc10_.attributs.style;
  1150.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.StylesTextes.StylesLM");
  1151.    var _loc6_ = {};
  1152.    var _loc14_ = 0;
  1153.    var _loc7_ = new TextFormat();
  1154.    var _loc5_ = new XML();
  1155.    var _loc13_ = "00";
  1156.    var _loc2_ = 0;
  1157.    while(_loc2_ < _loc3_.childNodes.length)
  1158.    {
  1159.       if(_loc3_.childNodes[_loc2_].attributes.id == _loc8_)
  1160.       {
  1161.          var _loc4_ = 0;
  1162.          while(_loc4_ < _loc3_.childNodes[_loc2_].childNodes.length)
  1163.          {
  1164.             _loc6_[_loc3_.childNodes[_loc2_].childNodes[_loc4_].nodeName] = _loc3_.childNodes[_loc2_].childNodes[_loc4_].firstChild.nodeValue;
  1165.             _loc4_ = _loc4_ + 1;
  1166.          }
  1167.       }
  1168.       else
  1169.       {
  1170.          if(_loc3_.childNodes[_loc2_].attributes.id == codeLM)
  1171.          {
  1172.             _loc5_ = _loc3_.childNodes[_loc2_];
  1173.             break;
  1174.          }
  1175.          if(_loc3_.childNodes[_loc2_].attributes.id == myStyle)
  1176.          {
  1177.             _loc5_ = _loc3_.childNodes[_loc2_];
  1178.             break;
  1179.          }
  1180.       }
  1181.       _loc2_ = _loc2_ + 1;
  1182.    }
  1183.    if(_loc5_.childNodes.length !== 0)
  1184.    {
  1185.       _loc4_ = 0;
  1186.       while(_loc4_ < _loc5_.childNodes.length)
  1187.       {
  1188.          _loc6_[_loc5_.childNodes[_loc4_].nodeName] = _loc5_.childNodes[_loc4_].firstChild.nodeValue;
  1189.          _loc4_ = _loc4_ + 1;
  1190.       }
  1191.    }
  1192.    _loc7_.font = _loc6_.police;
  1193.    _loc7_.size = Number(_loc6_.corps);
  1194.    _loc7_.bold = _loc6_.bold != "0" ? true : false;
  1195.    _loc7_.italic = _loc6_.italic != "0" ? true : false;
  1196.    _loc7_.underline = _loc6_.underline != "0" ? true : false;
  1197.    _loc7_.color = Number(_loc6_.couleurT);
  1198.    _loc7_.align = _loc6_.justify;
  1199.    _loc6_.textFormat = _loc7_;
  1200.    return _loc6_;
  1201. }
  1202. function GetLmTextField(lm)
  1203. {
  1204.    return lm.LM.texte;
  1205. }
  1206. function IncString(str, seuil)
  1207. {
  1208.    var _loc2_ = str.split("_");
  1209.    var _loc1_ = _loc2_.length - 1;
  1210.    var _loc3_ = Number(_loc2_[_loc1_]) + 1;
  1211.    while(_loc3_ > seuil)
  1212.    {
  1213.       _loc2_[_loc1_] = gimme2digits(0);
  1214.       _loc1_ = _loc1_ - 1;
  1215.       _loc3_ = Number(_loc2_[_loc1_]) + 1;
  1216.    }
  1217.    _loc2_[_loc1_] = gimme2digits(_loc3_);
  1218.    return _loc2_.join("_");
  1219. }
  1220. function DecString(str)
  1221. {
  1222.    var _loc1_ = str.split("_");
  1223.    trace(_loc1_);
  1224.    var _loc2_ = _loc1_.length - 1;
  1225.    trace(Number(_loc1_[_loc2_]));
  1226.    _loc1_[_loc2_] = gimme2digits(Number(_loc1_[_loc2_]) - 1);
  1227.    return _loc1_.join("_");
  1228. }
  1229. function RetourneLettreAlphabet(no)
  1230. {
  1231.    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"];
  1232.    trace("RetourneLettreAlphabet() : lettre no " + no + " :" + _loc1_[no - 1]);
  1233.    return _loc1_[no - 1];
  1234. }
  1235. function xGetConfig()
  1236. {
  1237.    trace("xGetConfig()");
  1238.    _root.xConfig = {};
  1239.    _root.xConfig.Params = {};
  1240.    _root.xConfig.Set = function(p)
  1241.    {
  1242.       if(this[p.nom] == undefined)
  1243.       {
  1244.          if(p.defaut == "OBLIGATOIRE")
  1245.          {
  1246.             trace({mess:"/!\\ERROR /!\\Param├¿tre du xml obligatoire manquant dans la balise Config: " + p.nom,group:"error"});
  1247.          }
  1248.          else
  1249.          {
  1250.             this[p.nom] = p.defaut;
  1251.             if(p.type == "number")
  1252.             {
  1253.                this[p.nom] = Number(this[p.nom]);
  1254.             }
  1255.             if(p.type == "boolean")
  1256.             {
  1257.                this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
  1258.             }
  1259.          }
  1260.       }
  1261.       else
  1262.       {
  1263.          if(p.type == "number")
  1264.          {
  1265.             this[p.nom] = Number(this[p.nom]);
  1266.          }
  1267.          if(p.type == "boolean")
  1268.          {
  1269.             this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
  1270.          }
  1271.       }
  1272.       this.Params[p.nom] = {nom:p.nom,type:p.type,desc:p.desc,valeur:this[p.nom]};
  1273.    };
  1274.    _root.xConfig.ToXml = function()
  1275.    {
  1276.       var _loc2_ = "";
  1277.       trace("");
  1278.       trace("");
  1279.       trace("");
  1280.       trace("(!)_____ xConfig en XML _______");
  1281.       trace("<Params>");
  1282.       for(var _loc3_ in this.Params)
  1283.       {
  1284.          this.Params[_loc3_].desc = this.Params[_loc3_].desc != undefined ? this.Params[_loc3_].desc : "";
  1285.          _loc2_ = "<Param nom=\"" + _loc3_ + "\" valeur=\"" + this.Params[_loc3_].valeur + "\"  desc=\"" + this.Params[_loc3_].desc + "\" /> <!-- " + this.Params[_loc3_].desc + " -->\r" + _loc2_;
  1286.       }
  1287.       trace(_loc2_);
  1288.       trace("</Params>");
  1289.       trace("(!)_____ xConfig en XML- FIN _______");
  1290.       trace("");
  1291.       trace("");
  1292.       trace("");
  1293.    };
  1294.    _root.xConfig._name = "xConfig";
  1295.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.Config.Params").childNodes;
  1296.    for(props in _loc3_)
  1297.    {
  1298.       _root.xConfig[_loc3_[props].attributes.nom] = _loc3_[props].attributes.valeur;
  1299.    }
  1300. }
  1301. function GetFilePath(fichier)
  1302. {
  1303.    var _loc2_ = AntiSlashToSlash(fichier);
  1304.    var _loc1_ = _loc2_.split("/");
  1305.    _loc1_.pop();
  1306.    return _loc1_.join("/");
  1307. }
  1308. function AntiSlashToSlash(chaine)
  1309. {
  1310.    return str_replace(chaine,"\\","/");
  1311. }
  1312. function DistancePoints(p)
  1313. {
  1314.    return Math.sqrt(Math.pow(p.x2 - p.x1,2) + Math.pow(p.y2 - p.y1,2));
  1315. }
  1316. function SetInterval(p)
  1317. {
  1318.    if(_root.INTERVAL_IDS == undefined)
  1319.    {
  1320.       _root.INTERVAL_IDS = [];
  1321.    }
  1322.    if(p.mcRef == undefined)
  1323.    {
  1324.       p.mcRef = _root;
  1325.    }
  1326.    if(p.methode == undefined)
  1327.    {
  1328.       return false;
  1329.    }
  1330.    if(p.interval == undefined)
  1331.    {
  1332.       return false;
  1333.    }
  1334.    if(p.params == undefined)
  1335.    {
  1336.       p.params = {};
  1337.    }
  1338.    var _loc3_ = setInterval(p.mcRef,p.methode,p.interval,p.params);
  1339.    _root.INTERVAL_IDS.push(_loc3_);
  1340.    return _loc3_;
  1341. }
  1342. function ClearInterval(id)
  1343. {
  1344.    clearInterval(id);
  1345.    var _loc2_ = 0;
  1346.    while(_loc2_ < _root.INTERVAL_IDS.length)
  1347.    {
  1348.       if(_root.INTERVAL_IDS[_loc2_] == id)
  1349.       {
  1350.          _root.INTERVAL_IDS.splice(_loc2_,1);
  1351.          return undefined;
  1352.       }
  1353.       _loc2_ = _loc2_ + 1;
  1354.    }
  1355. }
  1356. function ClearAllIntervals()
  1357. {
  1358.    var _loc2_ = 0;
  1359.    while(_loc2_ < _root.INTERVAL_IDS.length)
  1360.    {
  1361.       clearInterval(_root.INTERVAL_IDS[_loc2_]);
  1362.       _loc2_ = _loc2_ + 1;
  1363.    }
  1364.    _root.INTERVAL_IDS = [];
  1365. }
  1366. function ExecuterApresDelai(p)
  1367. {
  1368.    var tdep = getTimer();
  1369.    var tfin;
  1370.    var _loc3_ = "ExecuterApresDelai" + Number(++_root.ExecuterApresDelaiNo);
  1371.    var id;
  1372.    var delai = p.delai * 1000;
  1373.    var _loc4_ = p.mcRef[p.methode];
  1374.    var mcRef = p.mcRef;
  1375.    var methode = p.methode;
  1376.    var params = p.params;
  1377.    _root[_loc3_] = function()
  1378.    {
  1379.       tfin = getTimer();
  1380.       if(tfin - tdep >= delai)
  1381.       {
  1382.          ClearInterval(id);
  1383.          mcRef[methode](params);
  1384.       }
  1385.    };
  1386.    id = SetInterval({methode:_loc3_,interval:p.delai});
  1387.    return id;
  1388. }
  1389. function str_replace(str, search, replace)
  1390. {
  1391.    return str.split(search).join(replace);
  1392. }
  1393. function JoindreObjets(objects)
  1394. {
  1395.    var _loc2_ = new Object();
  1396.    var _loc1_ = 0;
  1397.    while(_loc1_ < objects.length)
  1398.    {
  1399.       p1 = objects[_loc1_];
  1400.       for(props in p1)
  1401.       {
  1402.          _loc2_[props] = p1[props];
  1403.       }
  1404.       _loc1_ = _loc1_ + 1;
  1405.    }
  1406.    return _loc2_;
  1407. }
  1408. function GetOriginalSize(mc)
  1409. {
  1410.    var _loc2_ = mc._rotation;
  1411.    mc._rotation = 0;
  1412.    var _loc3_ = {w:mc._width * mc._xscale / 100,h:mc._height * mc._yscale / 100};
  1413.    mc._rotation = _loc2_;
  1414.    return _loc3_;
  1415. }
  1416. function GetOriginalWidth(mc)
  1417. {
  1418.    var _loc2_ = mc._rotation;
  1419.    mc._rotation = 0;
  1420.    var _loc3_ = mc._width * mc._xscale / 100;
  1421.    var _loc4_ = mc._height * mc._yscale / 100;
  1422.    mc._rotation = _loc2_;
  1423.    return _loc3_;
  1424. }
  1425. function GetOriginalHeight(mc)
  1426. {
  1427.    var _loc2_ = mc._rotation;
  1428.    mc._rotation = 0;
  1429.    var _loc4_ = mc._width * mc._xscale / 100;
  1430.    var _loc3_ = mc._height * mc._yscale / 100;
  1431.    mc._rotation = _loc2_;
  1432.    return _loc3_;
  1433. }
  1434. function CreerCache(p)
  1435. {
  1436.    var _loc4_ = p.level != undefined ? p.level : _global.Levels.cache;
  1437.    var _loc2_ = p.mc.createEmptyMovieClip("CACHE",_loc4_);
  1438.    _loc2_.beginFill(65280,50);
  1439.    _loc2_.moveTo(0,0);
  1440.    _loc2_.lineTo(p.width,0);
  1441.    _loc2_.lineTo(p.width,p.height);
  1442.    _loc2_.lineTo(0,p.height);
  1443.    _loc2_.lineTo(0,0);
  1444.    _loc2_.endFill();
  1445.    p.mc.setMask(_loc2_);
  1446. }
  1447. function ConvertCoord(mc_src, mc_dest)
  1448. {
  1449.    var _loc1_ = {x:0,y:0};
  1450.    mc_src.localToGlobal(_loc1_);
  1451.    mc_dest.globalToLocal(_loc1_);
  1452.    return _loc1_;
  1453. }
  1454. function getGlobalCoord(xc, yc, mc)
  1455. {
  1456.    var _loc1_ = {x:xc * 100 / mc._xscale,y:yc * 100 / mc._yscale};
  1457.    mc.localToGlobal(_loc1_);
  1458.    return _loc1_;
  1459. }
  1460. function getLocalCoord(xc, yc, mc)
  1461. {
  1462.    var _loc1_ = new Object({x:xc,y:yc});
  1463.    mc.globalToLocal(_loc1_);
  1464.    _loc1_.x = _loc1_.x / 100 * mc._xscale;
  1465.    _loc1_.y = _loc1_.y / 100 * mc._yscale;
  1466.    return _loc1_;
  1467. }
  1468. function length_ass(arr)
  1469. {
  1470.    var _loc1_ = 0;
  1471.    for(prop in arr)
  1472.    {
  1473.       _loc1_ = _loc1_ + 1;
  1474.    }
  1475.    return _loc1_;
  1476. }
  1477. function ExplodeString(chaine)
  1478. {
  1479.    var _loc3_ = new Array();
  1480.    var _loc1_ = 0;
  1481.    while(_loc1_ < chaine.length)
  1482.    {
  1483.       _loc3_.push(chaine.charAt(_loc1_));
  1484.       _loc1_ = _loc1_ + 1;
  1485.    }
  1486.    return _loc3_;
  1487. }
  1488. function TrimString(chaine)
  1489. {
  1490.    var _loc3_ = "";
  1491.    var _loc5_ = "";
  1492.    var _loc2_ = false;
  1493.    var _loc1_ = 0;
  1494.    while(_loc1_ < chaine.length)
  1495.    {
  1496.       if(chaine.charAt(_loc1_) != " ")
  1497.       {
  1498.          _loc2_ = true;
  1499.       }
  1500.       if(_loc2_ == true)
  1501.       {
  1502.          _loc3_ += chaine.charAt(_loc1_);
  1503.       }
  1504.       _loc1_ = _loc1_ + 1;
  1505.    }
  1506.    _loc2_ = false;
  1507.    _loc1_ = _loc3_.length - 1;
  1508.    while(_loc1_ >= 0)
  1509.    {
  1510.       if(_loc3_.charAt(_loc1_) != " ")
  1511.       {
  1512.          _loc2_ = true;
  1513.       }
  1514.       if(_loc2_ == true)
  1515.       {
  1516.          _loc5_ = _loc3_.charAt(_loc1_) + _loc5_;
  1517.       }
  1518.       _loc1_ = _loc1_ - 1;
  1519.    }
  1520.    return _loc5_;
  1521. }
  1522. function BloquerActives()
  1523. {
  1524.    if(_global.ClipBloquant == undefined)
  1525.    {
  1526.       var _loc0_ = null;
  1527.       var _loc3_ = _global.ClipBloquant = _root.createEmptyMovieClip("ClipBloquant",12123);
  1528.       _loc3_.attachMovie("ClipInvisible","ClipInvisible",2);
  1529.       _loc3_._width = Stage.width;
  1530.       _loc3_._height = Stage.height;
  1531.       _loc3_._x = 0;
  1532.       _loc3_._y = 0;
  1533.       _loc3_.useHandCursor = false;
  1534.       _loc3_.onPress = function()
  1535.       {
  1536.       };
  1537.    }
  1538. }
  1539. function DebloquerActives()
  1540. {
  1541.    if(_global.ClipBloquant != undefined)
  1542.    {
  1543.       _global.ClipBloquant.removeMovieClip();
  1544.       _global.ClipBloquant = undefined;
  1545.    }
  1546. }
  1547. function afficheLM_x2(p)
  1548. {
  1549.    viderLM_x2();
  1550.    _root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x,Y:p.LMrep._y,width:p.LMrep._width,height:p.LMrep._height});
  1551.    LMaVider2.push(p);
  1552. }
  1553. function viderLM_x2()
  1554. {
  1555.    var _loc3_ = 0;
  1556.    while(_loc3_ < _global.LMaVider2.length)
  1557.    {
  1558.       _root.gereTextes.masqueLM(_global.LMaVider2[_loc3_]);
  1559.       _loc3_ = _loc3_ + 1;
  1560.    }
  1561. }
  1562. function afficheLM_x(p)
  1563. {
  1564.    _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});
  1565.    _global.LMaVider.push(p);
  1566. }
  1567. function viderLM_x()
  1568. {
  1569.    var _loc3_ = 0;
  1570.    while(_loc3_ < _global.LMaVider.length)
  1571.    {
  1572.       _root.gereTextes.masqueLM(_global.LMaVider[_loc3_]);
  1573.       _loc3_ = _loc3_ + 1;
  1574.    }
  1575. }
  1576. function ConvertMcToArray(p)
  1577. {
  1578.    xtrace("Convertion du bitmap en tableau de nombres");
  1579.    var _loc3_ = p.mc;
  1580.    var _loc5_ = _loc3_._rotation;
  1581.    _loc3_._rotation = 0;
  1582.    var _loc1_ = _loc3_._width * 100 / _loc3_._xscale;
  1583.    var _loc4_ = _loc3_._height * 100 / _loc3_._yscale;
  1584.    _loc3_._rotation = _loc5_;
  1585.    _loc3_.MCwidth = _loc1_;
  1586.    _loc3_.MCheight = _loc4_;
  1587.    xtrace("WH " + _loc1_ + " " + _loc4_);
  1588.    var _loc2_ = new flash.display.BitmapData(_loc1_,_loc4_,true,0);
  1589.    _loc2_.draw(_loc3_);
  1590.    var _loc6_ = new Array();
  1591.    lv = new LoadVars();
  1592.    lv.tab = new Array();
  1593.    i = 0;
  1594.    while(i < _loc4_)
  1595.    {
  1596.       j = 0;
  1597.       while(j < _loc1_)
  1598.       {
  1599.          lv.tab.push(_loc2_.getPixel(j,i));
  1600.          j++;
  1601.       }
  1602.       i++;
  1603.    }
  1604.    return lv.tab;
  1605. }
  1606. function ConvertMcToBitmap(p)
  1607. {
  1608.    var _loc1_ = p.mc;
  1609.    var _loc2_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16777215);
  1610.    _loc2_.draw(_loc1_,_loc1_.transform.matrix);
  1611.    _loc1_._parent.createEmptyMovieClip(_loc1_._name,_loc1_.getDepth());
  1612.    _loc1_.attachBitmap(_loc2_,2,"always",true);
  1613. }
  1614. function CloneMcToBitmap(p)
  1615. {
  1616.    var _loc1_ = p.mc;
  1617.    var _loc9_ = p.pere;
  1618.    var _loc8_ = p.nom;
  1619.    var _loc5_ = p.level;
  1620.    trace("-*-*-* " + _loc1_._width + " " + _loc1_._height);
  1621.    var _loc7_ = _loc1_._x;
  1622.    var _loc6_ = _loc1_._y;
  1623.    _loc1_._x = 0;
  1624.    _loc1_._y = 0;
  1625.    var _loc4_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16755370);
  1626.    trace(_loc1_.transform.matrix.toString());
  1627.    var _loc2_ = _loc9_.createEmptyMovieClip(_loc8_,_loc5_);
  1628.    _loc2_._visible = false;
  1629.    _loc2_.attachBitmap(_loc4_,2,"auto",true);
  1630.    _loc4_.draw(_loc1_,_loc1_.transform.matrix);
  1631.    _loc1_._x = _loc7_;
  1632.    _loc1_._y = _loc6_;
  1633.    trace("CloneMcToBitmap" + _loc2_);
  1634.    return _loc2_;
  1635. }
  1636. function trace_obj(obj)
  1637. {
  1638.    trace("\r________________" + obj + "________________");
  1639.    for(var _loc2_ in obj)
  1640.    {
  1641.       trace(_loc2_ + " = " + obj[_loc2_]);
  1642.    }
  1643.    trace("\r_______________________________________");
  1644. }
  1645. function xtrace_mc(obj)
  1646. {
  1647.    trace("\r________________" + obj + "________________");
  1648.    trace("_x : " + obj._x);
  1649.    trace("_y : " + obj._y);
  1650.    trace("_width : " + obj._width);
  1651.    trace("_height : " + obj._height);
  1652.    trace("_level : " + obj.getDepth());
  1653.    for(var _loc2_ in obj)
  1654.    {
  1655.       trace(_loc2_ + " = " + obj[_loc2_]);
  1656.    }
  1657.    trace("\r_______________________________________");
  1658. }
  1659. function EnvoiVersServeur()
  1660. {
  1661.    _amfphp_.Call({url:_root.xConfig.GatewayUrl,mc:this,service:_root.xConfig.Service,fonction:"Save",params:{PSEUDO:escape(MEMO.PSEUDO),EMAIL:escape(MEMO.EMAIL),TITRE:escape(MEMO.TITRE),XML:escape(PARAMS_ATELIER.Texte),PARAMS:PARAMS_ATELIER.FonteFamille + "," + PARAMS_ATELIER.FonteSize + "," + PARAMS_ATELIER.FonteCouleur + "," + PARAMS_ATELIER.FonteBold + "," + PARAMS_ATELIER.FonteItalic + "," + PARAMS_ATELIER.NoPapier},retour:"EnvoiVersServeurRetour"});
  1662. }
  1663. function xlisteObj(p)
  1664. {
  1665.    trace("_________________________________________________");
  1666.    for(props in p)
  1667.    {
  1668.       trace(props + " = " + p[props]);
  1669.    }
  1670.    trace("_________________________________________________");
  1671. }
  1672. function EnvoiVersServeurRetour(p)
  1673. {
  1674.    trace("EnvoiVersServeurRetour : ");
  1675.    xlisteObj(p);
  1676.    xlisteObj(p.resultat);
  1677.    if(p.resultat != undefined)
  1678.    {
  1679.       trace("R├â┬⌐ponse du serveur: " + p.resultat);
  1680.    }
  1681.    else
  1682.    {
  1683.       var _loc2_ = "\r\r______________ \r /!\\ERREUR : ";
  1684.       _loc2_ += "\r " + p.erreur.faultstring;
  1685.       _loc2_ += "\r code : " + p.erreur.faultcode;
  1686.       _loc2_ += "\r detail : " + p.erreur.detail;
  1687.       _loc2_ += "\r error classe name : " + p.erreur.type;
  1688.       _loc2_ += "\r Cliquer sur \"Envoyer\" pour envoyer un message test au serveur.";
  1689.       trace("erreur : " + _loc2_);
  1690.    }
  1691.    DIALOG_BOX_WEB.AfficheSucces();
  1692. }
  1693. function StopAll()
  1694. {
  1695.    _o_.StopAll();
  1696.    mod.viewer1.StopAll();
  1697.    mod.viewer2.StopAll();
  1698.    mod.viewer3.StopAll();
  1699.    mod.viewer4.StopAll();
  1700.    mod.viewer5.StopAll();
  1701.    DebloquerActives();
  1702.    Mouse.show();
  1703. }
  1704. function ModulePause()
  1705. {
  1706. }
  1707. function ModuleResume()
  1708. {
  1709. }
  1710. function InitChoixPartie(mc)
  1711. {
  1712.    mc.CouleurOri = mc.LM.texte.textColor;
  1713.    if(mc._name == "LM_MEM_01")
  1714.    {
  1715.       mc.No = 1;
  1716.    }
  1717.    else
  1718.    {
  1719.       mc.No = 2;
  1720.    }
  1721.    mc.onPress = function()
  1722.    {
  1723.       trace("onPress : " + onPress);
  1724.       this.LM.texte.textColor = String(this.CouleurOri);
  1725.       if(this.No == 1)
  1726.       {
  1727.          _root.CHOIX_PARTIE._visible = false;
  1728.          _root.gotoAndStop("ATELIER");
  1729.       }
  1730.       else
  1731.       {
  1732.          _root.CHOIX_PARTIE._visible = false;
  1733.          NewMemo();
  1734.          _root.gotoAndStop("GENERIQUE");
  1735.       }
  1736.    };
  1737.    mc.onRollOver = function()
  1738.    {
  1739.       _root.joueBruitage({nomSon:"B_LM_0" + this.No});
  1740.       this.LM.texte.textColor = String(this.couleurRollT);
  1741.    };
  1742.    mc.onRollOut = function()
  1743.    {
  1744.       this.LM.texte.textColor = String(this.CouleurOri);
  1745.    };
  1746. }
  1747. function INIT()
  1748. {
  1749.    trace("(!)____mod_.INIT : ");
  1750.    xGetConfig();
  1751.    _root.xConfig.Set({nom:"GatewayUrl",defaut:"http://www.mobiclic.com/_backendCDS/amfphp/gateway.php",desc:""});
  1752.    _root.xConfig.Set({nom:"Service",defaut:"CD_" + _root.gModuleName.split("_")[0] + "_Connection",desc:""});
  1753.    _root.xConfig.Set({nom:"BanquesTypes",defaut:"swf,swf,swf,swf,lm",desc:""});
  1754.    _root.xConfig.Set({nom:"Vitesse1Cran",defaut:0.5,type:"number",desc:"Vitesse de d├⌐filement des ├⌐l├⌐ments 1 ├á 1"});
  1755.    _root.xConfig.Set({nom:"VitesseSlideMin",defaut:1,type:"number",desc:"Vitesse mini de d├⌐filement des ├⌐l├⌐ments avec la manette"});
  1756.    _root.xConfig.Set({nom:"VitesseSlideMax",defaut:0.1,type:"number",desc:"Vitesse max de d├⌐filement des ├⌐l├⌐ments avec la manette"});
  1757.    _root.xConfig.Set({nom:"DureeSlide",defaut:5,type:"number",desc:"Dur├⌐e du d├⌐filement (secondes)"});
  1758.    _root.xConfig.Set({nom:"LancersEcart",defaut:0.5,type:"number",desc:"d├⌐lai en secondes entre les lancers des banques"});
  1759.    _root.xConfig.Set({nom:"TaillePoliceLimites",defaut:"5,40",desc:"mini et max des taille de la fonte"});
  1760.    _root.xConfig.Set({nom:"ModeTexteBloquage",defaut:"3",type:"number",desc:"1: pas de bloquage, 2: bloquage, 3: auto-redimensionnement de la fonte"});
  1761.    _root.gLabelStartName = HOTE.LocalConfig.gLabelStartName;
  1762.    FONTES_LISTE = _root.moduleInfo.returnNodeByPath("Module.Config.Fontes").firstChild.nodeValue.split(",");
  1763.    var _loc3_ = 0;
  1764.    while(_loc3_ < FONTES_LISTE.length)
  1765.    {
  1766.       FONTES_LISTE[_loc3_] = TrimString(FONTES_LISTE[_loc3_]);
  1767.       _loc3_ = _loc3_ + 1;
  1768.    }
  1769.    FONTE_DEFAUT = {};
  1770.    var _loc4_ = _root.moduleInfo.returnNodeByPath("Module.Config.PremiereFonte");
  1771.    for(var _loc7_ in _loc4_.attributes)
  1772.    {
  1773.       trace(_loc7_ + " : " + _loc4_.attributes[_loc7_]);
  1774.       FONTE_DEFAUT[_loc7_] = _loc4_.attributes[_loc7_];
  1775.    }
  1776.    var _loc8_ = _root.xConfig.TaillePoliceLimites.split(",");
  1777.    TAILLE_FONTE_LIMITE = {min:Number(_loc8_[0]),max:Number(_loc8_[1])};
  1778.    COULEUR_LISTE = _root.moduleInfo.returnNodeByPath("Module.Config.Couleurs").firstChild.nodeValue.split(",");
  1779.    _loc3_ = 0;
  1780.    while(_loc3_ < COULEUR_LISTE.length)
  1781.    {
  1782.       COULEUR_LISTE[_loc3_] = TrimString(COULEUR_LISTE[_loc3_]);
  1783.       _loc3_ = _loc3_ + 1;
  1784.    }
  1785.    _root.CHOIX_PARTIE.swapDepths(7000);
  1786.    _root.CHOIX_PARTIE._visible = false;
  1787.    _root.CHOIX_PARTIE.FOND.onPress = function()
  1788.    {
  1789.    };
  1790.    _root.CHOIX_PARTIE.FOND.useHandCursor = false;
  1791.    _root.gereTextes.afficheLM({mc:_root.CHOIX_PARTIE,codeLM:"LM_MEM_01"});
  1792.    _root.gereTextes.afficheLM({mc:_root.CHOIX_PARTIE,codeLM:"LM_MEM_02"});
  1793.    FlashCookie = SharedObject.getLocal("MOBICLIC_" + _root.gModuleName,"/");
  1794.    var _loc9_ = FlashCookie.getSize() != 0 && Boolean(FlashCookie.data.newGame) == false;
  1795.    if(_loc9_)
  1796.    {
  1797.       trace("partie_existante : " + _loc9_);
  1798.       LoadCookie();
  1799.    }
  1800.    else
  1801.    {
  1802.       NewMemo();
  1803.    }
  1804.    if(this.SlideViewerInitOk != true)
  1805.    {
  1806.       this.SlideViewerInitOk = true;
  1807.       BanksInit();
  1808.       SlideViewerInit(1);
  1809.       SlideViewerInit(2);
  1810.       SlideViewerInit(3);
  1811.       SlideViewerInit(4);
  1812.       SlideViewerInit(5);
  1813.    }
  1814.    DIALOG_BOX_WEB = {create:function()
  1815.    {
  1816.       function init()
  1817.       {
  1818.          FENETRE._visible = false;
  1819.          FENETRE.swapDepths(25630);
  1820.          _root.gereTextes.afficheLM({codeLM:"LM_DB_WEB_SUCCES",mc:FENETRE});
  1821.          for(var _loc3_ in LMS)
  1822.          {
  1823.             _root.gereTextes.afficheLM({codeLM:LMS[_loc3_],mc:FENETRE.DG});
  1824.          }
  1825.          FENETRE.DG[LMS.PRENOM].LM.texte.type = "input";
  1826.          FENETRE.DG[LMS.PRENOM].LM.texte.selectable = true;
  1827.          FENETRE.DG[LMS.PRENOM].TexteOri = FENETRE.DG[LMS.PRENOM].LM.texte.text;
  1828.          FENETRE.DG[LMS.TITRE].LM.texte.type = "input";
  1829.          FENETRE.DG[LMS.TITRE].LM.texte.selectable = true;
  1830.          FENETRE.DG[LMS.EMAIL].LM.texte.type = "input";
  1831.          FENETRE.DG[LMS.EMAIL].LM.texte.selectable = true;
  1832.          FENETRE.DG[LMS.EMAIL].TexteOri = FENETRE.DG[LMS.EMAIL].LM.texte.text;
  1833.          InitMC({mc:FENETRE.DG.BTN_FERMER,OnPress:function()
  1834.          {
  1835.             Fermer();
  1836.          }});
  1837.          InitMC({mc:FENETRE.DG.BTN_OUI,OnPress:function()
  1838.          {
  1839.             if(FENETRE.DG[LMS.PRENOM].LM.texte.text != "" && FENETRE.DG[LMS.PRENOM].LM.texte.text != FENETRE.DG[LMS.PRENOM].TexteOri && FENETRE.DG[LMS.EMAIL].LM.texte.text != "" && FENETRE.DG[LMS.EMAIL].LM.texte.text != FENETRE.DG[LMS.EMAIL].TexteOri)
  1840.             {
  1841.                MEMO.PSEUDO = FENETRE.DG[LMS.PRENOM].LM.texte.text;
  1842.                MEMO.EMAIL = FENETRE.DG[LMS.EMAIL].LM.texte.text;
  1843.                MEMO.TITRE = FENETRE.DG[LMS.TITRE].LM.texte.text;
  1844.                FENETRE.DG._visible = false;
  1845.                EnvoiVersServeur();
  1846.             }
  1847.          }});
  1848.          InitMC({mc:FENETRE.DG.BTN_NON,OnPress:function()
  1849.          {
  1850.             Fermer();
  1851.          }});
  1852.       }
  1853.       function Afficher()
  1854.       {
  1855.          FENETRE.DG._visible = true;
  1856.          FENETRE.LM_DB_WEB_SUCCES._visible = false;
  1857.          FENETRE.FOND.onPress = function()
  1858.          {
  1859.          };
  1860.          FENETRE.FOND.useHandCursor = false;
  1861.          FENETRE._visible = true;
  1862.       }
  1863.       function Fermer()
  1864.       {
  1865.          FENETRE._visible = false;
  1866.       }
  1867.       function AfficheSucces()
  1868.       {
  1869.          FENETRE.LM_DB_WEB_SUCCES._visible = true;
  1870.          FENETRE.FOND.onPress = function()
  1871.          {
  1872.             DIALOG_BOX_WEB.Fermer();
  1873.          };
  1874.          FENETRE.FOND.useHandCursor = true;
  1875.       }
  1876.       var FENETRE = _root.DIALOG_BOX_WEB;
  1877.       var LMS = {PRENOM:"LM_DB_WEB_PRENOM",TITRE:"LM_DB_WEB_TITRE",EMAIL:"LM_DB_WEB_EMAIL",MESSAGE:"LM_DB_WEB_MESSAGE",MESSAGE2:"LM_DB_WEB_MESSAGE2",OUI:"LM_DB_WEB_OUI",NON:"LM_DB_WEB_NON"};
  1878.       this.Afficher = Afficher;
  1879.       this.Fermer = Fermer;
  1880.       this.AfficheSucces = AfficheSucces;
  1881.       init();
  1882.    }};
  1883.    DIALOG_BOX_WEB.create();
  1884.    TexteAjuste();
  1885.    _root.xConfig.ToXml();
  1886.    _root.InitOk();
  1887. }
  1888. function START()
  1889. {
  1890.    if(MEMO.newGame == true)
  1891.    {
  1892.       _root.gotoAndStop("GENERIQUE");
  1893.    }
  1894.    else
  1895.    {
  1896.       _root.gBlockMusic = undefined;
  1897.       _root.changeMusicOn(0);
  1898.       _root.changeMusicOn(1);
  1899.       _root.CHOIX_PARTIE._visible = true;
  1900.    }
  1901. }
  1902. function GENERIQUE()
  1903. {
  1904.    _root.zapIntro("_01");
  1905.    _root.changeMusicOn(0);
  1906.    _root.FinB_Jingle = function()
  1907.    {
  1908.       _root.gotoAndStop("_01");
  1909.    };
  1910.    _root.joueBruitage({nomSon:"B_JINGLE",actionFin:"FinB_Jingle"});
  1911. }
  1912. function ATTENTE()
  1913. {
  1914.    BT_AIDE_Init("ATTENTE");
  1915.    _root.gereTextes.masqueLM({codeLM:"LM_TEXTE"});
  1916.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_01"});
  1917.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_02"});
  1918.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_03"});
  1919.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_04"});
  1920.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_05"});
  1921.    _root.GEN_LM.swapDepths(9000);
  1922.    _root.ZONE_CACHE_01.swapDepths(8001);
  1923.    _root.ZONE_CACHE_02.swapDepths(8002);
  1924.    _root.ZONE_CACHE_03.swapDepths(8003);
  1925.    _root.ZONE_CACHE_04.swapDepths(8004);
  1926.    _root.ZONE_CACHE_05.swapDepths(8005);
  1927.    _root.FEUILLE.removeMovieClip();
  1928.    _root.GEN_LM_AT.removeMovieClip();
  1929.    _root.AT_REP_ZONE_01.removeMovieClip();
  1930.    _root.AT_REP_ZONE_02.removeMovieClip();
  1931.    _root.AT_REP_ZONE_03.removeMovieClip();
  1932.    _root.AT_REP_ZONE_04.removeMovieClip();
  1933.    _root.AT_REP_ZONE_05.removeMovieClip();
  1934.    _root.ZONE_CACHE_AT.removeMovieClip();
  1935.    GenerateursSlideViewerInit();
  1936.    _root.MANETTE_ZONE._visible = false;
  1937.    _root.REP_MANETTE._alpha = 0;
  1938.    InitMC({mc:_root.REP_MANETTE,fonction:"slider",DragZoneHauteur:_root.MANETTE_ZONE._height,son:"B_MAN02",sonOnMove:"B_MAN03",IB:"IB_MAN"});
  1939.    _root.REP_MANETTE.OnRollOver = function()
  1940.    {
  1941.       _root.MANETTE.gotoAndStop("E2");
  1942.    };
  1943.    _root.REP_MANETTE.OnRollOut = function()
  1944.    {
  1945.       _root.MANETTE.gotoAndStop("E1");
  1946.    };
  1947.    _root.REP_MANETTE.OnPress = function()
  1948.    {
  1949.       _root.MANETTE.gotoAndStop("E3");
  1950.       _global.CURSEUR._visible = false;
  1951.    };
  1952.    _root.REP_MANETTE.OnRelease = _root.REP_MANETTE.OnReleaseOutside = function()
  1953.    {
  1954.       if(this.FrameManette > 2)
  1955.       {
  1956.          this.Desactiver();
  1957.          _root.MANETTE.gotoAndStop("E4");
  1958.          _global.CURSEUR._visible = true;
  1959.          _root.MANETTE.MANETTE.gotoAndPlay(7 - this.FrameManette);
  1960.          gereCursor("fleche");
  1961.          _root.joueBruitage({nomSon:"B_MAN04"});
  1962.          this.SetPositionY(0);
  1963.       }
  1964.       else
  1965.       {
  1966.          _global.CURSEUR._visible = true;
  1967.          _root.MANETTE.gotoAndStop("E1");
  1968.       }
  1969.    };
  1970.    _root.REP_MANETTE.PendantSlide = function()
  1971.    {
  1972.       this.FrameManette = Math.floor(6 * this.GetPositionY() / 100) + 1;
  1973.       _root.MANETTE.MANETTE.gotoAndStop(this.FrameManette);
  1974.    };
  1975.    InitMC({mc:_root.BT_ATELIER,OnPress:function()
  1976.    {
  1977.       trace("OnPress : " + MEMO.newGame + " " + mod.IntroAtelierDejaVue);
  1978.       if(MEMO.newGame == true && mod.IntroAtelierDejaVue != true)
  1979.       {
  1980.          mod.IntroAtelierDejaVue = true;
  1981.          _root.gotoAndStop("AT_01");
  1982.       }
  1983.       else
  1984.       {
  1985.          _root.gotoAndStop("ATELIER");
  1986.       }
  1987.    },son:"B_AT",IB:"IB_AT"});
  1988.    if(mod.ElementsChanged != true && MEMO.newGame == true)
  1989.    {
  1990.       _root.BT_ATELIER.Desactiver();
  1991.       _root.BT_ATELIER.gotoAndStop("E0");
  1992.    }
  1993.    else
  1994.    {
  1995.       _root.BT_ATELIER.Activer();
  1996.       _root.BT_ATELIER.gotoAndStop("E1");
  1997.    }
  1998.    if(this.ATTENTE_DEJA_JOUE != true && partie_existante == true)
  1999.    {
  2000.       _root.CHOIX_PARTIE._visible = true;
  2001.    }
  2002.    this.ATTENTE_DEJA_JOUE = true;
  2003. }
  2004. function ATELIER()
  2005. {
  2006.    DebloquerActives();
  2007.    if(_root.gMusic == 0)
  2008.    {
  2009.       _root.changeMusicOn(1);
  2010.    }
  2011.    BT_AIDE_Init("ATELIER");
  2012.    _root.GEN_LM.removeMovieClip();
  2013.    _root.ZONE_CACHE_01.removeMovieClip();
  2014.    _root.ZONE_CACHE_02.removeMovieClip();
  2015.    _root.ZONE_CACHE_03.removeMovieClip();
  2016.    _root.ZONE_CACHE_04.removeMovieClip();
  2017.    _root.ZONE_CACHE_05.removeMovieClip();
  2018.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_01_AT"});
  2019.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_02_AT"});
  2020.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_03_AT"});
  2021.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_04_AT"});
  2022.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_05_AT"});
  2023.    _root.gereTextes.afficheLM({mc:_root.LM_TEXTE,codeLM:"LM_TEXTE"});
  2024.    _root.FEUILLE.swapDepths(14527);
  2025.    _root.GEN_LM_AT.swapDepths(9004);
  2026.    _root.ZONE_CACHE_AT.swapDepths(9002);
  2027.    if(PARAMS_ATELIER.Texte != "")
  2028.    {
  2029.       _root.LM_TEXTE._visible = false;
  2030.    }
  2031.    TEXTE = _root.FEUILLE.TEXTE;
  2032.    PALETTE_TEXTE = _root.PALETTE_TEXTE;
  2033.    _root.MASK_ZONE_01.removeMovieClip();
  2034.    _root.MASK_ZONE_02.removeMovieClip();
  2035.    _root.MASK_ZONE_03.removeMovieClip();
  2036.    _root.MASK_ZONE_04.removeMovieClip();
  2037.    _root.MASK_ZONE_05.removeMovieClip();
  2038.    PaletteInit();
  2039.    AtelierSlideViewerInit(1);
  2040.    AtelierSlideViewerInit(2);
  2041.    AtelierSlideViewerInit(3);
  2042.    AtelierSlideViewerInit(4);
  2043.    AtelierSlideViewerInit(5);
  2044.    InitMC({mc:_root.BT_RET,OnPress:function()
  2045.    {
  2046.       _root.gotoAndStop("ATTENTE");
  2047.    },son:"B_RET",IB:"IB_RET"});
  2048.    InitMC({mc:_root.BT_WEB,OnPress:function()
  2049.    {
  2050.       DIALOG_BOX_WEB.Afficher();
  2051.       trace("DIALOG_BOX_WEB.Afficher : " + DIALOG_BOX_WEB.Afficher);
  2052.    },son:"B_WEB",IB:"IB_WEB"});
  2053.    InitMC({mc:_root.BT_IMP,OnPress:function()
  2054.    {
  2055.       var _loc3_ = _root.creerRectangle({pere:_root,level:14526,alpha:100,couleur:16777215,w:800,h:600});
  2056.       _loc3_.onPress = function()
  2057.       {
  2058.       };
  2059.       _loc3_.useHandCursor = false;
  2060.       TEXTE_TEMP.removeTextField();
  2061.       TEXTE.autoSize = false;
  2062.       TEXTE._height = 411;
  2063.       _root.focusManager.setFocus(_root.BT_IMP);
  2064.       _root.FEUILLE.posOri = {x:_root.FEUILLE._x,y:_root.FEUILLE._y,w:_root.FEUILLE._width,h:_root.FEUILLE._height};
  2065.       var _loc4_ = 800 / _root.FEUILLE._height;
  2066.       _root.FEUILLE._width *= _loc4_;
  2067.       _root.FEUILLE._height = 800;
  2068.       _root.FEUILLE._rotation = -90;
  2069.       _root.FEUILLE._x = 400 - _root.FEUILLE._width / 2;
  2070.       _root.FEUILLE._y = 300 + _root.FEUILLE._height / 2;
  2071.       if(_global.HOTE.ImprimerEcran())
  2072.       {
  2073.          _root.FEUILLE._x = _root.FEUILLE.posOri.x;
  2074.          _root.FEUILLE._y = _root.FEUILLE.posOri.y;
  2075.          _root.FEUILLE._rotation = 0;
  2076.          _root.FEUILLE._width = _root.FEUILLE.posOri.w;
  2077.          _root.FEUILLE._height = _root.FEUILLE.posOri.h;
  2078.          if(_root.xConfig.ModeTexteBloquage == 1)
  2079.          {
  2080.             TEXTE.autoSize = "left";
  2081.          }
  2082.          else
  2083.          {
  2084.             TEXTE.autoSize = false;
  2085.          }
  2086.       }
  2087.       else
  2088.       {
  2089.          _root.FEUILLE._x = _root.FEUILLE.posOri.x;
  2090.          _root.FEUILLE._y = _root.FEUILLE.posOri.y;
  2091.          _root.FEUILLE._rotation = 0;
  2092.          _root.FEUILLE._width = _root.FEUILLE.posOri.w;
  2093.          _root.FEUILLE._height = _root.FEUILLE.posOri.h;
  2094.          if(_root.xConfig.ModeTexteBloquage == 1)
  2095.          {
  2096.             TEXTE.autoSize = "left";
  2097.          }
  2098.          else
  2099.          {
  2100.             TEXTE.autoSize = false;
  2101.          }
  2102.       }
  2103.       _loc3_.removeMovieClip();
  2104.    },son:"B_IMP",IB:"IB_IMP"});
  2105.    if(PARAMS_ATELIER.Texte == "" || MEMO.newGame == true)
  2106.    {
  2107.       _root.BT_WEB.Desactiver();
  2108.       _root.BT_WEB.gotoAndStop("E0");
  2109.       _root.BT_IMP.Desactiver();
  2110.       _root.BT_IMP.gotoAndStop("E0");
  2111.    }
  2112.    else
  2113.    {
  2114.       _root.BT_WEB.Activer();
  2115.       _root.BT_WEB.gotoAndStop("E1");
  2116.       _root.BT_IMP.Activer();
  2117.       _root.BT_IMP.gotoAndStop("E1");
  2118.    }
  2119. }
  2120. function TexteAjuste()
  2121. {
  2122.    if(TEXTE_TEMP == undefined)
  2123.    {
  2124.       TEXTE_TEMP = _root.FEUILLE.createTextField("TEXTE_TEMP",19234,-200,0,10,10);
  2125.       TEXTE_TEMP.embedFonts = true;
  2126.       TEXTE_TEMP.border = true;
  2127.       TEXTE_TEMP.type = "dynamic";
  2128.       TEXTE_TEMP.antiAliasType = "advanced";
  2129.       TEXTE_TEMP.selectable = false;
  2130.       TEXTE_TEMP.autoSize = true;
  2131.       TEXTE_TEMP.multiline = true;
  2132.       TEXTE_TEMP.wordWrap = true;
  2133.       TEXTE_TEMP.text = "";
  2134.       TEXTE_TEMP._visible = false;
  2135.    }
  2136.    TEXTE_TEMP._y = TEXTE._y;
  2137.    TEXTE_TEMP._width = TEXTE._width;
  2138.    TEXTE_TEMP.text = PARAMS_ATELIER.Texte;
  2139.    TEXTE_TEMP.setTextFormat(PARAMS_ATELIER.FormatText);
  2140. }
  2141. function Load()
  2142. {
  2143. }
  2144. function NewMemo()
  2145. {
  2146.    MEMO = {newGame:true};
  2147.    var _loc4_ = _root.getTextById("LM_TEXTE");
  2148.    PARAMS_ATELIER = {};
  2149.    PARAMS_ATELIER.Texte = "";
  2150.    PARAMS_ATELIER.FormatText = new TextFormat();
  2151.    PARAMS_ATELIER.FormatTextTaille = new TextFormat();
  2152.    PARAMS_ATELIER.FormatTextTaille.font = "Times New Roman";
  2153.    PARAMS_ATELIER.FormatTextFamille = new TextFormat();
  2154.    PARAMS_ATELIER.FormatTextFamille.size = 14;
  2155.    PARAMS_ATELIER.FonteFamille = 1;
  2156.    PARAMS_ATELIER.FonteCouleur = 1;
  2157.    var _loc2_ = 0;
  2158.    while(_loc2_ < FONTES_LISTE.length)
  2159.    {
  2160.       if(FONTES_LISTE[_loc2_] == FONTE_DEFAUT.font)
  2161.       {
  2162.          PARAMS_ATELIER.FonteFamille = _loc2_ + 1;
  2163.       }
  2164.       _loc2_ = _loc2_ + 1;
  2165.    }
  2166.    _loc2_ = 0;
  2167.    while(_loc2_ < COULEUR_LISTE.length)
  2168.    {
  2169.       trace("FONTE_DEFAUT[\"color\"] : " + FONTE_DEFAUT.color);
  2170.       trace("COULEUR_LISTE[i] : " + COULEUR_LISTE[_loc2_]);
  2171.       if(COULEUR_LISTE[_loc2_] == FONTE_DEFAUT.color)
  2172.       {
  2173.          PARAMS_ATELIER.FonteCouleur = _loc2_ + 1;
  2174.       }
  2175.       _loc2_ = _loc2_ + 1;
  2176.    }
  2177.    PARAMS_ATELIER.FonteSize = Number(FONTE_DEFAUT.size);
  2178.    trace("FONTE_DEFAUT[\"size\"] : " + FONTE_DEFAUT.size);
  2179.    PARAMS_ATELIER.FonteBold = FONTE_DEFAUT.bold == "true" ? true : false;
  2180.    PARAMS_ATELIER.FonteItalic = FONTE_DEFAUT.italic == "true" ? true : false;
  2181.    PARAMS_ATELIER.NoPapier = Number(FONTE_DEFAUT.papier);
  2182.    PARAMS_GENERATEUR = {};
  2183.    PARAMS_GENERATEUR.SelectedElements = [undefined,0,0,0,0,0];
  2184.    saveCookie();
  2185.    MEMO_trace();
  2186. }
  2187. function LoadCookie()
  2188. {
  2189.    MEMO = {newGame:Boolean(FlashCookie.data.newGame)};
  2190.    PARAMS_ATELIER = {};
  2191.    PARAMS_ATELIER.FormatText = new TextFormat();
  2192.    PARAMS_ATELIER.FormatTextTaille = new TextFormat();
  2193.    PARAMS_ATELIER.FormatTextTaille.font = "Times New Roman";
  2194.    PARAMS_ATELIER.FormatTextFamille = new TextFormat();
  2195.    PARAMS_ATELIER.FormatTextFamille.size = 14;
  2196.    PARAMS_ATELIER.Texte = FlashCookie.data.Texte;
  2197.    PARAMS_ATELIER.FonteFamille = FlashCookie.data.FonteFamille;
  2198.    PARAMS_ATELIER.FonteCouleur = FlashCookie.data.FonteCouleur;
  2199.    PARAMS_ATELIER.FonteSize = FlashCookie.data.FonteSize;
  2200.    PARAMS_ATELIER.FonteBold = FlashCookie.data.FonteBold;
  2201.    PARAMS_ATELIER.FonteItalic = FlashCookie.data.FonteItalic;
  2202.    PARAMS_ATELIER.NoPapier = FlashCookie.data.NoPapier;
  2203.    PARAMS_GENERATEUR = {};
  2204.    PARAMS_GENERATEUR.SelectedElements = [];
  2205.    var _loc1_ = 1;
  2206.    while(_loc1_ <= 5)
  2207.    {
  2208.       PARAMS_GENERATEUR.SelectedElements[_loc1_] = FlashCookie.data.elements[_loc1_];
  2209.       _loc1_ = _loc1_ + 1;
  2210.    }
  2211. }
  2212. function MEMO_trace()
  2213. {
  2214.    trace("\r_______MEMO_trace : " + MEMO_trace);
  2215.    trace("MEMO : ");
  2216.    for(var _loc1_ in MEMO)
  2217.    {
  2218.       trace("-- " + _loc1_ + " = " + MEMO[_loc1_]);
  2219.    }
  2220.    trace("PARAMS_ATELIER : ");
  2221.    for(_loc1_ in PARAMS_ATELIER)
  2222.    {
  2223.       trace("-- " + _loc1_ + " = " + PARAMS_ATELIER[_loc1_]);
  2224.    }
  2225.    trace("PARAMS_GENERATEUR : ");
  2226.    for(_loc1_ in PARAMS_GENERATEUR)
  2227.    {
  2228.       trace("-- " + _loc1_ + " = " + PARAMS_GENERATEUR[_loc1_]);
  2229.    }
  2230.    trace("____________________________");
  2231. }
  2232. function saveCookie()
  2233. {
  2234.    FlashCookie.clear();
  2235.    FlashCookie.data.newGame = MEMO.newGame;
  2236.    FlashCookie.data.Texte = PARAMS_ATELIER.Texte;
  2237.    FlashCookie.data.FonteFamille = PARAMS_ATELIER.FonteFamille;
  2238.    FlashCookie.data.FonteCouleur = PARAMS_ATELIER.FonteCouleur;
  2239.    FlashCookie.data.FonteSize = PARAMS_ATELIER.FonteSize;
  2240.    FlashCookie.data.FonteBold = PARAMS_ATELIER.FonteBold;
  2241.    FlashCookie.data.FonteItalic = PARAMS_ATELIER.FonteItalic;
  2242.    FlashCookie.data.NoPapier = PARAMS_ATELIER.NoPapier;
  2243.    FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
  2244.    FlashCookie.flush();
  2245. }
  2246. function BanksInit()
  2247. {
  2248.    ZONE_ELEMENT_MODELE = {w:_root.banque1["A_" + _root.gModuleName + "_EL_01_01"]._width,h:_root.banque1["A_" + _root.gModuleName + "_EL_01_01"]._height};
  2249.    var _loc10_ = _root.xConfig.BanquesTypes.split(",");
  2250.    BANKS = [];
  2251.    BANKS[0] = {};
  2252.    BANKS[1] = {type:_loc10_[0],elements:[]};
  2253.    BANKS[2] = {type:_loc10_[1],elements:[]};
  2254.    BANKS[3] = {type:_loc10_[2],elements:[]};
  2255.    BANKS[4] = {type:_loc10_[3],elements:[]};
  2256.    BANKS[5] = {type:_loc10_[4],elements:[]};
  2257.    var _loc6_ = 1;
  2258.    while(_loc6_ <= 10)
  2259.    {
  2260.       var _loc4_ = 1;
  2261.       while(_loc4_ <= BANKS.length)
  2262.       {
  2263.          if(BANKS[_loc4_].type == "swf")
  2264.          {
  2265.             BANKS[_loc4_].elements.push(_root["banque" + _loc4_]["A_" + _root.gModuleName + "_EL_" + gimme2digits(_loc4_) + "_" + gimme2digits(_loc6_)]);
  2266.          }
  2267.          else if(BANKS[_loc4_].type == "lm")
  2268.          {
  2269.             BANKS[_loc4_].elements.push(GetTexte("LM_" + gimme2digits(_loc4_) + "_" + gimme2digits(_loc6_),_loc4_));
  2270.          }
  2271.          _loc4_ = _loc4_ + 1;
  2272.       }
  2273.       _loc6_ = _loc6_ + 1;
  2274.    }
  2275.    var _loc5_ = undefined;
  2276.    var _loc3_ = undefined;
  2277.    _loc6_ = 1;
  2278.    while(_loc6_ <= 5)
  2279.    {
  2280.       _loc5_ = BANKS[_loc6_];
  2281.       _loc4_ = 0;
  2282.       while(_loc4_ < 10)
  2283.       {
  2284.          _loc3_ = _loc5_.elements[_loc4_];
  2285.          if(_loc5_.type == "swf")
  2286.          {
  2287.             _loc3_.onRollOver = function()
  2288.             {
  2289.                _root.joueSon({nomSon:this._name.split("_")[4] + "_" + this._name.split("_")[5],actionFin:"RIEN",zapBlock:"NOZAP_NOBLOCK"});
  2290.             };
  2291.             _loc3_.onRollOut = function()
  2292.             {
  2293.                _root.stopSon();
  2294.             };
  2295.          }
  2296.          else if(_loc5_.type == "lm")
  2297.          {
  2298.             _loc3_.onRollOver = function()
  2299.             {
  2300.                _root.joueBruitage({nomSon:"B_" + this._name.split("_")[1] + "_" + this._name.split("_")[2]});
  2301.             };
  2302.             _loc3_.onRollOut = function()
  2303.             {
  2304.                _root.stopBruitage({nomSon:"B_" + this._name.split("_")[1] + "_" + this._name.split("_")[2]});
  2305.             };
  2306.          }
  2307.          _loc3_.enabled = true;
  2308.          _loc4_ = _loc4_ + 1;
  2309.       }
  2310.       _loc6_ = _loc6_ + 1;
  2311.    }
  2312. }
  2313. function BankInit(no_bank)
  2314. {
  2315.    BANKS[no_bank].selectedIndex = 0;
  2316.    BankRefresh(no_bank);
  2317. }
  2318. function BankRefresh(no_bank)
  2319. {
  2320.    var _loc2_ = BANKS[no_bank];
  2321.    var _loc4_ = _root["ZONE_0" + no_bank];
  2322. }
  2323. function SlideViewerInit(no_bank)
  2324. {
  2325.    var _loc0_ = null;
  2326.    var _loc5_ = this["viewer" + no_bank] = new xb.classes.slide1.SlideViewer();
  2327.    _loc5_.__set__elements(BANKS[no_bank].elements);
  2328.    _loc5_.__set__dureeSlide(_root.xConfig.DureeSlide);
  2329.    _loc5_.__set__vitesse1Cran(_root.xConfig.Vitesse1Cran);
  2330.    _loc5_.__set__vitesseSlideMax(_root.xConfig.VitesseSlideMax);
  2331.    _loc5_.__set__vitesseSlideMin(_root.xConfig.VitesseSlideMin);
  2332.    _loc5_.elementsInit();
  2333.    _loc5_.OnChange = function()
  2334.    {
  2335.       if(mod.ManetteEnCours == true)
  2336.       {
  2337.          var _loc3_ = true;
  2338.          var _loc2_ = 1;
  2339.          while(_loc2_ <= 5)
  2340.          {
  2341.             if(mod["viewer" + _loc2_].state == xb.classes.slide1.SlideViewer.STARTED)
  2342.             {
  2343.                _loc3_ = false;
  2344.                break;
  2345.             }
  2346.             _loc2_ = _loc2_ + 1;
  2347.          }
  2348.          if(_loc3_ == true)
  2349.          {
  2350.             mod.ManetteEnCours = false;
  2351.             mod.ElementsChanged = true;
  2352.             _root.BT_ATELIER.gotoAndStop("E1");
  2353.             _root.BT_ATELIER.Activer();
  2354.             PARAMS_GENERATEUR.SelectedElements = [];
  2355.             _loc2_ = 1;
  2356.             while(_loc2_ <= 5)
  2357.             {
  2358.                PARAMS_GENERATEUR.SelectedElements[_loc2_] = mod["viewer" + _loc2_].selectedIndex;
  2359.                _loc2_ = _loc2_ + 1;
  2360.             }
  2361.             FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
  2362.             trace("SelectedElements : " + PARAMS_GENERATEUR.SelectedElements);
  2363.             FlashCookie.flush();
  2364.             DebloquerActives();
  2365.             _root.REP_MANETTE.Activer();
  2366.          }
  2367.       }
  2368.       else
  2369.       {
  2370.          mod.ElementsChanged = true;
  2371.          _root.BT_ATELIER.gotoAndStop("E1");
  2372.          _root.BT_ATELIER.Activer();
  2373.          PARAMS_GENERATEUR.SelectedElements = [];
  2374.          _loc2_ = 1;
  2375.          while(_loc2_ <= 5)
  2376.          {
  2377.             PARAMS_GENERATEUR.SelectedElements[_loc2_] = mod["viewer" + _loc2_].selectedIndex;
  2378.             _loc2_ = _loc2_ + 1;
  2379.          }
  2380.          FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
  2381.          trace("SelectedElements : " + PARAMS_GENERATEUR.SelectedElements);
  2382.          FlashCookie.flush();
  2383.       }
  2384.    };
  2385. }
  2386. function GenerateursSlideViewerInit()
  2387. {
  2388.    GenerateurSlideViewerInit(1);
  2389.    GenerateurSlideViewerInit(2);
  2390.    GenerateurSlideViewerInit(3);
  2391.    GenerateurSlideViewerInit(4);
  2392.    GenerateurSlideViewerInit(5);
  2393. }
  2394. function GenerateurSlideViewerInit(no_bank)
  2395. {
  2396.    var _loc4_ = _root["MASK_ZONE_0" + no_bank];
  2397.    var _loc8_ = _root["MASK_ZONE_0" + no_bank];
  2398.    _loc8_.swapDepths(5000 + no_bank);
  2399.    _root["banque" + no_bank]._visible = true;
  2400.    _root["banque" + no_bank].setMask(_loc8_);
  2401.    var _loc5_ = this["viewer" + no_bank];
  2402.    _loc5_.__set__zone_affichage({x:_loc4_._x - _loc4_._width / 2,y:_loc4_._y - _loc4_._height / 2,w:_loc4_._width,h:_loc4_._height});
  2403.    _loc5_.elementsRefresh();
  2404.    _loc5_.__set__selectedIndex(PARAMS_GENERATEUR.SelectedElements[no_bank]);
  2405.    var _loc6_ = _root["BOUTON_0" + no_bank + "_D"];
  2406.    var _loc7_ = _root["BOUTON_0" + no_bank + "_G"];
  2407.    InitMC({mc:_loc6_,son:"B_FLE"});
  2408.    _loc6_.Viewer = _loc5_;
  2409.    _loc6_.OnPress = function()
  2410.    {
  2411.       this.Viewer.showElement("next");
  2412.    };
  2413.    InitMC({mc:_loc7_,son:"B_FLE"});
  2414.    _loc7_.Viewer = _loc5_;
  2415.    _loc7_.onPress = function()
  2416.    {
  2417.       this.Viewer.showElement("prev");
  2418.    };
  2419. }
  2420. function AtelierSlideViewerInit(no_bank)
  2421. {
  2422.    var _loc3_ = _root["AT_REP_ZONE_0" + no_bank];
  2423.    var _loc6_ = _root["AT_REP_ZONE_0" + no_bank];
  2424.    _loc6_.swapDepths(6000 + no_bank);
  2425.    _root["banque" + no_bank]._visible = true;
  2426.    _root["banque" + no_bank].setMask(_loc6_);
  2427.    var _loc5_ = this["viewer" + no_bank];
  2428.    _loc5_.__set__zone_affichage({x:_loc3_._x - _loc3_._width / 2,y:_loc3_._y - _loc3_._height / 2,w:_loc3_._width,h:_loc3_._height});
  2429.    _loc5_.elementsRefresh();
  2430.    _loc5_.__set__selectedIndex(PARAMS_GENERATEUR.SelectedElements[no_bank]);
  2431. }
  2432. function SlideStart(no_bank)
  2433. {
  2434.    if(no_bank > 5)
  2435.    {
  2436.       return undefined;
  2437.    }
  2438.    BloquerActives();
  2439.    mod.ManetteEnCours = true;
  2440.    this["viewer" + no_bank].start();
  2441.    ExecuterApresDelai({mcRef:this,methode:"SlideStart",params:no_bank + 1,delai:_root.xConfig.LancersEcart * randomValue(1,_root.xConfig.LancersEcart * 0.2)});
  2442. }
  2443. function PaletteInit()
  2444. {
  2445.    if(this.PaletteIsInit != true)
  2446.    {
  2447.       this.PaletteIsInit = true;
  2448.    }
  2449.    PaletteBtnsInit();
  2450.    TEXTE.text = PARAMS_ATELIER.Texte;
  2451.    TEXTE.onChanged = function()
  2452.    {
  2453.       _root.LM_TEXTE._visible = false;
  2454.       PARAMS_ATELIER_LAST = ObjectClone(PARAMS_ATELIER);
  2455.       PARAMS_ATELIER.Texte = TEXTE.text;
  2456.       if(_root.xConfig.ModeTexteBloquage == 2)
  2457.       {
  2458.          TexteAjuste();
  2459.          if(TEXTE_TEMP._height > TEXTE._height)
  2460.          {
  2461.             PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2462.             PaletteRefresh();
  2463.             return undefined;
  2464.          }
  2465.       }
  2466.       else if(_root.xConfig.ModeTexteBloquage == 3)
  2467.       {
  2468.          TexteAjuste();
  2469.          if(TEXTE_TEMP._height > TEXTE._height)
  2470.          {
  2471.             if(PARAMS_ATELIER.FonteSize <= TAILLE_FONTE_LIMITE.min)
  2472.             {
  2473.                PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2474.             }
  2475.             else
  2476.             {
  2477.                PARAMS_ATELIER.FonteSize--;
  2478.             }
  2479.             PaletteRefresh();
  2480.             return undefined;
  2481.          }
  2482.       }
  2483.       else if(_root.xConfig.ModeTexteBloquage == 1)
  2484.       {
  2485.          TEXTE.autoSize = "left";
  2486.          if(TEXTE._height > 400)
  2487.          {
  2488.             TEXTE.autoSize = "left";
  2489.          }
  2490.          else
  2491.          {
  2492.             TEXTE.autoSize = false;
  2493.             TEXTE._height = 400;
  2494.          }
  2495.       }
  2496.       else
  2497.       {
  2498.          TEXTE.autoSize = false;
  2499.       }
  2500.       if(PARAMS_ATELIER.Texte != "")
  2501.       {
  2502.          _root.BT_WEB.Activer();
  2503.          _root.BT_WEB.gotoAndStop("E1");
  2504.          _root.BT_IMP.Activer();
  2505.          _root.BT_IMP.gotoAndStop("E1");
  2506.       }
  2507.       else
  2508.       {
  2509.          _root.BT_WEB.Desactiver();
  2510.          _root.BT_WEB.gotoAndStop("E0");
  2511.          _root.BT_IMP.Desactiver();
  2512.          _root.BT_IMP.gotoAndStop("E0");
  2513.       }
  2514.       MEMO.newGame = FlashCookie.data.newGame = false;
  2515.       FlashCookie.data.Texte = PARAMS_ATELIER.Texte;
  2516.       FlashCookie.flush();
  2517.    };
  2518.    TEXTE.onScroller = function()
  2519.    {
  2520.    };
  2521.    PaletteRefresh();
  2522. }
  2523. function ObjectClone(obj)
  2524. {
  2525.    var _loc2_ = {};
  2526.    for(var _loc3_ in obj)
  2527.    {
  2528.       _loc2_[_loc3_] = obj[_loc3_];
  2529.    }
  2530.    return _loc2_;
  2531. }
  2532. function PaletteBtnsInit()
  2533. {
  2534.    InitMC({mc:PALETTE_TEXTE.NEXT_FONT});
  2535.    PALETTE_TEXTE.NEXT_FONT.OnPress = function()
  2536.    {
  2537.       PARAMS_ATELIER.FonteFamille = PARAMS_ATELIER.FonteFamille < FONTES_LISTE.length ? PARAMS_ATELIER.FonteFamille + 1 : 1;
  2538.       PaletteRefresh();
  2539.    };
  2540.    InitMC({mc:PALETTE_TEXTE.PREV_FONT});
  2541.    PALETTE_TEXTE.PREV_FONT.OnPress = function()
  2542.    {
  2543.       PARAMS_ATELIER.FonteFamille = PARAMS_ATELIER.FonteFamille > 1 ? PARAMS_ATELIER.FonteFamille - 1 : FONTES_LISTE.length;
  2544.       PaletteRefresh();
  2545.    };
  2546.    InitMC({mc:PALETTE_TEXTE.CORPS_PLUS});
  2547.    PALETTE_TEXTE.CORPS_PLUS.OnPress = function()
  2548.    {
  2549.       PARAMS_ATELIER.FonteSize = PARAMS_ATELIER.FonteSize < TAILLE_FONTE_LIMITE.max ? PARAMS_ATELIER.FonteSize + 1 : TAILLE_FONTE_LIMITE.max;
  2550.       PARAMS_ATELIER.SizeWanted = PARAMS_ATELIER.FonteSize;
  2551.       PaletteRefresh();
  2552.    };
  2553.    InitMC({mc:PALETTE_TEXTE.CORPS_MOINS});
  2554.    PALETTE_TEXTE.CORPS_MOINS.OnPress = function()
  2555.    {
  2556.       PARAMS_ATELIER.FonteSize = PARAMS_ATELIER.FonteSize > TAILLE_FONTE_LIMITE.min ? PARAMS_ATELIER.FonteSize - 1 : TAILLE_FONTE_LIMITE.min;
  2557.       PARAMS_ATELIER.SizeWanted = PARAMS_ATELIER.FonteSize;
  2558.       PaletteRefresh();
  2559.    };
  2560.    InitMC({mc:PALETTE_TEXTE.PLAIN});
  2561.    PALETTE_TEXTE.PLAIN.OnPress = function()
  2562.    {
  2563.       PARAMS_ATELIER.FonteBold = false;
  2564.       PARAMS_ATELIER.FonteItalic = false;
  2565.       PaletteRefresh();
  2566.    };
  2567.    InitMC({mc:PALETTE_TEXTE.BOLD});
  2568.    PALETTE_TEXTE.BOLD.OnPress = function()
  2569.    {
  2570.       PARAMS_ATELIER.FonteBold = PARAMS_ATELIER.FonteBold != true ? true : false;
  2571.       PaletteRefresh();
  2572.    };
  2573.    InitMC({mc:PALETTE_TEXTE.ITALIC});
  2574.    PALETTE_TEXTE.ITALIC.OnPress = function()
  2575.    {
  2576.       PARAMS_ATELIER.FonteItalic = PARAMS_ATELIER.FonteItalic != true ? true : false;
  2577.       PaletteRefresh();
  2578.    };
  2579.    var _loc4_ = undefined;
  2580.    var _loc3_ = 1;
  2581.    while(_loc3_ <= 12)
  2582.    {
  2583.       _loc4_ = PALETTE_TEXTE["PAL_" + gimme2digits(_loc3_)];
  2584.       _loc4_.No = _loc3_;
  2585.       InitMC({mc:_loc4_});
  2586.       _loc4_.OnPress = function()
  2587.       {
  2588.          PARAMS_ATELIER.FonteCouleur = this.No;
  2589.          PaletteRefresh();
  2590.       };
  2591.       _loc3_ = _loc3_ + 1;
  2592.    }
  2593.    InitMC({mc:_root.PICTO_PAPIER,IB:"IB_PAPIER"});
  2594.    _root.PICTO_PAPIER.OnPress = function()
  2595.    {
  2596.       PARAMS_ATELIER.NoPapier = PARAMS_ATELIER.NoPapier < 5 ? PARAMS_ATELIER.NoPapier + 1 : 1;
  2597.       PaletteRefresh();
  2598.    };
  2599. }
  2600. function PaletteRefresh()
  2601. {
  2602.    trace("PaletteRefresh : " + PaletteRefresh);
  2603.    saveCookie();
  2604.    var _loc3_ = PARAMS_ATELIER.FormatText;
  2605.    _loc3_.color = Number("0x" + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1].slice(1));
  2606.    _loc3_.size = PARAMS_ATELIER.FonteSize;
  2607.    _loc3_.bold = PARAMS_ATELIER.FonteBold;
  2608.    _loc3_.italic = PARAMS_ATELIER.FonteItalic;
  2609.    _loc3_.font = FONTES_LISTE[PARAMS_ATELIER.FonteFamille - 1];
  2610.    if(_root.xConfig.ModeTexteBloquage == 2)
  2611.    {
  2612.       TexteAjuste();
  2613.       if(TEXTE_TEMP._height > TEXTE._height)
  2614.       {
  2615.          PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2616.          PaletteRefresh();
  2617.          return undefined;
  2618.       }
  2619.    }
  2620.    else if(_root.xConfig.ModeTexteBloquage == 3)
  2621.    {
  2622.       TexteAjuste();
  2623.       if(TEXTE_TEMP._height > TEXTE._height)
  2624.       {
  2625.          if(PARAMS_ATELIER.FonteSize <= TAILLE_FONTE_LIMITE.min)
  2626.          {
  2627.             PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2628.          }
  2629.          else
  2630.          {
  2631.             PARAMS_ATELIER.FonteSize--;
  2632.          }
  2633.          PaletteRefresh();
  2634.          return undefined;
  2635.       }
  2636.    }
  2637.    else if(_root.xConfig.ModeTexteBloquage == 1)
  2638.    {
  2639.       TEXTE.autoSize = "left";
  2640.       if(TEXTE._height > 400)
  2641.       {
  2642.          TEXTE.autoSize = "left";
  2643.       }
  2644.       else
  2645.       {
  2646.          TEXTE.autoSize = false;
  2647.          TEXTE._height = 400;
  2648.       }
  2649.    }
  2650.    else
  2651.    {
  2652.       TEXTE.autoSize = false;
  2653.    }
  2654.    TEXTE.html = false;
  2655.    TEXTE.antiAliasType = "advanced";
  2656.    TEXTE.setNewTextFormat(_loc3_);
  2657.    TEXTE.text = PARAMS_ATELIER.Texte;
  2658.    PALETTE_TEXTE.texte_CORPS.setNewTextFormat(PARAMS_ATELIER.FormatTextTaille);
  2659.    PALETTE_TEXTE.texte_CORPS.text = PARAMS_ATELIER.FonteSize;
  2660.    PALETTE_TEXTE.texte_CORPS.antiAliasType = "advanced";
  2661.    _loc3_ = PARAMS_ATELIER.FormatTextFamille;
  2662.    _loc3_.color = Number("0x" + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1].slice(1));
  2663.    _loc3_.bold = PARAMS_ATELIER.FonteBold;
  2664.    _loc3_.italic = PARAMS_ATELIER.FonteItalic;
  2665.    _loc3_.font = FONTES_LISTE[PARAMS_ATELIER.FonteFamille - 1];
  2666.    PALETTE_TEXTE.texte_FONT.antiAliasType = "advanced";
  2667.    PALETTE_TEXTE.texte_FONT.setNewTextFormat(_loc3_);
  2668.    PALETTE_TEXTE.texte_FONT.text = "Mobiclic";
  2669.    if(PARAMS_ATELIER.FonteBold == true)
  2670.    {
  2671.       PALETTE_TEXTE.BOLD.outFrame = "E3";
  2672.       PALETTE_TEXTE.BOLD.gotoAndStop("E3");
  2673.    }
  2674.    else
  2675.    {
  2676.       PALETTE_TEXTE.BOLD.outFrame = "E1";
  2677.       PALETTE_TEXTE.BOLD.gotoAndStop("E1");
  2678.    }
  2679.    if(PARAMS_ATELIER.FonteItalic == true)
  2680.    {
  2681.       PALETTE_TEXTE.ITALIC.outFrame = "E3";
  2682.       PALETTE_TEXTE.ITALIC.gotoAndStop("E3");
  2683.    }
  2684.    else
  2685.    {
  2686.       PALETTE_TEXTE.ITALIC.outFrame = "E1";
  2687.       PALETTE_TEXTE.ITALIC.gotoAndStop("E1");
  2688.    }
  2689.    if(PARAMS_ATELIER.FonteItalic == false && PARAMS_ATELIER.FonteBold == false)
  2690.    {
  2691.       PALETTE_TEXTE.PLAIN.outFrame = "E3";
  2692.       PALETTE_TEXTE.PLAIN.gotoAndStop("E3");
  2693.    }
  2694.    else
  2695.    {
  2696.       PALETTE_TEXTE.PLAIN.outFrame = "E1";
  2697.       PALETTE_TEXTE.PLAIN.gotoAndStop("E1");
  2698.    }
  2699.    var _loc2_ = 1;
  2700.    while(_loc2_ <= 12)
  2701.    {
  2702.       if(_loc2_ == PARAMS_ATELIER.FonteCouleur)
  2703.       {
  2704.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].outFrame = "E3";
  2705.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].gotoAndStop("E3");
  2706.       }
  2707.       else
  2708.       {
  2709.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].outFrame = "E1";
  2710.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].gotoAndStop("E1");
  2711.       }
  2712.       _loc2_ = _loc2_ + 1;
  2713.    }
  2714.    _root.PICTO_PAPIER.gotoAndStop("P" + PARAMS_ATELIER.NoPapier);
  2715.    _root.FEUILLE.PAPIER.gotoAndStop("P" + PARAMS_ATELIER.NoPapier);
  2716.    PARAMS_ATELIER_LAST = ObjectClone(PARAMS_ATELIER);
  2717. }
  2718. function TexteChampInit()
  2719. {
  2720.    if(this.TexteChampInit == true)
  2721.    {
  2722.       return undefined;
  2723.    }
  2724.    this.TexteChampInit = true;
  2725. }
  2726. function GetTexte(codeLM, no_bank)
  2727. {
  2728.    var _loc5_ = _root["banque" + no_bank];
  2729.    if(_loc5_ == undefined)
  2730.    {
  2731.       _loc5_ = _root.createEmptyMovieClip("banque" + no_bank,4000 + no_bank);
  2732.    }
  2733.    var _loc8_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  2734.    var _loc7_ = _root.gereTextes.getTextById(_loc8_,codeLM);
  2735.    var _loc4_ = getStyleLM(codeLM);
  2736.    var _loc3_ = _loc5_.createEmptyMovieClip(codeLM,_root.chercheDepthPlus(_loc5_,0));
  2737.    _loc3_.FOND = _root.creerRectangle({pere:_loc3_,level:1,alpha:Number(_loc4_.opaciteF),couleur:Number(_loc4_.couleurF),w:ZONE_ELEMENT_MODELE.w,h:ZONE_ELEMENT_MODELE.h});
  2738.    trace("style[\"opaciteF\"] : " + _loc4_.opaciteF);
  2739.    trace("Number(style[\"opaciteF\"]) : " + Number(_loc4_.opaciteF));
  2740.    var _loc2_ = _loc3_.createTextField("TEXTE",2,0,0,ZONE_ELEMENT_MODELE.w,ZONE_ELEMENT_MODELE.h);
  2741.    _loc2_._visible = true;
  2742.    _loc2_.background = false;
  2743.    _loc2_.wordWrap = true;
  2744.    _loc2_.autoSize = true;
  2745.    _loc2_.embedFonts = true;
  2746.    _loc2_.selectable = false;
  2747.    _loc2_.antiAliasType = "advanced";
  2748.    var _loc10_ = _loc4_.textFormat;
  2749.    _loc2_.setNewTextFormat(_loc10_);
  2750.    _loc2_.text = _loc7_;
  2751.    _loc2_._y = _loc3_._height / 2 - _loc2_._height / 2;
  2752.    return _loc3_;
  2753. }
  2754. function randomValue(min, max)
  2755. {
  2756.    var _loc1_ = Math.random() * (max - min + 1) + min;
  2757.    return _loc1_;
  2758. }
  2759. function CONSEILS()
  2760. {
  2761.    trace("CONSEILS : " + CONSEILS);
  2762.    _root.BOITE_CONSEILS.gotoAndStop("E1");
  2763.    AIDE_PERSO.gotoAndStop("E2");
  2764.    _root.ZONE_ANIM.gotoAndStop("E1");
  2765.    _root.gereTextes.afficheLM({codeLM:"LM_AIDE",mc:_root.LM});
  2766.    _root.LM._visible = true;
  2767.    if(mod.ConseilsFromLabel != undefined)
  2768.    {
  2769.       mod.fromLabel = mod.ConseilsFromLabel;
  2770.    }
  2771.    _root.FEUILLE.removeMovieClip();
  2772.    _root.GEN_LM_AT.removeMovieClip();
  2773.    _root.AT_REP_ZONE_01.removeMovieClip();
  2774.    _root.AT_REP_ZONE_02.removeMovieClip();
  2775.    _root.AT_REP_ZONE_03.removeMovieClip();
  2776.    _root.AT_REP_ZONE_04.removeMovieClip();
  2777.    _root.AT_REP_ZONE_05.removeMovieClip();
  2778.    _root.GEN_LM.removeMovieClip();
  2779.    _root.ZONE_CACHE_01.removeMovieClip();
  2780.    _root.ZONE_CACHE_02.removeMovieClip();
  2781.    _root.ZONE_CACHE_03.removeMovieClip();
  2782.    _root.ZONE_CACHE_04.removeMovieClip();
  2783.    _root.ZONE_CACHE_05.removeMovieClip();
  2784.    _root.ZONE_CACHE_AT.removeMovieClip();
  2785.    _root.MASK_ZONE_01.removeMovieClip();
  2786.    _root.MASK_ZONE_02.removeMovieClip();
  2787.    _root.MASK_ZONE_03.removeMovieClip();
  2788.    _root.MASK_ZONE_04.removeMovieClip();
  2789.    _root.MASK_ZONE_05.removeMovieClip();
  2790.    var _loc4_ = 1;
  2791.    while(_loc4_ <= 5)
  2792.    {
  2793.       _root["banque" + _loc4_]._visible = false;
  2794.       _loc4_ = _loc4_ + 1;
  2795.    }
  2796.    InitMC({mc:_root.BT_RET_AIDE,son:"B_RET_AIDE",IB:"IB_RET_AIDE",OnPress:function()
  2797.    {
  2798.       _root.gotoAndStop(mod.fromLabel);
  2799.    }});
  2800.    AIDE_PERSO = _root.BERNARD;
  2801.    var _loc5_ = undefined;
  2802.    _loc4_ = 1;
  2803.    while(_loc4_ <= 7)
  2804.    {
  2805.       _loc5_ = _root["PICTO_0" + _loc4_];
  2806.       _loc5_.No = _loc4_;
  2807.       _loc5_._visible = true;
  2808.       _loc5_.CiblesDrag = [_root.BOITE_CONSEILS];
  2809.       InitMC({mc:_loc5_,son:"B_0" + _loc4_,sonOnPress:"B_CLIC",IB:"IB_0" + _loc4_,CibleOverFrame:"E2",fonction:"dragdrop"});
  2810.       _loc5_.OnPress = function()
  2811.       {
  2812.          _root.LM._visible = false;
  2813.       };
  2814.       _loc5_.PendantDrag = function()
  2815.       {
  2816.          if(this.CiblesTouchees[0] == _root.BOITE_CONSEILS)
  2817.          {
  2818.             if(this.LastCible != _root.BOITE_CONSEILS)
  2819.             {
  2820.                this.LastCible = _root.BOITE_CONSEILS;
  2821.                _root.BOITE_CONSEILS.gotoAndStop("E2");
  2822.                _root.joueBruitage({nomSon:"B_BOITE",actionFin:"FinBruitDepot0"});
  2823.             }
  2824.          }
  2825.          else
  2826.          {
  2827.             this.LastCible = undefined;
  2828.             _root.BOITE_CONSEILS.gotoAndStop("E1");
  2829.          }
  2830.          _global.CURSEUR._x = this._x;
  2831.          _global.CURSEUR._y = this._y;
  2832.       };
  2833.       _loc5_.ApresDrag = function()
  2834.       {
  2835.          var me = this;
  2836.          if(this.CiblesTouchees[0] == _root.BOITE_CONSEILS)
  2837.          {
  2838.             this._visible = false;
  2839.             this.ComeBack();
  2840.             _root.FinBruitDepot1 = function()
  2841.             {
  2842.                _root.FinBruitDepot2 = function()
  2843.                {
  2844.                   _root.ZONE_ANIM.gotoAndStop("E3");
  2845.                   AIDE_PERSO.gotoAndStop("E1");
  2846.                   _root.gotoAndStop("AIDE_0" + me.No);
  2847.                };
  2848.                _root.BOITE_CONSEILS.gotoAndStop("E4");
  2849.                _root.ZONE_ANIM.gotoAndStop("E2");
  2850.                _root.joueBruitage({nomSon:"B_CRACHE",actionFin:"FinBruitDepot2"});
  2851.             };
  2852.             _root.BOITE_CONSEILS.gotoAndStop("E3");
  2853.             _root.joueBruitage({nomSon:"B_DEPOT",actionFin:"FinBruitDepot1"});
  2854.          }
  2855.          else
  2856.          {
  2857.             this.ComeBack();
  2858.          }
  2859.       };
  2860.       _loc4_ = _loc4_ + 1;
  2861.    }
  2862.    if(mod.ConseilsFromLabel != undefined)
  2863.    {
  2864.       mod.ConseilsFromLabel = undefined;
  2865.       _root.FinAIDE_00 = function()
  2866.       {
  2867.          AIDE_PERSO.gotoAndStop("E2");
  2868.       };
  2869.       AIDE_PERSO.gotoAndStop("E1");
  2870.       _root.joueSon({nomSon:"AIDE_00",actionFin:"FinAIDE_00"});
  2871.    }
  2872. }
  2873. function BT_AIDE_Init(fromLabel)
  2874. {
  2875.    AIDE_BTN = _root.BT_BERNARD;
  2876.    InitMC({mc:AIDE_BTN,son:"B_BERNARD",FROM:fromLabel,IB:"IB_BERNARD",OnPress:function()
  2877.    {
  2878.       mod.ConseilsFromLabel = this.FROM;
  2879.       _root.gotoAndStop("CONSEILS");
  2880.    }});
  2881. }
  2882. _global.InitMC = InitMC;
  2883. _global.InitMC_reccurent = InitMC_reccurent;
  2884. _global.ResetMC = ResetMC;
  2885. _global.InitMC_standart = InitMC_standart;
  2886. _global.InitMC_BTN = InitMC_BTN;
  2887. _global.InitMC_dragdrop = InitMC_dragdrop;
  2888. _global.InitMC_slider = InitMC_slider;
  2889. _global.InitMC_titre = InitMC_titre;
  2890. _global.InitMC_texte = InitMC_texte;
  2891. _global.DistancePoints = DistancePoints;
  2892. _global.DistancePoints = DistancePoints;
  2893. _global.SetInterval = SetInterval;
  2894. _global.ClearInterval = ClearInterval;
  2895. _global.ClearAllIntervals = ClearAllIntervals;
  2896. _root.ExecuterApresDelaiNo = 0;
  2897. _global.ExecuterApresDelai = ExecuterApresDelai;
  2898. _global.BloquerActives = BloquerActives;
  2899. _global.DebloquerActives = DebloquerActives;
  2900. _global.LMaVider = new Array();
  2901. _global.LMaVider2 = new Array();
  2902. _global.trace_obj = trace_obj;
  2903. _global.xtrace_mc = xtrace_mc;
  2904. var mod = this;
  2905. var MEMO;
  2906. var FlashCookie;
  2907. trace("FlashCookie.getSize() : " + FlashCookie.getSize());
  2908. var MODE = "ATTENTE";
  2909. var FONTES_LISTE;
  2910. var FONTE_DEFAUT;
  2911. var COULEUR_LISTE;
  2912. var TAILLE_FONTE_LIMITE;
  2913. var BANKS;
  2914. var DIALOG_BOX_WEB;
  2915. var PALETTE_TEXTE;
  2916. var TEXTE;
  2917. var PARAMS_ATELIER;
  2918. var PARAMS_GENERATEUR;
  2919. var viewer1;
  2920. var viewer2;
  2921. var viewer3;
  2922. var viewer4;
  2923. var viewer5;
  2924. _root.StopAll = StopAll;
  2925. _root.ModulePause = ModulePause;
  2926. _root.ModuleResume = ModuleResume;
  2927. _root.InitChoixPartie = InitChoixPartie;
  2928. var TEXTE_TEMP;
  2929. var ZONE_ELEMENT_MODELE;
  2930. var PARAMS_ATELIER_LAST;
  2931. var PARAMS_ATELIER_AVANT_DERNIER;
  2932. var AIDE_PERSO;
  2933. var AIDE_BTN;
  2934.