home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 174 / MOBICLIC174.ISO / mac / DATA / FAB174 / FAB174_00 / mod.swf / scripts / frame_1 / DoAction.as
Text File  |  2015-04-27  |  96KB  |  3,107 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 getIBById(codeIB)
  1111. {
  1112.    trace("getIBById : " + codeIB);
  1113.    var _loc3_ = _root.moduleInfo.returnRealNodeByPath("Module." + _root.gLangue + ".InfoBulles");
  1114.    myLM = this.recusivegetLMById(_loc3_,"id",codeIB);
  1115.    if(myLM == undefined)
  1116.    {
  1117.       myLM(attributeValue + " n\'existe pas dans XML");
  1118.    }
  1119.    return myLM;
  1120. }
  1121. function getLMById(codeLM)
  1122. {
  1123.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  1124.    myLM = this.recusivegetLMById(_loc3_,"id",codeLM);
  1125.    if(myLM == undefined)
  1126.    {
  1127.       myLM(attributeValue + " n\'existe pas dans XML");
  1128.    }
  1129.    return myLM;
  1130. }
  1131. function recusivegetLMById(node, attribute, attributeValue)
  1132. {
  1133.    var _loc1_ = 0;
  1134.    while(_loc1_ < node.childNodes.length)
  1135.    {
  1136.       if(node.childNodes[_loc1_].attributes[attribute] == attributeValue)
  1137.       {
  1138.          myText = node.childNodes[_loc1_].firstChild.nodeValue;
  1139.          var _loc7_ = [];
  1140.          for(var _loc4_ in node.childNodes[_loc1_].attributes)
  1141.          {
  1142.             _loc7_[_loc4_] = node.childNodes[_loc1_].attributes[_loc4_];
  1143.          }
  1144.          break;
  1145.       }
  1146.       if(node.childNodes[_loc1_].hasChildNodes())
  1147.       {
  1148.          recusivegetLMById(node.childNodes[_loc1_],attribute,attributeValue);
  1149.       }
  1150.       _loc1_ = _loc1_ + 1;
  1151.    }
  1152.    return {texte:myText,attributs:_loc7_,node:node.childNodes[_loc1_]};
  1153. }
  1154. function getStyleLM(codeLM)
  1155. {
  1156.    var _loc8_ = "LM";
  1157.    var _loc12_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  1158.    var _loc10_ = getLMById(codeLM);
  1159.    var _loc11_ = _loc10_.texte;
  1160.    myStyle = _loc10_.attributs.style;
  1161.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.StylesTextes.StylesLM");
  1162.    var _loc6_ = {};
  1163.    var _loc14_ = 0;
  1164.    var _loc7_ = new TextFormat();
  1165.    var _loc5_ = new XML();
  1166.    var _loc13_ = "00";
  1167.    var _loc2_ = 0;
  1168.    while(_loc2_ < _loc3_.childNodes.length)
  1169.    {
  1170.       if(_loc3_.childNodes[_loc2_].attributes.id == _loc8_)
  1171.       {
  1172.          var _loc4_ = 0;
  1173.          while(_loc4_ < _loc3_.childNodes[_loc2_].childNodes.length)
  1174.          {
  1175.             _loc6_[_loc3_.childNodes[_loc2_].childNodes[_loc4_].nodeName] = _loc3_.childNodes[_loc2_].childNodes[_loc4_].firstChild.nodeValue;
  1176.             _loc4_ = _loc4_ + 1;
  1177.          }
  1178.       }
  1179.       else
  1180.       {
  1181.          if(_loc3_.childNodes[_loc2_].attributes.id == codeLM)
  1182.          {
  1183.             _loc5_ = _loc3_.childNodes[_loc2_];
  1184.             break;
  1185.          }
  1186.          if(_loc3_.childNodes[_loc2_].attributes.id == myStyle)
  1187.          {
  1188.             _loc5_ = _loc3_.childNodes[_loc2_];
  1189.             break;
  1190.          }
  1191.       }
  1192.       _loc2_ = _loc2_ + 1;
  1193.    }
  1194.    if(_loc5_.childNodes.length !== 0)
  1195.    {
  1196.       _loc4_ = 0;
  1197.       while(_loc4_ < _loc5_.childNodes.length)
  1198.       {
  1199.          _loc6_[_loc5_.childNodes[_loc4_].nodeName] = _loc5_.childNodes[_loc4_].firstChild.nodeValue;
  1200.          _loc4_ = _loc4_ + 1;
  1201.       }
  1202.    }
  1203.    _loc7_.font = _loc6_.police;
  1204.    _loc7_.size = Number(_loc6_.corps);
  1205.    _loc7_.bold = _loc6_.bold != "0" ? true : false;
  1206.    _loc7_.italic = _loc6_.italic != "0" ? true : false;
  1207.    _loc7_.underline = _loc6_.underline != "0" ? true : false;
  1208.    _loc7_.color = Number(_loc6_.couleurT);
  1209.    _loc7_.align = _loc6_.justify;
  1210.    _loc6_.textFormat = _loc7_;
  1211.    return _loc6_;
  1212. }
  1213. function GetLmTextField(lm)
  1214. {
  1215.    return lm.LM.texte;
  1216. }
  1217. function IncString(str, seuil)
  1218. {
  1219.    var _loc2_ = str.split("_");
  1220.    var _loc1_ = _loc2_.length - 1;
  1221.    var _loc3_ = Number(_loc2_[_loc1_]) + 1;
  1222.    while(_loc3_ > seuil)
  1223.    {
  1224.       _loc2_[_loc1_] = gimme2digits(0);
  1225.       _loc1_ = _loc1_ - 1;
  1226.       _loc3_ = Number(_loc2_[_loc1_]) + 1;
  1227.    }
  1228.    _loc2_[_loc1_] = gimme2digits(_loc3_);
  1229.    return _loc2_.join("_");
  1230. }
  1231. function DecString(str)
  1232. {
  1233.    var _loc1_ = str.split("_");
  1234.    trace(_loc1_);
  1235.    var _loc2_ = _loc1_.length - 1;
  1236.    trace(Number(_loc1_[_loc2_]));
  1237.    _loc1_[_loc2_] = gimme2digits(Number(_loc1_[_loc2_]) - 1);
  1238.    return _loc1_.join("_");
  1239. }
  1240. function RetourneLettreAlphabet(no)
  1241. {
  1242.    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"];
  1243.    trace("RetourneLettreAlphabet() : lettre no " + no + " :" + _loc1_[no - 1]);
  1244.    return _loc1_[no - 1];
  1245. }
  1246. function xGetConfig()
  1247. {
  1248.    trace("xGetConfig()");
  1249.    _root.xConfig = {};
  1250.    _root.xConfig.Params = {};
  1251.    _root.xConfig.Set = function(p)
  1252.    {
  1253.       if(this[p.nom] == undefined)
  1254.       {
  1255.          if(p.defaut == "OBLIGATOIRE")
  1256.          {
  1257.             trace({mess:"/!\\ERROR /!\\Param├¿tre du xml obligatoire manquant dans la balise Config: " + p.nom,group:"error"});
  1258.          }
  1259.          else
  1260.          {
  1261.             this[p.nom] = p.defaut;
  1262.             if(p.type == "number")
  1263.             {
  1264.                this[p.nom] = Number(this[p.nom]);
  1265.             }
  1266.             if(p.type == "boolean")
  1267.             {
  1268.                this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
  1269.             }
  1270.          }
  1271.       }
  1272.       else
  1273.       {
  1274.          if(p.type == "number")
  1275.          {
  1276.             this[p.nom] = Number(this[p.nom]);
  1277.          }
  1278.          if(p.type == "boolean")
  1279.          {
  1280.             this[p.nom] = !(this[p.nom] == "true" || this[p.nom] == true) ? false : true;
  1281.          }
  1282.       }
  1283.       this.Params[p.nom] = {nom:p.nom,type:p.type,desc:p.desc,valeur:this[p.nom]};
  1284.    };
  1285.    _root.xConfig.ToXml = function()
  1286.    {
  1287.       var _loc2_ = "";
  1288.       trace("");
  1289.       trace("");
  1290.       trace("");
  1291.       trace("(!)_____ xConfig en XML _______");
  1292.       trace("<Params>");
  1293.       for(var _loc3_ in this.Params)
  1294.       {
  1295.          this.Params[_loc3_].desc = this.Params[_loc3_].desc != undefined ? this.Params[_loc3_].desc : "";
  1296.          _loc2_ = "<Param nom=\"" + _loc3_ + "\" valeur=\"" + this.Params[_loc3_].valeur + "\"  desc=\"" + this.Params[_loc3_].desc + "\" /> <!-- " + this.Params[_loc3_].desc + " -->\r" + _loc2_;
  1297.       }
  1298.       trace(_loc2_);
  1299.       trace("</Params>");
  1300.       trace("(!)_____ xConfig en XML- FIN _______");
  1301.       trace("");
  1302.       trace("");
  1303.       trace("");
  1304.    };
  1305.    _root.xConfig._name = "xConfig";
  1306.    var _loc3_ = _root.moduleInfo.returnNodeByPath("Module.Config.Params").childNodes;
  1307.    for(props in _loc3_)
  1308.    {
  1309.       _root.xConfig[_loc3_[props].attributes.nom] = _loc3_[props].attributes.valeur;
  1310.    }
  1311. }
  1312. function GetFilePath(fichier)
  1313. {
  1314.    var _loc2_ = AntiSlashToSlash(fichier);
  1315.    var _loc1_ = _loc2_.split("/");
  1316.    _loc1_.pop();
  1317.    return _loc1_.join("/");
  1318. }
  1319. function AntiSlashToSlash(chaine)
  1320. {
  1321.    return str_replace(chaine,"\\","/");
  1322. }
  1323. function DistancePoints(p)
  1324. {
  1325.    return Math.sqrt(Math.pow(p.x2 - p.x1,2) + Math.pow(p.y2 - p.y1,2));
  1326. }
  1327. function SetInterval(p)
  1328. {
  1329.    if(_root.INTERVAL_IDS == undefined)
  1330.    {
  1331.       _root.INTERVAL_IDS = [];
  1332.    }
  1333.    if(p.mcRef == undefined)
  1334.    {
  1335.       p.mcRef = _root;
  1336.    }
  1337.    if(p.methode == undefined)
  1338.    {
  1339.       return false;
  1340.    }
  1341.    if(p.interval == undefined)
  1342.    {
  1343.       return false;
  1344.    }
  1345.    if(p.params == undefined)
  1346.    {
  1347.       p.params = {};
  1348.    }
  1349.    var _loc3_ = setInterval(p.mcRef,p.methode,p.interval,p.params);
  1350.    _root.INTERVAL_IDS.push(_loc3_);
  1351.    return _loc3_;
  1352. }
  1353. function ClearInterval(id)
  1354. {
  1355.    clearInterval(id);
  1356.    var _loc2_ = 0;
  1357.    while(_loc2_ < _root.INTERVAL_IDS.length)
  1358.    {
  1359.       if(_root.INTERVAL_IDS[_loc2_] == id)
  1360.       {
  1361.          _root.INTERVAL_IDS.splice(_loc2_,1);
  1362.          return undefined;
  1363.       }
  1364.       _loc2_ = _loc2_ + 1;
  1365.    }
  1366. }
  1367. function ClearAllIntervals()
  1368. {
  1369.    var _loc2_ = 0;
  1370.    while(_loc2_ < _root.INTERVAL_IDS.length)
  1371.    {
  1372.       clearInterval(_root.INTERVAL_IDS[_loc2_]);
  1373.       _loc2_ = _loc2_ + 1;
  1374.    }
  1375.    _root.INTERVAL_IDS = [];
  1376. }
  1377. function ExecuterApresDelai(p)
  1378. {
  1379.    var tdep = getTimer();
  1380.    var tfin;
  1381.    var _loc3_ = "ExecuterApresDelai" + Number(++_root.ExecuterApresDelaiNo);
  1382.    var id;
  1383.    var delai = p.delai * 1000;
  1384.    var _loc4_ = p.mcRef[p.methode];
  1385.    var mcRef = p.mcRef;
  1386.    var methode = p.methode;
  1387.    var params = p.params;
  1388.    _root[_loc3_] = function()
  1389.    {
  1390.       tfin = getTimer();
  1391.       if(tfin - tdep >= delai)
  1392.       {
  1393.          ClearInterval(id);
  1394.          mcRef[methode](params);
  1395.       }
  1396.    };
  1397.    id = SetInterval({methode:_loc3_,interval:p.delai});
  1398.    return id;
  1399. }
  1400. function str_replace(str, search, replace)
  1401. {
  1402.    return str.split(search).join(replace);
  1403. }
  1404. function GetMonthByNo(no)
  1405. {
  1406.    var _loc1_ = ["Janvier","F├⌐vrier","Mars","Avril","Mai","Juin","Juillet","Ao├╗t","Septembre","Octobre","Novembre","D├⌐cembre"];
  1407.    return _loc1_[no - 1];
  1408. }
  1409. function JoindreObjets(objects)
  1410. {
  1411.    var _loc2_ = new Object();
  1412.    var _loc1_ = 0;
  1413.    while(_loc1_ < objects.length)
  1414.    {
  1415.       p1 = objects[_loc1_];
  1416.       for(props in p1)
  1417.       {
  1418.          _loc2_[props] = p1[props];
  1419.       }
  1420.       _loc1_ = _loc1_ + 1;
  1421.    }
  1422.    return _loc2_;
  1423. }
  1424. function GetOriginalSize(mc)
  1425. {
  1426.    var _loc2_ = mc._rotation;
  1427.    mc._rotation = 0;
  1428.    var _loc3_ = {w:mc._width * mc._xscale / 100,h:mc._height * mc._yscale / 100};
  1429.    mc._rotation = _loc2_;
  1430.    return _loc3_;
  1431. }
  1432. function GetOriginalWidth(mc)
  1433. {
  1434.    var _loc2_ = mc._rotation;
  1435.    mc._rotation = 0;
  1436.    var _loc3_ = mc._width * mc._xscale / 100;
  1437.    var _loc4_ = mc._height * mc._yscale / 100;
  1438.    mc._rotation = _loc2_;
  1439.    return _loc3_;
  1440. }
  1441. function GetOriginalHeight(mc)
  1442. {
  1443.    var _loc2_ = mc._rotation;
  1444.    mc._rotation = 0;
  1445.    var _loc4_ = mc._width * mc._xscale / 100;
  1446.    var _loc3_ = mc._height * mc._yscale / 100;
  1447.    mc._rotation = _loc2_;
  1448.    return _loc3_;
  1449. }
  1450. function CreerCache(p)
  1451. {
  1452.    var _loc4_ = p.level != undefined ? p.level : _global.Levels.cache;
  1453.    var _loc2_ = p.mc.createEmptyMovieClip("CACHE",_loc4_);
  1454.    _loc2_.beginFill(65280,50);
  1455.    _loc2_.moveTo(0,0);
  1456.    _loc2_.lineTo(p.width,0);
  1457.    _loc2_.lineTo(p.width,p.height);
  1458.    _loc2_.lineTo(0,p.height);
  1459.    _loc2_.lineTo(0,0);
  1460.    _loc2_.endFill();
  1461.    p.mc.setMask(_loc2_);
  1462. }
  1463. function ConvertCoord(mc_src, mc_dest)
  1464. {
  1465.    var _loc1_ = {x:0,y:0};
  1466.    mc_src.localToGlobal(_loc1_);
  1467.    mc_dest.globalToLocal(_loc1_);
  1468.    return _loc1_;
  1469. }
  1470. function getGlobalCoord(xc, yc, mc)
  1471. {
  1472.    var _loc1_ = {x:xc * 100 / mc._xscale,y:yc * 100 / mc._yscale};
  1473.    mc.localToGlobal(_loc1_);
  1474.    return _loc1_;
  1475. }
  1476. function getLocalCoord(xc, yc, mc)
  1477. {
  1478.    var _loc1_ = new Object({x:xc,y:yc});
  1479.    mc.globalToLocal(_loc1_);
  1480.    _loc1_.x = _loc1_.x / 100 * mc._xscale;
  1481.    _loc1_.y = _loc1_.y / 100 * mc._yscale;
  1482.    return _loc1_;
  1483. }
  1484. function length_ass(arr)
  1485. {
  1486.    var _loc1_ = 0;
  1487.    for(prop in arr)
  1488.    {
  1489.       _loc1_ = _loc1_ + 1;
  1490.    }
  1491.    return _loc1_;
  1492. }
  1493. function ExplodeString(chaine)
  1494. {
  1495.    var _loc3_ = new Array();
  1496.    var _loc1_ = 0;
  1497.    while(_loc1_ < chaine.length)
  1498.    {
  1499.       _loc3_.push(chaine.charAt(_loc1_));
  1500.       _loc1_ = _loc1_ + 1;
  1501.    }
  1502.    return _loc3_;
  1503. }
  1504. function TrimString(chaine)
  1505. {
  1506.    var _loc3_ = "";
  1507.    var _loc5_ = "";
  1508.    var _loc2_ = false;
  1509.    var _loc1_ = 0;
  1510.    while(_loc1_ < chaine.length)
  1511.    {
  1512.       if(chaine.charAt(_loc1_) != " ")
  1513.       {
  1514.          _loc2_ = true;
  1515.       }
  1516.       if(_loc2_ == true)
  1517.       {
  1518.          _loc3_ += chaine.charAt(_loc1_);
  1519.       }
  1520.       _loc1_ = _loc1_ + 1;
  1521.    }
  1522.    _loc2_ = false;
  1523.    _loc1_ = _loc3_.length - 1;
  1524.    while(_loc1_ >= 0)
  1525.    {
  1526.       if(_loc3_.charAt(_loc1_) != " ")
  1527.       {
  1528.          _loc2_ = true;
  1529.       }
  1530.       if(_loc2_ == true)
  1531.       {
  1532.          _loc5_ = _loc3_.charAt(_loc1_) + _loc5_;
  1533.       }
  1534.       _loc1_ = _loc1_ - 1;
  1535.    }
  1536.    return _loc5_;
  1537. }
  1538. function BloquerActives()
  1539. {
  1540.    if(_global.ClipBloquant == undefined)
  1541.    {
  1542.       var _loc0_ = null;
  1543.       var _loc3_ = _global.ClipBloquant = _root.createEmptyMovieClip("ClipBloquant",12123);
  1544.       _loc3_.attachMovie("ClipInvisible","ClipInvisible",2);
  1545.       _loc3_._width = Stage.width;
  1546.       _loc3_._height = Stage.height;
  1547.       _loc3_._x = 0;
  1548.       _loc3_._y = 0;
  1549.       _loc3_.useHandCursor = false;
  1550.       _loc3_.onPress = function()
  1551.       {
  1552.       };
  1553.    }
  1554. }
  1555. function DebloquerActives()
  1556. {
  1557.    if(_global.ClipBloquant != undefined)
  1558.    {
  1559.       _global.ClipBloquant.removeMovieClip();
  1560.       _global.ClipBloquant = undefined;
  1561.    }
  1562. }
  1563. function afficheLM_x2(p)
  1564. {
  1565.    viderLM_x2();
  1566.    _root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x,Y:p.LMrep._y,width:p.LMrep._width,height:p.LMrep._height});
  1567.    LMaVider2.push(p);
  1568. }
  1569. function viderLM_x2()
  1570. {
  1571.    var _loc3_ = 0;
  1572.    while(_loc3_ < _global.LMaVider2.length)
  1573.    {
  1574.       _root.gereTextes.masqueLM(_global.LMaVider2[_loc3_]);
  1575.       _loc3_ = _loc3_ + 1;
  1576.    }
  1577. }
  1578. function afficheLM_x(p)
  1579. {
  1580.    _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});
  1581.    _global.LMaVider.push(p);
  1582. }
  1583. function viderLM_x()
  1584. {
  1585.    var _loc3_ = 0;
  1586.    while(_loc3_ < _global.LMaVider.length)
  1587.    {
  1588.       _root.gereTextes.masqueLM(_global.LMaVider[_loc3_]);
  1589.       _loc3_ = _loc3_ + 1;
  1590.    }
  1591. }
  1592. function ConvertMcToArray(p)
  1593. {
  1594.    xtrace("Convertion du bitmap en tableau de nombres");
  1595.    var _loc3_ = p.mc;
  1596.    var _loc5_ = _loc3_._rotation;
  1597.    _loc3_._rotation = 0;
  1598.    var _loc1_ = _loc3_._width * 100 / _loc3_._xscale;
  1599.    var _loc4_ = _loc3_._height * 100 / _loc3_._yscale;
  1600.    _loc3_._rotation = _loc5_;
  1601.    _loc3_.MCwidth = _loc1_;
  1602.    _loc3_.MCheight = _loc4_;
  1603.    xtrace("WH " + _loc1_ + " " + _loc4_);
  1604.    var _loc2_ = new flash.display.BitmapData(_loc1_,_loc4_,true,0);
  1605.    _loc2_.draw(_loc3_);
  1606.    var _loc6_ = new Array();
  1607.    lv = new LoadVars();
  1608.    lv.tab = new Array();
  1609.    i = 0;
  1610.    while(i < _loc4_)
  1611.    {
  1612.       j = 0;
  1613.       while(j < _loc1_)
  1614.       {
  1615.          lv.tab.push(_loc2_.getPixel(j,i));
  1616.          j++;
  1617.       }
  1618.       i++;
  1619.    }
  1620.    return lv.tab;
  1621. }
  1622. function ConvertMcToBitmap(p)
  1623. {
  1624.    var _loc1_ = p.mc;
  1625.    var _loc2_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16777215);
  1626.    _loc2_.draw(_loc1_,_loc1_.transform.matrix);
  1627.    _loc1_._parent.createEmptyMovieClip(_loc1_._name,_loc1_.getDepth());
  1628.    _loc1_.attachBitmap(_loc2_,2,"always",true);
  1629. }
  1630. function CloneMcToBitmap(p)
  1631. {
  1632.    var _loc1_ = p.mc;
  1633.    var _loc9_ = p.pere;
  1634.    var _loc8_ = p.nom;
  1635.    var _loc5_ = p.level;
  1636.    trace("-*-*-* " + _loc1_._width + " " + _loc1_._height);
  1637.    var _loc7_ = _loc1_._x;
  1638.    var _loc6_ = _loc1_._y;
  1639.    _loc1_._x = 0;
  1640.    _loc1_._y = 0;
  1641.    var _loc4_ = new flash.display.BitmapData(_loc1_._width,_loc1_._height,true,16755370);
  1642.    trace(_loc1_.transform.matrix.toString());
  1643.    var _loc2_ = _loc9_.createEmptyMovieClip(_loc8_,_loc5_);
  1644.    _loc2_._visible = false;
  1645.    _loc2_.attachBitmap(_loc4_,2,"auto",true);
  1646.    _loc4_.draw(_loc1_,_loc1_.transform.matrix);
  1647.    _loc1_._x = _loc7_;
  1648.    _loc1_._y = _loc6_;
  1649.    trace("CloneMcToBitmap" + _loc2_);
  1650.    return _loc2_;
  1651. }
  1652. function trace_obj(obj)
  1653. {
  1654.    trace("\r________________" + obj + "________________");
  1655.    for(var _loc2_ in obj)
  1656.    {
  1657.       trace(_loc2_ + " = " + obj[_loc2_]);
  1658.    }
  1659.    trace("\r_______________________________________");
  1660. }
  1661. function xtrace_mc(obj)
  1662. {
  1663.    trace("\r________________" + obj + "________________");
  1664.    trace("_x : " + obj._x);
  1665.    trace("_y : " + obj._y);
  1666.    trace("_width : " + obj._width);
  1667.    trace("_height : " + obj._height);
  1668.    trace("_level : " + obj.getDepth());
  1669.    for(var _loc2_ in obj)
  1670.    {
  1671.       trace(_loc2_ + " = " + obj[_loc2_]);
  1672.    }
  1673.    trace("\r_______________________________________");
  1674. }
  1675. function EnvoiVersServeur()
  1676. {
  1677.    _amfphp_.Call({url:_root.xConfig.GatewayUrl,mc:this,service:_root.xConfig.Service,fonction:"Save",params:{Rubrique:_root.gModuleName.slice(0,6),DateLimite:_root.xConfig.DateLimiteEnvoi,PSEUDO:escape(MEMO.PSEUDO),EMAIL:escape(MEMO.EMAIL),TITRE:escape(MEMO.TITRE),XML:escape(PARAMS_ATELIER.Texte),PARAMS:PARAMS_ATELIER.FonteFamille + "," + PARAMS_ATELIER.FonteSize + "," + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1] + "," + PARAMS_ATELIER.FonteBold + "," + PARAMS_ATELIER.FonteItalic + "," + PARAMS_ATELIER.NoPapier},retour:"EnvoiVersServeurRetour"});
  1678. }
  1679. function xlisteObj(p)
  1680. {
  1681.    trace("_________________________________________________");
  1682.    for(props in p)
  1683.    {
  1684.       trace(props + " = " + p[props]);
  1685.    }
  1686.    trace("_________________________________________________");
  1687. }
  1688. function EnvoiVersServeurRetour(p)
  1689. {
  1690.    trace("EnvoiVersServeurRetour : ");
  1691.    xlisteObj(p);
  1692.    xlisteObj(p.resultat);
  1693.    if(p.resultat != undefined)
  1694.    {
  1695.       trace("R├â┬⌐ponse du serveur: " + p.resultat);
  1696.       if(p.resultat.succes == "ok")
  1697.       {
  1698.          DIALOG_BOX_WEB.AfficheSucces();
  1699.       }
  1700.       else if(p.resultat.outdate == true)
  1701.       {
  1702.          DIALOG_BOX_WEB.AfficheOutDate();
  1703.       }
  1704.    }
  1705.    else
  1706.    {
  1707.       var _loc2_ = "\r\r______________ \r /!\\ERREUR : ";
  1708.       _loc2_ += "\r " + p.erreur.faultstring;
  1709.       _loc2_ += "\r code : " + p.erreur.faultcode;
  1710.       _loc2_ += "\r detail : " + p.erreur.detail;
  1711.       _loc2_ += "\r error classe name : " + p.erreur.type;
  1712.       _loc2_ += "\r Cliquer sur \"Envoyer\" pour envoyer un message test au serveur.";
  1713.       trace("erreur : " + _loc2_);
  1714.       DIALOG_BOX_WEB.AfficheSucces();
  1715.    }
  1716. }
  1717. function MascotteSet(nom, frame)
  1718. {
  1719.    trace("MascotteSet : " + MascotteSet);
  1720.    trace("frame : " + frame);
  1721.    var _loc4_ = _root["MASC_" + nom];
  1722.    trace("mascotte : " + _loc4_);
  1723.    _loc4_.swapDepths(19569);
  1724.    _root["REP_" + _loc4_._name]._visible = false;
  1725.    _loc4_._x = MASCOTTE_INFO[frame].x;
  1726.    _loc4_._y = MASCOTTE_INFO[frame].y;
  1727.    _loc4_._xscale = MASCOTTE_INFO[frame].scale;
  1728.    _loc4_._yscale = Math.abs(MASCOTTE_INFO[frame].scale);
  1729.    trace("mascotte._x : " + _loc4_._x);
  1730.    trace("mascotte._y : " + _loc4_._y);
  1731.    trace("MASCOTTE_INFO[frame].scale : " + MASCOTTE_INFO[frame].scale);
  1732.    trace("MASCOTTE_INFO[frame] : " + MASCOTTE_INFO[frame]);
  1733.    _loc4_._visible = true;
  1734.    if(ASSISTANT_MODE == "ON")
  1735.    {
  1736.       _root.joueSon = _global.joueSon = function()
  1737.       {
  1738.       };
  1739.       _loc4_._visible = true;
  1740.       _loc4_.onPress = function()
  1741.       {
  1742.          this.startDrag();
  1743.       };
  1744.       _loc4_.onRelease = function()
  1745.       {
  1746.          this.stopDrag();
  1747.       };
  1748.    }
  1749.    _loc4_.NOT_RESIZE = true;
  1750. }
  1751. function StopAll()
  1752. {
  1753.    _o_.StopAll();
  1754.    mod.viewer1.StopAll();
  1755.    mod.viewer2.StopAll();
  1756.    mod.viewer3.StopAll();
  1757.    mod.viewer4.StopAll();
  1758.    mod.viewer5.StopAll();
  1759.    DebloquerActives();
  1760.    Mouse.show();
  1761. }
  1762. function ModulePause()
  1763. {
  1764. }
  1765. function ModuleResume()
  1766. {
  1767. }
  1768. function InitChoixPartie(mc)
  1769. {
  1770.    mc.CouleurOri = mc.LM.texte.textColor;
  1771.    if(mc._name == "LM_MEM_01")
  1772.    {
  1773.       mc.No = 1;
  1774.    }
  1775.    else
  1776.    {
  1777.       mc.No = 2;
  1778.    }
  1779.    mc.onPress = function()
  1780.    {
  1781.       trace("onPress : " + onPress);
  1782.       this.LM.texte.textColor = String(this.CouleurOri);
  1783.       if(this.No == 1)
  1784.       {
  1785.          _root.CHOIX_PARTIE._visible = false;
  1786.          _root.gotoAndStop("ATELIER");
  1787.       }
  1788.       else
  1789.       {
  1790.          _root.CHOIX_PARTIE._visible = false;
  1791.          NewMemo();
  1792.          _root.gotoAndStop("GENERIQUE");
  1793.       }
  1794.    };
  1795.    mc.onRollOver = function()
  1796.    {
  1797.       _root.joueBruitage({nomSon:"B_LM_0" + this.No});
  1798.       this.LM.texte.textColor = String(this.couleurRollT);
  1799.    };
  1800.    mc.onRollOut = function()
  1801.    {
  1802.       this.LM.texte.textColor = String(this.CouleurOri);
  1803.    };
  1804. }
  1805. function INIT()
  1806. {
  1807.    trace("(!)____mod_.INIT : ");
  1808.    trace("(!) VERSIONS : Module: " + _root.VERSION + ", mod: " + VERSION);
  1809.    xGetConfig();
  1810.    _root.xConfig.Set({nom:"GatewayUrl",defaut:"http://www.mobiclic.com/_backendCDS/amfphp/gateway.php",desc:""});
  1811.    _root.xConfig.Set({nom:"Service",defaut:"CD_FAB_Connection",desc:""});
  1812.    _root.xConfig.Set({nom:"BanquesTypes",defaut:"swf,swf,swf,swf,lm",desc:""});
  1813.    _root.xConfig.Set({nom:"Vitesse1Cran",defaut:0.5,type:"number",desc:"Vitesse de d├⌐filement des ├⌐l├⌐ments 1 ├á 1"});
  1814.    _root.xConfig.Set({nom:"VitesseSlideMin",defaut:1,type:"number",desc:"Vitesse mini de d├⌐filement des ├⌐l├⌐ments avec la manette"});
  1815.    _root.xConfig.Set({nom:"VitesseSlideMax",defaut:0.1,type:"number",desc:"Vitesse max de d├⌐filement des ├⌐l├⌐ments avec la manette"});
  1816.    _root.xConfig.Set({nom:"DureeSlide",defaut:5,type:"number",desc:"Dur├⌐e du d├⌐filement (secondes)"});
  1817.    _root.xConfig.Set({nom:"LancersEcart",defaut:0.5,type:"number",desc:"d├⌐lai en secondes entre les lancers des banques"});
  1818.    _root.xConfig.Set({nom:"TaillePoliceLimites",defaut:"5,40",desc:"mini et max des taille de la fonte"});
  1819.    _root.xConfig.Set({nom:"ModeTexteBloquage",defaut:"3",type:"number",desc:"1: pas de bloquage, 2: bloquage, 3: auto-redimensionnement de la fonte"});
  1820.    _root.xConfig.Set({nom:"DateLimiteEnvoi",defaut:"10/12/2000",desc:"date limite des envoi sur le web"});
  1821.    _root.gLabelStartName = HOTE.LocalConfig.gLabelStartName;
  1822.    trace("ASSISTANT_MODE " + ASSISTANT_MODE);
  1823.    if(ASSISTANT_MODE == "ON")
  1824.    {
  1825.       _root.ASSISTANT_DEV.swapDepths(21569);
  1826.       _root.gLabelStartName = ASSISTANT_LABEL;
  1827.    }
  1828.    else
  1829.    {
  1830.       _root.ASSISTANT_DEV.removeMovieClip();
  1831.    }
  1832.    var _loc9_ = getIBById("IB_WEB");
  1833.    var _loc8_ = _root.xConfig.DateLimiteEnvoi.split("/");
  1834.    _loc8_[1] = GetMonthByNo(_loc8_[1]);
  1835.    _loc9_.node.firstChild.nodeValue = str_replace(_loc9_.node.firstChild.nodeValue,"$DateLimite",_loc8_.join(" "));
  1836.    trace("ib_web.node.firstChild.nodeValue : " + _loc9_.node.firstChild.nodeValue);
  1837.    FONTES_LISTE = _root.moduleInfo.returnNodeByPath("Module.Config.Fontes").firstChild.nodeValue.split(",");
  1838.    var _loc3_ = 0;
  1839.    while(_loc3_ < FONTES_LISTE.length)
  1840.    {
  1841.       FONTES_LISTE[_loc3_] = TrimString(FONTES_LISTE[_loc3_]);
  1842.       _loc3_ = _loc3_ + 1;
  1843.    }
  1844.    FONTE_DEFAUT = {};
  1845.    var _loc4_ = _root.moduleInfo.returnNodeByPath("Module.Config.PremiereFonte");
  1846.    for(var _loc7_ in _loc4_.attributes)
  1847.    {
  1848.       trace(_loc7_ + " : " + _loc4_.attributes[_loc7_]);
  1849.       FONTE_DEFAUT[_loc7_] = _loc4_.attributes[_loc7_];
  1850.    }
  1851.    var _loc10_ = _root.xConfig.TaillePoliceLimites.split(",");
  1852.    TAILLE_FONTE_LIMITE = {min:Number(_loc10_[0]),max:Number(_loc10_[1])};
  1853.    COULEUR_LISTE = _root.moduleInfo.returnNodeByPath("Module.Config.Couleurs").firstChild.nodeValue.split(",");
  1854.    _loc3_ = 0;
  1855.    while(_loc3_ < COULEUR_LISTE.length)
  1856.    {
  1857.       COULEUR_LISTE[_loc3_] = TrimString(COULEUR_LISTE[_loc3_]);
  1858.       _loc3_ = _loc3_ + 1;
  1859.    }
  1860.    _root.CHOIX_PARTIE.swapDepths(7000);
  1861.    _root.CHOIX_PARTIE._visible = false;
  1862.    _root.CHOIX_PARTIE.FOND.onPress = function()
  1863.    {
  1864.    };
  1865.    _root.CHOIX_PARTIE.FOND.useHandCursor = false;
  1866.    _root.gereTextes.afficheLM({mc:_root.CHOIX_PARTIE,codeLM:"LM_MEM_01"});
  1867.    _root.gereTextes.afficheLM({mc:_root.CHOIX_PARTIE,codeLM:"LM_MEM_02"});
  1868.    FlashCookie = SharedObject.getLocal("MOBICLIC_" + _root.gModuleName,"/");
  1869.    var _loc11_ = FlashCookie.getSize() != 0 && Boolean(FlashCookie.data.newGame) == false;
  1870.    if(_loc11_)
  1871.    {
  1872.       trace("partie_existante : " + _loc11_);
  1873.       LoadCookie();
  1874.    }
  1875.    else
  1876.    {
  1877.       NewMemo();
  1878.    }
  1879.    if(this.SlideViewerInitOk != true)
  1880.    {
  1881.       this.SlideViewerInitOk = true;
  1882.       BanksInit();
  1883.       SlideViewerInit(1);
  1884.       SlideViewerInit(2);
  1885.       SlideViewerInit(3);
  1886.       SlideViewerInit(4);
  1887.       SlideViewerInit(5);
  1888.    }
  1889.    DIALOG_BOX_WEB = {create:function()
  1890.    {
  1891.       function init()
  1892.       {
  1893.          FENETRE._visible = false;
  1894.          FENETRE.swapDepths(25630);
  1895.          _root.gereTextes.afficheLM({codeLM:"LM_DB_WEB_SUCCES",mc:FENETRE});
  1896.          _root.gereTextes.afficheLM({codeLM:"LM_DB_WEB_ECHEC",mc:FENETRE});
  1897.          for(var _loc3_ in LMS)
  1898.          {
  1899.             _root.gereTextes.afficheLM({codeLM:LMS[_loc3_],mc:FENETRE.DG});
  1900.          }
  1901.          FENETRE.DG[LMS.PRENOM].LM.texte.type = "input";
  1902.          FENETRE.DG[LMS.PRENOM].LM.texte.selectable = true;
  1903.          FENETRE.DG[LMS.PRENOM].TexteOri = FENETRE.DG[LMS.PRENOM].LM.texte.text;
  1904.          FENETRE.DG[LMS.TITRE].LM.texte.type = "input";
  1905.          FENETRE.DG[LMS.TITRE].LM.texte.selectable = true;
  1906.          FENETRE.DG[LMS.EMAIL].LM.texte.type = "input";
  1907.          FENETRE.DG[LMS.EMAIL].LM.texte.selectable = true;
  1908.          FENETRE.DG[LMS.EMAIL].TexteOri = FENETRE.DG[LMS.EMAIL].LM.texte.text;
  1909.          InitMC({mc:FENETRE.DG.BTN_FERMER,OnPress:function()
  1910.          {
  1911.             Fermer();
  1912.          }});
  1913.          InitMC({mc:FENETRE.DG.BTN_OUI,OnPress:function()
  1914.          {
  1915.             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)
  1916.             {
  1917.                MEMO.PSEUDO = FENETRE.DG[LMS.PRENOM].LM.texte.text;
  1918.                MEMO.EMAIL = FENETRE.DG[LMS.EMAIL].LM.texte.text;
  1919.                MEMO.TITRE = FENETRE.DG[LMS.TITRE].LM.texte.text;
  1920.                FENETRE.DG._visible = false;
  1921.                EnvoiVersServeur();
  1922.             }
  1923.          }});
  1924.          InitMC({mc:FENETRE.DG.BTN_NON,OnPress:function()
  1925.          {
  1926.             Fermer();
  1927.          }});
  1928.       }
  1929.       function Afficher()
  1930.       {
  1931.          FENETRE.DG._visible = true;
  1932.          FENETRE.LM_DB_WEB_SUCCES._visible = false;
  1933.          FENETRE.LM_DB_WEB_ECHEC._visible = false;
  1934.          FENETRE.FOND.onPress = function()
  1935.          {
  1936.          };
  1937.          FENETRE.FOND.useHandCursor = false;
  1938.          FENETRE._visible = true;
  1939.       }
  1940.       function Fermer()
  1941.       {
  1942.          FENETRE._visible = false;
  1943.       }
  1944.       function AfficheSucces()
  1945.       {
  1946.          FENETRE.LM_DB_WEB_SUCCES._visible = true;
  1947.          FENETRE.FOND.onPress = function()
  1948.          {
  1949.             DIALOG_BOX_WEB.Fermer();
  1950.          };
  1951.          FENETRE.FOND.useHandCursor = true;
  1952.       }
  1953.       function AfficheOutDate()
  1954.       {
  1955.          FENETRE.LM_DB_WEB_ECHEC._visible = true;
  1956.          FENETRE.FOND.onPress = function()
  1957.          {
  1958.             DIALOG_BOX_WEB.Fermer();
  1959.          };
  1960.          FENETRE.FOND.useHandCursor = true;
  1961.       }
  1962.       var FENETRE = _root.DIALOG_BOX_WEB;
  1963.       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"};
  1964.       this.Afficher = Afficher;
  1965.       this.Fermer = Fermer;
  1966.       this.AfficheSucces = AfficheSucces;
  1967.       this.AfficheOutDate = AfficheOutDate;
  1968.       init();
  1969.    }};
  1970.    DIALOG_BOX_WEB.create();
  1971.    DIALOG_BOX_MESSAGE = {create:function()
  1972.    {
  1973.       function init()
  1974.       {
  1975.          FENETRE._visible = false;
  1976.          FENETRE.swapDepths(25631);
  1977.          for(var _loc3_ in LMS)
  1978.          {
  1979.             _root.gereTextes.afficheLM({codeLM:LMS[_loc3_],mc:FENETRE.DG});
  1980.          }
  1981.          InitMC({mc:FENETRE.DG.BTN_FERMER,OnPress:function()
  1982.          {
  1983.             Fermer();
  1984.          }});
  1985.       }
  1986.       function Afficher()
  1987.       {
  1988.          FENETRE.DG._visible = true;
  1989.          FENETRE.FOND.onPress = function()
  1990.          {
  1991.          };
  1992.          FENETRE.FOND.useHandCursor = false;
  1993.          FENETRE._visible = true;
  1994.       }
  1995.       function Fermer()
  1996.       {
  1997.          FENETRE._visible = false;
  1998.       }
  1999.       var FENETRE = _root.DIALOG_BOX_MESSAGE;
  2000.       var LMS = {DEPASSE:"LM_DB_WEB_DEPASSE"};
  2001.       this.Afficher = Afficher;
  2002.       this.Fermer = Fermer;
  2003.       init();
  2004.    }};
  2005.    DIALOG_BOX_MESSAGE.create();
  2006.    TexteAjuste();
  2007.    _root.xConfig.ToXml();
  2008.    _root.InitOk();
  2009. }
  2010. function START()
  2011. {
  2012.    if(MEMO.newGame == true)
  2013.    {
  2014.       _root.gotoAndStop("GENERIQUE");
  2015.    }
  2016.    else
  2017.    {
  2018.       _root.gBlockMusic = undefined;
  2019.       _root.changeMusicOn(0);
  2020.       _root.changeMusicOn(1);
  2021.       _root.CHOIX_PARTIE._visible = true;
  2022.    }
  2023. }
  2024. function GENERIQUE()
  2025. {
  2026.    _root.zapIntro("_01");
  2027.    _root.changeMusicOn(0);
  2028.    _root.FinB_Jingle = function()
  2029.    {
  2030.       _root.gotoAndStop("_01");
  2031.    };
  2032.    _root.joueBruitage({nomSon:"B_JINGLE",actionFin:"FinB_Jingle"});
  2033. }
  2034. function ATTENTE()
  2035. {
  2036.    BT_AIDE_Init("ATTENTE");
  2037.    _root.gereTextes.masqueLM({codeLM:"LM_TEXTE"});
  2038.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_01"});
  2039.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_02"});
  2040.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_03"});
  2041.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_04"});
  2042.    _root.gereTextes.afficheLM({mc:_root.GEN_LM,codeLM:"LM_05"});
  2043.    _root.GEN_LM.swapDepths(9000);
  2044.    _root.ZONE_CACHE_01.swapDepths(8001);
  2045.    _root.ZONE_CACHE_02.swapDepths(8002);
  2046.    _root.ZONE_CACHE_03.swapDepths(8003);
  2047.    _root.ZONE_CACHE_04.swapDepths(8004);
  2048.    _root.ZONE_CACHE_05.swapDepths(8005);
  2049.    _root.FEUILLE._parent._visible = false;
  2050.    _root.GEN_LM_AT.removeMovieClip();
  2051.    _root.AT_REP_ZONE_01.removeMovieClip();
  2052.    _root.AT_REP_ZONE_02.removeMovieClip();
  2053.    _root.AT_REP_ZONE_03.removeMovieClip();
  2054.    _root.AT_REP_ZONE_04.removeMovieClip();
  2055.    _root.AT_REP_ZONE_05.removeMovieClip();
  2056.    _root.ZONE_CACHE_AT.removeMovieClip();
  2057.    GenerateursSlideViewerInit();
  2058.    _root.MANETTE_ZONE._visible = false;
  2059.    _root.REP_MANETTE._alpha = 0;
  2060.    InitMC({mc:_root.REP_MANETTE,fonction:"slider",DragZoneHauteur:_root.MANETTE_ZONE._height,son:"B_MAN02",sonOnMove:"B_MAN03",IB:"IB_MAN"});
  2061.    _root.REP_MANETTE.OnRollOver = function()
  2062.    {
  2063.       _root.MANETTE.gotoAndStop("E2");
  2064.    };
  2065.    _root.REP_MANETTE.OnRollOut = function()
  2066.    {
  2067.       _root.MANETTE.gotoAndStop("E1");
  2068.    };
  2069.    _root.REP_MANETTE.OnPress = function()
  2070.    {
  2071.       _root.MANETTE.gotoAndStop("E3");
  2072.       _global.CURSEUR._visible = false;
  2073.    };
  2074.    _root.REP_MANETTE.OnRelease = _root.REP_MANETTE.OnReleaseOutside = function()
  2075.    {
  2076.       if(this.FrameManette > 2)
  2077.       {
  2078.          this.Desactiver();
  2079.          _root.MANETTE.gotoAndStop("E4");
  2080.          _global.CURSEUR._visible = true;
  2081.          _root.MANETTE.MANETTE.gotoAndPlay(7 - this.FrameManette);
  2082.          gereCursor("fleche");
  2083.          _root.joueBruitage({nomSon:"B_MAN04"});
  2084.          this.SetPositionY(0);
  2085.       }
  2086.       else
  2087.       {
  2088.          _global.CURSEUR._visible = true;
  2089.          _root.MANETTE.gotoAndStop("E1");
  2090.       }
  2091.    };
  2092.    _root.REP_MANETTE.PendantSlide = function()
  2093.    {
  2094.       this.FrameManette = Math.floor(6 * this.GetPositionY() / 100) + 1;
  2095.       _root.MANETTE.MANETTE.gotoAndStop(this.FrameManette);
  2096.    };
  2097.    InitMC({mc:_root.BT_ATELIER,OnPress:function()
  2098.    {
  2099.       trace("OnPress : " + MEMO.newGame + " " + mod.IntroAtelierDejaVue);
  2100.       if(MEMO.newGame == true && mod.IntroAtelierDejaVue != true)
  2101.       {
  2102.          mod.IntroAtelierDejaVue = true;
  2103.          _root.gotoAndStop("AT_01");
  2104.       }
  2105.       else
  2106.       {
  2107.          _root.gotoAndStop("ATELIER");
  2108.       }
  2109.    },son:"B_AT",IB:"IB_AT"});
  2110.    if(mod.ElementsChanged != true && MEMO.newGame == true)
  2111.    {
  2112.       _root.BT_ATELIER.Desactiver();
  2113.       _root.BT_ATELIER.gotoAndStop("E0");
  2114.    }
  2115.    else
  2116.    {
  2117.       _root.BT_ATELIER.Activer();
  2118.       _root.BT_ATELIER.gotoAndStop("E1");
  2119.    }
  2120.    if(this.ATTENTE_DEJA_JOUE != true && partie_existante == true)
  2121.    {
  2122.       _root.CHOIX_PARTIE._visible = true;
  2123.    }
  2124.    this.ATTENTE_DEJA_JOUE = true;
  2125. }
  2126. function ATELIER()
  2127. {
  2128.    DebloquerActives();
  2129.    if(_root.gMusic == 0)
  2130.    {
  2131.       _root.changeMusicOn(1);
  2132.    }
  2133.    _root.LM_DEPASSE._visible = false;
  2134.    BT_AIDE_Init("ATELIER");
  2135.    _root.GEN_LM.removeMovieClip();
  2136.    _root.ZONE_CACHE_01.removeMovieClip();
  2137.    _root.ZONE_CACHE_02.removeMovieClip();
  2138.    _root.ZONE_CACHE_03.removeMovieClip();
  2139.    _root.ZONE_CACHE_04.removeMovieClip();
  2140.    _root.ZONE_CACHE_05.removeMovieClip();
  2141.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_01_AT"});
  2142.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_02_AT"});
  2143.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_03_AT"});
  2144.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_04_AT"});
  2145.    _root.gereTextes.afficheLM({mc:_root.GEN_LM_AT,codeLM:"LM_05_AT"});
  2146.    _root.gereTextes.afficheLM({mc:_root.LM_TEXTE,codeLM:"LM_TEXTE"});
  2147.    _root.FEUILLE_i._visible = false;
  2148.    _root.FEUILLE = _root.swfStocker["A_" + _root.gModuleName + "_FEUILLE_" + _root.gModuleName].FEUILLE;
  2149.    trace("_root.FEUILLE : " + _root.FEUILLE);
  2150.    _root.FEUILLE._parent._visible = true;
  2151.    _root.FEUILLE._x = _root.FEUILLE_i._x;
  2152.    _root.FEUILLE._y = _root.FEUILLE_i._y;
  2153.    _root.swfStocker.swapDepths(14527);
  2154.    _root.GEN_LM_AT.swapDepths(9004);
  2155.    _root.ZONE_CACHE_AT.swapDepths(9002);
  2156.    if(PARAMS_ATELIER.Texte != "")
  2157.    {
  2158.       _root.LM_TEXTE._visible = false;
  2159.    }
  2160.    TEXTE = _root.FEUILLE.TEXTE;
  2161.    PALETTE_TEXTE = _root.PALETTE_TEXTE;
  2162.    _root.MASK_ZONE_01.removeMovieClip();
  2163.    _root.MASK_ZONE_02.removeMovieClip();
  2164.    _root.MASK_ZONE_03.removeMovieClip();
  2165.    _root.MASK_ZONE_04.removeMovieClip();
  2166.    _root.MASK_ZONE_05.removeMovieClip();
  2167.    PaletteInit();
  2168.    AtelierSlideViewerInit(1);
  2169.    AtelierSlideViewerInit(2);
  2170.    AtelierSlideViewerInit(3);
  2171.    AtelierSlideViewerInit(4);
  2172.    AtelierSlideViewerInit(5);
  2173.    InitMC({mc:_root.BT_RET,OnPress:function()
  2174.    {
  2175.       _root.gotoAndStop("ATTENTE");
  2176.    },son:"B_RET",IB:"IB_RET"});
  2177.    InitMC({mc:_root.BT_WEB,OnPress:function()
  2178.    {
  2179.       if(TEXTE_DEPASSE == true)
  2180.       {
  2181.          DIALOG_BOX_MESSAGE.Afficher();
  2182.       }
  2183.       else
  2184.       {
  2185.          DIALOG_BOX_WEB.Afficher();
  2186.       }
  2187.    },son:"B_WEB",IB:"IB_WEB"});
  2188.    InitMC({mc:_root.BT_IMP,OnPress:function()
  2189.    {
  2190.       var _loc3_ = _root.creerRectangle({pere:_root,level:14526,alpha:100,couleur:16777215,w:800,h:600});
  2191.       _loc3_.onPress = function()
  2192.       {
  2193.       };
  2194.       _loc3_.useHandCursor = false;
  2195.       TEXTE_TEMP.removeTextField();
  2196.       TEXTE.autoSize = false;
  2197.       TEXTE._height = 411;
  2198.       _root.FEUILLE.posOri = {x:_root.FEUILLE._x,y:_root.FEUILLE._y,w:_root.FEUILLE._width,h:_root.FEUILLE._height};
  2199.       var _loc4_ = 800 / _root.FEUILLE._height;
  2200.       _root.FEUILLE._width *= _loc4_;
  2201.       _root.FEUILLE._height = 800;
  2202.       _root.FEUILLE._rotation = -90;
  2203.       _root.FEUILLE._x = 400 - _root.FEUILLE._width / 2;
  2204.       _root.FEUILLE._y = 300 + _root.FEUILLE._height / 2;
  2205.       if(_global.HOTE.ImprimerEcran())
  2206.       {
  2207.          _root.FEUILLE._x = _root.FEUILLE.posOri.x;
  2208.          _root.FEUILLE._y = _root.FEUILLE.posOri.y;
  2209.          _root.FEUILLE._rotation = 0;
  2210.          _root.FEUILLE._width = _root.FEUILLE.posOri.w;
  2211.          _root.FEUILLE._height = _root.FEUILLE.posOri.h;
  2212.          if(_root.xConfig.ModeTexteBloquage == 1)
  2213.          {
  2214.             TEXTE.autoSize = "left";
  2215.          }
  2216.          else
  2217.          {
  2218.             TEXTE.autoSize = false;
  2219.          }
  2220.       }
  2221.       else
  2222.       {
  2223.          _root.FEUILLE._x = _root.FEUILLE.posOri.x;
  2224.          _root.FEUILLE._y = _root.FEUILLE.posOri.y;
  2225.          _root.FEUILLE._rotation = 0;
  2226.          _root.FEUILLE._width = _root.FEUILLE.posOri.w;
  2227.          _root.FEUILLE._height = _root.FEUILLE.posOri.h;
  2228.          if(_root.xConfig.ModeTexteBloquage == 1)
  2229.          {
  2230.             TEXTE.autoSize = "left";
  2231.          }
  2232.          else
  2233.          {
  2234.             TEXTE.autoSize = false;
  2235.          }
  2236.       }
  2237.       _loc3_.removeMovieClip();
  2238.    },son:"B_IMP",IB:"IB_IMP"});
  2239.    if(PARAMS_ATELIER.Texte == "" || MEMO.newGame == true)
  2240.    {
  2241.       _root.BT_WEB.Desactiver();
  2242.       _root.BT_WEB.gotoAndStop("E0");
  2243.       _root.BT_IMP.Desactiver();
  2244.       _root.BT_IMP.gotoAndStop("E0");
  2245.    }
  2246.    else
  2247.    {
  2248.       _root.BT_WEB.Activer();
  2249.       _root.BT_WEB.gotoAndStop("E1");
  2250.       _root.BT_IMP.Activer();
  2251.       _root.BT_IMP.gotoAndStop("E1");
  2252.    }
  2253. }
  2254. function TexteAjuste()
  2255. {
  2256.    if(TEXTE_TEMP == undefined)
  2257.    {
  2258.       TEXTE_TEMP = _root.FEUILLE.createTextField("TEXTE_TEMP",19234,-200,0,10,10);
  2259.       TEXTE_TEMP.embedFonts = true;
  2260.       TEXTE_TEMP.border = true;
  2261.       TEXTE_TEMP.type = "dynamic";
  2262.       TEXTE_TEMP.antiAliasType = "advanced";
  2263.       TEXTE_TEMP.selectable = false;
  2264.       TEXTE_TEMP.autoSize = true;
  2265.       TEXTE_TEMP.multiline = true;
  2266.       TEXTE_TEMP.wordWrap = true;
  2267.       TEXTE_TEMP.text = "";
  2268.       TEXTE_TEMP._visible = false;
  2269.    }
  2270.    TEXTE_TEMP._y = TEXTE._y;
  2271.    TEXTE_TEMP._width = TEXTE._width;
  2272.    TEXTE_TEMP.text = PARAMS_ATELIER.Texte;
  2273.    TEXTE_TEMP.setTextFormat(PARAMS_ATELIER.FormatText);
  2274. }
  2275. function Load()
  2276. {
  2277. }
  2278. function NewMemo()
  2279. {
  2280.    MEMO = {newGame:true};
  2281.    var _loc4_ = _root.getTextById("LM_TEXTE");
  2282.    PARAMS_ATELIER = {};
  2283.    PARAMS_ATELIER.Texte = "";
  2284.    PARAMS_ATELIER.FormatText = new TextFormat();
  2285.    PARAMS_ATELIER.FormatTextTaille = new TextFormat();
  2286.    PARAMS_ATELIER.FormatTextTaille.font = "Times New Roman";
  2287.    PARAMS_ATELIER.FormatTextFamille = new TextFormat();
  2288.    PARAMS_ATELIER.FormatTextFamille.size = 14;
  2289.    PARAMS_ATELIER.FonteFamille = 1;
  2290.    PARAMS_ATELIER.FonteCouleur = 1;
  2291.    var _loc2_ = 0;
  2292.    while(_loc2_ < FONTES_LISTE.length)
  2293.    {
  2294.       if(FONTES_LISTE[_loc2_] == FONTE_DEFAUT.font)
  2295.       {
  2296.          PARAMS_ATELIER.FonteFamille = _loc2_ + 1;
  2297.       }
  2298.       _loc2_ = _loc2_ + 1;
  2299.    }
  2300.    _loc2_ = 0;
  2301.    while(_loc2_ < COULEUR_LISTE.length)
  2302.    {
  2303.       trace("FONTE_DEFAUT[\"color\"] : " + FONTE_DEFAUT.color);
  2304.       trace("COULEUR_LISTE[i] : " + COULEUR_LISTE[_loc2_]);
  2305.       if(COULEUR_LISTE[_loc2_] == FONTE_DEFAUT.color)
  2306.       {
  2307.          PARAMS_ATELIER.FonteCouleur = _loc2_ + 1;
  2308.       }
  2309.       _loc2_ = _loc2_ + 1;
  2310.    }
  2311.    PARAMS_ATELIER.FonteSize = Number(FONTE_DEFAUT.size);
  2312.    trace("FONTE_DEFAUT[\"size\"] : " + FONTE_DEFAUT.size);
  2313.    PARAMS_ATELIER.FonteBold = FONTE_DEFAUT.bold == "true" ? true : false;
  2314.    PARAMS_ATELIER.FonteItalic = FONTE_DEFAUT.italic == "true" ? true : false;
  2315.    PARAMS_ATELIER.NoPapier = Number(FONTE_DEFAUT.papier);
  2316.    PARAMS_GENERATEUR = {};
  2317.    PARAMS_GENERATEUR.SelectedElements = [undefined,0,0,0,0,0];
  2318.    saveCookie();
  2319.    MEMO_trace();
  2320. }
  2321. function LoadCookie()
  2322. {
  2323.    MEMO = {newGame:Boolean(FlashCookie.data.newGame)};
  2324.    PARAMS_ATELIER = {};
  2325.    PARAMS_ATELIER.FormatText = new TextFormat();
  2326.    PARAMS_ATELIER.FormatTextTaille = new TextFormat();
  2327.    PARAMS_ATELIER.FormatTextTaille.font = "Times New Roman";
  2328.    PARAMS_ATELIER.FormatTextFamille = new TextFormat();
  2329.    PARAMS_ATELIER.FormatTextFamille.size = 14;
  2330.    PARAMS_ATELIER.Texte = FlashCookie.data.Texte;
  2331.    PARAMS_ATELIER.FonteFamille = FlashCookie.data.FonteFamille;
  2332.    PARAMS_ATELIER.FonteCouleur = FlashCookie.data.FonteCouleur;
  2333.    PARAMS_ATELIER.FonteSize = FlashCookie.data.FonteSize;
  2334.    PARAMS_ATELIER.FonteBold = FlashCookie.data.FonteBold;
  2335.    PARAMS_ATELIER.FonteItalic = FlashCookie.data.FonteItalic;
  2336.    PARAMS_ATELIER.NoPapier = FlashCookie.data.NoPapier;
  2337.    PARAMS_GENERATEUR = {};
  2338.    PARAMS_GENERATEUR.SelectedElements = [];
  2339.    var _loc1_ = 1;
  2340.    while(_loc1_ <= 5)
  2341.    {
  2342.       PARAMS_GENERATEUR.SelectedElements[_loc1_] = FlashCookie.data.elements[_loc1_];
  2343.       _loc1_ = _loc1_ + 1;
  2344.    }
  2345. }
  2346. function MEMO_trace()
  2347. {
  2348.    trace("\r_______MEMO_trace : " + MEMO_trace);
  2349.    trace("MEMO : ");
  2350.    for(var _loc1_ in MEMO)
  2351.    {
  2352.       trace("-- " + _loc1_ + " = " + MEMO[_loc1_]);
  2353.    }
  2354.    trace("PARAMS_ATELIER : ");
  2355.    for(_loc1_ in PARAMS_ATELIER)
  2356.    {
  2357.       trace("-- " + _loc1_ + " = " + PARAMS_ATELIER[_loc1_]);
  2358.    }
  2359.    trace("PARAMS_GENERATEUR : ");
  2360.    for(_loc1_ in PARAMS_GENERATEUR)
  2361.    {
  2362.       trace("-- " + _loc1_ + " = " + PARAMS_GENERATEUR[_loc1_]);
  2363.    }
  2364.    trace("____________________________");
  2365. }
  2366. function saveCookie()
  2367. {
  2368.    FlashCookie.clear();
  2369.    FlashCookie.data.newGame = MEMO.newGame;
  2370.    FlashCookie.data.Texte = PARAMS_ATELIER.Texte;
  2371.    FlashCookie.data.FonteFamille = PARAMS_ATELIER.FonteFamille;
  2372.    FlashCookie.data.FonteCouleur = PARAMS_ATELIER.FonteCouleur;
  2373.    FlashCookie.data.FonteSize = PARAMS_ATELIER.FonteSize;
  2374.    FlashCookie.data.FonteBold = PARAMS_ATELIER.FonteBold;
  2375.    FlashCookie.data.FonteItalic = PARAMS_ATELIER.FonteItalic;
  2376.    FlashCookie.data.NoPapier = PARAMS_ATELIER.NoPapier;
  2377.    FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
  2378.    FlashCookie.flush();
  2379. }
  2380. function BanksInit()
  2381. {
  2382.    ZONE_ELEMENT_MODELE = {w:230,h:70};
  2383.    var _loc10_ = _root.xConfig.BanquesTypes.split(",");
  2384.    BANKS = [];
  2385.    BANKS[0] = {};
  2386.    BANKS[1] = {type:_loc10_[0],elements:[]};
  2387.    BANKS[2] = {type:_loc10_[1],elements:[]};
  2388.    BANKS[3] = {type:_loc10_[2],elements:[]};
  2389.    BANKS[4] = {type:_loc10_[3],elements:[]};
  2390.    BANKS[5] = {type:_loc10_[4],elements:[]};
  2391.    var _loc6_ = 1;
  2392.    while(_loc6_ <= 10)
  2393.    {
  2394.       var _loc4_ = 1;
  2395.       while(_loc4_ <= BANKS.length)
  2396.       {
  2397.          if(BANKS[_loc4_].type == "swf")
  2398.          {
  2399.             BANKS[_loc4_].elements.push(_root["banque" + _loc4_]["A_" + _root.gModuleName + "_EL_" + gimme2digits(_loc4_) + "_" + gimme2digits(_loc6_)]);
  2400.          }
  2401.          else if(BANKS[_loc4_].type == "lm")
  2402.          {
  2403.             BANKS[_loc4_].elements.push(GetTexte("LM_" + gimme2digits(_loc4_) + "_" + gimme2digits(_loc6_),_loc4_));
  2404.          }
  2405.          _loc4_ = _loc4_ + 1;
  2406.       }
  2407.       _loc6_ = _loc6_ + 1;
  2408.    }
  2409.    var _loc5_ = undefined;
  2410.    var _loc3_ = undefined;
  2411.    _loc6_ = 1;
  2412.    while(_loc6_ <= 5)
  2413.    {
  2414.       _loc5_ = BANKS[_loc6_];
  2415.       _loc4_ = 0;
  2416.       while(_loc4_ < 10)
  2417.       {
  2418.          _loc3_ = _loc5_.elements[_loc4_];
  2419.          if(_loc5_.type == "swf")
  2420.          {
  2421.             _loc3_.onRollOver = function()
  2422.             {
  2423.                _root.joueSon({nomSon:this._name.split("_")[4] + "_" + this._name.split("_")[5],actionFin:"RIEN",zapBlock:"NOZAP_NOBLOCK"});
  2424.             };
  2425.             _loc3_.onRollOut = function()
  2426.             {
  2427.                _root.stopSon();
  2428.             };
  2429.          }
  2430.          else if(_loc5_.type == "lm")
  2431.          {
  2432.             _loc3_.onRollOver = function()
  2433.             {
  2434.                _root.joueBruitage({nomSon:"B_" + this._name.split("_")[1] + "_" + this._name.split("_")[2]});
  2435.             };
  2436.             _loc3_.onRollOut = function()
  2437.             {
  2438.                _root.stopBruitage({nomSon:"B_" + this._name.split("_")[1] + "_" + this._name.split("_")[2]});
  2439.             };
  2440.          }
  2441.          _loc3_.enabled = true;
  2442.          _loc4_ = _loc4_ + 1;
  2443.       }
  2444.       _loc6_ = _loc6_ + 1;
  2445.    }
  2446. }
  2447. function BankInit(no_bank)
  2448. {
  2449.    BANKS[no_bank].selectedIndex = 0;
  2450.    BankRefresh(no_bank);
  2451. }
  2452. function BankRefresh(no_bank)
  2453. {
  2454.    var _loc2_ = BANKS[no_bank];
  2455.    var _loc4_ = _root["ZONE_0" + no_bank];
  2456. }
  2457. function SlideViewerInit(no_bank)
  2458. {
  2459.    var _loc0_ = null;
  2460.    var _loc5_ = this["viewer" + no_bank] = new xb.classes.slide1.SlideViewer();
  2461.    _loc5_.__set__elements(BANKS[no_bank].elements);
  2462.    _loc5_.__set__dureeSlide(_root.xConfig.DureeSlide);
  2463.    _loc5_.__set__vitesse1Cran(_root.xConfig.Vitesse1Cran);
  2464.    _loc5_.__set__vitesseSlideMax(_root.xConfig.VitesseSlideMax);
  2465.    _loc5_.__set__vitesseSlideMin(_root.xConfig.VitesseSlideMin);
  2466.    _loc5_.elementsInit();
  2467.    _loc5_.OnChange = function()
  2468.    {
  2469.       if(mod.ManetteEnCours == true)
  2470.       {
  2471.          var _loc3_ = true;
  2472.          var _loc2_ = 1;
  2473.          while(_loc2_ <= 5)
  2474.          {
  2475.             if(mod["viewer" + _loc2_].state == xb.classes.slide1.SlideViewer.STARTED)
  2476.             {
  2477.                _loc3_ = false;
  2478.                break;
  2479.             }
  2480.             _loc2_ = _loc2_ + 1;
  2481.          }
  2482.          if(_loc3_ == true)
  2483.          {
  2484.             mod.ManetteEnCours = false;
  2485.             mod.ElementsChanged = true;
  2486.             _root.BT_ATELIER.gotoAndStop("E1");
  2487.             _root.BT_ATELIER.Activer();
  2488.             PARAMS_GENERATEUR.SelectedElements = [];
  2489.             _loc2_ = 1;
  2490.             while(_loc2_ <= 5)
  2491.             {
  2492.                PARAMS_GENERATEUR.SelectedElements[_loc2_] = mod["viewer" + _loc2_].selectedIndex;
  2493.                _loc2_ = _loc2_ + 1;
  2494.             }
  2495.             FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
  2496.             trace("SelectedElements : " + PARAMS_GENERATEUR.SelectedElements);
  2497.             FlashCookie.flush();
  2498.             DebloquerActives();
  2499.             _root.REP_MANETTE.Activer();
  2500.          }
  2501.       }
  2502.       else
  2503.       {
  2504.          mod.ElementsChanged = true;
  2505.          _root.BT_ATELIER.gotoAndStop("E1");
  2506.          _root.BT_ATELIER.Activer();
  2507.          PARAMS_GENERATEUR.SelectedElements = [];
  2508.          _loc2_ = 1;
  2509.          while(_loc2_ <= 5)
  2510.          {
  2511.             PARAMS_GENERATEUR.SelectedElements[_loc2_] = mod["viewer" + _loc2_].selectedIndex;
  2512.             _loc2_ = _loc2_ + 1;
  2513.          }
  2514.          FlashCookie.data.elements = PARAMS_GENERATEUR.SelectedElements;
  2515.          trace("SelectedElements : " + PARAMS_GENERATEUR.SelectedElements);
  2516.          FlashCookie.flush();
  2517.       }
  2518.    };
  2519. }
  2520. function GenerateursSlideViewerInit()
  2521. {
  2522.    GenerateurSlideViewerInit(1);
  2523.    GenerateurSlideViewerInit(2);
  2524.    GenerateurSlideViewerInit(3);
  2525.    GenerateurSlideViewerInit(4);
  2526.    GenerateurSlideViewerInit(5);
  2527. }
  2528. function GenerateurSlideViewerInit(no_bank)
  2529. {
  2530.    var _loc4_ = _root["MASK_ZONE_0" + no_bank];
  2531.    var _loc8_ = _root["MASK_ZONE_0" + no_bank];
  2532.    _loc8_.swapDepths(5000 + no_bank);
  2533.    _root["banque" + no_bank]._visible = true;
  2534.    _root["banque" + no_bank].setMask(_loc8_);
  2535.    var _loc5_ = this["viewer" + no_bank];
  2536.    _loc5_.__set__zone_affichage({x:_loc4_._x - _loc4_._width / 2,y:_loc4_._y - _loc4_._height / 2,w:_loc4_._width,h:_loc4_._height});
  2537.    _loc5_.elementsRefresh();
  2538.    _loc5_.__set__selectedIndex(PARAMS_GENERATEUR.SelectedElements[no_bank]);
  2539.    var _loc6_ = _root["BOUTON_0" + no_bank + "_D"];
  2540.    var _loc7_ = _root["BOUTON_0" + no_bank + "_G"];
  2541.    InitMC({mc:_loc6_,son:"B_FLE"});
  2542.    _loc6_.Viewer = _loc5_;
  2543.    _loc6_.OnPress = function()
  2544.    {
  2545.       this.Viewer.showElement("next");
  2546.    };
  2547.    InitMC({mc:_loc7_,son:"B_FLE"});
  2548.    _loc7_.Viewer = _loc5_;
  2549.    _loc7_.onPress = function()
  2550.    {
  2551.       this.Viewer.showElement("prev");
  2552.    };
  2553. }
  2554. function AtelierSlideViewerInit(no_bank)
  2555. {
  2556.    var _loc3_ = _root["AT_REP_ZONE_0" + no_bank];
  2557.    var _loc6_ = _root["AT_REP_ZONE_0" + no_bank];
  2558.    _loc6_.swapDepths(6000 + no_bank);
  2559.    _root["banque" + no_bank]._visible = true;
  2560.    _root["banque" + no_bank].setMask(_loc6_);
  2561.    var _loc5_ = this["viewer" + no_bank];
  2562.    _loc5_.__set__zone_affichage({x:_loc3_._x - _loc3_._width / 2,y:_loc3_._y - _loc3_._height / 2,w:_loc3_._width,h:_loc3_._height});
  2563.    _loc5_.elementsRefresh();
  2564.    _loc5_.__set__selectedIndex(PARAMS_GENERATEUR.SelectedElements[no_bank]);
  2565. }
  2566. function SlideStart(no_bank)
  2567. {
  2568.    if(no_bank > 5)
  2569.    {
  2570.       return undefined;
  2571.    }
  2572.    BloquerActives();
  2573.    mod.ManetteEnCours = true;
  2574.    this["viewer" + no_bank].start();
  2575.    ExecuterApresDelai({mcRef:this,methode:"SlideStart",params:no_bank + 1,delai:_root.xConfig.LancersEcart * randomValue(1,_root.xConfig.LancersEcart * 0.2)});
  2576. }
  2577. function PaletteInit()
  2578. {
  2579.    if(this.PaletteIsInit != true)
  2580.    {
  2581.       this.PaletteIsInit = true;
  2582.    }
  2583.    PaletteBtnsInit();
  2584.    TEXTE.text = PARAMS_ATELIER.Texte;
  2585.    TEXTE.onChanged = function()
  2586.    {
  2587.       _root.LM_TEXTE._visible = false;
  2588.       PARAMS_ATELIER_LAST = ObjectClone(PARAMS_ATELIER);
  2589.       PARAMS_ATELIER.Texte = TEXTE.text;
  2590.       if(_root.xConfig.ModeTexteBloquage == 2)
  2591.       {
  2592.          TexteAjuste();
  2593.          if(TEXTE_TEMP._height > TEXTE._height)
  2594.          {
  2595.             PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2596.             PaletteRefresh();
  2597.             return undefined;
  2598.          }
  2599.       }
  2600.       else if(_root.xConfig.ModeTexteBloquage == 3)
  2601.       {
  2602.          TexteAjuste();
  2603.          if(TEXTE_TEMP._height > TEXTE._height)
  2604.          {
  2605.             if(PARAMS_ATELIER.FonteSize <= TAILLE_FONTE_LIMITE.min)
  2606.             {
  2607.                PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2608.             }
  2609.             else
  2610.             {
  2611.                PARAMS_ATELIER.FonteSize--;
  2612.             }
  2613.             PaletteRefresh();
  2614.             return undefined;
  2615.          }
  2616.       }
  2617.       else if(_root.xConfig.ModeTexteBloquage == 1)
  2618.       {
  2619.          TEXTE.autoSize = "left";
  2620.          if(TEXTE._height > 411)
  2621.          {
  2622.             TEXTE.autoSize = "left";
  2623.             _root.LM_DEPASSE._visible = true;
  2624.             TEXTE_DEPASSE = true;
  2625.          }
  2626.          else
  2627.          {
  2628.             TEXTE.autoSize = false;
  2629.             TEXTE._height = 411;
  2630.             _root.LM_DEPASSE._visible = false;
  2631.             TEXTE_DEPASSE = false;
  2632.          }
  2633.       }
  2634.       else
  2635.       {
  2636.          TEXTE.autoSize = false;
  2637.       }
  2638.       if(PARAMS_ATELIER.Texte != "")
  2639.       {
  2640.          _root.BT_WEB.Activer();
  2641.          _root.BT_WEB.gotoAndStop("E1");
  2642.          _root.BT_IMP.Activer();
  2643.          _root.BT_IMP.gotoAndStop("E1");
  2644.       }
  2645.       else
  2646.       {
  2647.          _root.BT_WEB.Desactiver();
  2648.          _root.BT_WEB.gotoAndStop("E0");
  2649.          _root.BT_IMP.Desactiver();
  2650.          _root.BT_IMP.gotoAndStop("E0");
  2651.       }
  2652.       MEMO.newGame = FlashCookie.data.newGame = false;
  2653.       FlashCookie.data.Texte = PARAMS_ATELIER.Texte;
  2654.       FlashCookie.flush();
  2655.    };
  2656.    TEXTE.onScroller = function()
  2657.    {
  2658.    };
  2659.    PaletteRefresh();
  2660. }
  2661. function ObjectClone(obj)
  2662. {
  2663.    var _loc2_ = {};
  2664.    for(var _loc3_ in obj)
  2665.    {
  2666.       _loc2_[_loc3_] = obj[_loc3_];
  2667.    }
  2668.    return _loc2_;
  2669. }
  2670. function PaletteBtnsInit()
  2671. {
  2672.    InitMC({mc:PALETTE_TEXTE.NEXT_FONT});
  2673.    PALETTE_TEXTE.NEXT_FONT.OnPress = function()
  2674.    {
  2675.       PARAMS_ATELIER.FonteFamille = PARAMS_ATELIER.FonteFamille < FONTES_LISTE.length ? PARAMS_ATELIER.FonteFamille + 1 : 1;
  2676.       PaletteRefresh();
  2677.    };
  2678.    InitMC({mc:PALETTE_TEXTE.PREV_FONT});
  2679.    PALETTE_TEXTE.PREV_FONT.OnPress = function()
  2680.    {
  2681.       PARAMS_ATELIER.FonteFamille = PARAMS_ATELIER.FonteFamille > 1 ? PARAMS_ATELIER.FonteFamille - 1 : FONTES_LISTE.length;
  2682.       PaletteRefresh();
  2683.    };
  2684.    InitMC({mc:PALETTE_TEXTE.CORPS_PLUS});
  2685.    PALETTE_TEXTE.CORPS_PLUS.OnPress = function()
  2686.    {
  2687.       PARAMS_ATELIER.FonteSize = PARAMS_ATELIER.FonteSize < TAILLE_FONTE_LIMITE.max ? PARAMS_ATELIER.FonteSize + 1 : TAILLE_FONTE_LIMITE.max;
  2688.       PARAMS_ATELIER.SizeWanted = PARAMS_ATELIER.FonteSize;
  2689.       PaletteRefresh();
  2690.    };
  2691.    InitMC({mc:PALETTE_TEXTE.CORPS_MOINS});
  2692.    PALETTE_TEXTE.CORPS_MOINS.OnPress = function()
  2693.    {
  2694.       PARAMS_ATELIER.FonteSize = PARAMS_ATELIER.FonteSize > TAILLE_FONTE_LIMITE.min ? PARAMS_ATELIER.FonteSize - 1 : TAILLE_FONTE_LIMITE.min;
  2695.       PARAMS_ATELIER.SizeWanted = PARAMS_ATELIER.FonteSize;
  2696.       PaletteRefresh();
  2697.    };
  2698.    InitMC({mc:PALETTE_TEXTE.PLAIN});
  2699.    PALETTE_TEXTE.PLAIN.OnPress = function()
  2700.    {
  2701.       PARAMS_ATELIER.FonteBold = false;
  2702.       PARAMS_ATELIER.FonteItalic = false;
  2703.       PaletteRefresh();
  2704.    };
  2705.    InitMC({mc:PALETTE_TEXTE.BOLD});
  2706.    PALETTE_TEXTE.BOLD.OnPress = function()
  2707.    {
  2708.       PARAMS_ATELIER.FonteBold = PARAMS_ATELIER.FonteBold != true ? true : false;
  2709.       PaletteRefresh();
  2710.    };
  2711.    InitMC({mc:PALETTE_TEXTE.ITALIC});
  2712.    PALETTE_TEXTE.ITALIC.OnPress = function()
  2713.    {
  2714.       PARAMS_ATELIER.FonteItalic = PARAMS_ATELIER.FonteItalic != true ? true : false;
  2715.       PaletteRefresh();
  2716.    };
  2717.    var _loc4_ = undefined;
  2718.    var _loc3_ = 1;
  2719.    while(_loc3_ <= 12)
  2720.    {
  2721.       _loc4_ = PALETTE_TEXTE["PAL_" + gimme2digits(_loc3_)];
  2722.       _loc4_.No = _loc3_;
  2723.       var _loc5_ = new Color(_loc4_.COULEUR);
  2724.       _loc5_.setRGB(Number("0x" + COULEUR_LISTE[_loc3_ - 1].slice(1)));
  2725.       InitMC({mc:_loc4_});
  2726.       _loc4_.OnPress = function()
  2727.       {
  2728.          PARAMS_ATELIER.FonteCouleur = this.No;
  2729.          PaletteRefresh();
  2730.       };
  2731.       _loc3_ = _loc3_ + 1;
  2732.    }
  2733.    InitMC({mc:_root.PICTO_PAPIER,IB:"IB_PAPIER"});
  2734.    _root.PICTO_PAPIER.OnPress = function()
  2735.    {
  2736.       PARAMS_ATELIER.NoPapier = PARAMS_ATELIER.NoPapier < 5 ? PARAMS_ATELIER.NoPapier + 1 : 1;
  2737.       PaletteRefresh();
  2738.    };
  2739. }
  2740. function PaletteRefresh()
  2741. {
  2742.    trace("PaletteRefresh : " + PaletteRefresh);
  2743.    saveCookie();
  2744.    var _loc3_ = PARAMS_ATELIER.FormatText;
  2745.    _loc3_.color = Number("0x" + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1].slice(1));
  2746.    _loc3_.size = PARAMS_ATELIER.FonteSize;
  2747.    _loc3_.bold = PARAMS_ATELIER.FonteBold;
  2748.    _loc3_.italic = PARAMS_ATELIER.FonteItalic;
  2749.    _loc3_.font = FONTES_LISTE[PARAMS_ATELIER.FonteFamille - 1];
  2750.    if(_root.xConfig.ModeTexteBloquage == 2)
  2751.    {
  2752.       TexteAjuste();
  2753.       if(TEXTE_TEMP._height > TEXTE._height)
  2754.       {
  2755.          PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2756.          PaletteRefresh();
  2757.          return undefined;
  2758.       }
  2759.    }
  2760.    else if(_root.xConfig.ModeTexteBloquage == 3)
  2761.    {
  2762.       TexteAjuste();
  2763.       if(TEXTE_TEMP._height > TEXTE._height)
  2764.       {
  2765.          if(PARAMS_ATELIER.FonteSize <= TAILLE_FONTE_LIMITE.min)
  2766.          {
  2767.             PARAMS_ATELIER = PARAMS_ATELIER_LAST;
  2768.          }
  2769.          else
  2770.          {
  2771.             PARAMS_ATELIER.FonteSize--;
  2772.          }
  2773.          PaletteRefresh();
  2774.          return undefined;
  2775.       }
  2776.    }
  2777.    else if(_root.xConfig.ModeTexteBloquage == 1)
  2778.    {
  2779.       TEXTE.autoSize = "left";
  2780.       if(TEXTE._height > 411)
  2781.       {
  2782.          TEXTE.autoSize = "left";
  2783.          _root.LM_DEPASSE._visible = true;
  2784.          TEXTE_DEPASSE = true;
  2785.       }
  2786.       else
  2787.       {
  2788.          TEXTE.autoSize = false;
  2789.          TEXTE._height = 411;
  2790.          _root.LM_DEPASSE._visible = false;
  2791.          TEXTE_DEPASSE = false;
  2792.       }
  2793.    }
  2794.    else
  2795.    {
  2796.       TEXTE.autoSize = false;
  2797.    }
  2798.    TexteAjuste();
  2799.    if(TEXTE_TEMP._height > 411)
  2800.    {
  2801.       _root.LM_DEPASSE._visible = true;
  2802.    }
  2803.    else
  2804.    {
  2805.       _root.LM_DEPASSE._visible = false;
  2806.    }
  2807.    TEXTE.html = false;
  2808.    TEXTE.antiAliasType = "advanced";
  2809.    TEXTE.setNewTextFormat(_loc3_);
  2810.    TEXTE.text = PARAMS_ATELIER.Texte;
  2811.    PALETTE_TEXTE.texte_CORPS.setNewTextFormat(PARAMS_ATELIER.FormatTextTaille);
  2812.    PALETTE_TEXTE.texte_CORPS.text = PARAMS_ATELIER.FonteSize;
  2813.    PALETTE_TEXTE.texte_CORPS.antiAliasType = "advanced";
  2814.    _loc3_ = PARAMS_ATELIER.FormatTextFamille;
  2815.    _loc3_.color = Number("0x" + COULEUR_LISTE[PARAMS_ATELIER.FonteCouleur - 1].slice(1));
  2816.    _loc3_.bold = PARAMS_ATELIER.FonteBold;
  2817.    _loc3_.italic = PARAMS_ATELIER.FonteItalic;
  2818.    _loc3_.font = FONTES_LISTE[PARAMS_ATELIER.FonteFamille - 1];
  2819.    PALETTE_TEXTE.texte_FONT.antiAliasType = "advanced";
  2820.    PALETTE_TEXTE.texte_FONT.setNewTextFormat(_loc3_);
  2821.    PALETTE_TEXTE.texte_FONT.text = "Mobiclic";
  2822.    if(PARAMS_ATELIER.FonteBold == true)
  2823.    {
  2824.       PALETTE_TEXTE.BOLD.outFrame = "E3";
  2825.       PALETTE_TEXTE.BOLD.gotoAndStop("E3");
  2826.    }
  2827.    else
  2828.    {
  2829.       PALETTE_TEXTE.BOLD.outFrame = "E1";
  2830.       PALETTE_TEXTE.BOLD.gotoAndStop("E1");
  2831.    }
  2832.    if(PARAMS_ATELIER.FonteItalic == true)
  2833.    {
  2834.       PALETTE_TEXTE.ITALIC.outFrame = "E3";
  2835.       PALETTE_TEXTE.ITALIC.gotoAndStop("E3");
  2836.    }
  2837.    else
  2838.    {
  2839.       PALETTE_TEXTE.ITALIC.outFrame = "E1";
  2840.       PALETTE_TEXTE.ITALIC.gotoAndStop("E1");
  2841.    }
  2842.    if(PARAMS_ATELIER.FonteItalic == false && PARAMS_ATELIER.FonteBold == false)
  2843.    {
  2844.       PALETTE_TEXTE.PLAIN.outFrame = "E3";
  2845.       PALETTE_TEXTE.PLAIN.gotoAndStop("E3");
  2846.    }
  2847.    else
  2848.    {
  2849.       PALETTE_TEXTE.PLAIN.outFrame = "E1";
  2850.       PALETTE_TEXTE.PLAIN.gotoAndStop("E1");
  2851.    }
  2852.    var _loc2_ = 1;
  2853.    while(_loc2_ <= 12)
  2854.    {
  2855.       if(_loc2_ == PARAMS_ATELIER.FonteCouleur)
  2856.       {
  2857.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].outFrame = "E3";
  2858.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].gotoAndStop("E3");
  2859.       }
  2860.       else
  2861.       {
  2862.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].outFrame = "E1";
  2863.          PALETTE_TEXTE["PAL_" + gimme2digits(_loc2_)].gotoAndStop("E1");
  2864.       }
  2865.       _loc2_ = _loc2_ + 1;
  2866.    }
  2867.    _root.PICTO_PAPIER.gotoAndStop("P" + PARAMS_ATELIER.NoPapier);
  2868.    _root.FEUILLE.PAPIER.gotoAndStop("P" + PARAMS_ATELIER.NoPapier);
  2869.    PARAMS_ATELIER_LAST = ObjectClone(PARAMS_ATELIER);
  2870. }
  2871. function TexteChampInit()
  2872. {
  2873.    if(this.TexteChampInit == true)
  2874.    {
  2875.       return undefined;
  2876.    }
  2877.    this.TexteChampInit = true;
  2878. }
  2879. function GetTexte(codeLM, no_bank)
  2880. {
  2881.    var _loc3_ = _root["banque" + no_bank];
  2882.    if(_loc3_ == undefined)
  2883.    {
  2884.       _loc3_ = _root.createEmptyMovieClip("banque" + no_bank,4000 + no_bank);
  2885.    }
  2886.    var _loc8_ = _root.moduleInfo.returnNodeByPath("Module." + _root.gLangue + ".LegendesMedias");
  2887.    var _loc7_ = _root.gereTextes.getTextById(_loc8_,codeLM);
  2888.    var _loc5_ = getStyleLM(codeLM);
  2889.    var _loc4_ = _loc3_.createEmptyMovieClip(codeLM,_root.chercheDepthPlus(_loc3_,0));
  2890.    _loc4_.FOND = _root.creerRectangle({pere:_loc4_,level:1,alpha:Number(_loc5_.opaciteF),couleur:Number(_loc5_.couleurF),w:ZONE_ELEMENT_MODELE.w,h:ZONE_ELEMENT_MODELE.h});
  2891.    var _loc2_ = _loc4_.createTextField("TEXTE",2,0,0,ZONE_ELEMENT_MODELE.w,ZONE_ELEMENT_MODELE.h);
  2892.    _loc2_._visible = true;
  2893.    _loc2_.background = false;
  2894.    _loc2_.wordWrap = true;
  2895.    _loc2_.autoSize = true;
  2896.    _loc2_.embedFonts = true;
  2897.    _loc2_.selectable = false;
  2898.    _loc2_.antiAliasType = "advanced";
  2899.    var _loc10_ = _loc5_.textFormat;
  2900.    _loc2_.setNewTextFormat(_loc10_);
  2901.    _loc2_.text = _loc7_;
  2902.    _loc2_._y = ZONE_ELEMENT_MODELE.h / 2 - _loc2_._height / 2;
  2903.    return _loc4_;
  2904. }
  2905. function randomValue(min, max)
  2906. {
  2907.    var _loc1_ = Math.random() * (max - min + 1) + min;
  2908.    return _loc1_;
  2909. }
  2910. function CONSEILS()
  2911. {
  2912.    trace("CONSEILS : " + CONSEILS);
  2913.    _root.BOITE_CONSEILS.gotoAndStop("E1");
  2914.    AIDE_PERSO.gotoAndStop("E2");
  2915.    _root.ZONE_ANIM.gotoAndStop("E1");
  2916.    _root.gereTextes.afficheLM({codeLM:"LM_AIDE",mc:_root.LM});
  2917.    _root.LM._visible = true;
  2918.    if(mod.ConseilsFromLabel != undefined)
  2919.    {
  2920.       mod.fromLabel = mod.ConseilsFromLabel;
  2921.    }
  2922.    _root.FEUILLE._parent._visible = false;
  2923.    _root.GEN_LM_AT.removeMovieClip();
  2924.    _root.AT_REP_ZONE_01.removeMovieClip();
  2925.    _root.AT_REP_ZONE_02.removeMovieClip();
  2926.    _root.AT_REP_ZONE_03.removeMovieClip();
  2927.    _root.AT_REP_ZONE_04.removeMovieClip();
  2928.    _root.AT_REP_ZONE_05.removeMovieClip();
  2929.    _root.GEN_LM.removeMovieClip();
  2930.    _root.ZONE_CACHE_01.removeMovieClip();
  2931.    _root.ZONE_CACHE_02.removeMovieClip();
  2932.    _root.ZONE_CACHE_03.removeMovieClip();
  2933.    _root.ZONE_CACHE_04.removeMovieClip();
  2934.    _root.ZONE_CACHE_05.removeMovieClip();
  2935.    _root.ZONE_CACHE_AT.removeMovieClip();
  2936.    _root.MASK_ZONE_01.removeMovieClip();
  2937.    _root.MASK_ZONE_02.removeMovieClip();
  2938.    _root.MASK_ZONE_03.removeMovieClip();
  2939.    _root.MASK_ZONE_04.removeMovieClip();
  2940.    _root.MASK_ZONE_05.removeMovieClip();
  2941.    var _loc4_ = 1;
  2942.    while(_loc4_ <= 5)
  2943.    {
  2944.       _root["banque" + _loc4_]._visible = false;
  2945.       _loc4_ = _loc4_ + 1;
  2946.    }
  2947.    InitMC({mc:_root.BT_RET_AIDE,son:"B_RET_AIDE",IB:"IB_RET_AIDE",OnPress:function()
  2948.    {
  2949.       _root.gotoAndStop(mod.fromLabel);
  2950.    }});
  2951.    AIDE_PERSO = _root.BERNARD;
  2952.    var _loc5_ = undefined;
  2953.    _loc4_ = 1;
  2954.    while(_loc4_ <= 7)
  2955.    {
  2956.       _loc5_ = _root["PICTO_0" + _loc4_];
  2957.       _loc5_.No = _loc4_;
  2958.       _loc5_._visible = true;
  2959.       _loc5_.CiblesDrag = [_root.BOITE_CONSEILS];
  2960.       InitMC({mc:_loc5_,son:"B_0" + _loc4_,sonOnPress:"B_CLIC",IB:"IB_0" + _loc4_,CibleOverFrame:"E2",fonction:"dragdrop"});
  2961.       _loc5_.OnPress = function()
  2962.       {
  2963.          _root.LM._visible = false;
  2964.       };
  2965.       _loc5_.PendantDrag = function()
  2966.       {
  2967.          if(this.CiblesTouchees[0] == _root.BOITE_CONSEILS)
  2968.          {
  2969.             if(this.LastCible != _root.BOITE_CONSEILS)
  2970.             {
  2971.                this.LastCible = _root.BOITE_CONSEILS;
  2972.                _root.BOITE_CONSEILS.gotoAndStop("E2");
  2973.                _root.joueBruitage({nomSon:"B_BOITE",actionFin:"FinBruitDepot0"});
  2974.             }
  2975.          }
  2976.          else
  2977.          {
  2978.             this.LastCible = undefined;
  2979.             _root.BOITE_CONSEILS.gotoAndStop("E1");
  2980.          }
  2981.          _global.CURSEUR._x = this._x;
  2982.          _global.CURSEUR._y = this._y;
  2983.       };
  2984.       _loc5_.ApresDrag = function()
  2985.       {
  2986.          var me = this;
  2987.          if(this.CiblesTouchees[0] == _root.BOITE_CONSEILS)
  2988.          {
  2989.             this._visible = false;
  2990.             this.ComeBack();
  2991.             _root.FinBruitDepot1 = function()
  2992.             {
  2993.                _root.FinBruitDepot2 = function()
  2994.                {
  2995.                   _root.ZONE_ANIM.gotoAndStop("E3");
  2996.                   AIDE_PERSO.gotoAndStop("E1");
  2997.                   _root.gotoAndStop("AIDE_0" + me.No);
  2998.                };
  2999.                _root.BOITE_CONSEILS.gotoAndStop("E4");
  3000.                _root.ZONE_ANIM.gotoAndStop("E2");
  3001.                _root.joueBruitage({nomSon:"B_CRACHE",actionFin:"FinBruitDepot2"});
  3002.             };
  3003.             _root.BOITE_CONSEILS.gotoAndStop("E3");
  3004.             _root.joueBruitage({nomSon:"B_DEPOT",actionFin:"FinBruitDepot1"});
  3005.          }
  3006.          else
  3007.          {
  3008.             this.ComeBack();
  3009.          }
  3010.          if(this.hitTest(_root._xmouse,_root._ymouse,true) == true)
  3011.          {
  3012.             this.gotoAndStop("E2");
  3013.          }
  3014.          else
  3015.          {
  3016.             this.gotoAndStop("E1");
  3017.          }
  3018.       };
  3019.       _loc4_ = _loc4_ + 1;
  3020.    }
  3021.    if(mod.ConseilsFromLabel != undefined)
  3022.    {
  3023.       mod.ConseilsFromLabel = undefined;
  3024.       _root.FinAIDE_00 = function()
  3025.       {
  3026.          AIDE_PERSO.gotoAndStop("E2");
  3027.       };
  3028.       AIDE_PERSO.gotoAndStop("E1");
  3029.       _root.joueSon({nomSon:"AIDE_00",actionFin:"FinAIDE_00"});
  3030.    }
  3031. }
  3032. function BT_AIDE_Init(fromLabel)
  3033. {
  3034.    AIDE_BTN = _root.BT_BERNARD;
  3035.    InitMC({mc:AIDE_BTN,son:"B_BERNARD",FROM:fromLabel,IB:"IB_BERNARD",OnPress:function()
  3036.    {
  3037.       mod.ConseilsFromLabel = this.FROM;
  3038.       _root.gotoAndStop("CONSEILS");
  3039.    }});
  3040. }
  3041. _global.InitMC = InitMC;
  3042. _global.InitMC_reccurent = InitMC_reccurent;
  3043. _global.ResetMC = ResetMC;
  3044. _global.InitMC_standart = InitMC_standart;
  3045. _global.InitMC_BTN = InitMC_BTN;
  3046. _global.InitMC_dragdrop = InitMC_dragdrop;
  3047. _global.InitMC_slider = InitMC_slider;
  3048. _global.InitMC_titre = InitMC_titre;
  3049. _global.InitMC_texte = InitMC_texte;
  3050. _global.DistancePoints = DistancePoints;
  3051. _global.DistancePoints = DistancePoints;
  3052. _global.SetInterval = SetInterval;
  3053. _global.ClearInterval = ClearInterval;
  3054. _global.ClearAllIntervals = ClearAllIntervals;
  3055. _root.ExecuterApresDelaiNo = 0;
  3056. _global.ExecuterApresDelai = ExecuterApresDelai;
  3057. _global.BloquerActives = BloquerActives;
  3058. _global.DebloquerActives = DebloquerActives;
  3059. _global.LMaVider = new Array();
  3060. _global.LMaVider2 = new Array();
  3061. _global.trace_obj = trace_obj;
  3062. _global.xtrace_mc = xtrace_mc;
  3063. var mod = this;
  3064. var VERSION = "1.52";
  3065. var MEMO;
  3066. var FlashCookie;
  3067. trace("FlashCookie.getSize() : " + FlashCookie.getSize());
  3068. var MODE = "ATTENTE";
  3069. var MASCOTTE_INFO = [];
  3070. MASCOTTE_INFO["01"] = {scale:62,x:104.45,y:54.15};
  3071. MASCOTTE_INFO["02"] = {scale:62,x:447.4,y:-10.75};
  3072. MASCOTTE_INFO["03"] = {scale:62,x:-73.05,y:1};
  3073. MASCOTTE_INFO["04"] = {scale:62,x:421.65,y:110.15};
  3074. MASCOTTE_INFO["05"] = {scale:62,x:421.65,y:110.15};
  3075. MASCOTTE_INFO.AT_01 = {scale:62,x:287.5,y:75.25};
  3076. MASCOTTE_INFO.AT_02 = {scale:62,x:130.3,y:166.6};
  3077. MASCOTTE_INFO.AT_03 = {scale:62,x:457.3,y:256.45};
  3078. var ASSISTANT_MODE = "OFF";
  3079. var ASSISTANT_LABEL = "AT_01";
  3080. var FONTES_LISTE;
  3081. var FONTE_DEFAUT;
  3082. var COULEUR_LISTE;
  3083. var TAILLE_FONTE_LIMITE;
  3084. var BANKS;
  3085. var DIALOG_BOX_WEB;
  3086. var DIALOG_BOX_MESSAGE;
  3087. var TEXTE_DEPASSE = false;
  3088. var PALETTE_TEXTE;
  3089. var TEXTE;
  3090. var PARAMS_ATELIER;
  3091. var PARAMS_GENERATEUR;
  3092. var viewer1;
  3093. var viewer2;
  3094. var viewer3;
  3095. var viewer4;
  3096. var viewer5;
  3097. _root.StopAll = StopAll;
  3098. _root.ModulePause = ModulePause;
  3099. _root.ModuleResume = ModuleResume;
  3100. _root.InitChoixPartie = InitChoixPartie;
  3101. var TEXTE_TEMP;
  3102. var ZONE_ELEMENT_MODELE;
  3103. var PARAMS_ATELIER_LAST;
  3104. var PARAMS_ATELIER_AVANT_DERNIER;
  3105. var AIDE_PERSO;
  3106. var AIDE_BTN;
  3107.