Frame 1
if (include_Library_Complete != true) {
var include_Library_Complete = true;
var hello = "created EUGENE POTAPENKO john@3wgraphics.net 1999-2003";
delete hello;
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 attr = (((" id=\"" + num) + ".0") + "\"");
this.number_for_trace_objects = num;
_root.array_for_delete_numbers.push(this);
if (name == "movieclip") {
attr = attr + ((" name=\"" + this._name) + "\"");
}
var XML_result = new XML((((("<" + name) + attr) + "><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")) {
continue;
}
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 (isXML(this[v])) {
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 = this[v].number_for_trace_objects + 0.01;
attr = (" id=\"" + this[v].number_for_trace_objects) + "\"";
if (type == "movieclip") {
attr = attr + ((" name=\"" + this[v]._name) + "\"");
}
element = new XML((("<" + v) + attr) + " />");
}
} else {
marks = ((type == "string") ? "\"" : "");
if (((type == "number") || (type == "string")) || (type == "boolean")) {
attr = "";
} else {
attr = (" 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.id == "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").toString2());
};
Function.prototype.toString = function () {
return("function");
};
XMLNode.prototype.toString1 = XMLNode.prototype.toString;
XMLNode.prototype.toString = function (tabD) {
if (this.tabDesign || (tabD)) {
return(this.toString2());
}
return(this.toString1());
};
XMLNode.prototype.toString2 = 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 = traced_value + ((((" " + v) + "=\"") + this.attributes[v]) + "\"");
}
if (this.firstChild == null) {
traced_value = traced_value + " />";
} else if ((this.firstChild.nodeType == 3) && (this.firstChild == this.lastChild)) {
traced_value = traced_value + ((((">" + this.firstChild.toString2()) + "</") + this.nodeName) + ">");
} else {
traced_value = traced_value + (((((((">\r " + tab) + this.firstChild.toString2(tab + " ")) + "\r") + tab) + "</") + this.nodeName) + ">");
}
} else {
traced_value = this.firstChild.toString2("");
}
} else {
traced_value = this.nodeValue;
}
if (this.nextSibling != null) {
traced_value = traced_value + (("\r" + tab) + this.nextSibling.toString2(tab));
}
return(traced_value);
};
ASSetPropFlags(Object.prototype, "toXML,trace", 131);
ASSetPropFlags(XMLNode.prototype, "toString1,toString2,tabDesign", 131);
var o = Object.prototype;
o.set = function (param, value) {
this[param] = value;
};
o.clone = function () {
var o = (new this.constructor());
o.__proto__ = this.__proto__;
return(o.copy(this));
};
o.copy = function (o) {
var proto = o.__proto__;
o.__proto__ = undefined;
for (var v in o) {
this[v] = o[v];
}
o.__proto__ = proto;
return(this);
};
o.clear = function () {
var proto = this.__proto__;
this.__proto__ = undefined;
for (var v in this) {
delete this[v];
}
this.__proto__ = proto;
this.constructor.apply(this, arguments);
};
o.applyClass = function (c) {
if (typeof(c) != "function") {
return(false);
}
this.__proto__ = c.prototype;
c.apply(this, arguments.slice(1));
return(true);
};
o.paramHide = function (paramsArray) {
ASSetPropFlags(this, paramsArray || null, 1);
};
o.paramShow = function (paramsArray) {
ASSetPropFlags(this, paramsArray || null, 2);
};
o.paramLock = function (paramsArray) {
ASSetPropFlags(this, paramsArray || null, 7);
};
Object.combine = function (obj, oldFoo, newFoo) {
var oldFoo_bk = obj[oldFoo];
var foo_combine = function () {
newFoo.apply(this, arguments);
return(oldFoo_bk.apply(this, arguments));
};
obj[oldFoo] = foo_combine;
};
o.paramHide();
Object.paramHide();
var o = Array.prototype;
o.nSort = function () {
this.sort(function (a, b) {
if (Number(a) < Number(b)) {
return(-1);
}
if (Number(a) > Number(b)) {
return(1);
}
return(0);
});
return(this);
};
o.sortOnNum = function (param) {
this.sort(function (a, b) {
a = a[param];
b = b[param];
if (!isNaN(a)) {
a = Number(a);
}
if (!isNaN(b)) {
b = Number(b);
}
return((((a < b) * -1) || ((a > b) * 1)) || 0);
});
};
o.trim = function (searched_array, rec) {
var l = this.length;
if (searched_array == undefined) {
searched_array = ["", null];
}
var i = 0;
while (i < this.length) {
if ((searched_array.indexOf(this[i]) != -1) || (rec && (this[i].trim(searched_array, true)))) {
this.splice(i, 1);
i--;
}
i++;
}
return(l != this.length);
};
o.match = function (searched) {
var test = 0;
if (searched instanceof Array) {
var i = 0;
while (i < this.length) {
if (searched.indexOf(this[i]) != -1) {
test++;
}
i++;
}
} else {
var i = 0;
while (i < this.length) {
if (searched == this[i]) {
test++;
}
i++;
}
}
return(test);
};
o.indexOf = function (searched) {
var i = 0;
while (i < this.length) {
if (searched == this[i]) {
return(i);
}
i++;
}
return(-1);
};
o.random = function () {
var random_i = this.length;
while (random_i > 0) {
this.push(this.splice(Math.floor(Math.random() * random_i), 1)[0]);
random_i--;
}
return(this);
};
o.paramHide();
var o = MovieClip.prototype;
o.movieTo = function () {
this._x = arguments[0];
this._y = arguments[1];
};
o.movieBy = function () {
this._x = this._x + arguments[0];
this._y = this._y + arguments[1];
};
o.size = function () {
if ((arguments[0] != null) && (arguments[0] != 0)) {
this._width = arguments[0];
}
if ((arguments[0] != null) && (arguments[0] != 0)) {
this._height = arguments[1];
}
};
o.scale = function () {
this._xscale = (this._yscale = arguments[0]);
};
o.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];
}
};
o.scaleBy = function () {
this._xscale = this._xscale * arguments[0];
this._yscale = this._yscale * arguments[0];
};
o.rotateBy = function () {
this._rotation = this._rotation + arguments[0];
};
o.hide = function () {
this._visible = 0;
};
o.show = function () {
this._visible = 1;
};
o.visInvert = function () {
this._visible = !this._visible;
};
o.flipV = function () {
this._xscale = this._xscale * -1;
};
o.flipH = function () {
this._yscale = this._yscale * -1;
};
o.playOffset = function () {
this.gotoAndPlay(this._currentframe + arguments[0]);
};
o.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);
};
o.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);
};
o.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;
};
o.copyColor = function (fromClip) {
new Color(this).setTransform(new Color(fromClip).getTransform());
};
o.top = function () {
if (this._parent != _root) {
return(this._parent.top());
}
return(this);
};
o.AnimToPlace = function (StartA, FinishA, Steps, CurrStep, XY) {
this[XY] = Math.inOut(StartA, FinishA, Steps, CurrStep);
};
o.newSound = function (id, volume, loop) {
this.mySound = new Sound();
this.mySound.attachSound(id);
this.mySound.setVolume(volume || 100);
this.mySound.start(0, loop || 1);
};
o.stopSound = function (id, volume, loop) {
this.mySound.stop();
};
o.localToLocal = function (fromMc) {
fromMc.localToGlobal(arguments[1]);
this.globalToLocal(arguments[1]);
};
o.align = function (fromClip) {
var b = this.getBounds(fromClip || (this._parent));
if (arguments[1] != "v") {
this._x = this._x - ((b.xMin + b.xMax) / 2);
}
if (arguments[1] != "h") {
this._y = this._y - ((b.yMin + b.yMax) / 2);
}
};
o.alignH = function (fromClip) {
this.align(fromClip || (this._parent), "h");
};
o.alignV = function (fromClip) {
this.align(fromClip || (this._parent), "v");
};
o.setParam = function () {
this[arguments[0]] = arguments[1];
};
o.addProperty("_brightness", function () {
}, function (br) {
var b;
var c;
if (br <= 0) {
b = 100 + br;
c = 0;
} else {
b = 100 - br;
c = Math.round((br / 100) * 255);
}
new Color(this).setTransform({ra:b, rb:c, ga:b, gb:c, ba:b, bb:c, aa:100, ab:0});
});
o.pauseInit = function () {
var o = MovieClip.prototype;
o.played = true;
o.old_play = o.play;
o.play = function () {
if (this.pause_local_flag) {
return(undefined);
}
this.played = true;
this.old_play();
};
o.old_gotoAndPlay = o.gotoAndPlay;
o.gotoAndPlay = function () {
if (this.pause_local_flag) {
return(undefined);
}
this.gotoAndPlayed = true;
this.old_gotoAndPlay(arguments[0], arguments[1]);
};
o.old_stop = o.stop;
o.stop = function () {
this.played = false;
this.old_stop();
};
o.old_gotoAndStop = o.gotoAndStop;
o.gotoAndStop = function () {
this.played = false;
this.old_gotoAndStop(arguments[0], arguments[1]);
};
o.old_prevFrame = o.prevFrame;
o.prevFrame = function () {
this.played = false;
this.old_prevFrame();
};
o.old_nextFrame = o.nextFrame;
o.nextFrame = function () {
this.played = false;
this.old_nextFrame();
};
o.pauseInited = true;
o.paramHide();
};
o.pause = function (action) {
if (!this.pauseInited) {
this.pauseInit();
}
var action = action.toLowerCase();
if ((this.paused_mc_array != undefined) && (action != "stop")) {
delete this.pause_flag;
var i = 0;
while (i < this.paused_mc_array.length) {
delete this.paused_mc_array[i].pause_local_flag;
this.paused_mc_array[i].play();
i++;
}
delete this.paused_mc_array;
} else if ((this.paused_mc_array == undefined) && (action != "play")) {
var pause_array = this.allChilds();
pause_array.push(this);
this.paused_mc_array = new Array();
var i = 0;
while (i < pause_array.length) {
if (pause_array[i].played && (pause_array[i]._totalframes != 1)) {
pause_array[i].stop();
this.paused_mc_array.push(pause_array[i]);
pause_array[i].pause_local_flag = true;
}
i++;
}
}
};
o.creatRound = function (name, depth, radius, color) {
var r = this.createEmptyMovieClip(name, depth);
radius = (radius / 2) || 2;
r.lineStyle(radius, color || 0, 100);
r.lineTo(0, 0.15);
return(r);
};
o.creatSqv = function (name, depth, width, color, center) {
var sqv = this.createEmptyMovieClip(name, depth);
width = width || 1;
var s = 0;
if (center) {
s = (-width) / 2;
}
sqv.moveTo(s, s);
sqv.beginFill(color || 0);
sqv.lineTo(width + s, s);
sqv.lineTo(width + s, width + s);
sqv.lineTo(s, width + s);
sqv.lineTo(s, s);
sqv.endFill();
return(sqv);
};
o.setPixel = function () {
var o = this.localToGlobal({x:this._x, y:this._y});
this._x = this._x - (o.x % 1);
this._y = this._y - (o.y % 1);
};
o.addProperty("_gXscale", function () {
return(this._xscale * ((this._parent != undefined) && ((arguments.callee.apply(this._parent) || 100) / 100)));
}, function (newVal) {
var o = this;
var s = this._xscale;
while ((o = o._parent)) {
s = s * (o._xscale / 100);
}
newVal = newVal / s;
this._xscale = newVal * 100;
});
o.addProperty("_gYscale", function () {
return(this._yscale * ((this._parent != undefined) && ((arguments.callee.apply(this._parent) || 100) / 100)));
}, function (newVal) {
var o = this;
var s = this._yscale;
while ((o = o._parent)) {
s = s * (o._yscale / 100);
}
newVal = newVal / s;
this._yscale = newVal * 100;
});
o.paramHide();
var o = String.prototype;
o.scrollBy = function (scrOffset) {
var newScroll = (this.scroll + scrOffset);
if (newScroll > this.maxscroll) {
newScroll = this.maxscroll;
} else if (newScroll < 1) {
newScroll = 1;
}
this.scroll = newScroll;
};
o.dZero = function () {
return(Number(this).dZero());
};
o.paramHide();
var o = XMLNode.prototype;
XML.prototype.ignoreWhite = true;
o.attr = o.firstChild.attributes;
o.byName = function (node_name) {
return(this.search("nodeName", node_name));
};
o.search = function (param, value) {
if ((value != undefined) && ((this[param] == value) || (this.attributes[param] == value))) {
return(this);
}
if ((value == undefined) && (this.attributes[param] != undefined)) {
return(this);
}
return(this.nextSibling.search(param, value) || (this.firstChild.search(param, value)));
};
o.searchValue = function (value) {
var a = this.attributes;
for (var v in a) {
if (a[v] == value) {
return(this);
}
}
return(this.nextSibling.searchValue(value) || (this.firstChild.searchValue(value)));
};
o.clear = function () {
this.nextSibling.clear();
this.firstChild.clear();
if ((this.nodeType == 3) && (this.parentNode.firstChild != this.parentNode.lastChild)) {
this.removeNode();
}
};
o.paramHide();
var o = Math;
o.ease = function (Steps, CurrStep) {
if (Steps <= CurrStep) {
return(0);
}
if ((Steps / 2) == CurrStep) {
return(1);
}
var result = Math.sin((((CurrStep / Steps) * 180) * Math.PI) / 180);
return((result * result) * result);
};
o.inOut = function (StartA, FinishA, Steps, CurrStep) {
if (CurrStep >= Steps) {
return(FinishA);
}
if (CurrStep <= 0) {
return(StartA);
}
return(StartA + ((FinishA - StartA) * Math.ease(Steps * 2, CurrStep)));
};
o.length = function (point1, point2) {
var catet1 = this.abs(point1._x - point2._x);
var catet2 = this.abs(point1._y - point2._y);
return(this.sqrt(this.pow(catet1, 2) + this.pow(catet2, 2)));
};
o.getMiddlePoint = function (point1, point2, len) {
var bigLen = this.length(point1, point2);
if (len == undefined) {
len = bigLen / 2;
}
var c = (bigLen / len);
var point = {};
point._x = point1._x + ((point2._x - point1._x) / c);
point._y = point1._y + ((point2._y - point1._y) / c);
return(point);
};
o.getDeltaPoint = function (a_point, b_point, delta) {
var rad = 57.2957795130823;
var c = this.length(a_point, b_point);
var b = this.length(a_point, delta);
var a = this.length(b_point, delta);
var angA = Math.round(Math.acos((((b * b) + (c * c)) - (a * a)) / ((2 * b) * c)) * rad);
var angB = Math.round(Math.acos((((a * a) + (c * c)) - (b * b)) / ((2 * a) * c)) * rad);
var angC = Math.round(Math.acos((((a * a) + (b * b)) - (c * c)) / ((2 * a) * b)) * rad);
var ax = Math.round(b * Math.cos(angA / rad));
return(this.getMiddlePoint(a_point, b_point, ax));
};
o.paramHide();
Stage.onCenterScale = function (w, h) {
var o = {};
o.onResize = function () {
var s = Stage;
var rootScale;
var tmp;
if (s.width <= 0) {
return(undefined);
}
s._xscale = (s.width / w) * 100;
s._yscale = (s.height / h) * 100;
tmp = (rootScale = Math.min(s._xscale, s._yscale));
rootScale = rootScale * (Stage._rootH / Stage.height);
if (rootScale > tmp) {
rootScale = tmp;
}
_root._yscale = (_root._xscale = rootScale);
_root._x = (w - (w * (rootScale / 100))) / 2;
_root._y = (h - (h * (rootScale / 100))) / 2;
C_AltCLASS.prototype.scale = (100 / rootScale) * 100;
};
o.onKeyDown = function () {
if ((getTimer() - this.downTimer) > 300) {
var c = Key.getCode();
if ((c == 187) || (c == 107)) {
Stage.zoomIn();
} else if ((c == 189) || (c == 109)) {
Stage.zoomOut();
}
this.downTimer = getTimer();
}
};
o.onKeyUp = function () {
this.downTimer = 0;
};
this.zoomIn = function () {
this._rootH = Math.round(this._rootH * 1.1);
if (this._rootH > this.height) {
this._rootH = this.height;
}
this.saveRootParams();
Stage.broadcastMessage("onResize");
};
this.zoomOut = function () {
if (this._rootH > this.height) {
this._rootH = this.height;
}
this._rootH = Math.round(this._rootH / 1.1);
if (this._rootH < 100) {
this._rootH = 100;
}
Stage.saveRootParams();
Stage.broadcastMessage("onResize");
};
this.saveRootParams = function () {
this.so.data._rootH = this._rootH;
this.so.flush();
};
this.so = SharedObject.getLocal("stage");
if (this.so.data._rootH) {
this._rootH = this.so.data._rootH;
} else {
this._rootH = this.height * 10;
}
Stage.centerScaleMode = true;
Stage._xscale = 100;
Stage._yscale = 100;
Stage.scaleMode = "noScale";
Stage.addListener(o);
Key.addListener(o);
Stage.broadcastMessage("onResize");
};
Stage._xscale = 100;
Stage._yscale = 100;
Stage.paramHide();
var o = Number.prototype;
o.dZero = function () {
if (this < 0) {
var changed = true;
this = -this;
}
if (this == 0) {
return("0.00");
}
var dStr = String(Math.floor(this * 100));
var one = dStr.substr(0, dStr.length - 2);
if (one == "") {
one = "0";
}
var two = dStr.substr(-2);
if (two == "0") {
two = "00";
}
var arr_tmp = [];
var str_tmp = one;
while (str_tmp != "") {
if (str_tmp.length < 3) {
arr_tmp.unshift(str_tmp);
break;
}
arr_tmp.unshift(str_tmp.substr(-3));
str_tmp = str_tmp.substr(0, str_tmp.length - 3);
}
one = arr_tmp.join(",");
if (changed) {
this = -this;
return((("-" + one) + ".") + two);
}
return((one + ".") + two);
};
o.paramHide();
var o = Button.prototype;
o.addProperty("_brightness", function () {
}, function (br) {
var b;
var c;
if (br <= 0) {
b = 100 + br;
c = 0;
} else {
b = 100 - br;
c = Math.round((br / 100) * 255);
}
new Color(this).setTransform({ra:b, rb:c, ga:b, gb:c, ba:b, bb:c, aa:100, ab:0});
});
o.paramHide();
var o = {time:0};
o.onMouseDown = function () {
var t = getTimer();
if (Mouse.isDoubleClick) {
Mouse.isDoubleClick = false;
this.time = t;
return(undefined);
}
if ((t - this.time) <= 300) {
Mouse.isDoubleClick = true;
Mouse.broadcastMessage("onDoubleClick");
}
this.time = t;
};
Mouse.addListener(o);
Mouse.isDoubleClick = false;
delete o;
Mouse.paramHide();
_global.isXML = function (x) {
return((x instanceof XML) || (x instanceof XMLNode));
};
_global.c__ = {};
c__[1] = function () {
Conv.include.apply(Conv, arguments);
};
c__[2] = function () {
Conv.put.apply(Conv, arguments);
};
c__[3] = function () {
Conv.anim.apply(Conv, arguments);
};
_global.startDebug = function () {
Object.prototype.__resolve = function (notFoundMethodName) {
trace((("Not Found Method Or Prop Name: " + this) + ": ") + notFoundMethodName);
};
};
ASSetPropFlags(_global, "isXML,c__,startDebug", 131);
_global.C_ConveyorCLASS = function (notFrames) {
this.init(notFrames);
};
C_ConveyorCLASS.prototype.init = function (notFrames) {
this.aConveyor = new Array();
this.conveyorON = true;
this.bookmark = 0;
this.shorts = 0;
this.turbo = false;
this.noSound = false;
this.frameTimer = {};
if (!notFrames) {
this.frameTimer.root = this;
this.frameTimer.onEnterFrame = function () {
if (this.sleep) {
return(undefined);
}
this.nTime++;
if (this.nTime >= this.timeOut) {
this.root.engine();
}
};
this.ConvTimer.addListener(this.frameTimer);
this.pauseValue = "1";
} else {
this.pauseValue = 50;
}
this.engine();
ASSetPropFlags(this, null, 1);
};
C_ConveyorCLASS.prototype.ConvTimer = _root.createEmptyMovieClip("ConvTimer", -9122);
C_ConveyorCLASS.prototype.ConvTimer.onEnterFrame = function () {
this.broadcastMessage("onEnterFrame");
};
AsBroadcaster.initialize(_root.ConvTimer);
_global.anim_depth = _root.createEmptyMovieClip("anim_depth", 15400);
anim_depth.onUnload = function () {
trace("error: conveyor anim depth crashed!");
};
C_ConveyorCLASS.prototype.play = function () {
if (this.conveyorON) {
return(undefined);
}
if (this.frame) {
this.frameTimer.sleep = false;
}
this.conveyorON = true;
};
C_ConveyorCLASS.prototype.stop = function () {
if (this.frame) {
this.frameTimer.sleep = true;
}
this.conveyorON = false;
};
C_ConveyorCLASS.prototype.pause = function (pause) {
this.aConveyor = [[function () {
}, pause]].concat(this.aConveyor);
};
C_ConveyorCLASS.prototype.put = function () {
if (this.noSound && (arguments[1] == "newSound")) {
return(undefined);
}
this.aConveyor.push(arguments);
if ((!this.bookmark) && (this.aConveyor.length > (200 + this.shorts))) {
var tmp_arr = this.aConveyor.splice(100 + this.shorts);
this.shorts++;
this.put(function () {
this.aConveyor = arguments[0].concat(this.aConveyor);
this.shorts--;
}, this, 0, tmp_arr);
}
};
C_ConveyorCLASS.prototype.include = function () {
this.put(this, "bookmark_add", 0);
this.put.apply(this, arguments);
this.put(this, "bookmark_remove", 0);
};
C_ConveyorCLASS.prototype.engine = function () {
if (!this.conveyorON) {
this.pause(this.pauseValue);
}
var cTime;
var tA = this.aConveyor[0];
if (this.aConveyor.length == 0) {
cTime = this.pauseValue;
} else {
this.aConveyor.shift();
var calledFunction;
var calledObject;
var argumentsObject;
if (typeof(tA[0]) != "function") {
calledObject = tA[0];
if (typeof(calledObject) == "string") {
calledObject = eval (calledObject);
}
cTime = tA[2];
calledFunction = calledObject[tA[1]];
argumentsObject = tA.slice(3);
if (typeof(calledFunction) == "function") {
calledFunction.apply(calledObject, argumentsObject);
} else {
calledObject[tA[1]] = argumentsObject[0];
}
} else if (!isNaN(tA[1])) {
cTime = tA[1];
calledFunction = tA[0];
argumentsObject = tA.slice(2);
calledFunction.apply(null, argumentsObject);
} else {
cTime = tA[2];
calledFunction = tA[0];
calledObject = tA[1];
if (typeof(calledObject) == "string") {
calledObject = eval (calledObject);
}
argumentsObject = tA.slice(3);
calledFunction.apply(calledObject, argumentsObject);
}
}
clearInterval(this.interval);
if (cTime != 0) {
var timeType = typeof(cTime);
var timeValue = Number(cTime);
if (timeType == "string") {
this.frameTimer.sleep = false;
if (this.turbo) {
timeValue = 1;
}
this.frameTimer.timeOut = timeValue;
this.frameTimer.nTime = 0;
this.frame = true;
} else if (timeType == "number") {
this.frameTimer.sleep = true;
this.interval = setInterval(this, "engine", timeValue);
this.frame = false;
} else {
this.engine();
}
} else {
this.engine();
}
};
C_ConveyorCLASS.prototype.anim = function (mc_anim, mc_to, params_ob) {
var to_end = params_ob.to_end;
var speed = (params_ob.speed || 20);
var scale = params_ob.scale;
var x_f = mc_to._x;
var y_f = mc_to._y;
var delta = params_ob.delta;
var x;
var y;
var x_s;
var y_s;
var x_st = mc_anim._x;
var y_st = mc_anim._y;
if (scale) {
var scale_x = mc_anim._xscale;
var scale_y = mc_anim._yscale;
var scale_to_x = mc_to._xscale;
var scale_to_y = mc_to._yscale;
}
this.put(mc_anim, "swapDepths", 0, _root.anim_depth);
this.put(_root, "newSound", 0, "movie", 50);
var pathLength = Math.sqrt(Math.pow(Math.abs(mc_anim._x - mc_to._x), 2) + Math.pow(Math.abs(mc_anim._y - mc_to._y), 2));
var nSteps = Math.round(pathLength / speed);
if (isNaN(nSteps)) {
return(undefined);
}
if (nSteps < 5) {
nSteps = 5;
}
var i = 1;
while (i <= nSteps) {
if ((!to_end) && (i >= (nSteps - (nSteps / 5)))) {
break;
}
if (this.turbo) {
i = (to_end ? (nSteps) : (nSteps - (nSteps / 5)));
}
if (scale) {
x_s = Math.inOut(scale_x, scale_to_x, nSteps, i);
y_s = Math.inOut(scale_y, scale_to_y, nSteps, i);
this.put(mc_anim, "scaleTo", 0, x_s, y_s);
}
x = Math.inOut(x_st, x_f, nSteps, i);
y = Math.inOut(y_st, y_f, nSteps, i);
this.put(mc_anim, "movieTo", "1", x, y);
i++;
}
this.put(mc_anim, "swapDepths", 0, _root.anim_depth);
};
C_ConveyorCLASS.prototype.turbo_On = function () {
this.turbo = true;
};
C_ConveyorCLASS.prototype.turbo_Off = function () {
this.turbo = false;
};
C_ConveyorCLASS.prototype.bookmark_add = function () {
this.aConveyor.push("#bookmark#");
this.bookmark++;
};
C_ConveyorCLASS.prototype.bookmark_remove = function (rev) {
if (this.bookmark <= 0) {
return(undefined);
}
this.bookmark--;
var n = this.aConveyor.length;
var tmp_array = [];
while ((this.aConveyor[this.aConveyor.length - 1] != "#bookmark#") && ((n--) > 0)) {
tmp_array.push(this.aConveyor.pop());
}
this.aConveyor.pop();
if (!rev) {
tmp_array.reverse();
}
this.aConveyor = tmp_array.concat(this.aConveyor);
};
C_ConveyorCLASS.prototype.create = function (notFrames) {
return(new C_ConveyorCLASS(notFrames));
};
C_ConveyorCLASS.prototype.close = function () {
this.stop();
this.ConvTimer.removeListener(this);
clearInterval(this.interval);
};
_global.empty = function () {
};
_global.Conv = new C_ConveyorCLASS();
ASSetPropFlags(_global, "Conv,empty,anim_depth,addConveyor", 131);
ASSetPropFlags(_global, "C_ConveyorCLASS", 131);
_global.Image = function (uri, mc) {
this._targetMovie = mc;
this.data = new XML();
this.data.owner = this;
if (uri != undefined) {
this.tmp_interval = setInterval(this, "load", 20, uri);
}
};
Image.prototype.load = function (uri, mc) {
clearInterval(this.tmp_interval);
this._targetMovie = mc || (this._targetMovie);
this._uri = uri;
this.data.onLoad = function (success) {
var o = this.owner;
o._trace();
o.onLoad(success);
o.close();
};
this._traceID = setInterval(this, "_trace", 50);
this.data.load(uri);
};
Image.prototype.close = function (uri, mc) {
clearInterval(this._traceID);
};
Image.prototype.getBytesLoaded = function () {
return(this.data.getBytesLoaded());
};
Image.prototype.getBytesTotal = function () {
return(this.data.getBytesTotal());
};
Image.prototype._trace = function () {
if (this.getBytesTotal() <= 0) {
return(undefined);
}
this.percent = Math.floor((this.getBytesLoaded() / this.getBytesTotal()) * 10000) / 100;
this.trace();
};
Image.prototype.trace = function () {
};
Image.prototype.onLoad = function (success) {
if (success) {
if (this._targetMovie) {
this._targetMovie.loadMovie(this._uri);
}
}
};
Image.prototype.addProperty("src", function () {
return(this._uri);
}, Image.prototype.load);
ASSetPropFlags(_global, "Image", 131);
_global.Preloader = function () {
this.items = [];
var i = 0;
while (i < arguments.length) {
this.addItem(arguments[i]);
i++;
}
};
Preloader.prototype.addItem = function () {
var o;
var a;
if (arguments[0] instanceof Array) {
a = arguments[0];
} else {
a = arguments;
}
var i = 0;
while (i < a.length) {
o = new Image();
o.owner = this;
o.onLoad = function (s) {
this.owner.onItemLoaded(s);
};
this.items.push([o, a[i]]);
this.loadInited = true;
i++;
}
if (!this.curentLoad) {
this.onItemLoaded();
}
return(o);
};
Preloader.prototype.onItemLoaded = function (success) {
var o = ((this.curentLoad = this.items.shift()));
if (this.curentLoad) {
o[0].load(o[1]);
} else if (this.loadInited) {
this.onLoad();
}
};
Preloader.prototype.onLoad = function () {
this.trace("Loading Complette");
};
ASSetPropFlags(_global, "Preloader", 131);
_global.C_ElasticEngineCLASS = function () {
};
C_ElasticEngineCLASS.prototype = new Object();
C_ElasticEngineCLASS.prototype.init = function (w, h, minWidth, minHeight) {
Stage.scaleMode = "noScale";
Stage.align = "TL";
var o = ((Stage.elasticListener = {}));
o.minHeight = minHeight || (h);
o.minWidth = minWidth || (w);
o.width = w;
o.height = h;
o.onResize = function () {
var o = Stage;
if ((o.width <= 0) || (o.height <= 0)) {
this.locked = true;
return(undefined);
}
this.locked = false;
var w = Math.max(this.minWidth, o.width);
var h = Math.max(this.minHeight, o.height);
this.w_d = Math.round(w) - this.width;
this.h_d = Math.round(h) - this.height;
this.width = w;
this.height = h;
};
Stage.addListener(o);
var mc = MovieClip.prototype;
var btn = Button.prototype;
var txt = TextField.prototype;
mc.registerElastic = (btn.registerElastic = (txt.registerElastic = this.registerElastic));
mc.registerInterfaceElastic = this.registerInterfaceElastic;
mc.removeElastic = (btn.removeElastic = (txt.removeElastic = this.registerElastic));
ASSetPropFlags(mc, "registerElastic,registerInterfaceElastic", 131);
ASSetPropFlags(btn, "registerElastic", 131);
ASSetPropFlags(txt, "registerElastic", 131);
delete _global.C_ElasticEngineCLASS;
};
C_ElasticEngineCLASS.prototype.registerElastic = function () {
var o = {root:this};
o.onResize = function () {
var o = this.root;
var s = Stage.elasticListener;
if (s.locked) {
return(undefined);
}
if (!this.inited) {
this._width = o._width;
this._height = o._height;
this._x = o._x;
this._y = o._y;
this.inited = true;
}
var a = this.elasticParams;
var value;
var i = 0;
while (i < a.length) {
o[a[i][1]] = o[a[i][1]] + s[a[i][0]];
i++;
}
for (var v in this.centerParams) {
if (v == "w_c") {
this._width = this._width + (s.w_d / this.centerParams.w_c);
o._width = Math.round(this._width);
} else if (v == "h_c") {
this._height = this._height + (s.h_d / this.centerParams.h_c);
o._height = Math.round(this._height);
} else if (v == "x_c") {
this._x = this._x + (s.w_d / this.centerParams.x_c);
o._x = Math.round(this._x);
} else if (v == "y_c") {
this._y = this._y + (s.h_d / this.centerParams.y_c);
o._y = Math.round(this._y);
}
}
o.onResize();
};
o.elasticParams = [];
var params = {};
params.x = ["w_d", "_x"];
params.w = ["w_d", "_width"];
params.y = ["h_d", "_y"];
params.h = ["h_d", "_height"];
o.centerParams = {};
var centerParam;
var centerValue;
var i = 0;
while (i < arguments.length) {
centerParam = arguments[i].substr(0, 1);
centerValue = Number(arguments[i].substr(2));
if (centerValue) {
if (centerParam == "x") {
o.centerParams.x_c = centerValue;
} else if (centerParam == "y") {
o.centerParams.y_c = centerValue;
} else if (centerParam == "w") {
o.centerParams.w_c = centerValue;
} else if (centerParam == "h") {
o.centerParams.h_c = centerValue;
}
} else {
o.elasticParams.push(params[arguments[i]]);
}
i++;
}
Stage.addListener(o);
};
C_ElasticEngineCLASS.prototype.registerInterfaceElastic = function () {
var o = {root:this};
o.onResize = function () {
var o = this.root;
var s = Stage.elasticListener;
if (s.locked) {
return(undefined);
}
if (!this.inited) {
this.width = o.width;
this.height = o.height;
this._x = o._x;
this._y = o._y;
this.inited = true;
}
var a = this.elasticParams;
var value;
var interface = this.interface;
var args = [];
var centerParams = this.centerParams;
var i = 0;
while (i < a.length) {
o[a[i][1]] = o[a[i][1]] + s[a[i][0]];
i++;
}
if (interface.w) {
args.push(o.width + s.w_d);
} else if (interface.w_l) {
args.push(o.width);
} else if (centerParams.w_c) {
this.width = this.width + (s.w_d / centerParams.w_c);
args.push(Math.round(this.width));
}
if (interface.h) {
args.push(o.height + s.h_d);
} else if (interface.h_l) {
args.push(o.height);
} else if (centerParams.h_c) {
this.height = this.height + (s.h_d / centerParams.h_c);
args.push(Math.round(this.height));
}
if (centerParams.x_c) {
this._x = this._x + (s.w_d / centerParams.x_c);
o._x = Math.round(this._x);
}
if (centerParams.y_c) {
this._y = this._y + (s.h_d / centerParams.y_c);
o._y = Math.round(this._y);
}
o.setSize.apply(o, args);
o.onResize();
};
o.elasticParams = [];
o.interface = {};
o.centerParams = {};
var params = {};
params.x = ["w_d", "_x"];
params.y = ["h_d", "_y"];
var centerParam;
var centerValue;
var i = 0;
while (i < arguments.length) {
if (params[arguments[i]]) {
o.elasticParams.push(params[arguments[i]]);
} else {
centerParam = arguments[i].substr(0, 1);
centerValue = Number(arguments[i].substr(2));
if (centerValue) {
if (centerParam == "x") {
o.centerParams.x_c = centerValue;
} else if (centerParam == "y") {
o.centerParams.y_c = centerValue;
} else if (centerParam == "w") {
o.centerParams.w_c = centerValue;
} else if (centerParam == "h") {
o.centerParams.h_c = centerValue;
}
} else {
o.interface[arguments[i]] = true;
}
}
i++;
}
Stage.addListener(o);
return(true);
};
C_ElasticEngineCLASS.prototype.removeElastic = function () {
var a = Stage._listeners;
var i = 0;
while (i < a.length) {
if (a[i].root == this) {
Stage.removeListener(a[i]);
return(undefined);
}
i++;
}
};
Stage.initElastic = function (w, h, minWidth, minHeight) {
var elasticEngine = new C_ElasticEngineCLASS();
elasticEngine.init(w, h, minWidth, minHeight);
};
ASSetPropFlags(_global, "C_ElasticEngine", 131);
ASSetPropFlags(Stage, "initElastic", 131);
_global.C_AltCLASS = function (text, owner) {
this.owner = owner;
this.init();
this.drawAlt(text);
};
C_AltCLASS.prototype = new Object();
C_AltCLASS.prototype.counter = 0;
C_AltCLASS.prototype.depth = 23499;
C_AltCLASS.prototype.fill = 16777164 /* 0xFFFFCC */;
C_AltCLASS.prototype.lineColor = 0;
C_AltCLASS.prototype.align = "BL";
C_AltCLASS.prototype.scale = 100;
var o = ((C_AltCLASS.prototype.textFormat = new TextFormat()));
o.font = "_sans";
o.size = 10;
o.textColor = 0;
o.bold = true;
o.indent = 0;
delete o;
C_AltCLASS.prototype.init = function () {
Stage.addListener(this);
Mouse.addListener(this);
var o = ((this.closeListener = {}));
o.owner = this;
o.onMouseDown = (o.onKeyDown = (o.onKeyUp = function () {
var o = this.owner.owner;
if (o) {
o.hideAlt();
} else {
this.owner.close();
}
}));
Key.addListener(o);
Mouse.addListener(o);
};
C_AltCLASS.prototype.drawAlt = function (text) {
if (this.__proto__.curent) {
this.__proto__.curent.owner.hideAlt();
}
this.__proto__.curent = this;
var o = ((this.holder = _root.createEmptyMovieClip(("alt_" + c) + "_mc", this.depth)));
this.holder._xscale = (this.holder._yscale = this.scale);
o.owner = this;
o.onEnterFrame = function () {
delete this.onEnterFrame;
this.owner.drawBorder();
};
o._visible = false;
o._x = _root._xmouse;
o._y = _root._ymouse;
o.createTextField("alt_txt", 123, 0, 0, 10, 10);
var t = o.alt_txt;
t.border = false;
t.multiline = true;
t.autoSize = true;
t.selectable = false;
t.text = text;
t.setTextFormat(this.textFormat);
};
C_AltCLASS.prototype.drawBorder = function () {
var o = this.holder;
o._visible = true;
var t = o.alt_txt;
var w = t._width;
var h = t._height;
var x = o._xmouse;
var y = o._ymouse;
var b = ((this.border_mc = o.createEmptyMovieClip("border", 2)));
b.beginFill(this.fill, 100);
b.lineStyle(0);
b.lineTo(12, -12);
b.lineTo((12 + w) + 4, -12);
b.lineTo((12 + w) + 4, (-12 - h) - 4);
b.lineTo(8, (-12 - h) - 4);
b.lineTo(8, -19);
b.endFill();
var a = b.createEmptyMovieClip("aligner", 1);
b = (this.shadow_mc = o.createEmptyMovieClip("shadow", 1));
b.beginFill(0, 30);
var d = 7;
b.lineTo(12 + d, -12 + d);
b.lineTo(((12 + w) + 4) + d, -12 + d);
b.lineTo(((12 + w) + 4) + d, ((-12 - h) - 4) + d);
b.lineTo(8 + d, ((-12 - h) - 4) + d);
b.lineTo(8 + d, -19 + d);
b.endFill();
a.beginFill(this.fill);
a.moveTo(12, -15);
a.lineTo(12 + w, -15);
a.lineTo(12 + w, -12 - h);
a.lineTo(12, -12 - h);
a.endFill();
this.altAlign();
this.onMouseMove();
};
C_AltCLASS.prototype.altAlign = function () {
var o = this.holder;
if (this.align == undefined) {
this.align = "BL";
}
if (this.align == "BL") {
o.border._xscale = (o.shadow._xscale = 100);
o.border._yscale = (o.shadow._yscale = 100);
o.shadow._x = (o.shadow._y = 0);
} else if (this.align == "BR") {
o.border._xscale = (o.shadow._xscale = -100);
o.border._yscale = (o.shadow._yscale = 100);
o.shadow._x = 0;
o.shadow._y = 0;
} else if (this.align == "TL") {
o.border._xscale = (o.shadow._xscale = 100);
o.border._yscale = (o.shadow._yscale = -100);
o.shadow._x = 0;
o.shadow._y = 10;
} else if (this.align == "TR") {
o.border._xscale = (o.shadow._xscale = -100);
o.border._yscale = (o.shadow._yscale = -100);
o.shadow._x = 0;
o.shadow._y = 10;
}
var p = o.border.aligner.getBounds(o);
o.alt_txt._x = p.xMin;
o.alt_txt._y = p.yMin - 2;
};
C_AltCLASS.prototype.onMouseMove = function () {
if (!this.owner.__alt) {
this.close();
return(undefined);
}
if (!this.point) {
this.holder._x = _root._xmouse;
this.holder._y = _root._ymouse;
} else {
this.holder._x = this.point._x;
this.holder._y = this.point._y;
}
this.holder._xscale = (this.holder._yscale = this.scale);
var x = this.holder._x;
var y = this.holder._y;
var w = this.holder._width;
var h = this.holder._height;
var a = this.align;
var v = "B";
var g = "L";
if (Stage.centerScaleMode) {
if ((y - h) < 0) {
v = "T";
}
if (((x + w) > (Stage.width / (Stage._xscale / 100))) && (w < Stage.width)) {
g = "R";
}
} else {
if ((Stage.height > 0) && (h > y)) {
v = "T";
}
if (((Stage.width > 0) && ((Stage.width - w) < x)) && (w < Stage.width)) {
g = "R";
}
}
this.align = v + g;
if (this.align != a) {
this.altAlign();
}
};
C_AltCLASS.prototype.onResize = function () {
this.onMouseMove();
};
C_AltCLASS.prototype.close = function () {
this.holder.removeMovieClip();
Stage.removeListener(this);
Mouse.removeListener(this);
Key.removeListener(this.closeListener);
Mouse.removeListener(this.closeListener);
};
ASSetPropFlags(_global, "C_AltCLASS", 131);
Button.prototype.showAlt = (MovieClip.prototype.showAlt = function (text) {
if (this.__alt) {
this.hideAlt();
}
this.__alt = new C_AltCLASS(text, this);
});
MovieClip.prototype.showAltInPoint = function (text, point) {
if (this.__alt) {
this.hideAlt();
}
var o = ((this.__alt = new C_AltCLASS(text, this)));
o.point = point;
};
Button.prototype.hideAlt = (MovieClip.prototype.hideAlt = function () {
this.__alt.close();
delete this.__alt;
});
Button.prototype.addAlt = (MovieClip.prototype.addAlt = function (t) {
var o = this;
var fIn = function () {
this.showAlt(t);
};
var fOut = function () {
this.hideAlt();
};
if (arguments.length > 1) {
fIn = arguments[0];
fOut = arguments[1];
}
o.onRollOver = fIn;
o.onDragOut = (o.onRollOut = (o.onPress = (o.onRelease = (o.onReleaseOutside = fOut))));
o.useHandCursor = false;
});
Mouse.showAlt = function (text) {
var b = _root.creatSqv("tmp_sqv_alt", 8919, 10, 0, true);
b._alpha = 0;
b._x = _root._xmouse;
b._y = _root._ymouse;
b.showAlt(text);
b.onRollOut = (b.onPress = (b.onRelease = (b.onReleaseOutside = (b.onDragOut = function () {
this.hideAlt();
this.removeMovieClip();
}))));
};
ASSetPropFlags(MovieClip.prototype, "showAlt,hideAlt,addAlt", 131);
ASSetPropFlags(Button.prototype, "showAlt,hideAlt,addAlt", 131);
ASSetPropFlags(Button, "showAlt", 131);
_global.C_My = {};
C_My.dZerro = function () {
if (arguments[0] == 0) {
return("0.00");
}
var dStr = String(Math.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";
}
var arr_tmp = [];
var str_tmp = one;
while (str_tmp != "") {
if (str_tmp.length < 3) {
arr_tmp.unshift(str_tmp);
break;
}
arr_tmp.unshift(str_tmp.substr(-3));
str_tmp = str_tmp.substr(0, str_tmp.length - 3);
}
one = arr_tmp.join(",");
return((one + ".") + two);
};
C_My.paramHide();
ASSetPropFlags(_global, "C_My", 131);
_global.C_ShortcutsCLASS = function () {
this._listeners = [];
this._shortCutListeners = [];
this.keys = {};
this.init();
};
C_ShortcutsCLASS.prototype = new Object();
C_ShortcutsCLASS.prototype.init = function () {
Key.addShortcut = function (listener) {
this.shortcutsEngine.addListener.apply(this.shortcutsEngine, arguments);
};
Key.removeShortcut = function (listener) {
this.shortcutsEngine.removeListener(listener);
};
Key.addShortcutListener = function (listener) {
this.shortcutsEngine.addShortcutListener.apply(this.shortcutsEngine, arguments);
};
Key.removeShortcutListener = function (listener) {
this.shortcutsEngine.removeShortcutListener(listener);
};
Key.getShortcut = function () {
return(this.shortcutsEngine.getShortcut());
};
Key.addListener(this);
ASSetPropFlags(Key, "addShortcut,removeShortcut", 131);
ASSetPropFlags(Key, "addShortcutListener,removeShortcutListener,getShortcut", 131);
var o = ((this.nonFunctionalKeys = {}));
o[38] = "UP";
o[40] = "DOWN";
o[37] = "LEFT";
o[39] = "RIGHT";
o[46] = "DELETE";
o[36] = "HOME";
o[35] = "END";
o[34] = "PAGEDOWN";
o[33] = "PAGEUP";
o[45] = "INSERT";
o[32] = "SPACE";
o[8] = "BACKSPACE";
o[27] = "INSERT";
o[9] = "TAB";
o[13] = "ENTER";
o = (this.functionalKeys = {});
o[17] = "CTRL";
o[16] = "SHIFT";
o[18] = "ALT";
};
C_ShortcutsCLASS.prototype.getShortcut = function () {
var a = [];
for (var v in this.keys) {
a.push(v);
}
return(this.format(a));
};
C_ShortcutsCLASS.prototype.onKeyDown = function () {
var isSh = this.registerKey(true);
if (isSh && (this.isListeners)) {
var a;
var o;
var shName = this.getShortcut();
a = this._listeners;
var i = 0;
while (i < a.length) {
o = a[i];
if ((o.shortcutName == shName) && (o.client.enabled != false)) {
o.client.onShortcut(shName);
}
i++;
}
}
this.onShortcutChanged();
};
C_ShortcutsCLASS.prototype.onKeyUp = function () {
this.registerKey(false);
this.onShortcutChanged();
};
C_ShortcutsCLASS.prototype.onShortcutChanged = function () {
if (this.isShortcutListeners) {
var shName = this.getShortcut();
var a = this._shortCutListeners;
var o;
var i = 0;
while (i < a.length) {
o = a[i];
if (o.shortcutName == shName) {
if (!o.calledDown) {
o.calledDown = true;
o.client.onShortcutDown(shName);
}
} else if (o.calledDown) {
o.calledDown = false;
o.client.onShortcutUp(o.shortcutName);
}
i++;
}
}
};
C_ShortcutsCLASS.prototype.addListener = function (listener) {
if (listener == undefined) {
return(undefined);
}
this.removeShortcut(listener);
var o;
var a = arguments.slice(1);
var i = 0;
while (i < a.length) {
o = {};
o.client = listener;
o.shortcutName = this.format(a[i].toUpperCase().split("+"));
this._listeners.push(o);
i++;
}
this.isListeners = this._listeners.length > 0;
};
C_ShortcutsCLASS.prototype.removeListener = function (listener) {
if (listener == undefined) {
return(undefined);
}
var a = this._listeners;
var i = 0;
while (i < a.length) {
if ((a[i].client == listener) || (a[i].client == undefined)) {
a.splice(i, 1);
if (i > 0) {
i--;
}
}
i++;
}
this.isListeners = this._listeners.length > 0;
};
C_ShortcutsCLASS.prototype.addShortcutListener = function (listener) {
if (listener == undefined) {
return(undefined);
}
this.removeShortcutListener(listener);
var o;
var a = arguments.slice(1);
var i = 0;
while (i < a.length) {
o = {};
o.client = listener;
o.shortcutName = this.format(a[i].toUpperCase().split("+"));
this._shortCutListeners.push(o);
i++;
}
this.isShortcutListeners = this._shortCutListeners.length > 0;
};
C_ShortcutsCLASS.prototype.removeShortcutListener = function (listener) {
if (listener == undefined) {
return(undefined);
}
var a = this._shortCutListeners;
var i = 0;
while (i < a.length) {
if ((a[i].client == listener) || (a[i].client == undefined)) {
a.splice(i, 1);
if (i > 0) {
i--;
}
}
i++;
}
this.isShortcutListeners = this._shortCutListeners.length > 0;
};
C_ShortcutsCLASS.prototype.format = function (a) {
var b = [];
var i = 0;
while (i < a.length) {
if (a[i] == "ALT") {
b.push(a.splice(i, 1));
break;
}
i++;
}
var i = 0;
while (i < a.length) {
if (a[i] == "CTRL") {
b.push(a.splice(i, 1));
break;
}
i++;
}
var i = 0;
while (i < a.length) {
if (a[i] == "SHIFT") {
b.push(a.splice(i, 1));
break;
}
i++;
}
return(b.concat(a.sort()).join("+"));
};
C_ShortcutsCLASS.prototype.registerKey = function (down) {
for (var v in this.keys) {
if (!Key.isDown(this.keys[v])) {
delete this.keys[v];
}
}
if (!down) {
return(undefined);
}
var c = Key.getCode();
var k = this.functionalKeys[c];
if (k == undefined) {
k = this.nonFunctionalKeys[c];
if (k == undefined) {
k = String.fromCharCode(Key.getAscii()).toUpperCase();
}
if (this.keys[k]) {
return(false);
}
this.keys[k] = c;
return(true);
}
this.keys[k] = c;
return(false);
};
Key.shortcutsEngine = new C_ShortcutsCLASS();
ASSetPropFlags(Key, "shortcutsEngine", 131);
ASSetPropFlags(_global, "C_ShortcutsCLASS", 131);
if (!MMSAVE("text_test.txt", _url)) {
_global.JS = {};
}
_global.JS.alert = function (msg) {
getURL (("javascript: void top.alert('" + msg) + "');");
};
_global.JS.focus = function () {
getURL ("javascript: void top.focus();");
};
_global.JS.close = function () {
getURL ("javascript: void top.close();");
};
_global.JS.call = function (msg) {
getURL ("javascript: void " + msg);
};
_global.JS.open = function (url, name, w, h) {
var params;
if (!isNaN(w)) {
params = ((("width=" + w) + ",height=") + h) + ",menubar=no,scrollbars=yes,status=yes,titlebar=no,toolbar=no,resizable=yes";
} else {
params = w;
}
getURL (((((("javascript: void top.open('" + url) + "', '") + name) + "', '") + params) + "');");
};
ASSetPropFlags(_global, "JS", 131);
if (AsBroadcaster == undefined) {
_global.ASBroadcaster = {};
ASBroadcaster.initialize = function (obj) {
obj.addListener = this.addListener;
obj.removeListener = this.removeListener;
obj.broadcastMessage = this.broadcastMessage;
obj._listeners = [];
ASSetPropFlags(obj, ["addListener", "removeListener", "broadcastMessage", "_listeners"], 7);
};
ASBroadcaster.addListener = function (obj) {
this.removeListener(obj);
this._listeners.push(obj);
return(true);
};
ASBroadcaster.removeListener = function (obj) {
var a = this._listeners;
var i = this._listeners.length;
while (--i) {
if (a[i] == obj) {
a.splice(i, 1);
return(true);
}
}
return(false);
};
ASBroadcaster.broadcastMessage = function (theEvent) {
var a = this._listeners;
var i = this._listeners.length;
while (--i) {
a[i][theEvent]();
}
};
ASSetPropFlags(ASBroadcaster, null, 7);
ASSetPropFlags(_global, "ASBroadcaster", 131);
}
Button.prototype.tabEnabled = false;
MovieClip.prototype.tabEnabled = false;
ASSetPropFlags(Button.prototype, "tabEnabled", 7);
ASSetPropFlags(MovieClip.prototype, "tabEnabled", 7);
delete o;
}
this.stop();
_global.C_GameCLASS = function () {
this.init();
};
C_GameCLASS.prototype = new Object();
C_GameCLASS.prototype.init = function () {
this.curBet = 5;
this.nCoins = 0;
this.coin = 5;
this.CardLine = ["2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"];
this.CardSuit = ["Spades", "Hearts", "Diamonds", "Clubs"];
this.CardSuit_Server = new Array("S", "H", "D", "C");
this.NCards = 52;
var o = ((this.table_prize = {}));
o.line_1 = [250, 500, 750, 1000, 5000];
o.line_2 = [50, 100, 150, 200, 250];
o.line_3 = [20, 40, 60, 80, 100];
o.line_4 = [7, 14, 21, 28, 35];
o.line_5 = [5, 10, 15, 20, 25];
o.line_6 = [4, 8, 12, 16, 20];
o.line_7 = [3, 6, 9, 12, 15];
o.line_8 = [2, 4, 6, 8, 10];
o.line_9 = [1, 2, 3, 4, 5];
this.setTableVisual();
this.soundOn = true;
this.turn_risk_step = 0;
this.userBalance = 999;
this.bet = 0;
this.paid = 0;
this.locked = false;
this.begin = false;
Conv.put(this, "display", "2");
this.inDeck();
_root.dealButton_mc.setChangeHandler("dealBegin", this);
_root.dealButton_mc.setKeys(13, 32);
_root.coinMenu_mc.setChangeHandler("changeCoin", this);
_root.infoDisplay_mc.setChangeHandler("setCoinsNumber", this);
Stage.onCenterScale(650, 400);
};
C_GameCLASS.prototype.lock = function () {
_root.Joke.gotoAndStop(1);
this.locked = true;
_root.dealButton_mc.lock();
Button.prototype.enabled = false;
_root.infoDisplay_mc.lock();
_root.coinMenu_mc.lock();
};
C_GameCLASS.prototype.unlock = function () {
_root.Joke.gotoAndPlay("start_anim");
this.locked = false;
_root.dealButton_mc.unlock();
Button.prototype.enabled = true;
if (!this.begin) {
_root.infoDisplay_mc.unlock();
_root.coinMenu_mc.unlock();
}
};
C_GameCLASS.prototype.inDeck = function () {
this.ideal_deck = new Array();
this.trans_deck = {};
var n = 0;
var s = 1;
var i = 0;
while (i < this.NCards) {
this.ideal_deck[i] = new Array(5);
this.ideal_deck[i][0] = this.CardLine[n];
this.ideal_deck[i][1] = this.CardSuit[s - 1];
this.ideal_deck[i][2] = s;
this.ideal_deck[i][3] = i + 1;
this.ideal_deck[i][4] = n;
this.trans_deck[this.CardLine[n] + this.CardSuit_Server[s - 1]] = this.ideal_deck[i];
if (((i + 1) % 4) == 0) {
s = 1;
n++;
} else {
s++;
}
i++;
}
};
C_GameCLASS.prototype.display = function () {
_root.displayLeft_txt.htmlText = (("<P ALIGN='LEFT'><FONT FACE='04b_25' SIZE='18' COLOR='#FF0000'>paid:<FONT COLOR='#FFFFFF'> $" + this.paid.dZero()) + "</FONT>") + "</P>";
_root.displayRight_txt.htmlText = (("<P ALIGN='RIGHT'><FONT FACE='04b_25' SIZE='18' COLOR='#FF0000'>bet:<FONT COLOR='#FFFFFF'> $" + this.bet.dZero()) + "</FONT>") + "</P>";
_root.balanceMashine_mc.balance = this.userBalance;
};
C_GameCLASS.prototype.crBalance = function () {
_root.balanceMashine_mc.balance = this.userBalance;
};
C_GameCLASS.prototype.checkPrize = function (turnOne) {
var ob = this.cards_hand;
var card_array = [ob[0].card, ob[1].card, ob[2].card, ob[3].card, ob[4].card];
var c;
var i = 0;
while (i < card_array.length) {
c = card_array[i];
card_array[i] = [];
var j = 0;
while (j < c.length) {
card_array[i][j] = c[j];
j++;
}
card_array[i][5] = i;
i++;
}
card_array.sort(function (a, b) {
if (a[3] > b[3]) {
return(-1);
}
if (a[3] < b[3]) {
return(1);
}
return(0);
});
var flush = true;
var straight = true;
var equal_mask = [];
var card_string;
var royal = false;
this.prize_line = 0;
var i = 0;
while (i < (card_array.length - 1)) {
if ((card_array[i][4] - card_array[i + 1][4]) != 1) {
straight = false;
}
if (card_array[i + 1][2] != card_array[i][2]) {
flush = false;
}
if (card_array[i + 1][4] == card_array[i][4]) {
equal_mask.push(i);
}
card_string = card_string + (card_array[i][0] + "|");
i++;
}
card_string = card_string + card_array[i][0];
if (card_string == "A|5|4|3|2") {
straight = true;
}
if ((card_string == "A|K|Q|J|10") && (flush)) {
this.prize_line = 1;
} else if (straight && (flush)) {
this.prize_line = 2;
} else if (flush) {
this.prize_line = 5;
} else if (straight) {
this.prize_line = 6;
} else if (equal_mask.length != 0) {
if (equal_mask.length == 3) {
if (card_array[equal_mask[0]][4] == card_array[equal_mask[2] + 1][4]) {
this.prize_line = 3;
} else {
this.prize_line = 4;
}
} else if (equal_mask.length == 2) {
if (card_array[equal_mask[0]][4] == card_array[equal_mask[1] + 1][4]) {
this.prize_line = 7;
} else {
this.prize_line = 8;
}
} else if ((equal_mask.length == 1) && (card_array[equal_mask[0]][4] >= 9)) {
this.prize_line = 9;
}
}
this.isWin = this.prize_line != 0;
if (this.isWin) {
Conv.put(_root.infoDisplay_mc, "displayPrizeLine", "1", this.prize_line);
}
if (turnOne) {
var i = 1;
while (i <= 5) {
Conv.put(_root["hold_" + i], "gotoAndStop", 0, 2);
i++;
}
}
if (turnOne && (this.isWin)) {
if (equal_mask.length != 0) {
var i = 0;
while (i < equal_mask.length) {
Conv.put(_root["hold_" + (card_array[equal_mask[i]][5] + 1)], "gotoAndStop", 0, 3);
Conv.put(_root["hold_" + (card_array[equal_mask[i] + 1][5] + 1)], "gotoAndStop", 0, 3);
i++;
}
} else {
var i = 1;
while (i <= 5) {
Conv.put(_root["hold_" + i], "gotoAndStop", 0, 3);
i++;
}
}
} else if (this.isWin) {
if (equal_mask.length != 0) {
var brightness_array = [true, true, true, true, true];
var i = 0;
while (i < equal_mask.length) {
brightness_array[card_array[equal_mask[i]][5]] = false;
brightness_array[card_array[equal_mask[i] + 1][5]] = false;
i++;
}
trace(brightness_array);
var i = 0;
while (i < brightness_array.length) {
if (brightness_array[i]) {
Conv.put(function (card) {
card._brightness = -50;
}, 0, _root["c_" + (i + 1)]);
trace(_root["c_" + (i + 1)]);
}
i++;
}
}
}
};
C_GameCLASS.prototype.dealBegin = function () {
if (!this.begin) {
this.turn_one();
} else {
this.turn_two();
}
};
C_GameCLASS.prototype.turn_one = function (complete, card_string) {
if (this.isWaitActive) {
this.doActiveUser(true);
}
if (this.userBalance < this.bet) {
Mouse.showAlt("You do not have enough money for betting. \rPlease visit the cashier \ror place a smaller bet if possible.");
return(undefined);
}
if ((this.nCoins == 0) || (this.bet == 0)) {
return(undefined);
}
this.lock();
if (_level5) {
if (!complete) {
C_Server.round_One();
return(undefined);
}
var server_result = card_string.split(":");
}
this.turn_risk_step = 0;
Conv.put(empty, "4");
this.begin = true;
this.deck = [].concat(this.ideal_deck).random();
var card;
this.userBalance = this.userBalance - this.bet;
this.paid = 0;
Conv.put(this, "display", 0);
Conv.put(_root.infoDisplay_mc, "displayPrizeLine", 0, 0);
this.cards_hand = [{}, {}, {}, {}, {}];
var i = 0;
while (i < this.cards_hand.length) {
this.cards_hand[i].hold = false;
if (_level5) {
this.cards_hand[i].card = this.trans_deck[server_result[i]];
} else {
this.cards_hand[i].card = [].concat(this.deck[0]);
this.deck.shift();
}
card = this.cards_hand[i].card;
this.cardRotation(_root["c_" + (i + 1)], true);
Conv.put(_root["c_" + (i + 1)], "attachMovie", "1", (("c_" + card[1]) + "_") + card[0], "card", 222);
this.cardRotation(_root["c_" + (i + 1)], false);
i++;
}
this.checkPrize(true);
Conv.put(this, "unlock", 0);
};
C_GameCLASS.prototype.turn_two = function (complete, card_string, paid, money) {
this.lock();
var card;
var i = 1;
while (i <= 5) {
_root["hold_" + i].gotoAndStop(1);
i++;
}
Conv.put(_root.infoDisplay_mc, "displayPrizeLine", 0, 0);
if (_level5) {
if (!complete) {
var change = "";
change = (this.cards_hand[0].hold ? 0 : 1);
var i = 1;
while (i < this.cards_hand.length) {
change = change + ("," + (this.cards_hand[i].hold ? 0 : 1));
i++;
}
C_Server.round_Two(change);
return(undefined);
}
var server_result = card_string.split(":");
}
var i = 0;
while (i < this.cards_hand.length) {
if (!this.cards_hand[i].hold) {
this.cardRotation(_root["c_" + (i + 1)], true);
Conv.put(_root["c_" + (i + 1)].card, "removeMovieClip", "1");
this.cardRotation(_root["c_" + (i + 1)], false);
}
i++;
}
var i = 0;
while (i < this.cards_hand.length) {
if (this.cards_hand[i].hold == false) {
if (_level5) {
this.cards_hand[i].card = this.trans_deck[server_result[i]];
} else {
this.cards_hand[i].card = [].concat(this.deck[0]);
this.deck.shift();
}
card = this.cards_hand[i].card;
this.cardRotation(_root["c_" + (i + 1)], true);
Conv.put(_root["c_" + (i + 1)], "attachMovie", "1", (("c_" + card[1]) + "_") + card[0], "card", 222);
this.cardRotation(_root["c_" + (i + 1)], false);
}
i++;
}
this.checkPrize();
Conv.put(this, "display", 0);
if (this.isWin) {
var win_coins = this.table_prize["line_" + this.prize_line][this.nCoins - 1];
if (_level5) {
this.paid = paid;
this.userBalance = money - this.paid;
} else {
this.paid = win_coins * this.coin;
}
Conv.put(this, "display", 0);
Conv.put(_root, "newSound", 400, "win");
var n;
var i = 1;
while (i <= win_coins) {
Conv.put(_root, "newSound", 100, "cash");
if ((n++) > 200) {
break;
}
i++;
}
this.turn_risk_step = 0;
Conv.put(_root.infoDisplay_mc, "openRiskDialog", 0, 2);
} else if (_level5) {
this.userBalance = money;
Conv.put(this, "display", 0);
}
var i = 1;
while (i <= 5) {
_root["c_" + i].onRelease = function () {
C_Game.doActiveUser();
};
_root["c_" + i].useHandCursor = false;
i++;
}
Conv.put(this, "unlock", 0);
this.begin = false;
this.isWaitActive = true;
};
C_GameCLASS.prototype.turn_risk = function (color_name, card_in, paid, money, complete) {
if ((this.locked && (!complete)) || (this.begin)) {
return(undefined);
}
if ((this.turn_risk_step + 1) > 5) {
return(undefined);
}
this.lock();
var card;
if (_level5) {
if (!complete) {
C_Server.round_Risk(color_name);
return(undefined);
}
card = this.trans_deck[card_in];
} else {
card = [].concat(this.deck[0]);
this.deck.shift();
}
this.turn_risk_step++;
Conv.put(empty, "3");
var turnCard = _root.infoDisplay_mc.turnRisk();
this.cardRotation(turnCard, true);
Conv.put(turnCard, "attachMovie", "1", (("c_" + card[1]) + "_") + card[0], "card", 222);
this.cardRotation(turnCard, false);
var color_card = (((card[1] == "Hearts") || (card[1] == "Diamonds")) ? "red" : "black");
if (color_card == color_name) {
if (_level5) {
this.paid = paid;
this.userBalance = money - this.paid;
} else {
this.paid = this.paid * 2;
}
Conv.put(_root, "newSound", 400, "win");
if (this.turn_risk_step == 5) {
Conv.put(this, "doActiveUser", 0);
} else {
Conv.put(this, "display", 0);
}
Conv.put(this, "unlock", 0);
} else {
Conv.put(empty, 1000);
this.paid = 0;
Conv.put(this, "doActiveUser", 0);
}
};
C_GameCLASS.prototype.setTableVisual = function () {
_root.infoDisplay_mc.setTable(this.table_prize);
};
C_GameCLASS.prototype.cardRotation = function (card_mc, start_to_end) {
var scale_pos = [84.9, 78.7, 60.6, 33.3, 0.8];
if (!start_to_end) {
scale_pos.reverse();
Conv.put(card_mc, "newSound", 0, "card_flip");
}
var i = 1;
while (i < scale_pos.length) {
Conv.put(card_mc, "setParam", "1", "_xscale", scale_pos[i]);
i++;
}
};
C_GameCLASS.prototype.doActiveUser = function (start_deal) {
this.isWaitActive = false;
this.userBalance = this.userBalance + this.paid;
this.paid = 0;
this.display();
_root.infoDisplay_mc.unlock();
_root.infoDisplay_mc.displayPrizeLine(0);
var i = 1;
while (i <= 5) {
delete _root["c_" + i].onRelease;
delete _root["c_" + i].useHandCursor;
_root["c_" + i]._brightness = 0;
i++;
}
if (start_deal) {
var mc;
var i = 1;
while (i <= 5) {
mc = _root["c_" + i].card;
Conv.put(mc, "newSound", 0, "card_turn", 30);
Conv.put(mc, "removeMovieClip", "3");
i++;
}
} else {
this.lock();
var i = 0;
while (i < this.cards_hand.length) {
this.cardRotation(_root["c_" + (i + 1)], true);
Conv.put(_root["c_" + (i + 1)].card, "removeMovieClip", "1");
this.cardRotation(_root["c_" + (i + 1)], false);
i++;
}
Conv.put(this, "unlock", 0);
}
};
C_GameCLASS.prototype.onDragHoldButton = function () {
if ((!this.begin) || (this.locked)) {
return(undefined);
}
var test_holder;
var holder;
var i = 1;
while (i <= 5) {
holder = _root["hold_" + i];
test_holder = holder.hitTest(_root._xmouse, _root._ymouse);
if (test_holder) {
break;
}
holder.changed = false;
i++;
}
if (!test_holder) {
return(undefined);
}
if (!holder.changed) {
var frame = ((holder._currentframe == 2) ? 3 : 2);
holder.gotoAndStop(frame);
holder.changed = true;
}
};
C_GameCLASS.prototype.setBet = function (b) {
if (this.locked) {
return(undefined);
}
this.nCoins = b;
this.setCoinsNumber();
};
C_GameCLASS.prototype.setCoinsNumber = function (c, r) {
if (r) {
this.turn_risk(c);
return(undefined);
}
if (c == this.nCoins) {
return(undefined);
}
this.nCoins = c;
this.bet = this.nCoins * this.coin;
this.display();
};
C_GameCLASS.prototype.changeCoin = function (c) {
if (this.locked || (this.begin)) {
return(undefined);
}
if (this.isWaitActive) {
this.doActiveUser();
}
if (this.coin == c) {
return(undefined);
}
this.coin = c;
this.bet = this.nCoins * this.coin;
this.display();
_root.coinMenu_mc.setCoin(c);
};
_global.C_Game = new C_GameCLASS();
ASSetPropFlags(_global, "C_Game,C_GameCLASS", 131);
if (SharedObject.getLocal("game_config").data.serverOn) {
_root._visible = 0;
}
Instance of Symbol 339 MovieClip [C_TableDisplayCLASS] "infoDisplay_mc" in Frame 1
//component parameters
onClipEvent (initialize) {
Component_Name = "Table Display";
maxCoins = 5;
coins = 3;
}
Instance of Symbol 236 MovieClip [C_BalanceMashine] "balanceMashine_mc" in Frame 1
//component parameters
onClipEvent (initialize) {
_balance = 0;
}
Instance of Symbol 217 MovieClip [C_DealButtonCLASS] "dealButton_mc" in Frame 1
/* no clip actions */
Instance of Symbol 205 MovieClip [C_CoinsMenuCLASS] "coinMenu_mc" in Frame 1
//component parameters
onClipEvent (initialize) {
curCoin = 1;
}
Instance of Symbol 190 MovieClip [C_GamesOpenMenuCLASS] "cashierMenu_mc" in Frame 1
//component parameters
onClipEvent (initialize) {
configPath = "games_menu.xml";
}
Instance of Symbol 186 MovieClip [C_RulesOpenMenuCLASS] "rulesButton_mc" in Frame 1
//component parameters
onClipEvent (initialize) {
configPath = "rules.xml";
}
Instance of Symbol 182 MovieClip [C_BackToSiteButtonCLASS] in Frame 1
//component parameters
onClipEvent (initialize) {
configPath = "../back_to_site.xml";
}
Symbol 17 MovieClip Frame 1
this.stop();
Symbol 17 MovieClip Frame 2
this.stop();
Symbol 32 Button
on (release) {
JS.call("open_feedback()");
}
Symbol 54 MovieClip [C_CashierMenuCLASS] Frame 1
#initclip 8
_global.C_CashierMenuCLASS = function () {
this.init();
};
C_CashierMenuCLASS.prototype = new MovieClip();
C_CashierMenuCLASS.prototype.init = function () {
this.stop();
this.setModel();
};
C_CashierMenuCLASS.prototype.setModel = function (model) {
if (model != undefined) {
this.model = model;
}
this.gotoAndStop(1);
this.label_mc.gotoAndStop(this.model);
if (this.model == "standart") {
this.open_cashier_btn.onRelease = function () {
this._parent.openMenu();
};
} else if (this.model == "delegates") {
if (!this.lc) {
this.lc = new LocalConnection();
lc.connect("cashierMenu");
}
this.open_cashier_btn.onRelease = function () {
this._parent.lc.send("game", "cashOut");
};
}
};
C_CashierMenuCLASS.prototype.openMenu = function () {
this.gotoAndStop(2);
this.close_btn.onRollOver = function () {
this._parent.setModel();
};
this.back_btn.onRollOver = function () {
};
this.back_btn.useHandCursor = false;
var a = ["deposit", "withdraw", "history"];
var b;
var i = 0;
while (i < a.length) {
b = this[a[i] + "_btn"];
b.name = a[i];
b.onRelease = function () {
this._parent.openCashier(this.name);
};
i++;
}
};
C_CashierMenuCLASS.prototype.openCashier = function (type) {
JS.call(("open_cashier('" + type) + "');");
this.setModel();
};
ASSetPropFlags(_global, "C_CashierMenuCLASS", 131);
Object.registerClass("C_CashierMenuCLASS", C_CashierMenuCLASS);
#endinitclip
Symbol 182 MovieClip [C_BackToSiteButtonCLASS] Frame 1
#initclip 1
_global.C_BackToSiteButtonCLASS = function () {
this.init();
};
C_BackToSiteButtonCLASS.prototype = new MovieClip();
C_BackToSiteButtonCLASS.prototype.init = function () {
this.back_btn.root = this;
this.back_btn.onRelease = function () {
o = this.root;
getURL (o.url, o.target);
};
this.loadRules();
};
C_BackToSiteButtonCLASS.prototype.loadRules = function () {
var x = new XML();
x.root = this;
x.ignoreWhite = true;
x.onLoad = function (s) {
if (!s) {
trace("\u043C\u0435\u043D\u044E \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C!");
}
var o = this.firstChild.attributes;
this.root.url = o.url;
this.root.target = o.target;
};
x.load(this.configPath);
};
Object.registerClass("C_BackToSiteButtonCLASS", C_BackToSiteButtonCLASS);
delete _global.C_BackToSiteButtonCLASS;
#endinitclip
Symbol 186 MovieClip [C_RulesOpenMenuCLASS] Frame 1
#initclip 2
_global.C_RulesOpenMenuCLASS = function () {
this.init();
};
C_RulesOpenMenuCLASS.prototype = new MovieClip();
C_RulesOpenMenuCLASS.prototype.init = function () {
this.rules_btn.root = this;
this.rules_btn.onRelease = function () {
o = this.root;
getURL (o.url, o.target);
};
this.loadRules();
};
C_RulesOpenMenuCLASS.prototype.loadRules = function () {
var x = new XML();
x.root = this;
x.ignoreWhite = true;
x.onLoad = function (s) {
if (!s) {
trace("rules \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0438\u0441\u044C!");
}
var o = this.firstChild.attributes;
this.root.url = o.url;
this.root.target = o.target;
};
x.load(this.configPath);
};
Object.registerClass("C_RulesOpenMenuCLASS", C_RulesOpenMenuCLASS);
delete _global.C_RulesOpenMenuCLASS;
#endinitclip
Symbol 190 MovieClip [C_GamesOpenMenuCLASS] Frame 1
#initclip 3
_global.C_GamesOpenMenuCLASS = function () {
this.init();
};
C_GamesOpenMenuCLASS.prototype = new MovieClip();
C_GamesOpenMenuCLASS.prototype.init = function () {
var o = this.attachMovie("GameMenu:holder", "holder_mc", 1);
o._x = -39;
o._y = 10;
o._visible = false;
var tf1 = this.holder_mc.text_mc;
var tf2 = this.holder_mc.title_mc;
o = (this.textFormats = {});
o.game = tf1.text_txt.getTextFormat();
o.game_over = tf1.text_txt.getTextFormat();
o.game_over.underline = true;
o.title = tf2.text_txt.getTextFormat();
tf1.removeMovieClip();
tf2.removeMovieClip();
this.loadMenu();
this.openGames_btn.root = this;
this.openGames_btn.onRelease = function () {
this.root.open();
};
};
C_GamesOpenMenuCLASS.prototype.loadMenu = function () {
var x = new XML();
x.root = this;
x.ignoreWhite = true;
x.onLoad = function (s) {
if (!s) {
trace("\u043C\u0435\u043D\u044E \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C!");
return(undefined);
}
this.root.createMenu(this);
};
x.load(this.configPath);
};
C_GamesOpenMenuCLASS.prototype.createMenu = function (x) {
this.inited = true;
var a = x.firstChild.childNodes;
var menu_items = [];
var o;
var item;
var h = this.holder_mc;
var height;
h.space_mc._visible = false;
h.title_mc._visible = false;
h.text_mc._visible = false;
var i = 0;
while (i < a.length) {
o = a[i].attributes;
if (o.type == "spacer") {
item = h.attachMovie("GameMenu:spacer", "spacer_" + i, i);
} else if (o.type == "title") {
item = h.attachMovie("GameMenu:titleText", "title_" + i, i);
item.text_txt.text = o.text;
} else {
item = h.attachMovie("GameMenu:gameText", "text_" + i, i);
item.text_txt.text = o.text;
if ((o.url != "") && (o.url != undefined)) {
item.url = o.url;
item.target = o.target;
item.onRelease = function () {
getURL (this.url, this.target);
this.clear();
this._parent._parent.close();
};
item.onRollOver = function () {
var tf = new TextFormat();
tf.underline = true;
this.text_txt.setTextFormat(tf);
this.box_mc.gotoAndStop(2);
};
item.onRollOut = function () {
this.box_mc.gotoAndStop(1);
this.clear();
};
item.clear = function () {
var tf = new TextFormat();
tf.underline = false;
this.text_txt.setTextFormat(tf);
};
} else {
var tf = new TextFormat();
tf.color = 10066329 /* 0x999999 */;
item.text_txt.setTextFormat(tf);
}
}
menu_items.push(item);
height = height + item._height;
i++;
}
a = menu_items;
height = height - h.space_mc._y;
var nextY = ((a[0]._y = a[0]._y - height));
nextY = nextY + a[0]._height;
var d_y = h.top_mc._y;
h.top_mc._y = (a[0]._y - h.top_mc._height) - 14;
d_y = d_y - h.top_mc._y;
h.middle_mc._y = h.middle_mc._y - d_y;
h.middle_mc._height = h.middle_mc._height + d_y;
var i = 1;
while (i < a.length) {
a[i]._y = nextY;
nextY = nextY + a[i]._height;
i++;
}
this.top_mc.onRelease = (this.middle_mc.onRelease = (this.bottom_mc.onRelease = function () {
}));
this.top_mc.useHandCursor = (this.middle_mc.useHandCursor = (this.bottom_mc.useHandCursor = false));
};
C_GamesOpenMenuCLASS.prototype.open = function () {
if (!this.inited) {
return(undefined);
}
var o = this.holder_mc;
o._visible = true;
if (_root._xscale != 100) {
var s_index = (100 / _root._xscale);
o._xscale = 100 * s_index;
o._yscale = 100 * s_index;
}
o = (this.listener = {});
o.root = this;
o.onMouseDown = function () {
if (this.root.hitTest(_root._xmouse, _root._ymouse, false)) {
} else {
this.root.close();
}
};
o.onKeyDown = function () {
this.root.close();
};
Mouse.addListener(o);
Key.addListener(o);
};
C_GamesOpenMenuCLASS.prototype.close = function () {
this.removeListener(this.listener);
this.holder_mc._visible = false;
};
Object.registerClass("C_GamesOpenMenuCLASS", C_GamesOpenMenuCLASS);
delete _global.C_GamesOpenMenuCLASS;
#endinitclip
Symbol 205 MovieClip [C_CoinsMenuCLASS] Frame 1
#initclip 4
_global.C_CoinsMenuCLASS = function () {
this.init();
};
C_CoinsMenuCLASS.prototype = new MovieClip();
C_CoinsMenuCLASS.prototype.onLoad = function () {
this.coins = [0.25, 1, 5];
this.buttons = [this.c_0_25_btn, this.c_1_btn, this.c_5_btn];
this.coins_mc_array = [this.c_0_25_mc, this.c_1_mc, this.c_5_mc];
this.coins_names_array = ["25c", "$1", "$5"];
var c;
var i = 0;
while (i < this.coins.length) {
c = this.buttons[i];
c.coin = this.coins[i];
c.addAlt(("Use " + this.coins_names_array[i]) + " coin\rfor betting");
c.onPress = function () {
this.hideAlt();
this._parent.setCoin(this.coin);
};
c.useHandCursor = false;
i++;
}
this.setCoin(this.curCoin);
};
C_CoinsMenuCLASS.prototype.lock = function () {
this.onRelease = function () {
};
this.useHandCursor = false;
};
C_CoinsMenuCLASS.prototype.unlock = function () {
delete this.onRelease;
delete this.useHandCursor;
};
C_CoinsMenuCLASS.prototype.setCoin = function (coin) {
if (!coin) {
return(undefined);
}
var a = this.coins_mc_array;
var i = 0;
while (i < this.buttons.length) {
if (a[i].locked) {
} else if (this.coins[i] == coin) {
a[i]._brightness = 0;
a[i]._xscale = (a[i]._yscale = 120);
this.arow_mc._x = a[i]._x;
this.buttons[i].enabled = false;
} else {
a[i]._brightness = -40;
a[i]._xscale = (a[i]._yscale = 100);
delete this.buttons[i].enabled;
}
i++;
}
this.curCoin = coin;
var c = this.client;
c.client[c.handler](this.curCoin);
};
C_CoinsMenuCLASS.prototype.setCoinEnabled = function (coin, enabled) {
var coinPos;
var a = this.coins;
var names = this.coins_names_array;
var i = 0;
while (i < a.length) {
if ((a[i] == coin) || (names[i] == coin)) {
coinPos = i;
break;
}
i++;
}
if (coinPos == undefined) {
return(undefined);
}
i = coinPos;
var btn = this.buttons[i];
var mc = this.coins_mc_array[i];
var name = this.coins_names_array[i];
if (!enabled) {
mc._brightness = -50;
mc.locked = true;
btn.enabled = false;
} else {
mc._brightness = 0;
mc.locked = false;
delete btn.enabled;
}
};
C_CoinsMenuCLASS.prototype.setChangeHandler = function (handler, client) {
this.client = {handler:handler, client:client};
};
ASSetPropFlags(_global, "C_CoinsMenuCLASS", 131);
Object.registerClass("C_CoinsMenuCLASS", C_CoinsMenuCLASS);
#endinitclip
Symbol 217 MovieClip [C_DealButtonCLASS] Frame 1
#initclip 5
_global.C_DealButtonCLASS = function () {
AsBroadcaster.initialize(this);
this.init();
};
C_DealButtonCLASS.prototype = new MovieClip();
C_DealButtonCLASS.prototype.init = function () {
this.keys = [13];
this.onKeyDown = function () {
var a = this.keys;
var k = Key.getCode();
var i = 0;
while (i < a.length) {
if (k == a[i]) {
this.onButtonPress();
}
i++;
}
};
var b = this.dealButton_btn;
b.onRelease = function () {
this._parent.onButtonPress();
};
b.onRollOver = (b.onDragOver = function () {
this._parent.onButtonFocus();
});
b.onDragOut = (b.releaseOutside = (b.onRollOut = function () {
this._parent.onButtonBlur();
}));
if (b) {
Key.addListener(this);
}
if (this.label != undefined) {
this.setLabel(this.label);
}
};
C_DealButtonCLASS.prototype.lock = function () {
if (this.locked) {
return(undefined);
}
this.locked = true;
this.onRelease = function () {
};
this.useHandCursor = false;
this.dealButton_btn._brightness = -40;
this.label_mc._brightness = -40;
this.onButtonBlur();
};
C_DealButtonCLASS.prototype.unlock = function () {
if (!this.locked) {
return(undefined);
}
this.locked = false;
delete this.onRelease;
delete this.useHandCursor;
this.dealButton_btn._brightness = 0;
this.label_mc._brightness = 0;
};
C_DealButtonCLASS.prototype.onButtonPress = function () {
if (this.locked) {
return(undefined);
}
if (this.hint != undefined) {
this.hideAlt();
}
var c = this.client;
c.client[c.handler]();
this.client.client._caller = this;
this.broadcastMessage("onPress");
};
C_DealButtonCLASS.prototype.onButtonFocus = function () {
if (this.locked) {
return(undefined);
}
if (this.hint != undefined) {
this.showAlt(this.hint);
}
this.client.client._caller = this;
this.broadcastMessage("onFocus");
};
C_DealButtonCLASS.prototype.onButtonBlur = function () {
if (this.hint != undefined) {
this.hideAlt();
}
this.client.client._caller = this;
this.broadcastMessage("onBlur");
};
C_DealButtonCLASS.prototype.setChangeHandler = function (handler, client) {
this.client = {handler:handler, client:client};
};
C_DealButtonCLASS.prototype.setKeys = function () {
this.keys = [];
var i = 0;
while (i < arguments.length) {
this.keys.push(arguments[i]);
i++;
}
};
C_DealButtonCLASS.prototype.setLabel = function (label) {
this.label_mc.gotoAndStop(label);
};
ASSetPropFlags(_global, "C_DealButtonCLASS", 131);
Object.registerClass("C_DealButtonCLASS", C_DealButtonCLASS);
#endinitclip
Symbol 230 MovieClip Frame 1
this.number_mc.n = this.number_old;
Symbol 230 MovieClip Frame 2
this.number2_mc.n = this.number_new;
Symbol 230 MovieClip Frame 4
this.number2_mc.n = this.number_new;
Symbol 230 MovieClip Frame 5
this.stop();
this._parent.onEvent(this);
Symbol 230 MovieClip Frame 6
this.number2_mc.n = this.number_old;
Symbol 230 MovieClip Frame 8
this.number_mc.n = this.number_new;
Symbol 230 MovieClip Frame 9
this.number_mc.n = this.number_new;
Symbol 230 MovieClip Frame 10
this.stop();
this._parent.onEvent(this);
Symbol 233 MovieClip Frame 1
this.number_mc.n = this.number_old;
Symbol 233 MovieClip Frame 2
this.number2_mc.n = this.number_new;
Symbol 233 MovieClip Frame 6
this.number2_mc.n = this.number_new;
Symbol 233 MovieClip Frame 7
this.stop();
this._parent.onEvent(this);
Symbol 233 MovieClip Frame 8
this.number2_mc.n = this.number_old;
Symbol 233 MovieClip Frame 11
this.number_mc.n = this.number_new;
Symbol 233 MovieClip Frame 12
this.number_mc.n = this.number_new;
Symbol 233 MovieClip Frame 13
this.stop();
this._parent.onEvent(this);
Symbol 236 MovieClip [C_BalanceMashine] Frame 1
#initclip 6
_global.C_BalanceMashine = function () {
this.init();
this.drawBalance();
};
C_BalanceMashine.prototype = new MovieClip();
C_BalanceMashine.prototype.init = function () {
this._x = Math.round(this._x);
this._y = Math.round(this._y);
this.comma_mc._visible = 0;
var o;
var t;
this.c_array = [];
this.c_array[0] = this.C1_mc;
this.c_array[1] = this.C2_mc;
var i = 0;
while (i < this.c_array.length) {
t = this.c_array[i];
t._x = Math.round(t._x);
t._y = Math.round(t._y);
t.number_new = 0;
i++;
}
this.S4_mc.isComma = true;
this.d_array = [];
this.d_array[0] = this.S1_mc;
this.d_array[1] = this.S2_mc;
this.d_array[2] = this.S3_mc;
this.d_array[3] = this.S4_mc;
this.d_array[4] = this.S5_mc;
this.d_array[5] = this.S6_mc;
var i = 0;
while (i < this.d_array.length) {
t = this.d_array[i];
t._x = Math.round(t._x);
t._y = Math.round(t._y);
t.number_new = 0;
i++;
}
};
C_BalanceMashine.prototype.addProperty("balance", function () {
return(this._balance);
}, function (b) {
this._balance = b;
this.drawBalance();
});
C_BalanceMashine.prototype.drawBalance = function () {
this.animTargets = 0;
var centes = String(Math.floor(this._balance * 100)).substr(-2);
if (centes.length < 2) {
centes = "0" + centes;
}
var i = 0;
while (i < this.c_array.length) {
this.drawNumber(this.c_array[i], centes.substr((i + 1) * -1, 1));
i++;
}
var dollars = (" " + String(Math.floor(this._balance)));
var i = 0;
while (i < this.d_array.length) {
this.drawNumber(this.d_array[i], dollars.substr((i + 1) * -1, 1));
i++;
}
};
C_BalanceMashine.prototype.drawNumber = function (targ, n) {
var number_new = ((n == " ") ? 0 : (Number(n)));
var number_old = ((targ.number_new == " ") ? 0 : (targ.number_new));
var a = ((targ.eventsArray = []));
if ((targ.number_new == n) || (isNaN(number_new))) {
return(undefined);
}
if (number_new == number_old) {
if (n == " ") {
a.push({event:"BACK", number_old:0, number_new:" "});
} else {
a.push({event:"FORWARD", number_old:" ", number_new:0});
}
} else {
var d;
var event;
var p = (Math.abs(number_new - number_old) <= 5);
if (number_new > number_old) {
if (p) {
event = "FORWARD";
d = 1;
} else {
event = "BACK";
d = -1;
}
} else if (!p) {
event = "FORWARD";
d = 1;
} else {
event = "BACK";
d = -1;
}
if (targ.number_old == " ") {
a.push({event:"FORWARD", number_old:" ", number_new:0});
}
var cur_number = number_old;
while (cur_number != number_new) {
number_old = cur_number;
cur_number = cur_number + d;
if (cur_number > 9) {
cur_number = 0;
} else if (cur_number < 0) {
cur_number = 9;
}
a.push({event:event, number_old:number_old, number_new:cur_number});
}
if (n == " ") {
a.push({event:"BACK", number_old:0, number_new:" "});
}
}
if (a.length) {
this.animTargets++;
Conv.stop();
}
if (targ.stoped) {
this.onEvent(targ);
}
};
C_BalanceMashine.prototype.onEvent = function (targ) {
var a = targ.eventsArray;
if (a.length == 0) {
targ.stoped = true;
if ((--this.animTargets) <= 0) {
Conv.play();
}
return(undefined);
}
targ.stoped = false;
var e = a.shift();
targ.number_old = e.number_old;
targ.number_new = e.number_new;
targ.gotoAndPlay(e.event);
if (targ.isComma) {
this.comma_mc._visible = e.number_new != " ";
}
};
Object.registerClass("C_BalanceMashine", C_BalanceMashine);
ASSetPropFlags(_global, "C_BalanceMashine", 131);
#endinitclip
Symbol 256 MovieClip Frame 1
this.stop();
Symbol 267 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 2
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 2
Symbol 286 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 2
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 2
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 2
Symbol 301 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
Symbol 317 MovieClip Frame 1
stop();
Symbol 320 Button
on (release) {
_root.Game.setBet(5);
}
Symbol 337 Button
on (release) {
_root.Game.turn_risk("black");
}
Symbol 339 MovieClip [C_TableDisplayCLASS] Frame 1
#initclip 7
_global.C_TableDisplayCLASS = function () {
};
C_TableDisplayCLASS.prototype = new MovieClip();
C_TableDisplayCLASS.prototype.onLoad = function () {
this.stop();
this.maxCoins = 5;
var o = ((this.table = {}));
o.line_1 = [250, 500, 750, 1000, 5000];
o.line_2 = [50, 100, 150, 200, 250];
o.line_3 = [20, 40, 60, 80, 100];
o.line_4 = [7, 14, 21, 28, 35];
o.line_5 = [5, 10, 15, 20, 25];
o.line_6 = [4, 8, 12, 16, 20];
o.line_7 = [3, 6, 9, 12, 15];
o.line_8 = [2, 4, 6, 8, 10];
o.line_9 = [1, 2, 3, 4, 5];
this.setTable(o);
this.setCoins(this.coins);
};
C_TableDisplayCLASS.prototype.lock = function (line) {
this.onPress = function () {
};
this.useHandCursor = false;
};
C_TableDisplayCLASS.prototype.unlock = function (line) {
delete this.onPress;
delete this.useHandCursor;
};
C_TableDisplayCLASS.prototype.setTable = function (table) {
if (!table) {
table = this.table;
}
this.table = table;
var mc;
var i = 0;
while (i < 5) {
mc = this[("R_" + (i + 1)) + "_mc"];
var j = 0;
while (j < 9) {
mc["n_" + (j + 1)] = table["line_" + (j + 1)][i];
j++;
}
i++;
}
};
C_TableDisplayCLASS.prototype.setCoins = function (c) {
if (c >= this.maxCoins) {
c = this.maxCoins;
}
this.coins = c;
this.displayColimns();
this.client.client[this.client.handler](c);
return(this.coins);
};
C_TableDisplayCLASS.prototype.displayColimns = function () {
this.gotoAndStop(1);
this.setTable();
var b;
var a = {};
a[1] = "ONE coin";
a[2] = "TWO coins";
a[3] = "THREE coins";
a[4] = "FOUR coins";
a[5] = "FIVE coins";
var i = 1;
while (i <= 5) {
b = this[("column_" + i) + "_btn"];
b.addAlt("Bet " + a[i]);
b.onPress = function () {
this.hideAlt();
this._parent.setCoins(this.coin);
};
b.coin = i;
b.useHandCursor = true;
i++;
}
var i = 1;
while (i <= 5) {
this[("R_" + i) + "_mc"].gotoAndStop(1);
delete this[("column_" + i) + "_btn"].enabled;
i++;
}
this[("R_" + this.coins) + "_mc"].gotoAndStop(2);
this[("column_" + this.coins) + "_btn"].enabled = false;
};
C_TableDisplayCLASS.prototype.displayPrizeLine = function (row) {
if (this._currentframe != 1) {
this.displayColimns();
}
var i = 1;
while (i <= 9) {
this[("prizeLine_" + i) + "_mc"].gotoAndStop(1);
i++;
}
this[("prizeLine_" + row) + "_mc"].gotoAndStop(2);
};
C_TableDisplayCLASS.prototype.setChangeHandler = function (handler, client) {
this.client = {handler:handler, client:client};
};
C_TableDisplayCLASS.prototype.openRiskDialog = function () {
this.unlock();
this.gotoAndStop(2);
this.black_btn.addAlt("Your winnings will double\rif the next card is BLACK!");
this.black_btn.onRelease = function () {
this.hideAlt();
var c = this._parent.client;
c.client[c.handler]("black", true);
};
this.red_btn.addAlt("Your winnings will double\rif the next card is RED!");
this.red_btn.onRelease = function () {
this.hideAlt();
var c = this._parent.client;
c.client[c.handler]("red", true);
};
var i = 1;
while (i <= 5) {
this["c_" + i]._visible = 1;
i++;
}
this.turn_risk_step = 0;
};
C_TableDisplayCLASS.prototype.turnRisk = function () {
if (this._currentframe != 2) {
this.openRiskDialog();
}
var s = (++this.turn_risk_step);
if (s > 1) {
this["c_" + (s - 1)]._visible = 0;
}
return(this["c_" + s]);
};
ASSetPropFlags(_global, "C_TableDisplayCLASS", 131);
Object.registerClass("C_TableDisplayCLASS", C_TableDisplayCLASS);
#endinitclip
Symbol 371 Button
on (release) {
this.nextFrame();
}
Symbol 375 Button
on (release) {
this.prevFrame();
}
Symbol 376 MovieClip Frame 1
this.stop();
Symbol 376 MovieClip Frame 2
C_Game.cards_hand[Number(_name.split("_")[1]) - 1].hold = false;
Symbol 376 MovieClip Frame 3
C_Game.cards_hand[Number(_name.split("_")[1]) - 1].hold = true;