Frame 1
var _local1 = new Object();
flash = _local1;
var _local2 = _global.flash;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
_local1 = new Object();
flash.display = _local1;
_local2 = _global.flash.display;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
_local1 = new Object();
my = _local1;
_local2 = _global.my;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
((my.YouWonMessage = function (_arg2) {
this.parent = _arg2;
this.mcRoot = flash.Lib.current;
this.mc = this.mcRoot.attachMovie("mcYouWon", "imcYouWon", 55001);
this.mc._x = 225;
this.mc._y = -200;
this.mc.onEnterFrame = @closure("frame", this);
this.state = 1;
})).__name__ = ["my", "YouWonMessage"];
_local1 = (my.YouWonMessage /* register */).prototype;
_local1.__class__ = my.YouWonMessage /* register */;
_local1.frame = function () {
if (this.state != 1) {
if (this.state == 2) {
var _local2 = (900 - this.mc._y) / 64;
if (_local2 < 2) {
_local2 = 0;
}
this.mc._y = this.mc._y + _local2;
if (this.mc._y >= 400) {
this.onRemovedCall();
this.mc.removeMovieClip();
this.state = 0;
}
}
} else {
var _local2 = (150 - this.mc._y) / 14;
if (_local2 < 2) {
_local2 = 0;
}
this.mc._y = this.mc._y + _local2;
}
};
_local1.mc = null;
_local1.mcRoot = null;
_local1.onRemovedCall = null;
_local1.parent = null;
_local1.remove = function (_arg2) {
this.state = 2;
this.onRemovedCall = _arg2;
};
_local1.state = null;
((flash.Boot = function () {
})).__name__ = ["flash", "Boot"];
_local1 = (flash.Boot /* register */).prototype;
_local1.__class__ = flash.Boot /* register */;
(flash.Boot /* register */).__string_rec = function (_arg2, _arg3) {
if (_arg3.length >= 20) {
return("<...>");
}
var _local4 = typeof(_arg2);
if (_local4 != "movieclip") {
if ((_local4 == "function") && ((_arg2.__name__ != null) || (_arg2.__ename__ != null))) {
_local4 = "object";
}
} else {
_local4 = "object";
}
var _local5 = _local4;
if (_local5 != "object") {
if (_local5 != "function") {
if (_local5 != "string") {
return(String(_arg2));
if (_arg2 instanceof Array) {
if (_arg2.__enum__ != null) {
if (_arg2.length == 1) {
return(_arg2[0]);
}
var _local6 = _arg2[0] + "(";
_arg3 = _arg3 + " ";
var _local7 = 1;
var _local8 = _arg2.length;
while (_local7 < _local8) {
var _local9 = _local7;
_local7++;
if (_local9 == 1) {
_local6 = _local6 + flash.Boot.__string_rec(_arg2[_local9], _arg3);
} else {
_local6 = _local6 + ("," + flash.Boot.__string_rec(_arg2[_local9], _arg3));
}
}
return(_local6 + ")");
}
var _local6 = _arg2.length;
var _local8 = "[";
_arg3 = _arg3 + " ";
var _local9 = 0;
var _local10 = _local6;
while (_local9 < _local10) {
var _local11 = _local9;
_local9++;
_local8 = _local8 + (((_local11 > 0) ? "," : "") + flash.Boot.__string_rec(_arg2[_local11], _arg3));
}
_local8 = _local8 + "]";
return(_local8);
}
var _local6 = _arg2.toString();
if (((typeof(_local6) == "string") || (_local6 instanceof String)) && ((_local6 != "[object Object]") && (_local6 != "[type Function]"))) {
return(_local6);
}
var _local8 = "{\n";
if (typeof(_arg2) == "movieclip") {
_local8 = (("MC(" + _arg2._name) + ") ") + _local8;
}
_arg3 = _arg3 + " ";
var _local9 = new Array();
for (_reg0 in _arg2) {
_local9.push(_reg0);
}
_local9 = _local9.iterator();
while (_local9.hasNext()) {
var _local10 = _local9.next();
if ((_local10 == "prototype") || ((_local10 == "__class__") || ((_local10 == "__super__") || (_local10 == "__interfaces__")))) {
continue;
}
if (_local8.length != 2) {
_local8 = _local8 + ",\n";
}
_local8 = _local8 + (((_arg3 + _local10) + " : ") + flash.Boot.__string_rec(_arg2[_local10], _arg3));
}
_arg3 = _arg3.substring(4);
if (_local8.length != 2) {
_local8 = _local8 + newline;
}
_local8 = _local8 + (_arg3 + "}");
return(_local8);
return("<function>");
}
}
}
if (_arg2 instanceof Array) {
if (_arg2.__enum__ != null) {
if (_arg2.length == 1) {
return(_arg2[0]);
}
var _local6 = _arg2[0] + "(";
_arg3 = _arg3 + " ";
var _local7 = 1;
var _local8 = _arg2.length;
while (_local7 < _local8) {
var _local9 = _local7;
_local7++;
if (_local9 == 1) {
_local6 = _local6 + flash.Boot.__string_rec(_arg2[_local9], _arg3);
} else {
_local6 = _local6 + ("," + flash.Boot.__string_rec(_arg2[_local9], _arg3));
}
}
return(_local6 + ")");
}
var _local6 = _arg2.length;
var _local8 = "[";
_arg3 = _arg3 + " ";
var _local9 = 0;
var _local10 = _local6;
while (_local9 < _local10) {
var _local11 = _local9;
_local9++;
_local8 = _local8 + (((_local11 > 0) ? "," : "") + flash.Boot.__string_rec(_arg2[_local11], _arg3));
}
_local8 = _local8 + "]";
return(_local8);
}
var _local6 = _arg2.toString();
if (((typeof(_local6) == "string") || (_local6 instanceof String)) && ((_local6 != "[object Object]") && (_local6 != "[type Function]"))) {
return(_local6);
}
var _local8 = "{\n";
if (typeof(_arg2) == "movieclip") {
_local8 = (("MC(" + _arg2._name) + ") ") + _local8;
}
_arg3 = _arg3 + " ";
var _local9 = new Array();
for (_reg0 in _arg2) {
_local9.push(_reg0);
}
_local9 = _local9.iterator();
while (_local9.hasNext()) {
var _local10 = _local9.next();
if ((_local10 == "prototype") || ((_local10 == "__class__") || ((_local10 == "__super__") || (_local10 == "__interfaces__")))) {
continue;
}
if (_local8.length != 2) {
_local8 = _local8 + ",\n";
}
_local8 = _local8 + (((_arg3 + _local10) + " : ") + flash.Boot.__string_rec(_arg2[_local10], _arg3));
}
_arg3 = _arg3.substring(4);
if (_local8.length != 2) {
_local8 = _local8 + newline;
}
_local8 = _local8 + (_arg3 + "}");
return(_local8);
return("<function>");
return(_arg2);
};
(flash.Boot /* register */).__closure = function (_arg2, _arg3) {
var _local4 = _arg3[_arg2];
if (_local4 == null) {
return(null);
}
var _local5 = function () {
var _local2 = arguments.callee;
return(_local2.f.apply(_local2.o, arguments));
};
_local5.f = _local4;
_local5.o = _arg3;
return(_local5);
};
(flash.Boot /* register */).__instanceof = function (_arg2, _arg3) {
if (!_arg3) {
return(false);
}
if (_arg2 instanceof _arg3) {
if (_arg3 == Array) {
return(_arg2.__enum__ == null);
}
return(true);
}
var _local4 = _arg3;
if (_local4 != Int) {
if (_local4 != Float) {
if (_local4 != Bool) {
if (_local4 != String) {
if (_local4 != Dynamic) {
if (_arg2.__enum__ == _arg3) {
return(true);
}
return(false);
return((Math.ceil(_arg2) === _arg2) && (isFinite(_arg2) && ((!(_arg2 === true)) && (!(_arg2 === false)))));
return(typeof(_arg2) == "number");
return((_arg2 === true) || (_arg2 === false));
return(typeof(_arg2) == "string");
}
}
}
}
}
return((Math.ceil(_arg2) === _arg2) && (isFinite(_arg2) && ((!(_arg2 === true)) && (!(_arg2 === false)))));
return(typeof(_arg2) == "number");
return((_arg2 === true) || (_arg2 === false));
return(typeof(_arg2) == "string");
return(true);
};
(flash.Boot /* register */).getTrace = function () {
var _local2 = flash.Lib.current;
var _local3 = _local2.__trace_txt;
if (_local3 == null) {
_local2.createTextField("__trace_txt", 1048500, 0, 0, flash.Stage.width, flash.Stage.height + 30);
_local3 = _local2.__trace_txt;
_local3.selectable = false;
_local3.textColor = flash.Boot.def_color;
_local2.__trace_lines = new Array();
}
return(_local3);
};
(flash.Boot /* register */).__set_trace_color = function (_arg2) {
flash.Boot.getTrace().textColor = _arg2;
flash.Boot.def_color = _arg2;
};
(flash.Boot /* register */).__trace = function (_arg2, _arg3) {
var _local4 = flash.Lib.current;
var _local5 = flash.Boot.getTrace();
var _local6 = ((_arg3.fileName + ((_arg3.lineNumber == null) ? "" : (":" + _arg3.lineNumber))) + ": ") + flash.Boot.__string_rec(_arg2, "");
var _local7 = _local4.__trace_lines.concat(_local6.split(newline));
_local5.text = _local7.join(newline);
while (_local5.textHeight > flash.Stage.height) {
_local7.shift();
_local5.text = _local7.join(newline);
}
_local4.__trace_lines = _local7;
};
(flash.Boot /* register */).__exc = function (_arg2) {
var _local3 = "";
if (@closure("onerror", flash.Lib) == null) {
flash.Boot.__trace(flash.Boot.__string_rec(_arg2, "") + _local3, {fileName:"(uncaught exception)"});
} else {
flash.Lib.onerror(flash.Boot.__string_rec(_arg2, ""), []);
}
};
(flash.Boot /* register */).__clear_trace = function () {
var _local2 = flash.Lib.current;
_local2.__trace_txt.removeTextField();
_local2.__trace_lines = null;
};
(flash.Boot /* register */).__init = function (_arg2) {
var _local3 = _global;
if (!_local3.haxeInitDone) {
var _local4 = _global.Object;
_local3.haxeInitDone = true;
_local3.Int = new _local4[undefined]();
_local3.Bool = new _local4[undefined]();
_local3.Dynamic = new _local4[undefined]();
_local3.Bool = new _local4[undefined]();
_local3.Bool.true = true;
_local3.Bool.false = false;
_local3.Float = _global.Number;
Array.prototype.copy = Array.prototype.slice;
Array.prototype.insert = function (_arg2, _arg3) {
this.splice(_arg2, 0, _arg3);
};
Array.prototype.remove = function (_arg2) {
var _local3 = 0;
var _local4 = this.length;
while (_local3 < _local4) {
if (this[_local3] == _arg2) {
this.splice(_local3, 1);
return(true);
}
_local3++;
}
return(false);
};
Array.prototype.iterator = function () {
return({next:function () {
return(this.arr[this.cur++]);
}, hasNext:function () {
return(this.cur < this.arr.length);
}, arr:this, cur:0});
};
Array.prototype.__class__ = Array;
Array.__name__ = ["Array"];
_global.ASSetPropFlags(Array.prototype, null, 7);
String.prototype.__class__ = String;
String.__name__ = ["String"];
var cca = String.prototype.charCodeAt;
String.prototype.charCodeAt = function (_arg2) {
var _local3 = cca.call(this, _arg2);
if (_local3 <= 0) {
return(null);
}
return(_local3);
};
if (_global.flash == null) {
_global.flash = new _local4[undefined]();
}
}
_arg2.flash.Lib._global = _global;
_arg2.flash.Lib._root = _root;
_arg2.flash.Lib.current = _arg2;
_arg2["@instanceof"] = flash.Boot.__instanceof;
_arg2["@closure"] = flash.Boot.__closure;
if (_global.Stage.align != "") {
} else {
_global.Stage.align = "LT";
}
};
_local1 = new Object();
pulp = _local1;
_local2 = _global.pulp;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
((pulp.NAsyncFunc = function () {
this.done = false;
this.active = false;
this.reset();
})).__name__ = ["pulp", "NAsyncFunc"];
_local1 = (pulp.NAsyncFunc /* register */).prototype;
_local1.__class__ = pulp.NAsyncFunc /* register */;
_local1.active = null;
_local1.done = null;
_local1.isDone = function () {
return(this.done);
};
_local1.reset = function () {
};
_local1.setDone = function () {
this.done = true;
this.active = false;
};
_local1.start = function () {
this.reset();
this.active = true;
this.done = false;
};
_local1.work = function (_arg2, _arg3) {
var _local4 = 0;
while (_local4 < _arg3) {
if (this.active) {
this.workSub(_arg2);
}
_local4 = _local4 + 1;
}
};
_local1.workSub = function (_arg2) {
};
((pulp.Htmlize = function () {
})).__name__ = ["pulp", "Htmlize"];
_local1 = (pulp.Htmlize /* register */).prototype;
_local1.__class__ = pulp.Htmlize /* register */;
(pulp.Htmlize /* register */).encode = function (_arg2) {
if (!Std.is(_arg2, String)) {
if (!(Std.is(_arg2, Int) || (Std.is(_arg2, Float)))) {
if (_arg2 != null) {
if (!Std.is(_arg2, Bool)) {
if (!Std.is(_arg2, Array)) {
if (Std.is(_arg2, Array)) {
var _local3 = "<dl>";
var _local4 = 0;
var _local5 = _arg2.length;
while (_local4 < _local5) {
var _local6 = _local4;
_local4++;
var _local7 = pulp.Htmlize.encode(_local6);
var _local8 = pulp.Htmlize.encode(_arg2[_local6]);
_local3 = _local3 + (((("<dt>" + _local7) + "</dt><dd>") + _local8) + "</dd>");
}
return(_local3 + "</dl>");
}
// unexpected jump
}
var _local3 = "<ul>\n";
var _local4 = 0;
var _local5 = _arg2.length;
while (_local4 < _local5) {
var _local6 = _local4;
_local4++;
var _local7 = pulp.Htmlize.encode(_arg2[_local6]);
_local3 = _local3 + ((" <li>" + _local7) + "</li>\n");
}
return(_local3 + "</ul>\n");
} else {
return(("<i>" + Std.int(_arg2)) + "</i>");
}
// unexpected jump
}
return("<u>null</u>");
} else {
return(("<i>" + _arg2) + "</i>");
}
} else {
if (!StringTools.startsWith(_arg2, "#err:")) {
return(("<b>" + _arg2) + "</b>");
}
return(("<u>" + _arg2) + "</u>");
}
return("");
};
_local1.decode = function (_arg2) {
if (_arg2 != null) {
this.str = StringTools.trim(_arg2);
}
if (!StringTools.startsWith(this.str, "<i>")) {
if (!StringTools.startsWith(this.str, "<b>")) {
if (!StringTools.startsWith(this.str, "<ul>")) {
if (!StringTools.startsWith(this.str, "<dl>")) {
if (!StringTools.startsWith(this.str, "<li>")) {
if (!StringTools.startsWith(this.str, "<dt>")) {
if (StringTools.startsWith(this.str, "<dd>")) {
this.str = this.str.substr(4);
return(this.decode(this.str));
}
// unexpected jump
}
this.str = this.str.substr(4);
return(this.decode(this.str));
} else {
this.str = this.str.substr(4);
return(this.decode(null));
}
// unexpected jump
}
var _local3 = new Array();
do {
this.str = this.str.substr(this.str.indexOf("<dt>"));
var _local4 = this.decode(this.str);
this.str = this.str.substr(this.str.indexOf("<dd>"));
var _local5 = this.decode(this.str);
_local3[_local4] = _local5;
this.str = this.str.substr(this.str.indexOf("</dd>") + 5);
this.str = StringTools.trim(this.str);
} while (StringTools.startsWith(this.str, "<dt>"));
return(_local3);
} else {
var _local3 = new Array();
do {
this.str = this.str.substr(this.str.indexOf("<li>"));
var _local4 = this.decode(null);
_local3.push(_local4);
this.str = this.str.substr(this.str.indexOf("</li>") + 5);
this.str = StringTools.trim(this.str);
} while (StringTools.startsWith(this.str, "<li>"));
return(_local3);
}
// unexpected jump
}
var _local3 = this.str.substr(3, this.str.indexOf("</b>") - 3);
return(_local3);
}
var _local3 = this.str.substr(3, this.str.indexOf("</i>") - 3);
if (_local3.indexOf(".") < 0) {
var _local4 = Std.parseFloat(_local3);
return(_local4);
}
var _local4 = Std.parseInt(_local3);
return(_local4);
return(null);
};
_local1.print_n_decode = function (_arg2) {
haxe.Log.trace(_arg2, {methodName:"print_n_decode", className:"pulp.Htmlize", lineNumber:71, fileName:"Htmlize.hx"});
return(this.decode(_arg2));
};
_local1.str = null;
((StringTools = function () {
})).__name__ = ["StringTools"];
_local1 = StringTools /*register */.prototype;
_local1.__class__ = StringTools /*register */;
StringTools /*register */.urlEncode = function (_arg2) {
return(_global.escape(_arg2));
};
StringTools /*register */.urlDecode = function (_arg2) {
return(_global.unescape(_arg2));
};
StringTools /*register */.htmlEscape = function (_arg2) {
return(_arg2.split("&").join("&").split("<").join("<").split(">").join(">"));
};
StringTools /*register */.htmlUnescape = function (_arg2) {
return(_arg2.split(">").join(">").split("<").join("<").split("&").join("&"));
};
StringTools /*register */.startsWith = function (_arg2, _arg3) {
return((_arg2.length >= _arg3.length) && (_arg2.substr(0, _arg3.length) == _arg3));
};
StringTools /*register */.endsWith = function (_arg2, _arg3) {
var _local4 = _arg3.length;
var _local5 = _arg2.length;
return((_local5 >= _local4) && (_arg2.substr(_local5 - _local4, _local4) == _arg3));
};
StringTools /*register */.isSpace = function (_arg2, _arg3) {
var _local4 = _arg2.charCodeAt(_arg3);
return(((_local4 >= 9) && (_local4 <= 13)) || (_local4 == 32));
};
StringTools /*register */.ltrim = function (_arg2) {
var _local3 = _arg2.length;
var _local4 = 0;
while ((_local4 < _local3) && (StringTools.isSpace(_arg2, _local4))) {
_local4++;
}
if (_local4 <= 0) {
return(_arg2);
}
return(_arg2.substr(_local4, _local3 - _local4));
};
StringTools /*register */.rtrim = function (_arg2) {
var _local3 = _arg2.length;
var _local4 = 0;
while ((_local4 < _local3) && (StringTools.isSpace(_arg2, (_local3 - _local4) - 1))) {
_local4++;
}
if (_local4 <= 0) {
return(_arg2);
}
return(_arg2.substr(0, _local3 - _local4));
};
StringTools /*register */.trim = function (_arg2) {
return(StringTools.ltrim(StringTools.rtrim(_arg2)));
};
StringTools /*register */.rpad = function (_arg2, _arg3, _arg4) {
var _local5 = _arg2.length;
var _local6 = _arg3.length;
while (_local5 < _arg4) {
if ((_arg4 - _local5) >= _local6) {
_arg2 = _arg2 + _arg3;
_local5 = _local5 + _local6;
} else {
_arg2 = _arg2 + _arg3.substr(0, _arg4 - _local5);
_local5 = _arg4;
}
}
return(_arg2);
};
StringTools /*register */.lpad = function (_arg2, _arg3, _arg4) {
var _local5 = "";
var _local6 = _arg2.length;
if (_local6 >= _arg4) {
return(_arg2);
}
var _local7 = _arg3.length;
while (_local6 < _arg4) {
if ((_arg4 - _local6) >= _local7) {
_local5 = _local5 + _arg3;
_local6 = _local6 + _local7;
} else {
_local5 = _local5 + _arg3.substr(0, _arg4 - _local6);
_local6 = _arg4;
}
}
return(_local5 + _arg2);
};
StringTools /*register */.replace = function (_arg2, _arg3, _arg4) {
return(_arg2.split(_arg3).join(_arg4));
};
StringTools /*register */.baseEncode = function (_arg2, _arg3) {
var _local4 = _arg3.length;
var _local5 = 1;
while (_local4 > (1 << _local5)) {
_local5++;
}
if ((_local5 > 8) || (_local4 != (1 << _local5))) {
throw "baseEncode: base must be a power of two.";
}
var _local6 = Std.int((((_arg2.length * 8) + _local5) - 1) / _local5);
var _local7 = new StringBuf();
var _local8 = 0;
var _local9 = 0;
var _local10 = (1 << _local5) - 1;
var _local11 = 0;
while ((_local6--) > 0) {
while (_local9 < _local5) {
_local9 = _local9 + 8;
_local8 = _local8 << 8;
var _local12 = _arg2.charCodeAt(_local11++);
if (_local12 > 255) {
throw "baseEncode: bad chars";
}
_local8 = _local8 | _local12;
}
_local9 = _local9 - _local5;
_local7.addChar(_arg3.charCodeAt((_local8 >> _local9) & _local10));
}
return(_local7.toString());
};
StringTools /*register */.baseDecode = function (_arg2, _arg3) {
var _local4 = _arg3.length;
var _local5 = 1;
while (_local4 > (1 << _local5)) {
_local5++;
}
if ((_local5 > 8) || (_local4 != (1 << _local5))) {
throw "baseDecode: base must be a power of two.";
}
var _local6 = (((_arg2.length * 8) + _local5) - 1) / _local5;
var _local7 = new Array();
var _local8 = 0;
var _local9 = 256;
while (_local8 < _local9) {
var _local10 = _local8;
_local8++;
_local7[_local10] = -1;
}
_local8 = 0;
_local9 = _local4;
while (_local8 < _local9) {
var _local10 = _local8;
_local8++;
_local7[_arg3.charCodeAt(_local10)] = _local10;
}
_local8 = (_arg2.length * _local5) / 8;
_local9 = new StringBuf();
var _local10 = 0;
var _local11 = 0;
var _local12 = 0;
while ((_local8--) > 0) {
while (_local11 < 8) {
_local11 = _local11 + _local5;
_local10 = _local10 << _local5;
var _local13 = _local7[_arg2.charCodeAt(_local12++)];
if (_local13 == -1) {
throw "baseDecode: bad chars";
}
_local10 = _local10 | _local13;
}
_local11 = _local11 - 8;
_local9.addChar((_local10 >> _local11) & 255);
}
return(_local9.toString());
};
StringTools /*register */.hex = function (_arg2, _arg3) {
var _local4 = "";
var _local5 = "0123456789ABCDEF";
do {
_local4 = _local5.charAt(_arg2 % 16) + _local4;
_arg2 = Std.int(_arg2 / 16);
} while (_arg2 > 0);
if (_arg3 != null) {
while (_local4.length < _arg3) {
_local4 = "0" + _local4;
}
}
return(_local4);
};
((Reflect = function () {
})).__name__ = ["Reflect"];
_local1 = Reflect /*register */.prototype;
_local1.__class__ = Reflect /*register */;
Reflect /*register */.empty = function () {
return(new _global.Object());
};
Reflect /*register */.hasField = function (_arg2, _arg3) {
return(this.hasOwnProperty.call(_arg2, _arg3));
};
Reflect /*register */.field = function (_arg2, _arg3) {
return(_arg2[_arg3]);
};
Reflect /*register */.setField = function (_arg2, _arg3, _arg4) {
_arg2[_arg3] = _arg4;
};
Reflect /*register */.callMethod = function (_arg2, _arg3, _arg4) {
return(_arg3.apply(_arg2, _arg4));
};
Reflect /*register */.fields = function (_arg2) {
if (_arg2 == null) {
return(new Array());
}
var _local4 = new Array();
for (_reg0 in _arg2) {
_local4.push(_reg0);
}
var _local3 = _local4;
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3.hasOwnProperty.call(_arg2, _local3[_local4])) {
_local4++;
} else {
_local3.splice(_local4, 1);
}
}
return(_local3);
};
Reflect /*register */.isFunction = function (_arg2) {
return((typeof(_arg2) == "function") && (_arg2.__name__ == null));
};
Reflect /*register */.isObject = function (_arg2) {
var _local3 = typeof(_arg2);
return((_local3 == "string") || (((_local3 == "object") && (!_arg2.__enum__)) || ((_local3 == "function") && (_arg2.__name__ != null))));
};
Reflect /*register */.deleteField = function (_arg2, _arg3) {
if (this.hasOwnProperty.call(_arg2, _arg3) != true) {
return(false);
}
delete _arg2[_arg3];
return(true);
};
Reflect /*register */.copy = function (_arg2) {
var _local3 = Reflect.empty();
var _local4 = Reflect.fields(_arg2).iterator();
while (_local4.hasNext()) {
var _local5 = _local4.next();
Reflect.setField(_local3, _local5, Reflect.field(_arg2, _local5));
}
return(_local3);
};
Reflect /*register */.makeVarArgs = function (f) {
return(function () {
return(f(arguments));
});
};
((pulp.CircSequence = function (_arg2) {
this.angle = 0;
this.speed = _arg2;
this.shouldStop = false;
this.shouldStopAtMax = false;
this.run = false;
})).__name__ = ["pulp", "CircSequence"];
_local1 = (pulp.CircSequence /* register */).prototype;
_local1.__class__ = pulp.CircSequence /* register */;
_local1.angle = null;
_local1.getAngle = function () {
return(this.angle);
};
_local1.run = null;
_local1.shouldStop = null;
_local1.shouldStopAtMax = null;
_local1.speed = null;
_local1.start = function () {
this.run = true;
this.shouldStop = false;
this.shouldStopAtMax = false;
};
_local1.stop = function () {
this.shouldStop = true;
};
_local1.stopAtMax = function () {
this.shouldStopAtMax = true;
};
_local1.stopAtMaxIfShould = function () {
if (this.shouldStopAtMax) {
this.run = false;
this.shouldStopAtMax = false;
}
};
_local1.stopIfShould = function () {
if (this.shouldStop) {
this.run = false;
this.angle = 0;
this.shouldStop = false;
}
};
_local1.stopNow = function () {
this.run = false;
};
_local1.update = function () {
if (this.run) {
this.angle = this.angle + this.speed;
if (this.angle > (Math.PI * 2)) {
this.angle = this.angle - (Math.PI * 2);
this.stopIfShould();
}
if (this.angle < 0) {
this.angle = this.angle + (Math.PI * 2);
this.stopIfShould();
}
if ((this.angle > (((Math.PI * 5) / 3) - 0.5)) && (this.angle < (((Math.PI * 5) / 3) + 0.5))) {
this.stopAtMaxIfShould();
}
}
return(this.angle);
};
_local1 = new Object();
haxe = _local1;
_local2 = _global.haxe;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
((haxe.Log = function () {
})).__name__ = ["haxe", "Log"];
_local1 = (haxe.Log /* register */).prototype;
_local1.__class__ = haxe.Log /* register */;
(haxe.Log /* register */).trace = function (_arg2, _arg3) {
flash.Boot.__trace(_arg2, _arg3);
};
(haxe.Log /* register */).clear = function () {
flash.Boot.__clear_trace();
};
(haxe.Log /* register */).setColor = function (_arg2) {
flash.Boot.__set_trace_color(_arg2);
};
_local1 = new Object();
flash.text = _local1;
_local2 = _global.flash.text;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
((pulp.NColor = function (_arg2) {
this.set(_arg2);
})).__name__ = ["pulp", "NColor"];
_local1 = (pulp.NColor /* register */).prototype;
_local1.__class__ = pulp.NColor /* register */;
_local1.a = null;
_local1.b = null;
_local1.darken = function (_arg2) {
this.r = this.limit(this.r - _arg2);
this.g = this.limit(this.g - _arg2);
this.b = this.limit(this.b - _arg2);
};
_local1.g = null;
_local1.invert = function () {
this.r = this.limit(255 - this.r);
this.g = this.limit(255 - this.g);
this.b = this.limit(255 - this.b);
};
_local1.lighten = function (_arg2) {
this.r = this.limit(this.r + _arg2);
this.g = this.limit(this.g + _arg2);
this.b = this.limit(this.b + _arg2);
};
_local1.limit = function (_arg2) {
if (_arg2 <= 255) {
if (_arg2 < 0) {
return(0);
}
} else {
return(255);
}
return(_arg2);
};
_local1.r = null;
_local1.set = function (_arg2) {
this.a = (_arg2 >> 24) & 255;
this.r = (_arg2 >> 16) & 255;
this.g = (_arg2 >> 8) & 255;
this.b = _arg2 & 255;
return(this);
};
_local1.setRGBA = function (_arg2, _arg3, _arg4, _arg5) {
this.r = _arg2;
this.g = _arg3;
this.b = _arg4;
this.a = _arg5;
};
_local1.toInt = function () {
return(((this.r << 16) | (this.g << 8)) | this.b);
};
((StringBuf = function () {
this.b = "";
})).__name__ = ["StringBuf"];
_local1 = StringBuf /*register */.prototype;
_local1.__class__ = StringBuf /*register */;
_local1.add = function (_arg2) {
this.b = this.b + _arg2;
};
_local1.addChar = function (_arg2) {
this.b = this.b + String.fromCharCode(_arg2);
};
_local1.addSub = function (_arg2, _arg3, _arg4) {
this.b = this.b + _arg2.substr(_arg3, _arg4);
};
_local1.b = null;
_local1.toString = function () {
return(this.b);
};
_local1 = new Object();
flash.geom = _local1;
_local2 = _global.flash.geom;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
((QubiPairs = function () {
QubiPairs.mc = flash.Lib.current;
QubiPairs.mc.baseUrl = "http://www.bravekidgames.com/qubidraw/";
this.instr = null;
this.afRemoveMcs = new Array();
this.won = false;
flash.Lib.current.__gamemode = "";
if (!((flash.Lib.current.__gamemode == null) || (flash.Lib.current.__gamemode == ""))) {
var _local2 = my.GameMode.easyPairs;
if (flash.Lib.current.__gamemode != "easyPairs") {
if (flash.Lib.current.__gamemode != "classicPairs") {
if (flash.Lib.current.__gamemode != "newItem") {
if (flash.Lib.current.__gamemode == "singleItem") {
_local2 = my.GameMode.singleItem;
}
} else {
_local2 = my.GameMode.newItem;
}
} else {
_local2 = my.GameMode.classicPairs;
}
} else {
_local2 = my.GameMode.easyPairs;
}
this.gameMode = _local2;
QubiPairs.mc.onEnterFrame = @closure("loopDisplayPics", this);
this.loadPics(this.gameMode);
} else {
this.showMenu();
}
var _local2 = flash.Lib.current.attachMovie("bg5", "ibg5", 323);
_local2._x = -10;
_local2._y = -10;
new pulp.Button("btnMoreActivities", 225, 389, 1643, @closure("openWebsite", this));
})).__name__ = ["QubiPairs"];
_local1 = QubiPairs /*register */.prototype;
_local1.__class__ = QubiPairs /*register */;
QubiPairs /*register */.mc = null;
QubiPairs /*register */.pics = null;
QubiPairs /*register */.currPicIds = null;
QubiPairs /*register */.picked = null;
QubiPairs /*register */.main = function () {
var _local2 = new QubiPairs();
};
_local1.afDisplayPics = null;
_local1.afRemoveMcs = null;
_local1.btnPlayAgain = null;
_local1.checkIfAlreadyWon = function () {
var _local2 = true;
if (!((this.gameMode == my.GameMode.easyPairs) || (this.gameMode == my.GameMode.classicPairs))) {
if (this.gameMode != my.GameMode.singleItem) {
if (this.gameMode != my.GameMode.newItem) {
haxe.Log.trace("ERR: none of the states", {methodName:"checkIfAlreadyWon", className:"QubiPairs", lineNumber:375, fileName:"QubiPairs.hx"});
} else {
var _local3 = QubiPairs.pics.iterator();
while (_local3.hasNext()) {
var _local4 = _local3.next();
_local4.removeMe(null);
}
_local2 = !this.shuffleAndDisplayOneNewOnes();
}
} else {
var _local3 = QubiPairs.pics.iterator();
while (_local3.hasNext()) {
var _local4 = _local3.next();
_local4.removeMe(null);
}
}
} else {
var _local3 = QubiPairs.pics.iterator();
while (_local3.hasNext()) {
var _local4 = _local3.next();
if ((_local4.state != my.PairItemState.removeme) && (_local4.state != my.PairItemState.removed)) {
_local2 = false;
}
}
}
if (_local2) {
if (!this.won) {
this.youWonMessage = new my.YouWonMessage(this);
}
this.btnPlayAgain = new pulp.FadeButton("btnPlayAgain", 225, 280, 3018, @closure("hideYouWon", this));
this.won = true;
}
};
_local1.currNewItem = null;
_local1.displayPics = function () {
var _local2 = 0;
var _local3 = 0;
var _local4 = QubiPairs.pics.iterator();
while (_local4.hasNext()) {
var _local5 = _local4.next();
if (this.gameMode != my.GameMode.newItem) {
_local2++;
} else if (!this.displayed.exists(_local5.id)) {
_local5.reset(-200, 100);
_local5.state = my.PairItemState.normal;
} else {
_local5.reset(this.getXFromI(_local2), 60 + (_local3 * 80));
_local5.state = my.PairItemState.normal;
_local2++;
}
if (this.getXFromI(_local2) > 350) {
_local3++;
_local2 = 0;
}
}
_local4 = QubiPairs.pics.iterator();
while (_local4.hasNext()) {
var _local5 = _local4.next();
}
};
_local1.displayed = null;
_local1.gameMode = null;
_local1.getImageIds = function (_arg2) {
return("11667,11681,11679,11672,11642,11677,11653,11651");
};
_local1.getXFromI = function (_arg2) {
return(40 + (_arg2 * 100));
};
_local1.hideGame = function () {
if (this.instr != null) {
this.instr.pushed = true;
}
if (!this.won) {
var _local2 = 0;
var _local3 = true;
var _local4 = QubiPairs.pics.iterator();
while (_local4.hasNext()) {
var _local5 = _local4.next();
_local5.removeMe(@closure("showMenu", this));
_local3 = false;
}
} else {
this.youWonMessage.remove(@closure("showMenu", this));
this.btnPlayAgain.pushed = true;
this.showMenu();
}
};
_local1.hideMenu = function () {
new pulp.FadeButton("btnClose", 434, 19, 1012, @closure("hideGame", this));
if (this.gameMode != my.GameMode.newItem) {
if (this.gameMode != my.GameMode.singleItem) {
this.instr = new pulp.FadeButton("mcInstrPairs", 225, -4, 1101, null);
} else {
this.instr = new pulp.FadeButton("mcInstrSingle", 225, -4, 1101, null);
}
} else {
this.instr = new pulp.FadeButton("mcInstrNew", 225, -4, 1101, null);
}
QubiPairs.mc.onEnterFrame = @closure("loopRemoveMenu", this);
var _local2 = new Array();
_local2.push(flash.Lib.current.imcTitle);
_local2.push(flash.Lib.current.imcBgCircle);
_local2.push(flash.Lib.current.ibtnPairsEasy);
_local2.push(flash.Lib.current.ibtnNewItem);
_local2.push(flash.Lib.current.ibtnPairsClassic);
_local2.push(flash.Lib.current.ibtnSingleItem);
var _local3 = 0;
var _local4 = _local2.iterator();
while (_local4.hasNext()) {
var _local5 = _local4.next();
var _local6 = 0;
var _local7 = -7;
if (_local3 < 4) {
if (_local3 < 2) {
if (_local3 >= 1) {
_local6 = 0;
_local7 = 8;
}
} else {
_local6 = -12;
_local7 = 0;
}
} else {
_local6 = 12;
_local7 = 0;
}
var _local8 = new AFRemoveMc();
_local8.reset();
_local8.setup(_local5, _local6, _local7);
_local8.start();
this.afRemoveMcs.push(_local8);
_local3++;
}
};
_local1.hideYouWon = function () {
this.youWonMessage.remove(null);
this.loadPics(this.gameMode);
};
_local1.instr = null;
_local1.isSingle = function (_arg2) {
return(this.singles.exists(_arg2));
};
_local1.itemClicked = function (_arg2) {
if (!((this.gameMode == my.GameMode.easyPairs) || (this.gameMode == my.GameMode.classicPairs))) {
if (this.gameMode != my.GameMode.singleItem) {
if (this.gameMode == my.GameMode.newItem) {
if (_arg2.id != this.currNewItem) {
_arg2.pick();
} else {
_arg2.fly();
}
}
}
} else if (QubiPairs.picked != null) {
if (QubiPairs.picked.id != _arg2.id) {
QubiPairs.picked.unpick();
_arg2.unpick();
QubiPairs.picked = null;
} else {
QubiPairs.picked.fly();
_arg2.fly();
QubiPairs.picked = null;
}
} else {
QubiPairs.picked = _arg2;
}
};
_local1.loadPics = function (_arg2) {
QubiPairs.pics = new Array();
this.won = false;
var _local3 = Math.floor(Math.random() * 4);
if (_local3 != 0) {
if (_local3 != 1) {
if (_local3 != 2) {
var _local4 = "i13,i14,i15,i16,i5,i6,i7,i8";
} else {
var _local4 = "i1,i2,i3,i4,i9,i10,i11,i12";
}
} else {
var _local4 = "i9,i10,i11,i12,i13,i14,i15,i16";
}
} else {
var _local4 = "i1,i2,i3,i4,i5,i6,i7,i8";
}
var _local5 = new Array();
if (_local4 != "") {
_local5 = _local4.split(",");
}
var _local6 = 0;
var _local7 = 0;
var _local8 = _local5.copy();
if (_arg2 != my.GameMode.singleItem) {
if (_arg2 == my.GameMode.newItem) {
this.displayed = new Hash();
var _local9 = _local5[Math.floor(Math.random() * _local5.length)];
this.displayed.set(_local9, 1);
this.currNewItem = _local9;
}
} else {
this.singles = new Hash();
var _local9 = 0;
var _local10 = 1;
while (_local9 < _local10) {
var _local11 = _local9;
_local9++;
var _local12 = _local8[Math.floor(Math.random() * _local8.length)];
this.singles.set(_local12, 1);
_local8.remove(_local12);
}
}
var _local9 = new Array();
if (_arg2 == my.GameMode.newItem) {
_local9 = _local5.copy();
} else {
var _local10 = _local5.concat(_local8);
_local9 = this.shufflePics(_local10);
}
QubiPairs.currPicIds = _local5.copy();
var _local10 = _local9.iterator();
while (_local10.hasNext()) {
var _local11 = _local10.next();
var _local12 = new my.PairItem(this, _local11, this.getXFromI(_local6), 60 + (_local7 * 80), _arg2);
if (_arg2 != my.GameMode.newItem) {
_local6++;
} else if (this.displayed.exists(_local11)) {
_local6++;
} else {
_local12.removeMe(null);
}
QubiPairs.pics.push(_local12);
if (this.getXFromI(_local6) > 350) {
_local7++;
_local6 = 0;
}
}
my.PairItem.depthOffset = 0;
this.afDisplayPics = new AFDisplayPics();
this.afDisplayPics.reset();
this.afDisplayPics.setup(QubiPairs.pics);
this.afDisplayPics.start();
};
_local1.loopDisplayPics = function () {
this.afDisplayPics.work(this, 1);
};
_local1.loopRemoveMenu = function () {
var _local2 = true;
var _local3 = this.afRemoveMcs.iterator();
while (_local3.hasNext()) {
var _local4 = _local3.next();
_local4.work(this, 1);
if (!_local4.done) {
_local2 = false;
}
}
if (_local2) {
QubiPairs.mc.onEnterFrame = @closure("loopDisplayPics", this);
this.loadPics(this.gameMode);
}
};
_local1.openWebsite = function () {
flash.Lib.getURL("http://www.bravekidgames.com/qubidraw");
};
_local1.showMenu = function () {
var _local2 = flash.Lib.current.attachMovie("mcTitle", "imcTitle", 1500);
_local2._x = 15;
_local2._y = 51;
var _local3 = flash.Lib.current.attachMovie("mcBgCircle", "imcBgCircle", 1503);
_local3._x = 114;
_local3._y = 181;
new pulp.Button("btnPairsEasy", 137, 242, 3000, @closure("startPairsEasy", this));
new pulp.Button("btnPairsClassic", 291, 241, 3003, @closure("startPairsClassic", this));
new pulp.Button("btnNewItem", 137, 290, 3006, @closure("startNewItem", this));
new pulp.Button("btnSingleItem", 291, 290, 3009, @closure("startSingleItem", this));
};
_local1.shuffleAndDisplayOneNewOnes = function () {
var _local2 = false;
var _local3 = 0;
while (!_local2) {
var _local4 = QubiPairs.currPicIds[Math.floor(Math.random() * QubiPairs.currPicIds.length)];
if (!this.displayed.exists(_local4)) {
this.displayed.set(_local4, 1);
this.currNewItem = _local4;
_local2 = true;
}
if (_local3 > 200) {
return(false);
}
_local3++;
}
this.displayPics();
return(true);
};
_local1.shufflePics = function (_arg2) {
var _local3 = new Array();
while (_arg2.length > 0) {
var _local4 = _arg2[Math.floor(Math.random() * _arg2.length)];
_local3.push(_local4);
_arg2.remove(_local4);
}
return(_local3);
};
_local1.singles = null;
_local1.startNewItem = function () {
this.gameMode = my.GameMode.newItem;
this.hideMenu();
};
_local1.startPairsClassic = function () {
this.gameMode = my.GameMode.classicPairs;
this.hideMenu();
};
_local1.startPairsEasy = function () {
this.gameMode = my.GameMode.easyPairs;
this.hideMenu();
};
_local1.startSingleItem = function () {
this.gameMode = my.GameMode.singleItem;
this.hideMenu();
};
_local1.won = null;
_local1.youWonMessage = null;
((AFRemoveMc = function () {
super();
})).__name__ = ["AFRemoveMc"];
AFRemoveMc /*register */.__super__ = pulp.NAsyncFunc;
//AFRemoveMc /*register */ extends pulp.NAsyncFunc
_local1 = AFRemoveMc /*register */.prototype;
_local1.__class__ = AFRemoveMc /*register */;
_local1.cdx = null;
_local1.cdy = null;
_local1.dx = null;
_local1.dy = null;
_local1.mc = null;
_local1.reset = function () {
};
_local1.setup = function (_arg2, _arg3, _arg4) {
this.mc = _arg2;
this.dx = _arg3;
this.dy = _arg4;
this.cdx = 0;
this.cdy = 0;
};
_local1.workSub = function (_arg2) {
this.cdx = this.cdx + ((this.dx - this.cdx) / 7);
this.cdy = this.cdy + ((this.dy - this.cdy) / 7);
this.mc._x = this.mc._x + this.cdx;
this.mc._y = this.mc._y + this.cdy;
if ((this.mc._y > 600) || ((this.mc._x > 600) || ((this.mc._y < -100) || (this.mc._x < -100)))) {
this.setDone();
}
};
((AFDisplayPics = function () {
super();
})).__name__ = ["AFDisplayPics"];
AFDisplayPics /*register */.__super__ = pulp.NAsyncFunc;
//AFDisplayPics /*register */ extends pulp.NAsyncFunc
_local1 = AFDisplayPics /*register */.prototype;
_local1.__class__ = AFDisplayPics /*register */;
_local1.counter = null;
_local1.idx = null;
_local1.pics = null;
_local1.reset = function () {
};
_local1.setup = function (_arg2) {
this.pics = _arg2;
this.counter = 0;
this.idx = 0;
};
_local1.workSub = function (_arg2) {
if (this.counter > 2) {
if (this.pics[this.idx].state != my.PairItemState.removed) {
if (this.idx > this.pics.length) {
this.setDone();
}
this.pics[this.idx].state = my.PairItemState.normal;
}
this.counter = 0;
this.idx++;
}
this.counter++;
};
((pulp.NVector2i = function (_arg2, _arg3) {
this.x = _arg2;
this.y = _arg3;
})).__name__ = ["pulp", "NVector2i"];
_local1 = (pulp.NVector2i /* register */).prototype;
_local1.__class__ = pulp.NVector2i /* register */;
_local1._trace = function () {
haxe.Log.trace((("x:" + this.x) + " y:") + this.y, {methodName:"_trace", className:"pulp.NVector2i", lineNumber:30, fileName:"NVector2i.hx"});
};
_local1.getKoeficient = function () {
if (this.x != 0) {
return(this.y / this.x);
}
return(0);
};
_local1.substract = function (_arg2) {
return(new pulp.NVector2i(this.x - _arg2.x, this.y - _arg2.y));
};
_local1.x = null;
_local1.y = null;
((pulp.Button = function (_arg2, _arg3, _arg4, _arg5, _arg6) {
this.onPress = _arg6;
this.mc = flash.Lib.current.attachMovie(_arg2, "i" + _arg2, _arg5);
this.mc._x = _arg3;
this.mc._y = _arg4;
this.mc.onPress = @closure("press", this);
this.mc.onRollOver = @closure("rollOver", this);
this.mc.onRollOut = @closure("rollOut", this);
})).__name__ = ["pulp", "Button"];
_local1 = (pulp.Button /* register */).prototype;
_local1.__class__ = pulp.Button /* register */;
_local1.mc = null;
_local1.onPress = null;
_local1.press = function () {
this.onPress();
};
_local1.rollOut = function () {
this.mc._xscale = 100;
this.mc._yscale = 100;
};
_local1.rollOver = function () {
this.mc._xscale = 110;
this.mc._yscale = 110;
};
((IntIter = function (_arg2, _arg3) {
this.min = _arg2;
this.max = _arg3;
})).__name__ = ["IntIter"];
_local1 = IntIter /*register */.prototype;
_local1.__class__ = IntIter /*register */;
_local1.hasNext = function () {
return(this.min < this.max);
};
_local1.max = null;
_local1.min = null;
_local1.next = function () {
return(this.min++);
};
((haxe.Timer = function (_arg2) {
var me = this;
this.id = _global.setInterval(function () {
me.run();
}, _arg2);
})).__name__ = ["haxe", "Timer"];
_local1 = (haxe.Timer /* register */).prototype;
_local1.__class__ = haxe.Timer /* register */;
(haxe.Timer /* register */).delayed = function (f, time) {
return(function () {
var t = (new haxe.Timer(time));
t.run = function () {
t.stop();
f();
};
});
};
(haxe.Timer /* register */).delayedArg = function (f, time) {
return(function (arg) {
var t = (new haxe.Timer(time));
t.run = function () {
t.stop();
f(arg);
};
});
};
(haxe.Timer /* register */).stamp = function () {
return(flash.Lib.getTimer() / 1000);
};
_local1.id = null;
_local1.run = function () {
};
_local1.stop = function () {
_global.clearInterval(this.id);
this.id = null;
};
((Std = function () {
})).__name__ = ["Std"];
_local1 = Std /*register */.prototype;
_local1.__class__ = Std /*register */;
Std /*register */.is = function (_arg2, _arg3) {
return(flash.Boot.__instanceof(_arg2, _arg3));
};
Std /*register */.string = function (_arg2) {
return(flash.Boot.__string_rec(_arg2, ""));
};
Std /*register */.int = function (_arg2) {
return(Math.floor(_arg2));
};
Std /*register */.bool = function (_arg2) {
return((!(_arg2 === 0)) && ((_arg2 != null) && (!(_arg2 === false))));
};
Std /*register */.parseInt = function (_arg2) {
var _local3 = _global.parseInt(_arg2);
if (Math.isNaN(_local3)) {
return(null);
}
return(_local3);
};
Std /*register */.parseFloat = function (_arg2) {
return(_global.parseFloat(_arg2));
};
Std /*register */.chr = function (_arg2) {
return(String.fromCharCode(_arg2));
};
Std /*register */.ord = function (_arg2) {
if (_arg2 != "") {
return(_arg2.charCodeAt(0));
}
return(null);
};
Std /*register */.random = function (_arg2) {
return(random(_arg2));
};
Std /*register */.resource = function (_arg2) {
return(flash.Boot.__res[_arg2]);
};
_local1 = new Object();
flash.filters = _local1;
_local2 = _global.flash.filters;
for (_reg0 in _local2) {
_local1[_reg0] = _local2[_reg0];
}
((my.PairItemState = new Object())).__ename__ = ["my", "PairItemState"];
["flying"].__enum__ = my.PairItemState /* register */;
(my.PairItemState /* register */).flying = ["flying"];
["normal"].__enum__ = my.PairItemState /* register */;
(my.PairItemState /* register */).normal = ["normal"];
["notshown"].__enum__ = my.PairItemState /* register */;
(my.PairItemState /* register */).notshown = ["notshown"];
["picked"].__enum__ = my.PairItemState /* register */;
(my.PairItemState /* register */).picked = ["picked"];
["removed"].__enum__ = my.PairItemState /* register */;
(my.PairItemState /* register */).removed = ["removed"];
["removeme"].__enum__ = my.PairItemState /* register */;
(my.PairItemState /* register */).removeme = ["removeme"];
((my.PairItem = function (_arg2, _arg3, _arg4, _arg5, _arg6) {
this.mcRoot = flash.Lib.current;
this.parent = _arg2;
this.id = _arg3;
this.gameMode = _arg6;
this.onRemoveMe = null;
this.mcBg = this.mcRoot.attachMovie("picBg", "ipicBig_" + my.PairItem.depthOffset, my.PairItem.depthOffset + 7000);
this.mcBg._x = _arg4;
this.mcBg._y = _arg5;
this.mcBg._alpha = 0;
this.mcBg.onPress = @closure("press", this);
this.mcBg.onRollOver = @closure("rollOver", this);
this.mcBg.onRollOut = @closure("rollOut", this);
this.mcBg.onEnterFrame = @closure("frame", this);
my.PairItem.depthOffset++;
var _local7 = this.mcBg.getNextHighestDepth();
this.mcPic = this.mcBg.attachMovie("m" + _arg3, "imcPic" + _local7, _local7);
this.mcPic._alpha = ((_arg6 == my.GameMode.classicPairs) ? 0 : 100);
this.mcPic._x = 5;
this.mcPic._y = 5;
this.state = my.PairItemState.notshown;
this.swing = new pulp.CircSequence(0.15);
})).__name__ = ["my", "PairItem"];
_local1 = (my.PairItem /* register */).prototype;
_local1.__class__ = my.PairItem /* register */;
_local1.fly = function () {
this.state = my.PairItemState.flying;
};
_local1.frame = function () {
if ((this.mcBg._alpha < 100) && (this.state == my.PairItemState.normal)) {
this.mcBg._alpha = this.mcBg._alpha + ((100 - this.mcBg._alpha) / 20);
}
if (!((this.state == my.PairItemState.picked) || (this.swing.run))) {
if (this.state != my.PairItemState.removeme) {
if ((this.state != my.PairItemState.flying) && (this.gameMode == my.GameMode.classicPairs)) {
this.mcPic._alpha = this.mcPic._alpha + ((-this.mcPic._alpha) / 7);
}
}
} else {
if (this.mcBg._xscale > 100) {
this.mcBg._x = this.mcBg._x + 6;
this.mcBg._y = this.mcBg._y + 6;
}
this.mcBg._xscale = 100;
this.mcBg._yscale = 100;
this.mcBg._rotation = Math.sin(this.swing.update()) * 10;
this.mcPic._alpha = this.mcPic._alpha + ((100 - this.mcPic._alpha) / 7);
}
if (this.state == my.PairItemState.flying) {
this.mcBg._xscale = 100;
this.mcBg._yscale = 100;
this.swing.stopAtMax();
if (this.swing.run) {
this.mcBg._rotation = Math.sin(this.swing.update()) * 30;
} else {
this.mcBg._x = this.mcBg._x + 4;
this.mcBg._y = this.mcBg._y + -2;
this.mcBg._rotation = this.mcBg._rotation - 4;
}
if (this.mcBg._x > 500) {
this.removeMe(null);
this.parent.checkIfAlreadyWon();
}
}
if (this.state == my.PairItemState.removeme) {
if (this.mcBg._alpha <= 5) {
if (this.onRemoveMe != null) {
this.onRemoveMe();
}
if (this.gameMode != my.GameMode.newItem) {
this.mcBg.removeMovieClip();
}
this.state = my.PairItemState.removed;
} else {
this.mcBg._alpha = this.mcBg._alpha + ((-this.mcBg._alpha) / 7);
}
}
if ((this.gameMode == my.GameMode.singleItem) || (this.gameMode == my.GameMode.newItem)) {
if (this.state == my.PairItemState.picked) {
this.unpick();
}
}
};
_local1.gameMode = null;
_local1.id = null;
_local1.mcBg = null;
_local1.mcPic = null;
_local1.mcRoot = null;
_local1.onRemoveMe = null;
_local1.parent = null;
_local1.pick = function () {
this.state = my.PairItemState.picked;
this.swing.start();
};
_local1.press = function () {
if (this.state == my.PairItemState.normal) {
if (!((this.gameMode == my.GameMode.classicPairs) || (this.gameMode == my.GameMode.easyPairs))) {
if (this.gameMode != my.GameMode.singleItem) {
if (this.gameMode == my.GameMode.newItem) {
}
} else if (!this.parent.isSingle(this.id)) {
this.state = my.PairItemState.picked;
this.swing.start();
} else {
this.state = my.PairItemState.flying;
}
} else {
this.state = my.PairItemState.picked;
this.swing.start();
}
this.parent.itemClicked(this);
}
};
_local1.removeMe = function (_arg2) {
this.onRemoveMe = _arg2;
this.mcBg._x = -200;
this.mcBg._y = 0;
this.state = my.PairItemState.removeme;
};
_local1.reset = function (_arg2, _arg3) {
this.mcBg._x = _arg2;
this.mcBg._y = _arg3;
this.mcBg._alpha = 0;
this.mcBg._rotation = 0;
this.state = my.PairItemState.normal;
this.swing.stopNow();
};
_local1.rollOut = function () {
if ((this.state == my.PairItemState.normal) && (!this.swing.run)) {
this.mcBg._xscale = 100;
this.mcBg._yscale = 100;
this.mcBg._x = this.mcBg._x + 6;
this.mcBg._y = this.mcBg._y + 6;
}
};
_local1.rollOver = function () {
if ((this.state == my.PairItemState.normal) && (!this.swing.run)) {
this.mcBg._xscale = 120;
this.mcBg._yscale = 120;
this.mcBg._x = this.mcBg._x - 6;
this.mcBg._y = this.mcBg._y - 6;
}
};
_local1.state = null;
_local1.swing = null;
_local1.unpick = function () {
this.swing.stop();
this.state = my.PairItemState.normal;
};
((haxe.Http = function (_arg2) {
this.url = _arg2;
this.headers = new Hash();
this.params = new Hash();
})).__name__ = ["haxe", "Http"];
_local1 = (haxe.Http /* register */).prototype;
_local1.__class__ = haxe.Http /* register */;
_local1.headers = null;
_local1.onData = function (_arg2) {
};
_local1.onError = function (_arg2) {
};
_local1.onStatus = function (_arg2) {
};
_local1.params = null;
_local1.request = function (_arg2) {
var me = this;
var _local3 = new flash.LoadVars();
_local3.onData = function (_arg2) {
if (_arg2 == null) {
me.onError("Failed to retrieve url");
return(undefined);
}
me.onData(_arg2);
};
_local3.onHTTPStatus = function (_arg2) {
if (_arg2 != 0) {
me.onStatus(_arg2);
}
};
ASSetPropFlags(_local3, "onHTTPStatus", 7);
ASSetPropFlags(_local3, "onData", 7);
var _local4 = this.headers.keys();
while (_local4.hasNext()) {
var _local5 = _local4.next();
_local3.addRequestHeader(_local5, this.headers.get(_local5));
}
_local4 = false;
var _local5 = this.params.keys();
while (_local5.hasNext()) {
var _local6 = _local5.next();
_local4 = true;
Reflect.setField(_local3, _local6, this.params.get(_local6));
}
_local5 = this.url;
if (_local4 && (!_arg2)) {
var _local6 = this.url.split("?");
if (_local6.length > 1) {
_local5 = _local6.shift();
_local3.decode(_local6.join("?"));
}
}
if (!_local3.sendAndLoad(_local5, _local3, (_local4 ? ((_arg2 ? "POST" : "GET")) : null))) {
this.onError("Failed to initialize Connection");
}
};
_local1.setHeader = function (_arg2, _arg3) {
this.headers.set(_arg2, _arg3);
};
_local1.setParameter = function (_arg2, _arg3) {
this.params.set(_arg2, _arg3);
};
_local1.url = null;
((my.GameMode = new Object())).__ename__ = ["my", "GameMode"];
["classicPairs"].__enum__ = my.GameMode /* register */;
(my.GameMode /* register */).classicPairs = ["classicPairs"];
["easyPairs"].__enum__ = my.GameMode /* register */;
(my.GameMode /* register */).easyPairs = ["easyPairs"];
["newItem"].__enum__ = my.GameMode /* register */;
(my.GameMode /* register */).newItem = ["newItem"];
["singleItem"].__enum__ = my.GameMode /* register */;
(my.GameMode /* register */).singleItem = ["singleItem"];
((flash.Lib = function () {
})).__name__ = ["flash", "Lib"];
_local1 = (flash.Lib /* register */).prototype;
_local1.__class__ = flash.Lib /* register */;
(flash.Lib /* register */)._global = null;
(flash.Lib /* register */)._root = null;
(flash.Lib /* register */).current = null;
(flash.Lib /* register */).onerror = null;
(flash.Lib /* register */).trace = function (_arg2) {
trace(_arg2);
};
(flash.Lib /* register */).eval = function (_arg2) {
return(eval (_arg2));
};
(flash.Lib /* register */).getURL = function (_arg2, _arg3) {
getURL (_arg2, ((_arg3 == null) ? "_self" : (_arg3)));
};
(flash.Lib /* register */).fscommand = function (_arg2, _arg3) {
getURL ("FSCommand:" + _arg2, ((_arg3 == null) ? "" : (_arg3)));
};
(flash.Lib /* register */).print = function (_arg2, _arg3) {
_arg3 = (((_arg3 == "bframe") || (_arg3 == "bmax")) ? ("print:#" + _arg3) : "print:");
getURL (_arg3, _arg2);
};
(flash.Lib /* register */).getTimer = function () {
return(getTimer());
};
(flash.Lib /* register */).getVersion = function () {
return(flash.Lib._root.$version);
};
(flash.Lib /* register */).registerClass = function (_arg2, _arg3) {
flash.Lib._global.Object.registerClass(_arg2, _arg3);
};
(flash.Lib /* register */).keys = function (_arg2) {
var _local3 = new Array();
for (_reg0 in _arg2) {
_local3.push(_reg0);
}
return(_local3);
};
(flash.Lib /* register */).setErrorHandler = function (_arg2) {
flash.Lib.onerror = _arg2;
};
((pulp.FadeButton = function (_arg3, _arg4, _arg5, _arg6, _arg7) {
super(_arg3, _arg4, _arg5, _arg6, _arg7);
this.mc._alpha = 0;
this.mc.onEnterFrame = @closure("frame", this);
this.pushed = false;
})).__name__ = ["pulp", "FadeButton"];
(pulp.FadeButton /* register */).__super__ = pulp.Button;
//pulp.FadeButton /* register */ extends pulp.Button
_local1 = (pulp.FadeButton /* register */).prototype;
_local1.__class__ = pulp.FadeButton /* register */;
_local1.frame = function () {
if ((!this.pushed) && (this.mc._alpha < 100)) {
this.mc._alpha = this.mc._alpha + ((100 - this.mc._alpha) / 30);
}
if (this.pushed) {
if (this.mc._alpha <= 0) {
this.mc.removeMovieClip();
} else {
this.mc._alpha = this.mc._alpha + ((-this.mc._alpha) / 7);
}
}
};
_local1.press = function () {
this.onPress();
this.pushed = true;
};
_local1.pushed = null;
((Hash = function () {
this.h = new _global.Object();
})).__name__ = ["Hash"];
_local1 = Hash /*register */.prototype;
_local1.__class__ = Hash /*register */;
_local1.exists = function (_arg2) {
return(this.h.hasOwnProperty(_arg2));
};
_local1.get = function (_arg2) {
return(this.h[_arg2]);
};
_local1.h = null;
_local1.iterator = function () {
return({next:function () {
var _local2 = this.it.next();
return(this.ref[_local2]);
}, hasNext:function () {
return(this.it.hasNext());
}, it:this.keys(), ref:this.h});
};
_local1.keys = function () {
var _local2 = new Array();
for (_reg0 in this.h) {
_local2.push(_reg0);
}
return(_local2.iterator());
};
_local1.remove = function (_arg2) {
if (!this.h.hasOwnProperty(_arg2)) {
return(false);
}
delete this.h[_arg2];
return(true);
};
_local1.set = function (_arg2, _arg3) {
this.h[_arg2] = _arg3;
};
_local1.toString = function () {
var _local2 = new StringBuf();
_local2.add("{");
var _local3 = this.keys();
var _local4 = _local3;
while (_local4.hasNext()) {
var _local5 = _local4.next();
_local2.add(_local5);
_local2.add(" => ");
_local2.add(Std.string(this.get(_local5)));
if (_local3.hasNext()) {
_local2.add(", ");
}
}
_local2.add("}");
return(_local2.toString());
};
((@Main = function () {
})).__name__ = ["@Main"];
_local1 = @Main /*register */.prototype;
_local1.__class__ = @Main /*register */;
flash.Boot;
flash.Boot.__init(this);
flash.Boot.__res = {};
try {
flash.MovieClip = _global.MovieClip;
flash.TextField = _global.TextField;
flash.text.StyleSheet = _global.TextField.StyleSheet;
Date.now = function () {
return(new Date());
};
Date.fromTime = function (_arg2) {
var _local3 = new Date();
_local3.setTime(_arg2);
return(_local3);
};
Date.fromString = function (_arg2) {
var _local3 = _arg2.length;
if (_local3 != 8) {
if (_local3 != 10) {
if (_local3 != 19) {
throw "Invalid date format : " + _arg2;
// unexpected jump
var _local4 = _arg2.split(":");
var _local5 = new Date();
_local5.setTime(0);
_local5.setUTCHours(_local4[0]);
_local5.setUTCMinutes(_local4[1]);
_local5.setUTCSeconds(_local4[2]);
return(_local5);
_local4 = _arg2.split("-");
return(new Date(_local4[0], _local4[1] - 1, _local4[2], 0, 0, 0));
}
}
} else {
var _local4 = _arg2.split(":");
var _local5 = new Date();
_local5.setTime(0);
_local5.setUTCHours(_local4[0]);
_local5.setUTCMinutes(_local4[1]);
_local5.setUTCSeconds(_local4[2]);
return(_local5);
_local4 = _arg2.split("-");
return(new Date(_local4[0], _local4[1] - 1, _local4[2], 0, 0, 0));
_local4 = _arg2.split(" ");
_local5 = _local4[0].split("-");
var _local6 = _local4[1].split(":");
return(new Date(_local5[0], _local5[1] - 1, _local5[2], _local6[0], _local6[1], _local6[2]));
}
};
Date.prototype.toString = function () {
var _local2 = this.getMonth() + 1;
var _local3 = this.getDate();
var _local4 = this.getHours();
var _local5 = this.getMinutes();
var _local6 = this.getSeconds();
return((((((((((this.getFullYear() + "-") + ((_local2 < 10) ? ("0" + _local2) : (_local2))) + "-") + ((_local3 < 10) ? ("0" + _local3) : (_local3))) + " ") + ((_local4 < 10) ? ("0" + _local4) : (_local4))) + ":") + ((_local5 < 10) ? ("0" + _local5) : (_local5))) + ":") + ((_local6 < 10) ? ("0" + _local6) : (_local6)));
};
Date.prototype.__class__ = Date;
Date.__name__ = ["Date"];
flash.TextFormat = _global.TextFormat;
flash.Stage = _global.Stage;
Math.NaN = Number.NaN;
Math.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
Math.POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
Math.isFinite = function (_arg2) {
return(_global.isFinite(_arg2));
};
Math.isNaN = function (_arg2) {
return(_global.isNaN(_arg2));
};
flash.TextSnapshot = _global.TextSnapshot;
flash.Sound = _global.Sound;
flash.LoadVars = _global.LoadVars;
flash.Boot.def_color = 0;
my.PairItem.depthOffset = 0;
@Main.init = QubiPairs.main();
} catch(_local) {
flash.Boot.__exc( /* Error999 */
);
}