home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / grand_roulette.swf / scripts / frame_4 / DoAction.as < prev   
Encoding:
Text File  |  2006-09-05  |  55.4 KB  |  1,923 lines

  1. function addConveyor()
  2. {
  3.    if(conv.conveyorON)
  4.    {
  5.       conv.aConveyor.push(arguments);
  6.    }
  7.    else
  8.    {
  9.       conv.bConveyor.push(arguments);
  10.    }
  11. }
  12. function MessageToChat(speaker, message)
  13. {
  14.    chatText += "\r<b>" + speaker + ":</b> " + message;
  15.    McMaxscroll.gotoAndPlay(2);
  16. }
  17. function makeChips(targMC, CashChips, multyLine, topMC)
  18. {
  19.    if(2000 < chipDepth)
  20.    {
  21.       chipDepth = 0;
  22.    }
  23.    var oldTarg = eval(targMC._name + "_New");
  24.    if(oldTarg != null)
  25.    {
  26.       targMC.swapDepths(oldTarg);
  27.    }
  28.    var CashChips_bk = Number(CashChips);
  29.    var ChArrey = new Array();
  30.    var n = 0;
  31.    i = 0;
  32.    while(i < ChNominals.length)
  33.    {
  34.       if(CashChips >= ChNominals[i])
  35.       {
  36.          var cRem = CashChips;
  37.          CashChips %= ChNominals[i];
  38.          ChArrey[n] = new Array();
  39.          ChArrey[n][0] = (cRem - CashChips) / ChNominals[i];
  40.          ChArrey[n][1] = "chip_" + ChNominals[i];
  41.          if(ChNominals[i] == 0.5)
  42.          {
  43.             ChArrey[n][1] = "chip_05";
  44.          }
  45.          n++;
  46.       }
  47.       i++;
  48.    }
  49.    if(oldTarg != null)
  50.    {
  51.       oldTarg.removeMovieClip();
  52.    }
  53.    var NewChPlace = targMC.duplicateMovieClip(targMC._name + "_New",1500 + chipDepth++);
  54.    targMC.swapDepths(NewChPlace);
  55.    NewChPlace._xscale = NewChPlace._yscale = 85;
  56.    if(multyLine != true)
  57.    {
  58.       var xPos = 0;
  59.       var yPos = 0;
  60.       var i = 0;
  61.       while(i < ChArrey.length)
  62.       {
  63.          var n = 0;
  64.          while(n < ChArrey[i][0])
  65.          {
  66.             var newChip = NewChPlace.Targ.attachMovie(ChArrey[i][1],ChArrey[i][1] + "_" + (n + 1),d++);
  67.             newChip.movieTo(xPos,yPos);
  68.             yPos -= 3;
  69.             n++;
  70.          }
  71.          xPos += 2;
  72.          i++;
  73.       }
  74.       if(topMC != null)
  75.       {
  76.          newChip = NewChPlace.Targ.attachMovie(topMC,topMC,d++);
  77.          newChip.movieTo(xPos,yPos);
  78.       }
  79.    }
  80.    else
  81.    {
  82.       var d = 12;
  83.       var dSh = 0;
  84.       var c = 0;
  85.       var b = 0;
  86.       var i = 0;
  87.       while(i < ChArrey.length)
  88.       {
  89.          var n = 0;
  90.          while(n < ChArrey[i][0])
  91.          {
  92.             var newChip = NewChPlace.Targ.attachMovie(ChArrey[i][1],ChArrey[i][1] + "_" + (n + 1),d++);
  93.             c = Math.floor(n / Chwh);
  94.             newChip.movieTo((i + b + c) * 17,- (n - c * Chwh) * 3);
  95.             n++;
  96.          }
  97.          NewChPlace.Targ.attachMovie("chip_shadow","chip_shadow" + dSh,dSh++);
  98.          NewChPlace.Targ["chip_shadow" + (dSh - 1)]._x = newChip._x;
  99.          b += c;
  100.          i++;
  101.       }
  102.       NewChPlace.Targ.alignH();
  103.    }
  104.    NewChPlace.Count = CashChips_bk;
  105.    NewChPlace.play();
  106.    if(0 < CashChips_bk && targMC != chPL)
  107.    {
  108.       NewChPlace.newSound("chip");
  109.       NewChPlace.Targ.attachMovie("chip_shadow","chip_shadow",-1).movieBy(5,-5);
  110.    }
  111.    return NewChPlace;
  112. }
  113. function GamePrams()
  114. {
  115.    this.curBet = 5;
  116.    this.userBalance = 999;
  117.    this.bet = 0;
  118.    this.maxBetOnTable = 500;
  119.    this.places = {};
  120.    this.places.bet_0 = {bet:0,prize_index:35,maximum:100};
  121.    this.places.bet_00 = {bet:0,prize_index:35,maximum:100};
  122.    this.places.bet_1 = {bet:0,prize_index:35,maximum:100};
  123.    this.places.bet_2 = {bet:0,prize_index:35,maximum:100};
  124.    this.places.bet_3 = {bet:0,prize_index:35,maximum:100};
  125.    this.places.bet_4 = {bet:0,prize_index:35,maximum:100};
  126.    this.places.bet_5 = {bet:0,prize_index:35,maximum:100};
  127.    this.places.bet_6 = {bet:0,prize_index:35,maximum:100};
  128.    this.places.bet_7 = {bet:0,prize_index:35,maximum:100};
  129.    this.places.bet_8 = {bet:0,prize_index:35,maximum:100};
  130.    this.places.bet_9 = {bet:0,prize_index:35,maximum:100};
  131.    this.places.bet_10 = {bet:0,prize_index:35,maximum:100};
  132.    this.places.bet_11 = {bet:0,prize_index:35,maximum:100};
  133.    this.places.bet_12 = {bet:0,prize_index:35,maximum:100};
  134.    this.places.bet_13 = {bet:0,prize_index:35,maximum:100};
  135.    this.places.bet_14 = {bet:0,prize_index:35,maximum:100};
  136.    this.places.bet_15 = {bet:0,prize_index:35,maximum:100};
  137.    this.places.bet_16 = {bet:0,prize_index:35,maximum:100};
  138.    this.places.bet_17 = {bet:0,prize_index:35,maximum:100};
  139.    this.places.bet_18 = {bet:0,prize_index:35,maximum:100};
  140.    this.places.bet_19 = {bet:0,prize_index:35,maximum:100};
  141.    this.places.bet_20 = {bet:0,prize_index:35,maximum:100};
  142.    this.places.bet_21 = {bet:0,prize_index:35,maximum:100};
  143.    this.places.bet_22 = {bet:0,prize_index:35,maximum:100};
  144.    this.places.bet_23 = {bet:0,prize_index:35,maximum:100};
  145.    this.places.bet_24 = {bet:0,prize_index:35,maximum:100};
  146.    this.places.bet_25 = {bet:0,prize_index:35,maximum:100};
  147.    this.places.bet_26 = {bet:0,prize_index:35,maximum:100};
  148.    this.places.bet_27 = {bet:0,prize_index:35,maximum:100};
  149.    this.places.bet_28 = {bet:0,prize_index:35,maximum:100};
  150.    this.places.bet_29 = {bet:0,prize_index:35,maximum:100};
  151.    this.places.bet_30 = {bet:0,prize_index:35,maximum:100};
  152.    this.places.bet_31 = {bet:0,prize_index:35,maximum:100};
  153.    this.places.bet_32 = {bet:0,prize_index:35,maximum:100};
  154.    this.places.bet_33 = {bet:0,prize_index:35,maximum:100};
  155.    this.places.bet_34 = {bet:0,prize_index:35,maximum:100};
  156.    this.places.bet_35 = {bet:0,prize_index:35,maximum:100};
  157.    this.places.bet_36 = {bet:0,prize_index:35,maximum:100};
  158.    this.places["bet_0-00"] = {bet:0,prize_index:17,maximum:100};
  159.    this.places["bet_33-36"] = {bet:0,prize_index:17,maximum:100};
  160.    this.places["bet_32-35"] = {bet:0,prize_index:17,maximum:100};
  161.    this.places["bet_31-34"] = {bet:0,prize_index:17,maximum:100};
  162.    this.places["bet_30-33"] = {bet:0,prize_index:17,maximum:100};
  163.    this.places["bet_29-32"] = {bet:0,prize_index:17,maximum:100};
  164.    this.places["bet_28-31"] = {bet:0,prize_index:17,maximum:100};
  165.    this.places["bet_27-30"] = {bet:0,prize_index:17,maximum:100};
  166.    this.places["bet_26-29"] = {bet:0,prize_index:17,maximum:100};
  167.    this.places["bet_25-28"] = {bet:0,prize_index:17,maximum:100};
  168.    this.places["bet_24-27"] = {bet:0,prize_index:17,maximum:100};
  169.    this.places["bet_23-26"] = {bet:0,prize_index:17,maximum:100};
  170.    this.places["bet_22-25"] = {bet:0,prize_index:17,maximum:100};
  171.    this.places["bet_21-24"] = {bet:0,prize_index:17,maximum:100};
  172.    this.places["bet_20-23"] = {bet:0,prize_index:17,maximum:100};
  173.    this.places["bet_19-22"] = {bet:0,prize_index:17,maximum:100};
  174.    this.places["bet_18-21"] = {bet:0,prize_index:17,maximum:100};
  175.    this.places["bet_17-20"] = {bet:0,prize_index:17,maximum:100};
  176.    this.places["bet_16-19"] = {bet:0,prize_index:17,maximum:100};
  177.    this.places["bet_15-18"] = {bet:0,prize_index:17,maximum:100};
  178.    this.places["bet_14-17"] = {bet:0,prize_index:17,maximum:100};
  179.    this.places["bet_13-16"] = {bet:0,prize_index:17,maximum:100};
  180.    this.places["bet_12-15"] = {bet:0,prize_index:17,maximum:100};
  181.    this.places["bet_11-14"] = {bet:0,prize_index:17,maximum:100};
  182.    this.places["bet_10-13"] = {bet:0,prize_index:17,maximum:100};
  183.    this.places["bet_9-12"] = {bet:0,prize_index:17,maximum:100};
  184.    this.places["bet_8-11"] = {bet:0,prize_index:17,maximum:100};
  185.    this.places["bet_7-10"] = {bet:0,prize_index:17,maximum:100};
  186.    this.places["bet_6-9"] = {bet:0,prize_index:17,maximum:100};
  187.    this.places["bet_5-8"] = {bet:0,prize_index:17,maximum:100};
  188.    this.places["bet_4-7"] = {bet:0,prize_index:17,maximum:100};
  189.    this.places["bet_3-6"] = {bet:0,prize_index:17,maximum:100};
  190.    this.places["bet_2-5"] = {bet:0,prize_index:17,maximum:100};
  191.    this.places["bet_1-4"] = {bet:0,prize_index:17,maximum:100};
  192.    this.places["bet_35-36"] = {bet:0,prize_index:17,maximum:100};
  193.    this.places["bet_34-35"] = {bet:0,prize_index:17,maximum:100};
  194.    this.places["bet_32-33"] = {bet:0,prize_index:17,maximum:100};
  195.    this.places["bet_31-32"] = {bet:0,prize_index:17,maximum:100};
  196.    this.places["bet_29-30"] = {bet:0,prize_index:17,maximum:100};
  197.    this.places["bet_28-29"] = {bet:0,prize_index:17,maximum:100};
  198.    this.places["bet_26-27"] = {bet:0,prize_index:17,maximum:100};
  199.    this.places["bet_25-26"] = {bet:0,prize_index:17,maximum:100};
  200.    this.places["bet_23-24"] = {bet:0,prize_index:17,maximum:100};
  201.    this.places["bet_22-23"] = {bet:0,prize_index:17,maximum:100};
  202.    this.places["bet_20-21"] = {bet:0,prize_index:17,maximum:100};
  203.    this.places["bet_19-20"] = {bet:0,prize_index:17,maximum:100};
  204.    this.places["bet_17-18"] = {bet:0,prize_index:17,maximum:100};
  205.    this.places["bet_16-17"] = {bet:0,prize_index:17,maximum:100};
  206.    this.places["bet_14-15"] = {bet:0,prize_index:17,maximum:100};
  207.    this.places["bet_13-14"] = {bet:0,prize_index:17,maximum:100};
  208.    this.places["bet_11-12"] = {bet:0,prize_index:17,maximum:100};
  209.    this.places["bet_10-11"] = {bet:0,prize_index:17,maximum:100};
  210.    this.places["bet_8-9"] = {bet:0,prize_index:17,maximum:100};
  211.    this.places["bet_7-8"] = {bet:0,prize_index:17,maximum:100};
  212.    this.places["bet_5-6"] = {bet:0,prize_index:17,maximum:100};
  213.    this.places["bet_4-5"] = {bet:0,prize_index:17,maximum:100};
  214.    this.places["bet_2-3"] = {bet:0,prize_index:17,maximum:100};
  215.    this.places["bet_1-2"] = {bet:0,prize_index:17,maximum:100};
  216.    this.places["bet_34-36"] = {bet:0,prize_index:11,maximum:100};
  217.    this.places["bet_31-33"] = {bet:0,prize_index:11,maximum:100};
  218.    this.places["bet_28-30"] = {bet:0,prize_index:11,maximum:100};
  219.    this.places["bet_25-27"] = {bet:0,prize_index:11,maximum:100};
  220.    this.places["bet_22-24"] = {bet:0,prize_index:11,maximum:100};
  221.    this.places["bet_19-21"] = {bet:0,prize_index:11,maximum:100};
  222.    this.places["bet_16-18"] = {bet:0,prize_index:11,maximum:100};
  223.    this.places["bet_13-15"] = {bet:0,prize_index:11,maximum:100};
  224.    this.places["bet_10-12"] = {bet:0,prize_index:11,maximum:100};
  225.    this.places["bet_7-9"] = {bet:0,prize_index:11,maximum:100};
  226.    this.places["bet_4-6"] = {bet:0,prize_index:11,maximum:100};
  227.    this.places["bet_1-3"] = {bet:0,prize_index:11,maximum:100};
  228.    this.places["bet_32-36"] = {bet:0,prize_index:8,maximum:100};
  229.    this.places["bet_31-35"] = {bet:0,prize_index:8,maximum:100};
  230.    this.places["bet_29-33"] = {bet:0,prize_index:8,maximum:100};
  231.    this.places["bet_28-32"] = {bet:0,prize_index:8,maximum:100};
  232.    this.places["bet_26-30"] = {bet:0,prize_index:8,maximum:100};
  233.    this.places["bet_25-29"] = {bet:0,prize_index:8,maximum:100};
  234.    this.places["bet_23-27"] = {bet:0,prize_index:8,maximum:100};
  235.    this.places["bet_22-26"] = {bet:0,prize_index:8,maximum:100};
  236.    this.places["bet_20-24"] = {bet:0,prize_index:8,maximum:100};
  237.    this.places["bet_19-23"] = {bet:0,prize_index:8,maximum:100};
  238.    this.places["bet_17-21"] = {bet:0,prize_index:8,maximum:100};
  239.    this.places["bet_16-20"] = {bet:0,prize_index:8,maximum:100};
  240.    this.places["bet_14-18"] = {bet:0,prize_index:8,maximum:100};
  241.    this.places["bet_13-17"] = {bet:0,prize_index:8,maximum:100};
  242.    this.places["bet_11-15"] = {bet:0,prize_index:8,maximum:100};
  243.    this.places["bet_10-14"] = {bet:0,prize_index:8,maximum:100};
  244.    this.places["bet_8-12"] = {bet:0,prize_index:8,maximum:100};
  245.    this.places["bet_7-11"] = {bet:0,prize_index:8,maximum:100};
  246.    this.places["bet_5-9"] = {bet:0,prize_index:8,maximum:100};
  247.    this.places["bet_4-8"] = {bet:0,prize_index:8,maximum:100};
  248.    this.places["bet_2-6"] = {bet:0,prize_index:8,maximum:100};
  249.    this.places["bet_1-5"] = {bet:0,prize_index:8,maximum:100};
  250.    this.places["bet_31-36"] = {bet:0,prize_index:5,maximum:100};
  251.    this.places["bet_28-33"] = {bet:0,prize_index:5,maximum:100};
  252.    this.places["bet_25-30"] = {bet:0,prize_index:5,maximum:100};
  253.    this.places["bet_22-27"] = {bet:0,prize_index:5,maximum:100};
  254.    this.places["bet_19-24"] = {bet:0,prize_index:5,maximum:100};
  255.    this.places["bet_16-21"] = {bet:0,prize_index:5,maximum:100};
  256.    this.places["bet_13-18"] = {bet:0,prize_index:5,maximum:100};
  257.    this.places["bet_10-15"] = {bet:0,prize_index:5,maximum:100};
  258.    this.places["bet_7-12"] = {bet:0,prize_index:5,maximum:100};
  259.    this.places["bet_4-9"] = {bet:0,prize_index:5,maximum:100};
  260.    this.places["bet_1-6"] = {bet:0,prize_index:5,maximum:100};
  261.    this.places.bet_FIVE = {bet:0,prize_index:6,maximum:100};
  262.    this.places["bet_3rd 12"] = {bet:0,prize_index:2,maximum:100};
  263.    this.places["bet_2nd 12"] = {bet:0,prize_index:2,maximum:100};
  264.    this.places["bet_1st 12"] = {bet:0,prize_index:2,maximum:100};
  265.    this.places["bet_2 to 1(3)"] = {bet:0,prize_index:2,maximum:100};
  266.    this.places["bet_2 to 1(2)"] = {bet:0,prize_index:2,maximum:100};
  267.    this.places["bet_2 to 1(1)"] = {bet:0,prize_index:2,maximum:100};
  268.    this.places.bet_BLACK = {bet:0,prize_index:1,maximum:500};
  269.    this.places.bet_RED = {bet:0,prize_index:1,maximum:500};
  270.    this.places.bet_ODD = {bet:0,prize_index:1,maximum:500};
  271.    this.places.bet_EVEN = {bet:0,prize_index:1,maximum:500};
  272.    this.places["bet_19 to 36"] = {bet:0,prize_index:1,maximum:500};
  273.    this.places["bet_1 to 18"] = {bet:0,prize_index:1,maximum:500};
  274.    this.repeat_places = {};
  275.    this.dice_1 = Math.floor(Math.random() * 6 + 1);
  276.    this.dice_2 = Math.floor(Math.random() * 6 + 1);
  277.    this.started = false;
  278.    this.voiceON = true;
  279.    this.repeatArray = new Array();
  280.    conv.put(this,"crBalance","2");
  281.    this.showButtons();
  282.    this.hide_show_odds();
  283.    for(var v in "/buttons:odds")
  284.    {
  285.       if(typeof _root.buttons.odds[v] == "movieclip")
  286.       {
  287.          _root.buttons.odds[v].hide();
  288.       }
  289.    }
  290. }
  291. function MousesDown(ob, chip)
  292. {
  293.    var Menu = [ch_menu_1,ch_menu_5,ch_menu_25,ch_menu_100];
  294.    i = 0;
  295.    while(i < Menu.length)
  296.    {
  297.       Menu[i]._xscale = Menu[i]._yscale = 100;
  298.       i++;
  299.    }
  300.    ob._xscale = ob._yscale = 120;
  301.    Game.curBet = chip;
  302.    ch_arow._x = ob._x;
  303. }
  304. function test_server()
  305. {
  306.    if(_level5)
  307.    {
  308.       if(_level5.serverWork)
  309.       {
  310.          _visible = 0;
  311.          _level5.XML_POST_LINE();
  312.       }
  313.       else
  314.       {
  315.          _visible = 0;
  316.          _root.conv.put(arguments.callee,1000);
  317.       }
  318.    }
  319.    else
  320.    {
  321.       delete arguments.callee;
  322.    }
  323. }
  324. if(this == _level0 && include_Library_Complete != true)
  325. {
  326.    var include_Library_Complete = true;
  327.    var ob = Object.prototype;
  328.    ob.clone = function()
  329.    {
  330.       var empty_object = new this.constructor();
  331.       return empty_object.copy(this);
  332.    };
  333.    ob.copy = function()
  334.    {
  335.       var proto = arguments[0].__proto__;
  336.       arguments[0].__proto__ = undefined;
  337.       for(var v in "arguments:0")
  338.       {
  339.          this[v] = arguments[0][v];
  340.       }
  341.       arguments[0].__proto__ = proto;
  342.       this.__proto__ = arguments[0].__proto__;
  343.       return this;
  344.    };
  345.    ob.clear = function(rec)
  346.    {
  347.       var proto = this.__proto__;
  348.       this.__proto__ = undefined;
  349.       for(var v in "this")
  350.       {
  351.          delete this[v];
  352.       }
  353.       this.constructor();
  354.       this.__proto__ = proto;
  355.       if(rec)
  356.       {
  357.          this.__proto__.clear();
  358.       }
  359.    };
  360.    ob.byProto = function(rec)
  361.    {
  362.       if(rec)
  363.       {
  364.          this.__proto__.byProto();
  365.       }
  366.       var proto = this.__proto__;
  367.       this.__proto__ = undefined;
  368.       for(var v in "proto")
  369.       {
  370.          delete this[v];
  371.       }
  372.       this.__proto__ = proto;
  373.    };
  374.    ob.testInheritance = function(param)
  375.    {
  376.    };
  377.    ob = null;
  378.    delete ob;
  379.    var arr = Array.prototype;
  380.    arr.nSort = function()
  381.    {
  382.       this.sort(function(a, b)
  383.       {
  384.          if(Number(a) < Number(b))
  385.          {
  386.             return -1;
  387.          }
  388.          if(Number(b) < Number(a))
  389.          {
  390.             return 1;
  391.          }
  392.          return 0;
  393.       }
  394.       );
  395.       return this;
  396.    };
  397.    arr.trim = function(searched_array)
  398.    {
  399.       if(searched_array == null)
  400.       {
  401.          searched_array = ["",null];
  402.       }
  403.       var trim_i = 0;
  404.       while(trim_i < this.length)
  405.       {
  406.          if(searched_array.indexOf(this[trim_i]) != -1)
  407.          {
  408.             this.splice(trim_i,1);
  409.             trim_i--;
  410.          }
  411.          trim_i++;
  412.       }
  413.       return this;
  414.    };
  415.    arr.indexOf = function(searched)
  416.    {
  417.       var indexOf_i = 0;
  418.       while(indexOf_i < this.length)
  419.       {
  420.          if(searched == this[indexOf_i])
  421.          {
  422.             return indexOf_i;
  423.          }
  424.          indexOf_i++;
  425.       }
  426.       return -1;
  427.    };
  428.    arr.random = function()
  429.    {
  430.       var random_i = this.length;
  431.       while(0 < random_i)
  432.       {
  433.          this.push(this.splice(Math.floor(Math.random() * random_i),1)[0]);
  434.          random_i--;
  435.       }
  436.       return this;
  437.    };
  438.    arr = null;
  439.    delete arr;
  440.    var mc = MovieClip.prototype;
  441.    mc.movieTo = function()
  442.    {
  443.       this._x = arguments[0];
  444.       this._y = arguments[1];
  445.    };
  446.    mc.movieBy = function()
  447.    {
  448.       this._x += arguments[0];
  449.       this._y += arguments[1];
  450.    };
  451.    mc.size = function()
  452.    {
  453.       if(arguments[0] != null && arguments[0] != 0)
  454.       {
  455.          this._width = arguments[0];
  456.       }
  457.       if(arguments[0] != null && arguments[0] != 0)
  458.       {
  459.          this._height = arguments[1];
  460.       }
  461.    };
  462.    mc.scale = function()
  463.    {
  464.       _xscale = _yscale = arguments[0];
  465.    };
  466.    mc.scaleTo = function(xscale, yscale)
  467.    {
  468.       if(arguments[0] != null && arguments[0] != 0)
  469.       {
  470.          this._xscale = arguments[0];
  471.       }
  472.       if(arguments[1] != null && arguments[1] != 0)
  473.       {
  474.          this._yscale = arguments[1];
  475.       }
  476.    };
  477.    mc.scaleBy = function()
  478.    {
  479.       this._xscale *= arguments[0];
  480.       this._yscale *= arguments[0];
  481.    };
  482.    mc.rotateBy = function()
  483.    {
  484.       this._rotation += arguments[0];
  485.    };
  486.    mc.hide = function()
  487.    {
  488.       this._visible = 0;
  489.    };
  490.    mc.show = function()
  491.    {
  492.       this._visible = 1;
  493.    };
  494.    mc.visInvert = function()
  495.    {
  496.       this._visible = !this._visible;
  497.    };
  498.    mc.flipV = function()
  499.    {
  500.       this._xscale *= -1;
  501.    };
  502.    mc.flipH = function()
  503.    {
  504.       this._yscale *= -1;
  505.    };
  506.    mc.playOffset = function()
  507.    {
  508.       this.gotoAndPlay(this._currentframe + arguments[0]);
  509.    };
  510.    mc.childs = function()
  511.    {
  512.       var result_childs = new Array();
  513.       for(var v in "this")
  514.       {
  515.          if(typeof this[v] == "movieclip" && this[v]._parent == this)
  516.          {
  517.             result_childs.push(this[v]);
  518.          }
  519.       }
  520.       return result_childs;
  521.    };
  522.    mc.allChilds = function()
  523.    {
  524.       if(_root.allChilds_root_movieclip == null)
  525.       {
  526.          _root.allChilds_root_movieclip = this;
  527.       }
  528.       this.allChilds_tested = true;
  529.       var result_allChilds = new Array();
  530.       for(var v in "this")
  531.       {
  532.          if(typeof this[v] == "movieclip")
  533.          {
  534.             if(this[v].allChilds_tested || this[v]._parent != this)
  535.             {
  536.                continue;
  537.             }
  538.             result_allChilds.push(this[v]);
  539.             result_allChilds = result_allChilds.concat(this[v].allChilds());
  540.          }
  541.       }
  542.       if(_root.allChilds_root_movieclip == this)
  543.       {
  544.          var allChilds_i = 0;
  545.          while(allChilds_i < result_allChilds.length)
  546.          {
  547.             delete result_allChilds[allChilds_i].allChilds_tested;
  548.             allChilds_i++;
  549.          }
  550.          delete _root.allChilds_root_movieclip;
  551.          delete allChilds_tested;
  552.       }
  553.       return result_allChilds;
  554.    };
  555.    mc.copy = function(fromClip, paramArray)
  556.    {
  557.       if(paramArray == null)
  558.       {
  559.          paramArray = new Array("_width","_height","_x","_y","_alpha");
  560.       }
  561.       var rotation_fromClip = fromClip._rotation;
  562.       fromClip._rotation = 0;
  563.       var rotation_thisClip = this._rotation;
  564.       this._rotation = 0;
  565.       var copy_a = 0;
  566.       while(copy_a < paramArray.length)
  567.       {
  568.          this[paramArray[copy_a]] = fromClip[paramArray[copy_a]];
  569.          copy_a++;
  570.       }
  571.       fromClip._rotation = rotation_fromClip;
  572.       this._rotation = rotation_fromClip;
  573.    };
  574.    mc.copyColor = function(fromClip)
  575.    {
  576.       new Color(this).setTransform(new Color(fromClip).getTransform());
  577.    };
  578.    mc.top = function()
  579.    {
  580.       if(this._parent != _root)
  581.       {
  582.          return this._parent.top();
  583.       }
  584.       return this;
  585.    };
  586.    mc.AnimToPlace = function(StartA, FinishA, Steps, CurrStep, XY)
  587.    {
  588.       this[XY] = Math.inOut(StartA,FinishA,Steps,CurrStep);
  589.    };
  590.    mc.newSound = function(id, volume, loop)
  591.    {
  592.       this.mySound = new Sound();
  593.       this.mySound.attachSound(id);
  594.       this.mySound.setVolume(volume || 100);
  595.       this.mySound.start(0,loop || 1);
  596.    };
  597.    mc.stopSound = function(id, volume, loop)
  598.    {
  599.       this.mySound.stop();
  600.    };
  601.    mc.localToLocal = function(fromMc)
  602.    {
  603.       fromMc.localToGlobal(arguments[1]);
  604.       this.globalToLocal(arguments[1]);
  605.    };
  606.    mc.align = function(fromClip)
  607.    {
  608.       var bounds_align = this.getBounds(fromClip || this._parent);
  609.       if(arguments[1] != "v")
  610.       {
  611.          this._x -= (bounds_align.xMin + bounds_align.xMax) / 2;
  612.       }
  613.       if(arguments[1] != "h")
  614.       {
  615.          this._y -= (bounds_align.yMin + bounds_align.yMax) / 2;
  616.       }
  617.    };
  618.    mc.alignH = function(fromClip)
  619.    {
  620.       this.align(fromClip || this._parent,"h");
  621.    };
  622.    mc.alignV = function(fromClip)
  623.    {
  624.       this.align(fromClip || this._parent,"v");
  625.    };
  626.    mc.SearchTop = function()
  627.    {
  628.       var SearchTop_tmp = this;
  629.       var SearchTop_tmp_bk;
  630.       while(tmp != _root)
  631.       {
  632.          SearchTop_tmp_bk = SearchTop_tmp;
  633.          SearchTop_tmp = SearchTop_tmp._parent;
  634.       }
  635.       return SearchTop_tmp_bk;
  636.    };
  637.    mc.setParam = function()
  638.    {
  639.       this[arguments[0]] = arguments[1];
  640.    };
  641.    mc.old_attachMovie = mc.attachMovie;
  642.    mc.attachMovie = function(arg1, arg2, arg3)
  643.    {
  644.       this.old_attachMovie(arg1,arg2,arg3);
  645.       return this[arg2];
  646.    };
  647.    mc.old_duplicateMovieClip = mc.duplicateMovieClip;
  648.    mc.duplicateMovieClip = function()
  649.    {
  650.       this.old_duplicateMovieClip(arguments[0],arguments[1]);
  651.       return this._parent[arguments[0]];
  652.    };
  653.    mc.played = true;
  654.    mc.old_play = mc.play;
  655.    mc.play = function()
  656.    {
  657.       this.played = true;
  658.       this.old_play();
  659.    };
  660.    mc.old_gotoAndPlay = mc.gotoAndPlay;
  661.    mc.gotoAndPlay = function()
  662.    {
  663.       this.gotoAndPlayed = true;
  664.       this.old_gotoAndPlay(arguments[0],arguments[1]);
  665.    };
  666.    mc.old_stop = mc.stop;
  667.    mc.stop = function()
  668.    {
  669.       this.played = false;
  670.       this.old_stop();
  671.    };
  672.    mc.old_gotoAndStop = mc.gotoAndStop;
  673.    mc.gotoAndStop = function()
  674.    {
  675.       this.played = false;
  676.       this.old_gotoAndStop(arguments[0],arguments[1]);
  677.    };
  678.    mc.old_prevFrame = mc.prevFrame;
  679.    mc.prevFrame = function()
  680.    {
  681.       this.played = false;
  682.       this.old_prevFrame();
  683.    };
  684.    mc.old_nextFrame = mc.nextFrame;
  685.    mc.nextFrame = function()
  686.    {
  687.       this.played = false;
  688.       this.old_nextFrame();
  689.    };
  690.    mc.pause = function()
  691.    {
  692.       if(this.paused_mc_array != null)
  693.       {
  694.          delete this.pause_flag;
  695.          var pause_i = 0;
  696.          while(pause_i < this.paused_mc_array.length)
  697.          {
  698.             this.paused_mc_array[pause_i].play();
  699.             pause_i++;
  700.          }
  701.          delete this.paused_mc_array;
  702.       }
  703.       else
  704.       {
  705.          var pause_array = this.allChilds();
  706.          pause_array.push(this);
  707.          this.paused_mc_array = new Array();
  708.          var pause_i = 0;
  709.          while(pause_i < pause_array.length)
  710.          {
  711.             if(pause_array[pause_i].played && pause_array[pause_i]._totalframes != 1)
  712.             {
  713.                pause_array[pause_i].stop();
  714.                this.paused_mc_array.push(pause_array[pause_i]);
  715.             }
  716.             pause_i++;
  717.          }
  718.       }
  719.    };
  720.    mc = null;
  721.    delete mc;
  722.    var st = String.prototype;
  723.    st.scrollBy = function(scrOffset)
  724.    {
  725.       var newScroll = this.scroll + scrOffset;
  726.       if(this.maxscroll < newScroll)
  727.       {
  728.          newScroll = this.maxscroll;
  729.       }
  730.       else if(newScroll < 1)
  731.       {
  732.          newScroll = 1;
  733.       }
  734.       this.scroll = newScroll;
  735.    };
  736.    st.OldSplit = st.split;
  737.    st.split = function(str)
  738.    {
  739.       if(1 < str.length)
  740.       {
  741.          return this.OldSplit(str);
  742.       }
  743.       if(str == "" || str == null)
  744.       {
  745.          return this.toCharArray();
  746.       }
  747.       var result = new Array();
  748.       var d = this.length;
  749.       var n = 0;
  750.       var tmpStr = "";
  751.       var ch;
  752.       while(n < d)
  753.       {
  754.          ch = this.substr(++n,1);
  755.          if(ch == str)
  756.          {
  757.             result.push(tmpStr);
  758.             tmpStr = "";
  759.          }
  760.          else
  761.          {
  762.             tmpStr += ch;
  763.          }
  764.       }
  765.       result.push(tmpStr);
  766.       return result;
  767.    };
  768.    st.toCharArray = function()
  769.    {
  770.       var st = this;
  771.       var arr_result = new Array();
  772.       var s = 0;
  773.       while(s < st.length)
  774.       {
  775.          arr_result.push(this.substr(s + 1,1));
  776.          s++;
  777.       }
  778.       return arr_result;
  779.    };
  780.    st.charAt = function(index)
  781.    {
  782.       return this.substr(index + 1,1);
  783.    };
  784.    st.replace = function()
  785.    {
  786.       this.split(arguments[0]).join(arguments[1]);
  787.    };
  788.    st = null;
  789.    delete st;
  790.    var xm = XML.prototype;
  791.    xm.attr = xm.firstChild.attributes;
  792.    xm.__proto__.byName = function(node_name)
  793.    {
  794.       return this.search("nodeName",node_name);
  795.    };
  796.    xm.__proto__.search = function(param, value)
  797.    {
  798.       if(this[param] == value || this.attributes[param] == value)
  799.       {
  800.          return this;
  801.       }
  802.       return this.nextSibling.search(param,value) || this.firstChild.search(param,value);
  803.    };
  804.    xm.__proto__.clear = function()
  805.    {
  806.       this.nextSibling.clear();
  807.       this.firstChild.clear();
  808.       if(this.nodeType == 3 && this.parentNode.firstChild != this.parentNode.lastChild)
  809.       {
  810.          this.removeNode();
  811.       }
  812.    };
  813.    xm = null;
  814.    delete xm;
  815.    var mt = Math.__proto__;
  816.    mt.ease = function(Steps, CurrStep)
  817.    {
  818.       if(CurrStep >= Steps)
  819.       {
  820.          return 0;
  821.       }
  822.       if(Steps / 2 == CurrStep)
  823.       {
  824.          return 1;
  825.       }
  826.       var result = Math.sin(CurrStep / Steps * 180 * 3.141592653589793 / 180);
  827.       return result * result * result;
  828.    };
  829.    mt.inOut = function(StartA, FinishA, Steps, CurrStep)
  830.    {
  831.       if(CurrStep >= Steps)
  832.       {
  833.          return FinishA;
  834.       }
  835.       if(0 >= CurrStep)
  836.       {
  837.          return StartA;
  838.       }
  839.       return StartA + (FinishA - StartA) * Math.ease(Steps * 2,CurrStep);
  840.    };
  841.    mt = null;
  842.    delete mt;
  843.    Object.prototype.toXML = function(name, num)
  844.    {
  845.       if(name == null)
  846.       {
  847.          name = typeof this;
  848.       }
  849.       if(num == null)
  850.       {
  851.          num = 1;
  852.          _root.array_for_delete_numbers = [];
  853.       }
  854.       var proto = this.__proto__;
  855.       this.__proto__ = undefined;
  856.       var atributes = " #=\"" + num + ".0" + "\"";
  857.       this.number_for_trace_objects = num;
  858.       _root.array_for_delete_numbers.push(this);
  859.       if(name == "movieclip")
  860.       {
  861.          atributes += " name=\"" + this._name + "\"";
  862.       }
  863.       var XML_result = new XML("<" + name + atributes + "><tmp /></" + name + ">");
  864.       var type;
  865.       var element;
  866.       var marks;
  867.       for(var v in "this")
  868.       {
  869.          if(!(v == "__proto__" || v == "number_for_trace_objects" || v == "array_for_delete_numbers"))
  870.          {
  871.             type = typeof this[v];
  872.             if(type == "object" || type == "movieclip")
  873.             {
  874.                if(!this[v].number_for_trace_objects)
  875.                {
  876.                   if(this[v].__proto__ == Array.prototype)
  877.                   {
  878.                      type = "array";
  879.                   }
  880.                   else if(this[v].__proto__ == XML.prototype)
  881.                   {
  882.                      type = "XML";
  883.                   }
  884.                   else if(this[v].__proto__ == XMLSocket.prototype)
  885.                   {
  886.                      type = "XMLSocket";
  887.                   }
  888.                   else if(this[v].__proto__ == Sound.prototype)
  889.                   {
  890.                      type = "sound";
  891.                   }
  892.                   element = new XML("<" + v + " />");
  893.                   if(type == "XML")
  894.                   {
  895.                      element.firstChild.appendChild(this[v].firstChild.cloneNode(true));
  896.                   }
  897.                   else
  898.                   {
  899.                      element.firstChild.appendChild(this[v].toXML(type,++num).firstChild);
  900.                   }
  901.                }
  902.                else
  903.                {
  904.                   this[v].number_for_trace_objects += 0.1;
  905.                   atributes = " #=\"" + this[v].number_for_trace_objects + "\"";
  906.                   if(type == "movieclip")
  907.                   {
  908.                      atributes += " name=\"" + this[v]._name + "\"";
  909.                   }
  910.                   element = new XML("<" + v + atributes + " />");
  911.                }
  912.             }
  913.             else
  914.             {
  915.                marks = type != "string" ? "" : "\"";
  916.                if(type == "number" || type == "string" || type == "boolean")
  917.                {
  918.                   atributes = "";
  919.                }
  920.                else
  921.                {
  922.                   atributes = " type=\"" + type + "\"";
  923.                }
  924.                element = new XML("<" + v + (type != "function" ? "" : " type=\"function\"") + ">" + " " + marks + this[v] + marks + " " + "</" + v + ">");
  925.                if(element.firstChild.firstChild.nodeType == 3 && element.firstChild.firstChild.nodeValue == "  ")
  926.                {
  927.                   element.firstChild.firstChild.removeNode();
  928.                }
  929.             }
  930.             XML_result.firstChild.insertBefore(element.firstChild,XML_result.firstChild.firstChild);
  931.          }
  932.       }
  933.       XML_result.firstChild.lastChild.removeNode();
  934.       if(XML_result.firstChild.attributes["#"] == "1.0")
  935.       {
  936.          var i = 0;
  937.          while(i < _root.array_for_delete_numbers.length)
  938.          {
  939.             delete _root.array_for_delete_numbers[i].number_for_trace_objects;
  940.             i++;
  941.          }
  942.          delete _root.array_for_delete_numbers;
  943.       }
  944.       this.__proto__ = proto;
  945.       return XML_result;
  946.    };
  947.    Object.prototype.toString = function()
  948.    {
  949.       return this.toXML("Object").toString();
  950.    };
  951.    XML.prototype.__proto__.toString = function(tab)
  952.    {
  953.       var traced_value;
  954.       if(this.nodeType != 3)
  955.       {
  956.          if(this.nodeName != null)
  957.          {
  958.             traced_value = "<" + this.nodeName;
  959.             for(var v in "this:attributes")
  960.             {
  961.                traced_value += " " + v + "=\"" + this.attributes[v] + "\"";
  962.             }
  963.             if(this.firstChild == null)
  964.             {
  965.                traced_value += " />";
  966.             }
  967.             else if(this.firstChild.nodeType == 3 && this.firstChild == this.lastChild)
  968.             {
  969.                traced_value += ">" + this.firstChild.toString() + "</" + this.nodeName + ">";
  970.             }
  971.             else
  972.             {
  973.                traced_value += ">\r\t" + tab + this.firstChild.toString(tab + "\t") + "\r" + tab + "</" + this.nodeName + ">";
  974.             }
  975.          }
  976.          else
  977.          {
  978.             traced_value = this.firstChild.toString("");
  979.          }
  980.       }
  981.       else
  982.       {
  983.          traced_value = this.nodeValue;
  984.       }
  985.       if(this.nextSibling != null)
  986.       {
  987.          traced_value += "\r" + tab + this.nextSibling.toString(tab);
  988.       }
  989.       return traced_value;
  990.    };
  991.    Array.prototype.toString = function()
  992.    {
  993.       return this.toXML("Array").toString();
  994.    };
  995.    Conveyor_Constructor = function()
  996.    {
  997.       this.aConveyor = new Array();
  998.       this.bConveyor = new Array();
  999.       this.conveyorON = true;
  1000.       this.bookmark = 0;
  1001.       this.shorts = 0;
  1002.       this.turbo = false;
  1003.       this.engine();
  1004.    };
  1005.    var conv = Conveyor_Constructor.prototype;
  1006.    conv.play = function()
  1007.    {
  1008.       if(this.conveyorON)
  1009.       {
  1010.          return undefined;
  1011.       }
  1012.       this.aConveyor = this.aConveyor.concat(this.bConveyor);
  1013.       this.bConveyor = new Array();
  1014.       this.conveyorON = true;
  1015.    };
  1016.    conv.stop = function()
  1017.    {
  1018.       this.conveyorON = false;
  1019.    };
  1020.    conv.pause = function(pause)
  1021.    {
  1022.       this.aConveyor = [[function()
  1023.       {
  1024.       },pause]].concat(this.aConveyor);
  1025.    };
  1026.    conv.put = function()
  1027.    {
  1028.       var tmp_array = [];
  1029.       var i = 0;
  1030.       while(i < arguments.length)
  1031.       {
  1032.          tmp_array.push(arguments[i]);
  1033.          i++;
  1034.       }
  1035.       if(this.conveyorON)
  1036.       {
  1037.          this.aConveyor.push(tmp_array);
  1038.          if(!this.bookmark && 200 + this.shorts < this.aConveyor.length)
  1039.          {
  1040.             var tmp_arr = this.aConveyor.slice(100 + this.shorts);
  1041.             this.aConveyor.splice(100 + this.shorts);
  1042.             this.shorts = this.shorts + 1;
  1043.             this.put(function()
  1044.             {
  1045.                _root.conv.aConveyor = arguments[0].concat(_root.conv.aConveyor);
  1046.                _root.conv.shorts--;
  1047.             }
  1048.             ,0,tmp_arr);
  1049.          }
  1050.       }
  1051.       else
  1052.       {
  1053.          this.bConveyor.push(tmp_array);
  1054.       }
  1055.    };
  1056.    conv.include = function()
  1057.    {
  1058.       _root.conv.put(this,"bookmark_add",0);
  1059.       var tmp_array = [];
  1060.       var i = 0;
  1061.       while(i < arguments.length)
  1062.       {
  1063.          tmp_array.push(arguments[i]);
  1064.          i++;
  1065.       }
  1066.       if(this.conveyorON)
  1067.       {
  1068.          this.aConveyor.push(tmp_array);
  1069.       }
  1070.       else
  1071.       {
  1072.          this.bConveyor.push(tmp_array);
  1073.       }
  1074.       _root.conv.put(this,"bookmark_remove",0);
  1075.    };
  1076.    conv.put_a = function()
  1077.    {
  1078.       this.aConveyor.push(arguments);
  1079.    };
  1080.    conv.engine = function()
  1081.    {
  1082.       if(this.conveyorON == false)
  1083.       {
  1084.          this.pause(500);
  1085.       }
  1086.       var cTime;
  1087.       if(this.aConveyor.length == 0)
  1088.       {
  1089.          cTime = 1000;
  1090.       }
  1091.       else
  1092.       {
  1093.          var tA1;
  1094.          var tA2;
  1095.          var tA3;
  1096.          var tA4;
  1097.          var tA5;
  1098.          var tA6;
  1099.          var tA7;
  1100.          var tA8;
  1101.          var tA9;
  1102.          var tA10;
  1103.          var tA11;
  1104.          var tA12;
  1105.          var tA13;
  1106.          var tA14;
  1107.          var tA15;
  1108.          var tA16;
  1109.          var tA17;
  1110.          i = 0;
  1111.          while(i < this.aConveyor[0].length)
  1112.          {
  1113.             set("tA" + (i + 1),this.aConveyor[0][i]);
  1114.             i++;
  1115.          }
  1116.          this.aConveyor.shift();
  1117.          if(typeof tA1 != "function")
  1118.          {
  1119.             if(typeof tA1[tA2] != "function")
  1120.             {
  1121.                cTime = tA3;
  1122.                tA1[tA2] = tA4;
  1123.             }
  1124.             else
  1125.             {
  1126.                cTime = tA3;
  1127.                tA1[tA2](tA4,tA5,tA6,tA7,tA8,tA9,tA10,tA11,tA12,tA13,tA14,tA15,tA16,tA17);
  1128.             }
  1129.          }
  1130.          else
  1131.          {
  1132.             cTime = tA2;
  1133.             tA1(tA3,tA4,tA5,tA6,tA7,tA8,tA9,tA10,tA11,tA12,tA13,tA14,tA15,tA16);
  1134.          }
  1135.       }
  1136.       if(cTime != 0)
  1137.       {
  1138.          if(typeof cTime == "string")
  1139.          {
  1140.             _root.ConvTimer.frame = true;
  1141.             if(this.turbo)
  1142.             {
  1143.                cTime = "1";
  1144.             }
  1145.          }
  1146.          else
  1147.          {
  1148.             _root.ConvTimer.time = getTimer();
  1149.             _root.ConvTimer.frame = false;
  1150.          }
  1151.          _root.ConvTimer.timeOut = Number(cTime);
  1152.          _root.ConvTimer.nTime = 0;
  1153.       }
  1154.       else
  1155.       {
  1156.          this.engine();
  1157.       }
  1158.    };
  1159.    conv.anim = function(mc_anim, mc_to, params_ob)
  1160.    {
  1161.       var to_end = params_ob.to_end * 1 || 0;
  1162.       var speed = params_ob.speed || 20;
  1163.       var acsel = params_ob.acsel * 1 || 1;
  1164.       var scale = params_ob.scale;
  1165.       this.put(mc_anim,"swapDepths","1",_root.anim_depth);
  1166.       this.put(_root,"newSound",0,"movie",50);
  1167.       var x;
  1168.       var y;
  1169.       var number_steps = Math.round(Math.sqrt(Math.pow(Math.abs(mc_anim._x - mc_to._x),2) + Math.pow(Math.abs(mc_anim._y - mc_to._y),2)) / speed * acsel);
  1170.       var i = 1;
  1171.       while(number_steps >= i)
  1172.       {
  1173.          if(this.turbo)
  1174.          {
  1175.             i = number_steps;
  1176.          }
  1177.          if(scale)
  1178.          {
  1179.             this.put(mc_anim,"AnimToPlace",0,mc_anim._xscale,mc_to._xscale,number_steps + 1 - to_end,i,"_xscale");
  1180.             this.put(mc_anim,"AnimToPlace",0,mc_anim._yscale,mc_to._yscale,number_steps + 1 - to_end,i,"_yscale");
  1181.          }
  1182.          x = Math.inOut(mc_anim._x,mc_to._x,number_steps + 1 - to_end,i);
  1183.          y = Math.inOut(mc_anim._y,mc_to._y,number_steps + 1 - to_end,i);
  1184.          this.put(mc_anim,"movieTo","1",x,y);
  1185.          i++;
  1186.       }
  1187.       this.put(mc_anim,"swapDepths","1",_root.anim_depth);
  1188.    };
  1189.    conv.turbo_On = function()
  1190.    {
  1191.       this.turbo = true;
  1192.    };
  1193.    conv.turbo_Off = function()
  1194.    {
  1195.       this.turbo = false;
  1196.    };
  1197.    conv.bookmark_add = function()
  1198.    {
  1199.       this.aConveyor.push("#bookmark#");
  1200.       this.bookmark = this.bookmark + 1;
  1201.    };
  1202.    conv.bookmark_remove = function()
  1203.    {
  1204.       if(0 >= this.bookmark)
  1205.       {
  1206.          return undefined;
  1207.       }
  1208.       this.bookmark--;
  1209.       var n = this.aConveyor.length;
  1210.       while(this.aConveyor[this.aConveyor.length - 1] != "#bookmark#" && 0 < n--)
  1211.       {
  1212.          this.aConveyor.unshift(this.aConveyor.pop());
  1213.       }
  1214.       this.aConveyor.pop();
  1215.    };
  1216.    conv_engine = function()
  1217.    {
  1218.       _root.conv.engine();
  1219.    };
  1220.    setTimeOut = function(funcLink, timeOut, inOut)
  1221.    {
  1222.       var McTimeOut = MySTM;
  1223.       if(inOut)
  1224.       {
  1225.          if(funcLink[0] != null)
  1226.          {
  1227.             var tA = funcLink[1];
  1228.             funcLink[0](tA[0],tA[1],tA[2],tA[3],tA[4],tA[5],tA[6],tA[7],tA[8],tA[9]);
  1229.          }
  1230.          else
  1231.          {
  1232.             funcLink();
  1233.          }
  1234.       }
  1235.       else
  1236.       {
  1237.          McTimeOut.n = McTimeOut.n + 1;
  1238.          McTimeOut.STM.duplicateMovieClip("STM" + McTimeOut.n,McTimeOut.n);
  1239.          var newTarg = McTimeOut["STM" + McTimeOut.n];
  1240.          if(typeof timeOut == "string")
  1241.          {
  1242.             timeOut = Number(timeOut);
  1243.             newTarg.frame = true;
  1244.          }
  1245.          else
  1246.          {
  1247.             newTarg.time = getTimer();
  1248.          }
  1249.          newTarg.funcString = funcLink;
  1250.          newTarg.timeOut = timeOut;
  1251.       }
  1252.    };
  1253.    conv = null;
  1254.    delete conv;
  1255.    conv = new Conveyor_Constructor();
  1256.    var my = {};
  1257.    my.floor = function()
  1258.    {
  1259.       var tmpStNum = new String(arguments[0]);
  1260.       return Math.floor(Number(tmpStNum));
  1261.    };
  1262.    my.GlobalToLocal = function(toObj, fromObj)
  1263.    {
  1264.       var GlobalObj = new Object();
  1265.       GlobalObj.x = fromObj._x;
  1266.       GlobalObj.y = fromObj._y;
  1267.       toObj.globalToLocal(GlobalObj);
  1268.       return new Array(GlobalObj.x,GlobalObj.y);
  1269.    };
  1270.    my.dZerro = function()
  1271.    {
  1272.       if(arguments[0] == 0)
  1273.       {
  1274.          return "0.00";
  1275.       }
  1276.       var dStr = new String(this.floor(arguments[0] * 100));
  1277.       var one = dStr.substr(0,dStr.length - 2);
  1278.       if(one == "")
  1279.       {
  1280.          one = "0";
  1281.       }
  1282.       var two = dStr.substr(-2);
  1283.       if(two == "0")
  1284.       {
  1285.          two = "00";
  1286.       }
  1287.       return one + "." + two;
  1288.    };
  1289.    my.SelectAll = function(in_all)
  1290.    {
  1291.       if(in_all)
  1292.       {
  1293.          setTimeOut(mySelectAll,"2");
  1294.       }
  1295.       else
  1296.       {
  1297.          Selection.setSelection(0,10000);
  1298.       }
  1299.    };
  1300. }
  1301. hello = "Hello Source Viewers! ;) Code Created by 3WGRAPHICS.com";
  1302. delete hello;
  1303. var ChNominals = new Array(1000,500,100,25,5,1,0.5);
  1304. var Chwh = 40;
  1305. game_pr = GamePrams.prototype;
  1306. game_pr.display_names = {};
  1307. var ob = game_pr.display_names;
  1308. ob["bet_0-00"] = "0 and 00";
  1309. ob["bet_33-36"] = "33 and 36";
  1310. ob["bet_32-35"] = "32 and 35";
  1311. ob["bet_31-34"] = "31 and 34";
  1312. ob["bet_30-33"] = "30 and 33";
  1313. ob["bet_29-32"] = "29 and 32";
  1314. ob["bet_28-31"] = "28 and 31";
  1315. ob["bet_27-30"] = "27 and 30";
  1316. ob["bet_26-29"] = "26 and 29";
  1317. ob["bet_25-28"] = "25 and 28";
  1318. ob["bet_24-27"] = "24 and 27";
  1319. ob["bet_23-26"] = "23 and 26";
  1320. ob["bet_22-25"] = "22 and 25";
  1321. ob["bet_21-24"] = "21 and 24";
  1322. ob["bet_20-23"] = "20 and 23";
  1323. ob["bet_19-22"] = "19 and 22";
  1324. ob["bet_18-21"] = "18 and 21";
  1325. ob["bet_17-20"] = "17 and 20";
  1326. ob["bet_16-19"] = "16 and 19";
  1327. ob["bet_15-18"] = "15 and 18";
  1328. ob["bet_14-17"] = "14 and 17";
  1329. ob["bet_13-16"] = "13 and 16";
  1330. ob["bet_12-15"] = "12 and 15";
  1331. ob["bet_11-14"] = "11 and 14";
  1332. ob["bet_10-13"] = "10 and 13";
  1333. ob["bet_9-12"] = "9 and 12";
  1334. ob["bet_8-11"] = "8 and 11";
  1335. ob["bet_7-10"] = "7 and 10";
  1336. ob["bet_6-9"] = "6 and 9";
  1337. ob["bet_5-8"] = "5 and 8";
  1338. ob["bet_4-7"] = "4 and 7";
  1339. ob["bet_3-6"] = "3 and 6";
  1340. ob["bet_2-5"] = "2 and 5";
  1341. ob["bet_1-4"] = "1 and 4";
  1342. ob["bet_35-36"] = "35 and 36";
  1343. ob["bet_34-35"] = "34 and 35";
  1344. ob["bet_32-33"] = "32 and 33";
  1345. ob["bet_31-32"] = "31 and 32";
  1346. ob["bet_29-30"] = "29 and 30";
  1347. ob["bet_28-29"] = "28 and 29";
  1348. ob["bet_26-27"] = "26 and 27";
  1349. ob["bet_25-26"] = "25 and 26";
  1350. ob["bet_23-24"] = "23 and 24";
  1351. ob["bet_22-23"] = "22 and 23";
  1352. ob["bet_20-21"] = "20 and 21";
  1353. ob["bet_19-20"] = "19 and 20";
  1354. ob["bet_17-18"] = "17 and 18";
  1355. ob["bet_16-17"] = "16 and 17";
  1356. ob["bet_14-15"] = "14 and 15";
  1357. ob["bet_13-14"] = "13 and 14";
  1358. ob["bet_11-12"] = "11 and 12";
  1359. ob["bet_10-11"] = "10 and 11";
  1360. ob["bet_8-9"] = "8 and 9";
  1361. ob["bet_7-8"] = "7 and 8";
  1362. ob["bet_5-6"] = "5 and 6";
  1363. ob["bet_4-5"] = "4 and 5";
  1364. ob["bet_2-3"] = "2 and 3";
  1365. ob["bet_1-2"] = "1 and 2";
  1366. ob["bet_32-36"] = "32, 33, 36, 35";
  1367. ob["bet_31-35"] = "31, 32, 35, 34";
  1368. ob["bet_29-33"] = "29, 30, 33, 32";
  1369. ob["bet_28-32"] = "28, 29, 32, 31";
  1370. ob["bet_26-30"] = "26, 27, 30, 29";
  1371. ob["bet_25-29"] = "25, 26, 29, 28";
  1372. ob["bet_23-27"] = "23, 24, 27, 26";
  1373. ob["bet_22-26"] = "22, 23, 26, 25";
  1374. ob["bet_20-24"] = "20, 21, 24, 23";
  1375. ob["bet_19-23"] = "19, 20, 23, 22";
  1376. ob["bet_17-21"] = "17, 18, 21, 20";
  1377. ob["bet_16-20"] = "16, 17, 20, 19";
  1378. ob["bet_14-18"] = "14, 15, 18, 17";
  1379. ob["bet_13-17"] = "13, 14, 17, 16";
  1380. ob["bet_11-15"] = "11, 12, 15, 14";
  1381. ob["bet_10-14"] = "10, 11, 14, 13";
  1382. ob["bet_8-12"] = "8, 9, 12, 11";
  1383. ob["bet_7-11"] = "7, 8, 11, 10";
  1384. ob["bet_5-9"] = "5, 6, 9, 8";
  1385. ob["bet_4-8"] = "4, 5, 8, 7";
  1386. ob["bet_2-6"] = "2, 3, 6, 5";
  1387. ob["bet_1-5"] = "1, 2, 5, 4";
  1388. ob["bet_31-36"] = "31-33 and 34-36";
  1389. ob["bet_28-33"] = "28-30 and 31-33";
  1390. ob["bet_25-30"] = "25-27 and 28-30";
  1391. ob["bet_22-27"] = "22-24 and 25-27";
  1392. ob["bet_19-24"] = "19-21 and 22-24";
  1393. ob["bet_16-21"] = "16-18 and 19-21";
  1394. ob["bet_13-18"] = "13-15 and 16-18";
  1395. ob["bet_10-15"] = "10-12 and 13-15";
  1396. ob["bet_7-12"] = "7-9 and 10-12";
  1397. ob["bet_4-9"] = "4-6 and 7-9";
  1398. ob["bet_1-6"] = "1-3 and 4-6";
  1399. ob["bet_2 to 1(1)"] = "1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34";
  1400. ob["bet_2 to 1(2)"] = "2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35";
  1401. ob["bet_2 to 1(3)"] = "3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36";
  1402. ob = null;
  1403. delete ob;
  1404. game_pr.weel = {};
  1405. ob = game_pr.weel;
  1406. ob["0"] = 11;
  1407. ob["1"] = 29;
  1408. ob["2"] = 10;
  1409. ob["3"] = 25;
  1410. ob["4"] = 6;
  1411. ob["5"] = 21;
  1412. ob["6"] = 2;
  1413. ob["7"] = 17;
  1414. ob["8"] = 36;
  1415. ob["9"] = 13;
  1416. ob["10"] = 32;
  1417. ob["11"] = 16;
  1418. ob["12"] = 35;
  1419. ob["13"] = 28;
  1420. ob["14"] = 9;
  1421. ob["15"] = 24;
  1422. ob["16"] = 5;
  1423. ob["17"] = 20;
  1424. ob["18"] = 1;
  1425. ob["19"] = 37;
  1426. ob["20"] = 18;
  1427. ob["21"] = 3;
  1428. ob["22"] = 22;
  1429. ob["23"] = 7;
  1430. ob["24"] = 26;
  1431. ob["25"] = 33;
  1432. ob["26"] = 14;
  1433. ob["27"] = 31;
  1434. ob["28"] = 12;
  1435. ob["29"] = 34;
  1436. ob["30"] = 15;
  1437. ob["31"] = 38;
  1438. ob["32"] = 19;
  1439. ob["33"] = 4;
  1440. ob["34"] = 23;
  1441. ob["35"] = 8;
  1442. ob["36"] = 27;
  1443. ob["00"] = 30;
  1444. ob = null;
  1445. delete ob;
  1446. game_pr.crBalance = function()
  1447. {
  1448.    _root.makeChips(_root.chPL,this.userBalance,true);
  1449.    _root.dysplayMoney.display = "$ " + _root.my.dZerro(this.userBalance);
  1450. };
  1451. game_pr.spin = function(complette, num)
  1452. {
  1453.    this.lock();
  1454.    this.display(true);
  1455.    if(_level5)
  1456.    {
  1457.       if(!complette)
  1458.       {
  1459.          _level5.XML_POST_round();
  1460.          return undefined;
  1461.       }
  1462.       this.result = num;
  1463.    }
  1464.    else
  1465.    {
  1466.       this.creat_result();
  1467.    }
  1468.    this.win = false;
  1469.    this.wins_summ = 0;
  1470.    this.anim_weel();
  1471.    _root.conv.put(empty,"3");
  1472.    this.check_prizes();
  1473.    if(_level5)
  1474.    {
  1475.       _root.conv.put(function(bal)
  1476.       {
  1477.          Game.userBalance = Game.userBalance_from_server;
  1478.          Game.crBalance();
  1479.       }
  1480.       ,0);
  1481.    }
  1482.    this.bet = 0;
  1483.    _root.conv.put(this,"unlock",0);
  1484. };
  1485. game_pr.creat_result = function()
  1486. {
  1487.    this.result = Math.floor(Math.random() * 38);
  1488.    if(this.result == 37)
  1489.    {
  1490.       this.result = "00";
  1491.    }
  1492. };
  1493. game_pr.lock = function()
  1494. {
  1495.    this.locked = true;
  1496.    _root.buttonsDisplay = "";
  1497.    _root.buttons.hide();
  1498.    _root.spin_button.gotoAndStop(2);
  1499.    _root.clear_button.gotoAndStop(2);
  1500.    _root.repeat_button.gotoAndStop(2);
  1501. };
  1502. game_pr.unlock = function()
  1503. {
  1504.    this.locked = false;
  1505.    _root.buttons.show();
  1506.    _root.spin_button.gotoAndStop(1);
  1507.    _root.clear_button.gotoAndStop(1);
  1508.    _root.repeat_button.gotoAndStop(1);
  1509. };
  1510. game_pr.anim_weel = function()
  1511. {
  1512.    _root.ball.hide();
  1513.    var finish = 17;
  1514.    var total = 129;
  1515.    var first = 15;
  1516.    var num_rotation = Math.floor(Math.random() * 3) + 2;
  1517.    var random_offset = Math.floor(Math.random() * 7) - 3;
  1518.    if(random_offset == 3)
  1519.    {
  1520.       random_offset = -21;
  1521.    }
  1522.    var ball_offset = total - finish + random_offset * 2;
  1523.    var end_pos = (this.weel[this.result] + random_offset + 38) % 38;
  1524.    var start_pos = _root.weel._currentframe;
  1525.    var anim_frames;
  1526.    if(start_pos < end_pos)
  1527.    {
  1528.       anim_frames = end_pos - start_pos;
  1529.    }
  1530.    else
  1531.    {
  1532.       anim_frames = 38 - start_pos + end_pos;
  1533.    }
  1534.    var weel_offset = (ball_offset + first * num_rotation) % 38;
  1535.    if(weel_offset < anim_frames)
  1536.    {
  1537.       weel_offset = anim_frames - weel_offset;
  1538.    }
  1539.    else
  1540.    {
  1541.       weel_offset = 38 - (weel_offset - anim_frames);
  1542.    }
  1543.    _root.conv.put(_root.weel,"play",0);
  1544.    _root.conv.put(_root.ruchka,"play",String(weel_offset));
  1545.    _root.conv.put(_root.ball,"show",0);
  1546.    _root.conv.put(_root.ball.ball,"newSound",0,"roll",100,1000);
  1547.    _root.conv.put(_root.ball.ball,"gotoAndPlay",String(first * num_rotation),1);
  1548.    _root.conv.put(_root.ball.ball,"stopSound",0);
  1549.    _root.conv.put(_root.ball.ball,"newSound",0,"bounc",70,1);
  1550.    _root.conv.put(_root.ball.ball,"gotoAndPlay",String(ball_offset),17);
  1551.    _root.conv.put(_root.ball.ball,"stop",0);
  1552.    _root.conv.put(_root.weel,"stop",0);
  1553.    _root.conv.put(_root.ruchka,"stop",0);
  1554. };
  1555. game_pr.display = function(changed)
  1556. {
  1557.    this.result_line = "\r\r";
  1558.    if(!changed)
  1559.    {
  1560.       if(this.nozerro)
  1561.       {
  1562.          this.result_line = this.result + " " + this.color + " " + this.parity + "\r";
  1563.       }
  1564.       else if(this.result + "_Z" == "00_Z")
  1565.       {
  1566.          this.result_line = "DOUBLE ZERRO\r";
  1567.       }
  1568.       else
  1569.       {
  1570.          this.result_line = "ZERRO\r";
  1571.       }
  1572.       if(0 < this.wins_summ)
  1573.       {
  1574.          this.result_line += "Player wins: $" + _root.my.dZerro(this.wins_summ) + "\r";
  1575.       }
  1576.       else
  1577.       {
  1578.          this.result_line += "\r";
  1579.       }
  1580.    }
  1581.    else
  1582.    {
  1583.       this.delete_pawn();
  1584.       this.total_line = "Total Bet: $" + _root.my.dZerro(this.bet);
  1585.    }
  1586.    _root.resultDisplay = this.result_line + this.total_line;
  1587. };
  1588. game_pr.display_pawn = function()
  1589. {
  1590.    _root.makeChips(_root["bet_" + this.result + "_ch"],this.places["bet_" + this.result].bet_bk,false,"girya");
  1591.    delete this.places["bet_" + this.result].bet_bk;
  1592.    this.pawn = true;
  1593. };
  1594. game_pr.delete_pawn = function()
  1595. {
  1596.    if(!this.pawn)
  1597.    {
  1598.       return undefined;
  1599.    }
  1600.    _root.makeChips(_root["bet_" + this.result + "_ch"],this.places["bet_" + this.result].bet,false);
  1601.    this.pawn = false;
  1602. };
  1603. game_pr.display_numbers = function()
  1604. {
  1605.    var mc = _root.display_numbers;
  1606.    var i = 16;
  1607.    while(i >= 1)
  1608.    {
  1609.       mc["display_black" + i].count = mc["display_black" + (i - 1)].count;
  1610.       mc["display_green" + i].count = mc["display_green" + (i - 1)].count;
  1611.       mc["display_red" + i].count = mc["display_red" + (i - 1)].count;
  1612.       i--;
  1613.    }
  1614.    mc.display_black1.count = "";
  1615.    mc.display_green1.count = "";
  1616.    mc.display_red1.count = "";
  1617.    var tmp_col = this.color.toLowerCase() + "";
  1618.    if(tmp_col == "")
  1619.    {
  1620.       tmp_col = "green";
  1621.    }
  1622.    mc["display_" + tmp_col + "1"].count = this.result;
  1623.    this.display_pawn();
  1624. };
  1625. game_pr.clear = function()
  1626. {
  1627.    this.lock();
  1628.    for(var v in "this:places")
  1629.    {
  1630.       if(0 < this.places[v].bet)
  1631.       {
  1632.          _root.conv.include(this,"toPlayer",0,v);
  1633.       }
  1634.    }
  1635.    _root.conv.put(this,"summ_bets",0);
  1636.    _root.conv.put(this,"display",0,true);
  1637.    _root.conv.put(this,"unlock",0);
  1638. };
  1639. game_pr.repeat = function()
  1640. {
  1641.    var bet;
  1642.    var prev_bet;
  1643.    for(var v in "this:repeat_places")
  1644.    {
  1645.       bet = this.repeat_places[v];
  1646.       prev_bet = this.places[v].bet;
  1647.       if(this.userBalance >= bet - prev_bet)
  1648.       {
  1649.          _root.makeChips(eval("_root." + v + "_ch"),bet);
  1650.          this.places[v].bet = bet;
  1651.          _root.Game.userBalance -= bet - prev_bet;
  1652.          _root.Game.crBalance();
  1653.       }
  1654.    }
  1655.    this.summ_bets();
  1656.    this.display(true);
  1657. };
  1658. game_pr.sounds = function()
  1659. {
  1660.    if(!this.voiceON)
  1661.    {
  1662.       return undefined;
  1663.    }
  1664. };
  1665. game_pr.check_prizes = function()
  1666. {
  1667.    this.result;
  1668.    var wins_array = [];
  1669.    this.nozerro = this.result != 0 && this.result != "00";
  1670.    this.color = null;
  1671.    this.parity = null;
  1672.    wins_array.push(this.result);
  1673.    if(this.nozerro)
  1674.    {
  1675.       if([1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].indexOf(this.result) != -1)
  1676.       {
  1677.          this.color = "RED";
  1678.       }
  1679.       else
  1680.       {
  1681.          this.color = "BLACK";
  1682.       }
  1683.       wins_array.push(this.color);
  1684.       if(12 >= this.result)
  1685.       {
  1686.          wins_array.push("1st 12");
  1687.       }
  1688.       else if(this.result >= 13 && 24 >= this.result)
  1689.       {
  1690.          wins_array.push("2nd 12");
  1691.       }
  1692.       else
  1693.       {
  1694.          wins_array.push("3rd 12");
  1695.       }
  1696.       var row = this.result % 3;
  1697.       if(row == 0)
  1698.       {
  1699.          row = 3;
  1700.       }
  1701.       wins_array.push("2 to 1(" + row + ")");
  1702.       if(18 >= this.result)
  1703.       {
  1704.          wins_array.push("1 to 18");
  1705.       }
  1706.       else
  1707.       {
  1708.          wins_array.push("19 to 36");
  1709.       }
  1710.       if(this.result % 2 == 0)
  1711.       {
  1712.          this.parity = "EVEN";
  1713.          wins_array.push("EVEN");
  1714.       }
  1715.       else
  1716.       {
  1717.          this.parity = "ODD";
  1718.          wins_array.push("ODD");
  1719.       }
  1720.       if([1,2,3].indexOf(this.result) != -1)
  1721.       {
  1722.          wins_array.push("FIVE");
  1723.       }
  1724.       wins_array.push("" + (this.result - 3) + "-" + this.result);
  1725.       wins_array.push("" + this.result + "-" + (this.result + 3));
  1726.       wins_array.push("" + (this.result - 1) + "-" + this.result);
  1727.       wins_array.push("" + this.result + "-" + (this.result + 1));
  1728.       wins_array.push("" + (this.result - 4) + "-" + this.result);
  1729.       wins_array.push("" + this.result + "-" + (this.result + 4));
  1730.       wins_array.push("" + (this.result - 3) + "-" + (this.result + 1));
  1731.       wins_array.push("" + (this.result - 1) + "-" + (this.result + 3));
  1732.       var left_n = this.result - (row - 1);
  1733.       var right_n = left_n + 2;
  1734.       wins_array.push("" + left_n + "-" + right_n);
  1735.       wins_array.push("" + (left_n - 3) + "-" + right_n);
  1736.       wins_array.push("" + left_n + "-" + (right_n + 3));
  1737.    }
  1738.    else
  1739.    {
  1740.       wins_array.push("0-00");
  1741.       wins_array.push("FIVE");
  1742.    }
  1743.    var ob_no_loose = {};
  1744.    var i = 0;
  1745.    while(i < wins_array.length)
  1746.    {
  1747.       wins_array[i] = "bet_" + wins_array[i];
  1748.       ob_no_loose[wins_array[i]] = true;
  1749.       i++;
  1750.    }
  1751.    _root.conv.put(this,"display_numbers",0);
  1752.    _root.conv.put(_root,"newSound",1100,"n_" + this.result);
  1753.    if(this.nozerro)
  1754.    {
  1755.       _root.conv.put(_root,"newSound",500,this.color);
  1756.       _root.conv.put(_root,"newSound",1100,this.parity);
  1757.    }
  1758.    this.loose_places(ob_no_loose);
  1759.    this.wins_places(wins_array);
  1760.    _root.conv.put(this,"display",0);
  1761. };
  1762. game_pr.loose_places = function(ob_no_loose)
  1763. {
  1764.    this.repeat_places = {};
  1765.    for(var v in "this:places")
  1766.    {
  1767.       if(0 < this.places[v].bet)
  1768.       {
  1769.          this.repeat_places[v] = this.places[v].bet;
  1770.          if(!ob_no_loose[v])
  1771.          {
  1772.             this.loose(v);
  1773.          }
  1774.       }
  1775.    }
  1776. };
  1777. game_pr.wins_places = function(arr_wins)
  1778. {
  1779.    var i = 0;
  1780.    while(i < arr_wins.length)
  1781.    {
  1782.       if(0 < this.places[arr_wins[i]].bet)
  1783.       {
  1784.          if(!this.win)
  1785.          {
  1786.             _root.conv.put(this,"display",0);
  1787.             _root.conv.put(_root,"newSound",1000,"WINS");
  1788.             this.win = true;
  1789.          }
  1790.          _root.conv.include(this,"prize",0,arr_wins[i]);
  1791.       }
  1792.       i++;
  1793.    }
  1794. };
  1795. game_pr.prize = function(bet_place)
  1796. {
  1797.    var ob = this.places[bet_place];
  1798.    var mc = eval("_root." + bet_place + "_ch");
  1799.    var mc_real = eval("_root." + bet_place + "_ch_New");
  1800.    if(ob.bet == 0 && ob.bet == null)
  1801.    {
  1802.       return undefined;
  1803.    }
  1804.    var prize_index;
  1805.    prize_index = ob.prize_index;
  1806.    var prize_value = Math.floor(ob.bet * prize_index * 4) / 4;
  1807.    this.wins_summ += prize_value;
  1808.    if(bet_place == "bet_" + this.result)
  1809.    {
  1810.       ob.bet_bk = ob.bet;
  1811.    }
  1812.    ob.bet += prize_value;
  1813.    _root.conv.put(_root.makeChips,"5",mc,ob.bet);
  1814.    _root.conv.anim(mc_real,_root.chPL,{speed:10});
  1815.    _root.conv.put(_root.makeChips,0,mc,0);
  1816.    _root.conv.put(function(bet)
  1817.    {
  1818.       _root.Game.userBalance += bet;
  1819.       _root.Game.crBalance();
  1820.    }
  1821.    ,"2",ob.bet);
  1822.    ob.bet = 0;
  1823. };
  1824. game_pr.loose = function(bet_place)
  1825. {
  1826.    var ob = this.places[bet_place];
  1827.    var mc = eval("_root." + bet_place + "_ch");
  1828.    var mc_real = eval("_root." + bet_place + "_ch_New");
  1829.    _root.conv.anim(mc_real,_root.dPL,{speed:70});
  1830.    _root.conv.put(_root.makeChips,0,mc,0);
  1831.    ob.bet = 0;
  1832. };
  1833. game_pr.toPlayer = function(bet_place)
  1834. {
  1835.    var ob = this.places[bet_place];
  1836.    var mc = eval("_root." + bet_place + "_ch");
  1837.    var mc_real = eval("_root." + bet_place + "_ch_New");
  1838.    _root.conv.anim(mc_real,_root.chPL,{speed:25});
  1839.    _root.conv.put(_root.makeChips,0,mc,0);
  1840.    _root.conv.put(function(bet)
  1841.    {
  1842.       _root.Game.userBalance += bet;
  1843.       _root.Game.crBalance();
  1844.    }
  1845.    ,"2",ob.bet);
  1846.    ob.bet = 0;
  1847. };
  1848. game_pr.addChips = function(bet_place)
  1849. {
  1850.    if(!this.testBalance() || this.check_bet_place(bet_place,this.curBet))
  1851.    {
  1852.       return undefined;
  1853.    }
  1854.    if(Number(this.maxBetOnTable) < this.summ_bets() + this.curBet)
  1855.    {
  1856.       _root.buttonsDisplay = "The table maximum is $" + this.maxBetOnTable;
  1857.       return undefined;
  1858.    }
  1859.    var bet = this.bet;
  1860.    this.bet += this.curBet;
  1861.    this.places[bet_place].bet += this.curBet;
  1862.    _root.makeChips(eval("_root." + bet_place + "_ch"),this.places[bet_place].bet);
  1863.    this.display(true);
  1864.    this.userBalance -= this.curBet;
  1865.    this.crBalance();
  1866. };
  1867. game_pr.summ_bets = function()
  1868. {
  1869.    var result_summ = 0;
  1870.    for(var v in "this:places")
  1871.    {
  1872.       result_summ += this.places[v].bet;
  1873.    }
  1874.    this.bet = result_summ;
  1875.    return result_summ;
  1876. };
  1877. game_pr.testBalance = function()
  1878. {
  1879.    return this.userBalance >= this.curBet;
  1880. };
  1881. game_pr.check_bet_place = function(checked_place, checked_bet)
  1882. {
  1883.    obj = this.places[checked_place];
  1884.    if(this.places[checked_place].bet + checked_bet < 0)
  1885.    {
  1886.       return true;
  1887.    }
  1888.    if(obj.maximum < obj.bet + checked_bet && 0 < obj.maximum)
  1889.    {
  1890.       _root.buttonsDisplay = "This place has limit in $" + obj.maximum;
  1891.       return true;
  1892.    }
  1893.    return false;
  1894. };
  1895. _root.buttons.o = function(name_mc)
  1896. {
  1897.    var left_text = "place your bet on ";
  1898.    var display_bet = _root.Game.display_names[name_mc];
  1899.    if(display_bet != null)
  1900.    {
  1901.       _root.buttonsDisplay = left_text + "\"" + display_bet + "\"";
  1902.       _root.buttonsDisplay += " (pays - " + _root.Game.places[name_mc].prize_index + " to 1)";
  1903.       return undefined;
  1904.    }
  1905.    _root.buttonsDisplay = left_text + "\"" + name_mc.substr(4) + "\"";
  1906.    _root.buttonsDisplay += " (pays - " + _root.Game.places[name_mc].prize_index + " to 1)";
  1907. };
  1908. _root.buttons.r = function(name_mc)
  1909. {
  1910.    _root.Game.addChips(name_mc);
  1911. };
  1912. _root.buttons.u = function()
  1913. {
  1914.    _root.buttonsDisplay = "";
  1915. };
  1916. Game = new GamePrams();
  1917. startGame();
  1918. var chDepth = 0;
  1919. game_pr = null;
  1920. delete game_pr;
  1921. test_server();
  1922. _focusrect = false;
  1923.