home *** CD-ROM | disk | FTP | other *** search
Text File | 2006-09-05 | 55.4 KB | 1,923 lines |
- function addConveyor()
- {
- if(conv.conveyorON)
- {
- conv.aConveyor.push(arguments);
- }
- else
- {
- conv.bConveyor.push(arguments);
- }
- }
- function MessageToChat(speaker, message)
- {
- chatText += "\r<b>" + speaker + ":</b> " + message;
- McMaxscroll.gotoAndPlay(2);
- }
- function makeChips(targMC, CashChips, multyLine, topMC)
- {
- if(2000 < chipDepth)
- {
- chipDepth = 0;
- }
- var oldTarg = eval(targMC._name + "_New");
- if(oldTarg != null)
- {
- targMC.swapDepths(oldTarg);
- }
- var CashChips_bk = Number(CashChips);
- var ChArrey = new Array();
- var n = 0;
- i = 0;
- while(i < ChNominals.length)
- {
- if(CashChips >= ChNominals[i])
- {
- var cRem = CashChips;
- CashChips %= ChNominals[i];
- ChArrey[n] = new Array();
- ChArrey[n][0] = (cRem - CashChips) / ChNominals[i];
- ChArrey[n][1] = "chip_" + ChNominals[i];
- if(ChNominals[i] == 0.5)
- {
- ChArrey[n][1] = "chip_05";
- }
- n++;
- }
- i++;
- }
- if(oldTarg != null)
- {
- oldTarg.removeMovieClip();
- }
- var NewChPlace = targMC.duplicateMovieClip(targMC._name + "_New",1500 + chipDepth++);
- targMC.swapDepths(NewChPlace);
- NewChPlace._xscale = NewChPlace._yscale = 85;
- if(multyLine != true)
- {
- var xPos = 0;
- var yPos = 0;
- var i = 0;
- while(i < ChArrey.length)
- {
- var n = 0;
- while(n < ChArrey[i][0])
- {
- var newChip = NewChPlace.Targ.attachMovie(ChArrey[i][1],ChArrey[i][1] + "_" + (n + 1),d++);
- newChip.movieTo(xPos,yPos);
- yPos -= 3;
- n++;
- }
- xPos += 2;
- i++;
- }
- if(topMC != null)
- {
- newChip = NewChPlace.Targ.attachMovie(topMC,topMC,d++);
- newChip.movieTo(xPos,yPos);
- }
- }
- else
- {
- var d = 12;
- var dSh = 0;
- var c = 0;
- var b = 0;
- var i = 0;
- while(i < ChArrey.length)
- {
- var n = 0;
- while(n < ChArrey[i][0])
- {
- var newChip = NewChPlace.Targ.attachMovie(ChArrey[i][1],ChArrey[i][1] + "_" + (n + 1),d++);
- c = Math.floor(n / Chwh);
- newChip.movieTo((i + b + c) * 17,- (n - c * Chwh) * 3);
- n++;
- }
- NewChPlace.Targ.attachMovie("chip_shadow","chip_shadow" + dSh,dSh++);
- NewChPlace.Targ["chip_shadow" + (dSh - 1)]._x = newChip._x;
- b += c;
- i++;
- }
- NewChPlace.Targ.alignH();
- }
- NewChPlace.Count = CashChips_bk;
- NewChPlace.play();
- if(0 < CashChips_bk && targMC != chPL)
- {
- NewChPlace.newSound("chip");
- NewChPlace.Targ.attachMovie("chip_shadow","chip_shadow",-1).movieBy(5,-5);
- }
- return NewChPlace;
- }
- function GamePrams()
- {
- this.curBet = 5;
- this.userBalance = 999;
- this.bet = 0;
- this.maxBetOnTable = 500;
- this.places = {};
- this.places.bet_0 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_00 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_1 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_2 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_3 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_4 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_5 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_6 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_7 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_8 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_9 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_10 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_11 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_12 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_13 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_14 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_15 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_16 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_17 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_18 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_19 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_20 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_21 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_22 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_23 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_24 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_25 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_26 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_27 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_28 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_29 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_30 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_31 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_32 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_33 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_34 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_35 = {bet:0,prize_index:35,maximum:100};
- this.places.bet_36 = {bet:0,prize_index:35,maximum:100};
- this.places["bet_0-00"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_33-36"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_32-35"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_31-34"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_30-33"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_29-32"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_28-31"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_27-30"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_26-29"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_25-28"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_24-27"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_23-26"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_22-25"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_21-24"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_20-23"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_19-22"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_18-21"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_17-20"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_16-19"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_15-18"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_14-17"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_13-16"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_12-15"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_11-14"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_10-13"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_9-12"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_8-11"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_7-10"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_6-9"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_5-8"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_4-7"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_3-6"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_2-5"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_1-4"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_35-36"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_34-35"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_32-33"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_31-32"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_29-30"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_28-29"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_26-27"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_25-26"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_23-24"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_22-23"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_20-21"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_19-20"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_17-18"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_16-17"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_14-15"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_13-14"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_11-12"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_10-11"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_8-9"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_7-8"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_5-6"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_4-5"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_2-3"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_1-2"] = {bet:0,prize_index:17,maximum:100};
- this.places["bet_34-36"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_31-33"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_28-30"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_25-27"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_22-24"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_19-21"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_16-18"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_13-15"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_10-12"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_7-9"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_4-6"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_1-3"] = {bet:0,prize_index:11,maximum:100};
- this.places["bet_32-36"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_31-35"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_29-33"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_28-32"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_26-30"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_25-29"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_23-27"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_22-26"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_20-24"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_19-23"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_17-21"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_16-20"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_14-18"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_13-17"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_11-15"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_10-14"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_8-12"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_7-11"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_5-9"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_4-8"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_2-6"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_1-5"] = {bet:0,prize_index:8,maximum:100};
- this.places["bet_31-36"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_28-33"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_25-30"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_22-27"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_19-24"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_16-21"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_13-18"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_10-15"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_7-12"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_4-9"] = {bet:0,prize_index:5,maximum:100};
- this.places["bet_1-6"] = {bet:0,prize_index:5,maximum:100};
- this.places.bet_FIVE = {bet:0,prize_index:6,maximum:100};
- this.places["bet_3rd 12"] = {bet:0,prize_index:2,maximum:100};
- this.places["bet_2nd 12"] = {bet:0,prize_index:2,maximum:100};
- this.places["bet_1st 12"] = {bet:0,prize_index:2,maximum:100};
- this.places["bet_2 to 1(3)"] = {bet:0,prize_index:2,maximum:100};
- this.places["bet_2 to 1(2)"] = {bet:0,prize_index:2,maximum:100};
- this.places["bet_2 to 1(1)"] = {bet:0,prize_index:2,maximum:100};
- this.places.bet_BLACK = {bet:0,prize_index:1,maximum:500};
- this.places.bet_RED = {bet:0,prize_index:1,maximum:500};
- this.places.bet_ODD = {bet:0,prize_index:1,maximum:500};
- this.places.bet_EVEN = {bet:0,prize_index:1,maximum:500};
- this.places["bet_19 to 36"] = {bet:0,prize_index:1,maximum:500};
- this.places["bet_1 to 18"] = {bet:0,prize_index:1,maximum:500};
- this.repeat_places = {};
- this.dice_1 = Math.floor(Math.random() * 6 + 1);
- this.dice_2 = Math.floor(Math.random() * 6 + 1);
- this.started = false;
- this.voiceON = true;
- this.repeatArray = new Array();
- conv.put(this,"crBalance","2");
- this.showButtons();
- this.hide_show_odds();
- for(var v in "/buttons:odds")
- {
- if(typeof _root.buttons.odds[v] == "movieclip")
- {
- _root.buttons.odds[v].hide();
- }
- }
- }
- function MousesDown(ob, chip)
- {
- var Menu = [ch_menu_1,ch_menu_5,ch_menu_25,ch_menu_100];
- i = 0;
- while(i < Menu.length)
- {
- Menu[i]._xscale = Menu[i]._yscale = 100;
- i++;
- }
- ob._xscale = ob._yscale = 120;
- Game.curBet = chip;
- ch_arow._x = ob._x;
- }
- function test_server()
- {
- if(_level5)
- {
- if(_level5.serverWork)
- {
- _visible = 0;
- _level5.XML_POST_LINE();
- }
- else
- {
- _visible = 0;
- _root.conv.put(arguments.callee,1000);
- }
- }
- else
- {
- delete arguments.callee;
- }
- }
- if(this == _level0 && include_Library_Complete != true)
- {
- var include_Library_Complete = true;
- var ob = Object.prototype;
- ob.clone = function()
- {
- var empty_object = new this.constructor();
- return empty_object.copy(this);
- };
- ob.copy = function()
- {
- var proto = arguments[0].__proto__;
- arguments[0].__proto__ = undefined;
- for(var v in "arguments:0")
- {
- this[v] = arguments[0][v];
- }
- arguments[0].__proto__ = proto;
- this.__proto__ = arguments[0].__proto__;
- return this;
- };
- ob.clear = function(rec)
- {
- var proto = this.__proto__;
- this.__proto__ = undefined;
- for(var v in "this")
- {
- delete this[v];
- }
- this.constructor();
- this.__proto__ = proto;
- if(rec)
- {
- this.__proto__.clear();
- }
- };
- ob.byProto = function(rec)
- {
- if(rec)
- {
- this.__proto__.byProto();
- }
- var proto = this.__proto__;
- this.__proto__ = undefined;
- for(var v in "proto")
- {
- delete this[v];
- }
- this.__proto__ = proto;
- };
- ob.testInheritance = function(param)
- {
- };
- ob = null;
- delete ob;
- var arr = Array.prototype;
- arr.nSort = function()
- {
- this.sort(function(a, b)
- {
- if(Number(a) < Number(b))
- {
- return -1;
- }
- if(Number(b) < Number(a))
- {
- return 1;
- }
- return 0;
- }
- );
- return this;
- };
- arr.trim = function(searched_array)
- {
- if(searched_array == null)
- {
- searched_array = ["",null];
- }
- var trim_i = 0;
- while(trim_i < this.length)
- {
- if(searched_array.indexOf(this[trim_i]) != -1)
- {
- this.splice(trim_i,1);
- trim_i--;
- }
- trim_i++;
- }
- return this;
- };
- arr.indexOf = function(searched)
- {
- var indexOf_i = 0;
- while(indexOf_i < this.length)
- {
- if(searched == this[indexOf_i])
- {
- return indexOf_i;
- }
- indexOf_i++;
- }
- return -1;
- };
- arr.random = function()
- {
- var random_i = this.length;
- while(0 < random_i)
- {
- this.push(this.splice(Math.floor(Math.random() * random_i),1)[0]);
- random_i--;
- }
- return this;
- };
- arr = null;
- delete arr;
- var mc = MovieClip.prototype;
- mc.movieTo = function()
- {
- this._x = arguments[0];
- this._y = arguments[1];
- };
- mc.movieBy = function()
- {
- this._x += arguments[0];
- this._y += arguments[1];
- };
- mc.size = function()
- {
- if(arguments[0] != null && arguments[0] != 0)
- {
- this._width = arguments[0];
- }
- if(arguments[0] != null && arguments[0] != 0)
- {
- this._height = arguments[1];
- }
- };
- mc.scale = function()
- {
- _xscale = _yscale = arguments[0];
- };
- mc.scaleTo = function(xscale, yscale)
- {
- if(arguments[0] != null && arguments[0] != 0)
- {
- this._xscale = arguments[0];
- }
- if(arguments[1] != null && arguments[1] != 0)
- {
- this._yscale = arguments[1];
- }
- };
- mc.scaleBy = function()
- {
- this._xscale *= arguments[0];
- this._yscale *= arguments[0];
- };
- mc.rotateBy = function()
- {
- this._rotation += arguments[0];
- };
- mc.hide = function()
- {
- this._visible = 0;
- };
- mc.show = function()
- {
- this._visible = 1;
- };
- mc.visInvert = function()
- {
- this._visible = !this._visible;
- };
- mc.flipV = function()
- {
- this._xscale *= -1;
- };
- mc.flipH = function()
- {
- this._yscale *= -1;
- };
- mc.playOffset = function()
- {
- this.gotoAndPlay(this._currentframe + arguments[0]);
- };
- mc.childs = function()
- {
- var result_childs = new Array();
- for(var v in "this")
- {
- if(typeof this[v] == "movieclip" && this[v]._parent == this)
- {
- result_childs.push(this[v]);
- }
- }
- return result_childs;
- };
- mc.allChilds = function()
- {
- if(_root.allChilds_root_movieclip == null)
- {
- _root.allChilds_root_movieclip = this;
- }
- this.allChilds_tested = true;
- var result_allChilds = new Array();
- for(var v in "this")
- {
- if(typeof this[v] == "movieclip")
- {
- if(this[v].allChilds_tested || this[v]._parent != this)
- {
- continue;
- }
- result_allChilds.push(this[v]);
- result_allChilds = result_allChilds.concat(this[v].allChilds());
- }
- }
- if(_root.allChilds_root_movieclip == this)
- {
- var allChilds_i = 0;
- while(allChilds_i < result_allChilds.length)
- {
- delete result_allChilds[allChilds_i].allChilds_tested;
- allChilds_i++;
- }
- delete _root.allChilds_root_movieclip;
- delete allChilds_tested;
- }
- return result_allChilds;
- };
- mc.copy = function(fromClip, paramArray)
- {
- if(paramArray == null)
- {
- paramArray = new Array("_width","_height","_x","_y","_alpha");
- }
- var rotation_fromClip = fromClip._rotation;
- fromClip._rotation = 0;
- var rotation_thisClip = this._rotation;
- this._rotation = 0;
- var copy_a = 0;
- while(copy_a < paramArray.length)
- {
- this[paramArray[copy_a]] = fromClip[paramArray[copy_a]];
- copy_a++;
- }
- fromClip._rotation = rotation_fromClip;
- this._rotation = rotation_fromClip;
- };
- mc.copyColor = function(fromClip)
- {
- new Color(this).setTransform(new Color(fromClip).getTransform());
- };
- mc.top = function()
- {
- if(this._parent != _root)
- {
- return this._parent.top();
- }
- return this;
- };
- mc.AnimToPlace = function(StartA, FinishA, Steps, CurrStep, XY)
- {
- this[XY] = Math.inOut(StartA,FinishA,Steps,CurrStep);
- };
- mc.newSound = function(id, volume, loop)
- {
- this.mySound = new Sound();
- this.mySound.attachSound(id);
- this.mySound.setVolume(volume || 100);
- this.mySound.start(0,loop || 1);
- };
- mc.stopSound = function(id, volume, loop)
- {
- this.mySound.stop();
- };
- mc.localToLocal = function(fromMc)
- {
- fromMc.localToGlobal(arguments[1]);
- this.globalToLocal(arguments[1]);
- };
- mc.align = function(fromClip)
- {
- var bounds_align = this.getBounds(fromClip || this._parent);
- if(arguments[1] != "v")
- {
- this._x -= (bounds_align.xMin + bounds_align.xMax) / 2;
- }
- if(arguments[1] != "h")
- {
- this._y -= (bounds_align.yMin + bounds_align.yMax) / 2;
- }
- };
- mc.alignH = function(fromClip)
- {
- this.align(fromClip || this._parent,"h");
- };
- mc.alignV = function(fromClip)
- {
- this.align(fromClip || this._parent,"v");
- };
- mc.SearchTop = function()
- {
- var SearchTop_tmp = this;
- var SearchTop_tmp_bk;
- while(tmp != _root)
- {
- SearchTop_tmp_bk = SearchTop_tmp;
- SearchTop_tmp = SearchTop_tmp._parent;
- }
- return SearchTop_tmp_bk;
- };
- mc.setParam = function()
- {
- this[arguments[0]] = arguments[1];
- };
- mc.old_attachMovie = mc.attachMovie;
- mc.attachMovie = function(arg1, arg2, arg3)
- {
- this.old_attachMovie(arg1,arg2,arg3);
- return this[arg2];
- };
- mc.old_duplicateMovieClip = mc.duplicateMovieClip;
- mc.duplicateMovieClip = function()
- {
- this.old_duplicateMovieClip(arguments[0],arguments[1]);
- return this._parent[arguments[0]];
- };
- mc.played = true;
- mc.old_play = mc.play;
- mc.play = function()
- {
- this.played = true;
- this.old_play();
- };
- mc.old_gotoAndPlay = mc.gotoAndPlay;
- mc.gotoAndPlay = function()
- {
- this.gotoAndPlayed = true;
- this.old_gotoAndPlay(arguments[0],arguments[1]);
- };
- mc.old_stop = mc.stop;
- mc.stop = function()
- {
- this.played = false;
- this.old_stop();
- };
- mc.old_gotoAndStop = mc.gotoAndStop;
- mc.gotoAndStop = function()
- {
- this.played = false;
- this.old_gotoAndStop(arguments[0],arguments[1]);
- };
- mc.old_prevFrame = mc.prevFrame;
- mc.prevFrame = function()
- {
- this.played = false;
- this.old_prevFrame();
- };
- mc.old_nextFrame = mc.nextFrame;
- mc.nextFrame = function()
- {
- this.played = false;
- this.old_nextFrame();
- };
- mc.pause = function()
- {
- if(this.paused_mc_array != null)
- {
- delete this.pause_flag;
- var pause_i = 0;
- while(pause_i < this.paused_mc_array.length)
- {
- this.paused_mc_array[pause_i].play();
- pause_i++;
- }
- delete this.paused_mc_array;
- }
- else
- {
- var pause_array = this.allChilds();
- pause_array.push(this);
- this.paused_mc_array = new Array();
- var pause_i = 0;
- while(pause_i < pause_array.length)
- {
- if(pause_array[pause_i].played && pause_array[pause_i]._totalframes != 1)
- {
- pause_array[pause_i].stop();
- this.paused_mc_array.push(pause_array[pause_i]);
- }
- pause_i++;
- }
- }
- };
- mc = null;
- delete mc;
- var st = String.prototype;
- st.scrollBy = function(scrOffset)
- {
- var newScroll = this.scroll + scrOffset;
- if(this.maxscroll < newScroll)
- {
- newScroll = this.maxscroll;
- }
- else if(newScroll < 1)
- {
- newScroll = 1;
- }
- this.scroll = newScroll;
- };
- st.OldSplit = st.split;
- st.split = function(str)
- {
- if(1 < str.length)
- {
- return this.OldSplit(str);
- }
- if(str == "" || str == null)
- {
- return this.toCharArray();
- }
- var result = new Array();
- var d = this.length;
- var n = 0;
- var tmpStr = "";
- var ch;
- while(n < d)
- {
- ch = this.substr(++n,1);
- if(ch == str)
- {
- result.push(tmpStr);
- tmpStr = "";
- }
- else
- {
- tmpStr += ch;
- }
- }
- result.push(tmpStr);
- return result;
- };
- st.toCharArray = function()
- {
- var st = this;
- var arr_result = new Array();
- var s = 0;
- while(s < st.length)
- {
- arr_result.push(this.substr(s + 1,1));
- s++;
- }
- return arr_result;
- };
- st.charAt = function(index)
- {
- return this.substr(index + 1,1);
- };
- st.replace = function()
- {
- this.split(arguments[0]).join(arguments[1]);
- };
- st = null;
- delete st;
- var xm = XML.prototype;
- xm.attr = xm.firstChild.attributes;
- xm.__proto__.byName = function(node_name)
- {
- return this.search("nodeName",node_name);
- };
- xm.__proto__.search = function(param, value)
- {
- if(this[param] == value || this.attributes[param] == value)
- {
- return this;
- }
- return this.nextSibling.search(param,value) || this.firstChild.search(param,value);
- };
- xm.__proto__.clear = function()
- {
- this.nextSibling.clear();
- this.firstChild.clear();
- if(this.nodeType == 3 && this.parentNode.firstChild != this.parentNode.lastChild)
- {
- this.removeNode();
- }
- };
- xm = null;
- delete xm;
- var mt = Math.__proto__;
- mt.ease = function(Steps, CurrStep)
- {
- if(CurrStep >= Steps)
- {
- return 0;
- }
- if(Steps / 2 == CurrStep)
- {
- return 1;
- }
- var result = Math.sin(CurrStep / Steps * 180 * 3.141592653589793 / 180);
- return result * result * result;
- };
- mt.inOut = function(StartA, FinishA, Steps, CurrStep)
- {
- if(CurrStep >= Steps)
- {
- return FinishA;
- }
- if(0 >= CurrStep)
- {
- return StartA;
- }
- return StartA + (FinishA - StartA) * Math.ease(Steps * 2,CurrStep);
- };
- mt = null;
- delete mt;
- Object.prototype.toXML = function(name, num)
- {
- if(name == null)
- {
- name = typeof this;
- }
- if(num == null)
- {
- num = 1;
- _root.array_for_delete_numbers = [];
- }
- var proto = this.__proto__;
- this.__proto__ = undefined;
- var atributes = " #=\"" + num + ".0" + "\"";
- this.number_for_trace_objects = num;
- _root.array_for_delete_numbers.push(this);
- if(name == "movieclip")
- {
- atributes += " name=\"" + this._name + "\"";
- }
- var XML_result = new XML("<" + name + atributes + "><tmp /></" + name + ">");
- var type;
- var element;
- var marks;
- for(var v in "this")
- {
- if(!(v == "__proto__" || v == "number_for_trace_objects" || v == "array_for_delete_numbers"))
- {
- type = typeof this[v];
- if(type == "object" || type == "movieclip")
- {
- if(!this[v].number_for_trace_objects)
- {
- if(this[v].__proto__ == Array.prototype)
- {
- type = "array";
- }
- else if(this[v].__proto__ == XML.prototype)
- {
- type = "XML";
- }
- else if(this[v].__proto__ == XMLSocket.prototype)
- {
- type = "XMLSocket";
- }
- else if(this[v].__proto__ == Sound.prototype)
- {
- type = "sound";
- }
- element = new XML("<" + v + " />");
- if(type == "XML")
- {
- element.firstChild.appendChild(this[v].firstChild.cloneNode(true));
- }
- else
- {
- element.firstChild.appendChild(this[v].toXML(type,++num).firstChild);
- }
- }
- else
- {
- this[v].number_for_trace_objects += 0.1;
- atributes = " #=\"" + this[v].number_for_trace_objects + "\"";
- if(type == "movieclip")
- {
- atributes += " name=\"" + this[v]._name + "\"";
- }
- element = new XML("<" + v + atributes + " />");
- }
- }
- else
- {
- marks = type != "string" ? "" : "\"";
- if(type == "number" || type == "string" || type == "boolean")
- {
- atributes = "";
- }
- else
- {
- atributes = " type=\"" + type + "\"";
- }
- element = new XML("<" + v + (type != "function" ? "" : " type=\"function\"") + ">" + " " + marks + this[v] + marks + " " + "</" + v + ">");
- if(element.firstChild.firstChild.nodeType == 3 && element.firstChild.firstChild.nodeValue == " ")
- {
- element.firstChild.firstChild.removeNode();
- }
- }
- XML_result.firstChild.insertBefore(element.firstChild,XML_result.firstChild.firstChild);
- }
- }
- XML_result.firstChild.lastChild.removeNode();
- if(XML_result.firstChild.attributes["#"] == "1.0")
- {
- var i = 0;
- while(i < _root.array_for_delete_numbers.length)
- {
- delete _root.array_for_delete_numbers[i].number_for_trace_objects;
- i++;
- }
- delete _root.array_for_delete_numbers;
- }
- this.__proto__ = proto;
- return XML_result;
- };
- Object.prototype.toString = function()
- {
- return this.toXML("Object").toString();
- };
- XML.prototype.__proto__.toString = function(tab)
- {
- var traced_value;
- if(this.nodeType != 3)
- {
- if(this.nodeName != null)
- {
- traced_value = "<" + this.nodeName;
- for(var v in "this:attributes")
- {
- traced_value += " " + v + "=\"" + this.attributes[v] + "\"";
- }
- if(this.firstChild == null)
- {
- traced_value += " />";
- }
- else if(this.firstChild.nodeType == 3 && this.firstChild == this.lastChild)
- {
- traced_value += ">" + this.firstChild.toString() + "</" + this.nodeName + ">";
- }
- else
- {
- traced_value += ">\r\t" + tab + this.firstChild.toString(tab + "\t") + "\r" + tab + "</" + this.nodeName + ">";
- }
- }
- else
- {
- traced_value = this.firstChild.toString("");
- }
- }
- else
- {
- traced_value = this.nodeValue;
- }
- if(this.nextSibling != null)
- {
- traced_value += "\r" + tab + this.nextSibling.toString(tab);
- }
- return traced_value;
- };
- Array.prototype.toString = function()
- {
- return this.toXML("Array").toString();
- };
- Conveyor_Constructor = function()
- {
- this.aConveyor = new Array();
- this.bConveyor = new Array();
- this.conveyorON = true;
- this.bookmark = 0;
- this.shorts = 0;
- this.turbo = false;
- this.engine();
- };
- var conv = Conveyor_Constructor.prototype;
- conv.play = function()
- {
- if(this.conveyorON)
- {
- return undefined;
- }
- this.aConveyor = this.aConveyor.concat(this.bConveyor);
- this.bConveyor = new Array();
- this.conveyorON = true;
- };
- conv.stop = function()
- {
- this.conveyorON = false;
- };
- conv.pause = function(pause)
- {
- this.aConveyor = [[function()
- {
- },pause]].concat(this.aConveyor);
- };
- conv.put = function()
- {
- var tmp_array = [];
- var i = 0;
- while(i < arguments.length)
- {
- tmp_array.push(arguments[i]);
- i++;
- }
- if(this.conveyorON)
- {
- this.aConveyor.push(tmp_array);
- if(!this.bookmark && 200 + this.shorts < this.aConveyor.length)
- {
- var tmp_arr = this.aConveyor.slice(100 + this.shorts);
- this.aConveyor.splice(100 + this.shorts);
- this.shorts = this.shorts + 1;
- this.put(function()
- {
- _root.conv.aConveyor = arguments[0].concat(_root.conv.aConveyor);
- _root.conv.shorts--;
- }
- ,0,tmp_arr);
- }
- }
- else
- {
- this.bConveyor.push(tmp_array);
- }
- };
- conv.include = function()
- {
- _root.conv.put(this,"bookmark_add",0);
- var tmp_array = [];
- var i = 0;
- while(i < arguments.length)
- {
- tmp_array.push(arguments[i]);
- i++;
- }
- if(this.conveyorON)
- {
- this.aConveyor.push(tmp_array);
- }
- else
- {
- this.bConveyor.push(tmp_array);
- }
- _root.conv.put(this,"bookmark_remove",0);
- };
- conv.put_a = function()
- {
- this.aConveyor.push(arguments);
- };
- conv.engine = function()
- {
- if(this.conveyorON == false)
- {
- this.pause(500);
- }
- var cTime;
- if(this.aConveyor.length == 0)
- {
- cTime = 1000;
- }
- else
- {
- var tA1;
- var tA2;
- var tA3;
- var tA4;
- var tA5;
- var tA6;
- var tA7;
- var tA8;
- var tA9;
- var tA10;
- var tA11;
- var tA12;
- var tA13;
- var tA14;
- var tA15;
- var tA16;
- var tA17;
- i = 0;
- while(i < this.aConveyor[0].length)
- {
- set("tA" + (i + 1),this.aConveyor[0][i]);
- i++;
- }
- this.aConveyor.shift();
- if(typeof tA1 != "function")
- {
- if(typeof tA1[tA2] != "function")
- {
- cTime = tA3;
- tA1[tA2] = tA4;
- }
- else
- {
- cTime = tA3;
- tA1[tA2](tA4,tA5,tA6,tA7,tA8,tA9,tA10,tA11,tA12,tA13,tA14,tA15,tA16,tA17);
- }
- }
- else
- {
- cTime = tA2;
- tA1(tA3,tA4,tA5,tA6,tA7,tA8,tA9,tA10,tA11,tA12,tA13,tA14,tA15,tA16);
- }
- }
- if(cTime != 0)
- {
- if(typeof cTime == "string")
- {
- _root.ConvTimer.frame = true;
- if(this.turbo)
- {
- cTime = "1";
- }
- }
- else
- {
- _root.ConvTimer.time = getTimer();
- _root.ConvTimer.frame = false;
- }
- _root.ConvTimer.timeOut = Number(cTime);
- _root.ConvTimer.nTime = 0;
- }
- else
- {
- this.engine();
- }
- };
- conv.anim = function(mc_anim, mc_to, params_ob)
- {
- var to_end = params_ob.to_end * 1 || 0;
- var speed = params_ob.speed || 20;
- var acsel = params_ob.acsel * 1 || 1;
- var scale = params_ob.scale;
- this.put(mc_anim,"swapDepths","1",_root.anim_depth);
- this.put(_root,"newSound",0,"movie",50);
- var x;
- var y;
- 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);
- var i = 1;
- while(number_steps >= i)
- {
- if(this.turbo)
- {
- i = number_steps;
- }
- if(scale)
- {
- this.put(mc_anim,"AnimToPlace",0,mc_anim._xscale,mc_to._xscale,number_steps + 1 - to_end,i,"_xscale");
- this.put(mc_anim,"AnimToPlace",0,mc_anim._yscale,mc_to._yscale,number_steps + 1 - to_end,i,"_yscale");
- }
- x = Math.inOut(mc_anim._x,mc_to._x,number_steps + 1 - to_end,i);
- y = Math.inOut(mc_anim._y,mc_to._y,number_steps + 1 - to_end,i);
- this.put(mc_anim,"movieTo","1",x,y);
- i++;
- }
- this.put(mc_anim,"swapDepths","1",_root.anim_depth);
- };
- conv.turbo_On = function()
- {
- this.turbo = true;
- };
- conv.turbo_Off = function()
- {
- this.turbo = false;
- };
- conv.bookmark_add = function()
- {
- this.aConveyor.push("#bookmark#");
- this.bookmark = this.bookmark + 1;
- };
- conv.bookmark_remove = function()
- {
- if(0 >= this.bookmark)
- {
- return undefined;
- }
- this.bookmark--;
- var n = this.aConveyor.length;
- while(this.aConveyor[this.aConveyor.length - 1] != "#bookmark#" && 0 < n--)
- {
- this.aConveyor.unshift(this.aConveyor.pop());
- }
- this.aConveyor.pop();
- };
- conv_engine = function()
- {
- _root.conv.engine();
- };
- setTimeOut = function(funcLink, timeOut, inOut)
- {
- var McTimeOut = MySTM;
- if(inOut)
- {
- if(funcLink[0] != null)
- {
- var tA = funcLink[1];
- funcLink[0](tA[0],tA[1],tA[2],tA[3],tA[4],tA[5],tA[6],tA[7],tA[8],tA[9]);
- }
- else
- {
- funcLink();
- }
- }
- else
- {
- McTimeOut.n = McTimeOut.n + 1;
- McTimeOut.STM.duplicateMovieClip("STM" + McTimeOut.n,McTimeOut.n);
- var newTarg = McTimeOut["STM" + McTimeOut.n];
- if(typeof timeOut == "string")
- {
- timeOut = Number(timeOut);
- newTarg.frame = true;
- }
- else
- {
- newTarg.time = getTimer();
- }
- newTarg.funcString = funcLink;
- newTarg.timeOut = timeOut;
- }
- };
- conv = null;
- delete conv;
- conv = new Conveyor_Constructor();
- var my = {};
- my.floor = function()
- {
- var tmpStNum = new String(arguments[0]);
- return Math.floor(Number(tmpStNum));
- };
- my.GlobalToLocal = function(toObj, fromObj)
- {
- var GlobalObj = new Object();
- GlobalObj.x = fromObj._x;
- GlobalObj.y = fromObj._y;
- toObj.globalToLocal(GlobalObj);
- return new Array(GlobalObj.x,GlobalObj.y);
- };
- my.dZerro = function()
- {
- if(arguments[0] == 0)
- {
- return "0.00";
- }
- var dStr = new String(this.floor(arguments[0] * 100));
- var one = dStr.substr(0,dStr.length - 2);
- if(one == "")
- {
- one = "0";
- }
- var two = dStr.substr(-2);
- if(two == "0")
- {
- two = "00";
- }
- return one + "." + two;
- };
- my.SelectAll = function(in_all)
- {
- if(in_all)
- {
- setTimeOut(mySelectAll,"2");
- }
- else
- {
- Selection.setSelection(0,10000);
- }
- };
- }
- hello = "Hello Source Viewers! ;) Code Created by 3WGRAPHICS.com";
- delete hello;
- var ChNominals = new Array(1000,500,100,25,5,1,0.5);
- var Chwh = 40;
- game_pr = GamePrams.prototype;
- game_pr.display_names = {};
- var ob = game_pr.display_names;
- ob["bet_0-00"] = "0 and 00";
- ob["bet_33-36"] = "33 and 36";
- ob["bet_32-35"] = "32 and 35";
- ob["bet_31-34"] = "31 and 34";
- ob["bet_30-33"] = "30 and 33";
- ob["bet_29-32"] = "29 and 32";
- ob["bet_28-31"] = "28 and 31";
- ob["bet_27-30"] = "27 and 30";
- ob["bet_26-29"] = "26 and 29";
- ob["bet_25-28"] = "25 and 28";
- ob["bet_24-27"] = "24 and 27";
- ob["bet_23-26"] = "23 and 26";
- ob["bet_22-25"] = "22 and 25";
- ob["bet_21-24"] = "21 and 24";
- ob["bet_20-23"] = "20 and 23";
- ob["bet_19-22"] = "19 and 22";
- ob["bet_18-21"] = "18 and 21";
- ob["bet_17-20"] = "17 and 20";
- ob["bet_16-19"] = "16 and 19";
- ob["bet_15-18"] = "15 and 18";
- ob["bet_14-17"] = "14 and 17";
- ob["bet_13-16"] = "13 and 16";
- ob["bet_12-15"] = "12 and 15";
- ob["bet_11-14"] = "11 and 14";
- ob["bet_10-13"] = "10 and 13";
- ob["bet_9-12"] = "9 and 12";
- ob["bet_8-11"] = "8 and 11";
- ob["bet_7-10"] = "7 and 10";
- ob["bet_6-9"] = "6 and 9";
- ob["bet_5-8"] = "5 and 8";
- ob["bet_4-7"] = "4 and 7";
- ob["bet_3-6"] = "3 and 6";
- ob["bet_2-5"] = "2 and 5";
- ob["bet_1-4"] = "1 and 4";
- ob["bet_35-36"] = "35 and 36";
- ob["bet_34-35"] = "34 and 35";
- ob["bet_32-33"] = "32 and 33";
- ob["bet_31-32"] = "31 and 32";
- ob["bet_29-30"] = "29 and 30";
- ob["bet_28-29"] = "28 and 29";
- ob["bet_26-27"] = "26 and 27";
- ob["bet_25-26"] = "25 and 26";
- ob["bet_23-24"] = "23 and 24";
- ob["bet_22-23"] = "22 and 23";
- ob["bet_20-21"] = "20 and 21";
- ob["bet_19-20"] = "19 and 20";
- ob["bet_17-18"] = "17 and 18";
- ob["bet_16-17"] = "16 and 17";
- ob["bet_14-15"] = "14 and 15";
- ob["bet_13-14"] = "13 and 14";
- ob["bet_11-12"] = "11 and 12";
- ob["bet_10-11"] = "10 and 11";
- ob["bet_8-9"] = "8 and 9";
- ob["bet_7-8"] = "7 and 8";
- ob["bet_5-6"] = "5 and 6";
- ob["bet_4-5"] = "4 and 5";
- ob["bet_2-3"] = "2 and 3";
- ob["bet_1-2"] = "1 and 2";
- ob["bet_32-36"] = "32, 33, 36, 35";
- ob["bet_31-35"] = "31, 32, 35, 34";
- ob["bet_29-33"] = "29, 30, 33, 32";
- ob["bet_28-32"] = "28, 29, 32, 31";
- ob["bet_26-30"] = "26, 27, 30, 29";
- ob["bet_25-29"] = "25, 26, 29, 28";
- ob["bet_23-27"] = "23, 24, 27, 26";
- ob["bet_22-26"] = "22, 23, 26, 25";
- ob["bet_20-24"] = "20, 21, 24, 23";
- ob["bet_19-23"] = "19, 20, 23, 22";
- ob["bet_17-21"] = "17, 18, 21, 20";
- ob["bet_16-20"] = "16, 17, 20, 19";
- ob["bet_14-18"] = "14, 15, 18, 17";
- ob["bet_13-17"] = "13, 14, 17, 16";
- ob["bet_11-15"] = "11, 12, 15, 14";
- ob["bet_10-14"] = "10, 11, 14, 13";
- ob["bet_8-12"] = "8, 9, 12, 11";
- ob["bet_7-11"] = "7, 8, 11, 10";
- ob["bet_5-9"] = "5, 6, 9, 8";
- ob["bet_4-8"] = "4, 5, 8, 7";
- ob["bet_2-6"] = "2, 3, 6, 5";
- ob["bet_1-5"] = "1, 2, 5, 4";
- ob["bet_31-36"] = "31-33 and 34-36";
- ob["bet_28-33"] = "28-30 and 31-33";
- ob["bet_25-30"] = "25-27 and 28-30";
- ob["bet_22-27"] = "22-24 and 25-27";
- ob["bet_19-24"] = "19-21 and 22-24";
- ob["bet_16-21"] = "16-18 and 19-21";
- ob["bet_13-18"] = "13-15 and 16-18";
- ob["bet_10-15"] = "10-12 and 13-15";
- ob["bet_7-12"] = "7-9 and 10-12";
- ob["bet_4-9"] = "4-6 and 7-9";
- ob["bet_1-6"] = "1-3 and 4-6";
- ob["bet_2 to 1(1)"] = "1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34";
- ob["bet_2 to 1(2)"] = "2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35";
- ob["bet_2 to 1(3)"] = "3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36";
- ob = null;
- delete ob;
- game_pr.weel = {};
- ob = game_pr.weel;
- ob["0"] = 11;
- ob["1"] = 29;
- ob["2"] = 10;
- ob["3"] = 25;
- ob["4"] = 6;
- ob["5"] = 21;
- ob["6"] = 2;
- ob["7"] = 17;
- ob["8"] = 36;
- ob["9"] = 13;
- ob["10"] = 32;
- ob["11"] = 16;
- ob["12"] = 35;
- ob["13"] = 28;
- ob["14"] = 9;
- ob["15"] = 24;
- ob["16"] = 5;
- ob["17"] = 20;
- ob["18"] = 1;
- ob["19"] = 37;
- ob["20"] = 18;
- ob["21"] = 3;
- ob["22"] = 22;
- ob["23"] = 7;
- ob["24"] = 26;
- ob["25"] = 33;
- ob["26"] = 14;
- ob["27"] = 31;
- ob["28"] = 12;
- ob["29"] = 34;
- ob["30"] = 15;
- ob["31"] = 38;
- ob["32"] = 19;
- ob["33"] = 4;
- ob["34"] = 23;
- ob["35"] = 8;
- ob["36"] = 27;
- ob["00"] = 30;
- ob = null;
- delete ob;
- game_pr.crBalance = function()
- {
- _root.makeChips(_root.chPL,this.userBalance,true);
- _root.dysplayMoney.display = "$ " + _root.my.dZerro(this.userBalance);
- };
- game_pr.spin = function(complette, num)
- {
- this.lock();
- this.display(true);
- if(_level5)
- {
- if(!complette)
- {
- _level5.XML_POST_round();
- return undefined;
- }
- this.result = num;
- }
- else
- {
- this.creat_result();
- }
- this.win = false;
- this.wins_summ = 0;
- this.anim_weel();
- _root.conv.put(empty,"3");
- this.check_prizes();
- if(_level5)
- {
- _root.conv.put(function(bal)
- {
- Game.userBalance = Game.userBalance_from_server;
- Game.crBalance();
- }
- ,0);
- }
- this.bet = 0;
- _root.conv.put(this,"unlock",0);
- };
- game_pr.creat_result = function()
- {
- this.result = Math.floor(Math.random() * 38);
- if(this.result == 37)
- {
- this.result = "00";
- }
- };
- game_pr.lock = function()
- {
- this.locked = true;
- _root.buttonsDisplay = "";
- _root.buttons.hide();
- _root.spin_button.gotoAndStop(2);
- _root.clear_button.gotoAndStop(2);
- _root.repeat_button.gotoAndStop(2);
- };
- game_pr.unlock = function()
- {
- this.locked = false;
- _root.buttons.show();
- _root.spin_button.gotoAndStop(1);
- _root.clear_button.gotoAndStop(1);
- _root.repeat_button.gotoAndStop(1);
- };
- game_pr.anim_weel = function()
- {
- _root.ball.hide();
- var finish = 17;
- var total = 129;
- var first = 15;
- var num_rotation = Math.floor(Math.random() * 3) + 2;
- var random_offset = Math.floor(Math.random() * 7) - 3;
- if(random_offset == 3)
- {
- random_offset = -21;
- }
- var ball_offset = total - finish + random_offset * 2;
- var end_pos = (this.weel[this.result] + random_offset + 38) % 38;
- var start_pos = _root.weel._currentframe;
- var anim_frames;
- if(start_pos < end_pos)
- {
- anim_frames = end_pos - start_pos;
- }
- else
- {
- anim_frames = 38 - start_pos + end_pos;
- }
- var weel_offset = (ball_offset + first * num_rotation) % 38;
- if(weel_offset < anim_frames)
- {
- weel_offset = anim_frames - weel_offset;
- }
- else
- {
- weel_offset = 38 - (weel_offset - anim_frames);
- }
- _root.conv.put(_root.weel,"play",0);
- _root.conv.put(_root.ruchka,"play",String(weel_offset));
- _root.conv.put(_root.ball,"show",0);
- _root.conv.put(_root.ball.ball,"newSound",0,"roll",100,1000);
- _root.conv.put(_root.ball.ball,"gotoAndPlay",String(first * num_rotation),1);
- _root.conv.put(_root.ball.ball,"stopSound",0);
- _root.conv.put(_root.ball.ball,"newSound",0,"bounc",70,1);
- _root.conv.put(_root.ball.ball,"gotoAndPlay",String(ball_offset),17);
- _root.conv.put(_root.ball.ball,"stop",0);
- _root.conv.put(_root.weel,"stop",0);
- _root.conv.put(_root.ruchka,"stop",0);
- };
- game_pr.display = function(changed)
- {
- this.result_line = "\r\r";
- if(!changed)
- {
- if(this.nozerro)
- {
- this.result_line = this.result + " " + this.color + " " + this.parity + "\r";
- }
- else if(this.result + "_Z" == "00_Z")
- {
- this.result_line = "DOUBLE ZERRO\r";
- }
- else
- {
- this.result_line = "ZERRO\r";
- }
- if(0 < this.wins_summ)
- {
- this.result_line += "Player wins: $" + _root.my.dZerro(this.wins_summ) + "\r";
- }
- else
- {
- this.result_line += "\r";
- }
- }
- else
- {
- this.delete_pawn();
- this.total_line = "Total Bet: $" + _root.my.dZerro(this.bet);
- }
- _root.resultDisplay = this.result_line + this.total_line;
- };
- game_pr.display_pawn = function()
- {
- _root.makeChips(_root["bet_" + this.result + "_ch"],this.places["bet_" + this.result].bet_bk,false,"girya");
- delete this.places["bet_" + this.result].bet_bk;
- this.pawn = true;
- };
- game_pr.delete_pawn = function()
- {
- if(!this.pawn)
- {
- return undefined;
- }
- _root.makeChips(_root["bet_" + this.result + "_ch"],this.places["bet_" + this.result].bet,false);
- this.pawn = false;
- };
- game_pr.display_numbers = function()
- {
- var mc = _root.display_numbers;
- var i = 16;
- while(i >= 1)
- {
- mc["display_black" + i].count = mc["display_black" + (i - 1)].count;
- mc["display_green" + i].count = mc["display_green" + (i - 1)].count;
- mc["display_red" + i].count = mc["display_red" + (i - 1)].count;
- i--;
- }
- mc.display_black1.count = "";
- mc.display_green1.count = "";
- mc.display_red1.count = "";
- var tmp_col = this.color.toLowerCase() + "";
- if(tmp_col == "")
- {
- tmp_col = "green";
- }
- mc["display_" + tmp_col + "1"].count = this.result;
- this.display_pawn();
- };
- game_pr.clear = function()
- {
- this.lock();
- for(var v in "this:places")
- {
- if(0 < this.places[v].bet)
- {
- _root.conv.include(this,"toPlayer",0,v);
- }
- }
- _root.conv.put(this,"summ_bets",0);
- _root.conv.put(this,"display",0,true);
- _root.conv.put(this,"unlock",0);
- };
- game_pr.repeat = function()
- {
- var bet;
- var prev_bet;
- for(var v in "this:repeat_places")
- {
- bet = this.repeat_places[v];
- prev_bet = this.places[v].bet;
- if(this.userBalance >= bet - prev_bet)
- {
- _root.makeChips(eval("_root." + v + "_ch"),bet);
- this.places[v].bet = bet;
- _root.Game.userBalance -= bet - prev_bet;
- _root.Game.crBalance();
- }
- }
- this.summ_bets();
- this.display(true);
- };
- game_pr.sounds = function()
- {
- if(!this.voiceON)
- {
- return undefined;
- }
- };
- game_pr.check_prizes = function()
- {
- this.result;
- var wins_array = [];
- this.nozerro = this.result != 0 && this.result != "00";
- this.color = null;
- this.parity = null;
- wins_array.push(this.result);
- if(this.nozerro)
- {
- if([1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].indexOf(this.result) != -1)
- {
- this.color = "RED";
- }
- else
- {
- this.color = "BLACK";
- }
- wins_array.push(this.color);
- if(12 >= this.result)
- {
- wins_array.push("1st 12");
- }
- else if(this.result >= 13 && 24 >= this.result)
- {
- wins_array.push("2nd 12");
- }
- else
- {
- wins_array.push("3rd 12");
- }
- var row = this.result % 3;
- if(row == 0)
- {
- row = 3;
- }
- wins_array.push("2 to 1(" + row + ")");
- if(18 >= this.result)
- {
- wins_array.push("1 to 18");
- }
- else
- {
- wins_array.push("19 to 36");
- }
- if(this.result % 2 == 0)
- {
- this.parity = "EVEN";
- wins_array.push("EVEN");
- }
- else
- {
- this.parity = "ODD";
- wins_array.push("ODD");
- }
- if([1,2,3].indexOf(this.result) != -1)
- {
- wins_array.push("FIVE");
- }
- wins_array.push("" + (this.result - 3) + "-" + this.result);
- wins_array.push("" + this.result + "-" + (this.result + 3));
- wins_array.push("" + (this.result - 1) + "-" + this.result);
- wins_array.push("" + this.result + "-" + (this.result + 1));
- wins_array.push("" + (this.result - 4) + "-" + this.result);
- wins_array.push("" + this.result + "-" + (this.result + 4));
- wins_array.push("" + (this.result - 3) + "-" + (this.result + 1));
- wins_array.push("" + (this.result - 1) + "-" + (this.result + 3));
- var left_n = this.result - (row - 1);
- var right_n = left_n + 2;
- wins_array.push("" + left_n + "-" + right_n);
- wins_array.push("" + (left_n - 3) + "-" + right_n);
- wins_array.push("" + left_n + "-" + (right_n + 3));
- }
- else
- {
- wins_array.push("0-00");
- wins_array.push("FIVE");
- }
- var ob_no_loose = {};
- var i = 0;
- while(i < wins_array.length)
- {
- wins_array[i] = "bet_" + wins_array[i];
- ob_no_loose[wins_array[i]] = true;
- i++;
- }
- _root.conv.put(this,"display_numbers",0);
- _root.conv.put(_root,"newSound",1100,"n_" + this.result);
- if(this.nozerro)
- {
- _root.conv.put(_root,"newSound",500,this.color);
- _root.conv.put(_root,"newSound",1100,this.parity);
- }
- this.loose_places(ob_no_loose);
- this.wins_places(wins_array);
- _root.conv.put(this,"display",0);
- };
- game_pr.loose_places = function(ob_no_loose)
- {
- this.repeat_places = {};
- for(var v in "this:places")
- {
- if(0 < this.places[v].bet)
- {
- this.repeat_places[v] = this.places[v].bet;
- if(!ob_no_loose[v])
- {
- this.loose(v);
- }
- }
- }
- };
- game_pr.wins_places = function(arr_wins)
- {
- var i = 0;
- while(i < arr_wins.length)
- {
- if(0 < this.places[arr_wins[i]].bet)
- {
- if(!this.win)
- {
- _root.conv.put(this,"display",0);
- _root.conv.put(_root,"newSound",1000,"WINS");
- this.win = true;
- }
- _root.conv.include(this,"prize",0,arr_wins[i]);
- }
- i++;
- }
- };
- game_pr.prize = function(bet_place)
- {
- var ob = this.places[bet_place];
- var mc = eval("_root." + bet_place + "_ch");
- var mc_real = eval("_root." + bet_place + "_ch_New");
- if(ob.bet == 0 && ob.bet == null)
- {
- return undefined;
- }
- var prize_index;
- prize_index = ob.prize_index;
- var prize_value = Math.floor(ob.bet * prize_index * 4) / 4;
- this.wins_summ += prize_value;
- if(bet_place == "bet_" + this.result)
- {
- ob.bet_bk = ob.bet;
- }
- ob.bet += prize_value;
- _root.conv.put(_root.makeChips,"5",mc,ob.bet);
- _root.conv.anim(mc_real,_root.chPL,{speed:10});
- _root.conv.put(_root.makeChips,0,mc,0);
- _root.conv.put(function(bet)
- {
- _root.Game.userBalance += bet;
- _root.Game.crBalance();
- }
- ,"2",ob.bet);
- ob.bet = 0;
- };
- game_pr.loose = function(bet_place)
- {
- var ob = this.places[bet_place];
- var mc = eval("_root." + bet_place + "_ch");
- var mc_real = eval("_root." + bet_place + "_ch_New");
- _root.conv.anim(mc_real,_root.dPL,{speed:70});
- _root.conv.put(_root.makeChips,0,mc,0);
- ob.bet = 0;
- };
- game_pr.toPlayer = function(bet_place)
- {
- var ob = this.places[bet_place];
- var mc = eval("_root." + bet_place + "_ch");
- var mc_real = eval("_root." + bet_place + "_ch_New");
- _root.conv.anim(mc_real,_root.chPL,{speed:25});
- _root.conv.put(_root.makeChips,0,mc,0);
- _root.conv.put(function(bet)
- {
- _root.Game.userBalance += bet;
- _root.Game.crBalance();
- }
- ,"2",ob.bet);
- ob.bet = 0;
- };
- game_pr.addChips = function(bet_place)
- {
- if(!this.testBalance() || this.check_bet_place(bet_place,this.curBet))
- {
- return undefined;
- }
- if(Number(this.maxBetOnTable) < this.summ_bets() + this.curBet)
- {
- _root.buttonsDisplay = "The table maximum is $" + this.maxBetOnTable;
- return undefined;
- }
- var bet = this.bet;
- this.bet += this.curBet;
- this.places[bet_place].bet += this.curBet;
- _root.makeChips(eval("_root." + bet_place + "_ch"),this.places[bet_place].bet);
- this.display(true);
- this.userBalance -= this.curBet;
- this.crBalance();
- };
- game_pr.summ_bets = function()
- {
- var result_summ = 0;
- for(var v in "this:places")
- {
- result_summ += this.places[v].bet;
- }
- this.bet = result_summ;
- return result_summ;
- };
- game_pr.testBalance = function()
- {
- return this.userBalance >= this.curBet;
- };
- game_pr.check_bet_place = function(checked_place, checked_bet)
- {
- obj = this.places[checked_place];
- if(this.places[checked_place].bet + checked_bet < 0)
- {
- return true;
- }
- if(obj.maximum < obj.bet + checked_bet && 0 < obj.maximum)
- {
- _root.buttonsDisplay = "This place has limit in $" + obj.maximum;
- return true;
- }
- return false;
- };
- _root.buttons.o = function(name_mc)
- {
- var left_text = "place your bet on ";
- var display_bet = _root.Game.display_names[name_mc];
- if(display_bet != null)
- {
- _root.buttonsDisplay = left_text + "\"" + display_bet + "\"";
- _root.buttonsDisplay += " (pays - " + _root.Game.places[name_mc].prize_index + " to 1)";
- return undefined;
- }
- _root.buttonsDisplay = left_text + "\"" + name_mc.substr(4) + "\"";
- _root.buttonsDisplay += " (pays - " + _root.Game.places[name_mc].prize_index + " to 1)";
- };
- _root.buttons.r = function(name_mc)
- {
- _root.Game.addChips(name_mc);
- };
- _root.buttons.u = function()
- {
- _root.buttonsDisplay = "";
- };
- Game = new GamePrams();
- startGame();
- var chDepth = 0;
- game_pr = null;
- delete game_pr;
- test_server();
- _focusrect = false;
-