Frame 1
Set("@class_str", function () {
return(this.__name__.join("."));
});
((l2@ = function () {
})).__name__ = ["flash", "Boot"];
l2@ /*register */.toString = @class_str;
l2@ /*register */.__super__ = null;
l2@ /*register */.__interfaces__ = [];
var _local1 = l2@ /*register */.prototype;
_local1.__class__ = l2@ /*register */;
l2@ /*register */.exc = null;
l2@ /*register */.__string_rec = function (_arg2, _arg3) {
if (_arg3.length >= 20) {
return("<...>");
}
var _local4 = typeof(_arg2);
if (_local4 != "movieclip") {
if ((_local4 == "function") && (_arg2.__interfaces__ != 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) {
if (_local7 == 1) {
_local6 = _local6 + l2@.__string_rec(_arg2[_local7], _arg3);
} else {
_local6 = _local6 + ("," + l2@.__string_rec(_arg2[_local7], _arg3));
}
_local7++;
}
return(_local6 + ")");
}
var _local6 = _arg2.length;
var _local8 = "[";
_arg3 = _arg3 + " ";
var _local9 = 0;
var _local10 = _local6;
while (_local9 < _local10) {
_local8 = _local8 + (((_local9 > 0) ? "," : "") + l2@.__string_rec(_arg2[_local9], _arg3));
_local9++;
}
_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 (_local8.length != 2) {
_local8 = _local8 + ",\n";
}
if (!((_local10 == "__construct__") && (typeof(_arg2[_local10]) == "function"))) {
_local8 = _local8 + (((_arg3 + _local10) + " : ") + l2@.__string_rec(_arg2[_local10], _arg3));
} else {
_local8 = _local8 + ((_arg3 + _local10) + " : <function>");
}
}
_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) {
if (_local7 == 1) {
_local6 = _local6 + l2@.__string_rec(_arg2[_local7], _arg3);
} else {
_local6 = _local6 + ("," + l2@.__string_rec(_arg2[_local7], _arg3));
}
_local7++;
}
return(_local6 + ")");
}
var _local6 = _arg2.length;
var _local8 = "[";
_arg3 = _arg3 + " ";
var _local9 = 0;
var _local10 = _local6;
while (_local9 < _local10) {
_local8 = _local8 + (((_local9 > 0) ? "," : "") + l2@.__string_rec(_arg2[_local9], _arg3));
_local9++;
}
_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 (_local8.length != 2) {
_local8 = _local8 + ",\n";
}
if (!((_local10 == "__construct__") && (typeof(_arg2[_local10]) == "function"))) {
_local8 = _local8 + (((_arg3 + _local10) + " : ") + l2@.__string_rec(_arg2[_local10], _arg3));
} else {
_local8 = _local8 + ((_arg3 + _local10) + " : <function>");
}
}
_arg3 = _arg3.substring(4);
if (_local8.length != 2) {
_local8 = _local8 + newline;
}
_local8 = _local8 + (_arg3 + "}");
return(_local8);
return("<function>");
return(_arg2);
};
l2@ /*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);
};
l2@ /*register */.__instanceof = function (_arg2, _arg3) {
if (_arg2 instanceof _arg3) {
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);
};
l2@ /*register */.__trace = function (_arg2, _arg3) {
var _local4 = kh@.current;
var _local5 = _local4.__trace_txt;
if (_local5 == null) {
_local4.createTextField("__trace_txt", 1048500, 0, 0, 7@V.width, 7@V.height);
_local5 = _local4.__trace_txt;
_local5.selectable = false;
_local4.__trace_lines = new Array();
}
var _local6 = ((_arg3.fileName + ((_arg3.lineNumber == null) ? "" : (":" + _arg3.lineNumber))) + ": ") + l2@.__string_rec(_arg2, "");
var _local7 = _local4.__trace_lines.concat(_local6.split(newline));
_local4.__trace_lines = _local7;
var _local8 = 7@V.height / 16;
if (_local7.length > _local8) {
_local7.splice(0, _local7.length - _local8);
}
_local5.text = _local7.join(newline);
};
l2@ /*register */.__clear_trace = function () {
_root.__trace_txt.removeTextField();
_root.__trace_lines = null;
};
l2@ /*register */.__init = function (_arg2) {
var _local3 = _global.Object;
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});
};
var cca = String.prototype.charCodeAt;
String.prototype.charCodeAt = function (_arg2) {
var _local3 = cca.call(this, _arg2);
if (_local3 <= 0) {
return(null);
}
return(_local3);
};
Set("uq@", _global.Accessibility);
Set("@wg", _global.Camera);
Set("@zP", _global.Color);
Set("cy@", _global.Key);
Set("@mu", _global.LoadVars);
Set("i@I", _global.LocalConnection);
Set("W3@", _global.Microphone);
Set("@CH", _global.Mouse);
Set("FG@", _global.MovieClip);
Set("@GQ", _global.MovieClipLoader);
Set("@1y", _global.PrintJob);
Set("qa@", _global.Selection);
Set("@fU", _global.SharedObject);
Set("f@0", _global.Sound);
Set("7@V", _global.Stage);
Set("BC@", _global.System);
Set("O@X", _global.TextField);
Set("@SA", _global.TextFormat);
Set("@mz", _global.TextSnapshot);
Set("X@Z", _global.Video);
Set("@vw", _global.XMLSocket);
Set("@0q", _global.NetConnection);
Set("2@s", _global.NetStream);
Set("@8r", O@X.StyleSheet);
Set("fR@", BC@.capabilities);
Set("ER@", BC@.security);
Set("5@K", BC@.IME);
kh@._global = _global;
kh@._root = _root;
kh@.current = _arg2;
Int = new _local3[undefined]();
Bool = new _local3[undefined]();
Bool.true = true;
Bool.false = false;
Float = _global.Number;
_arg2["@instanceof"] = l2@.__instanceof;
_arg2["@closure"] = l2@.__closure;
l2@.exc = new Array();
_arg2["@exc"] = l2@.exc;
if (7@V.align == "") {
7@V.align = "LT";
}
};
((BasicType = new Object())).__ename__ = ["BasicType"];
["TBool"].__enum__ = BasicType /*register */;
BasicType /*register */.TBool = ["TBool"];
["TEnum"].__enum__ = BasicType /*register */;
BasicType /*register */.TEnum = ["TEnum"];
["TFloat"].__enum__ = BasicType /*register */;
BasicType /*register */.TFloat = ["TFloat"];
["TFunction"].__enum__ = BasicType /*register */;
BasicType /*register */.TFunction = ["TFunction"];
["TInt"].__enum__ = BasicType /*register */;
BasicType /*register */.TInt = ["TInt"];
["TNull"].__enum__ = BasicType /*register */;
BasicType /*register */.TNull = ["TNull"];
["TObject"].__enum__ = BasicType /*register */;
BasicType /*register */.TObject = ["TObject"];
["TUnknown"].__enum__ = BasicType /*register */;
BasicType /*register */.TUnknown = ["TUnknown"];
((Reflect = function () {
})).__name__ = ["Reflect"];
Reflect /*register */.toString = @class_str;
Reflect /*register */.__super__ = null;
Reflect /*register */.__interfaces__ = [];
_local1 = Reflect /*register */.prototype;
_local1.__class__ = Reflect /*register */;
Reflect /*register */.typeof = function (_arg2) {
var _local3 = typeof(_arg2);
if (_local3 == "number") {
if ((Math.ceil(_arg2) == _arg2) && (isFinite(_arg2))) {
return(BasicType.TInt);
}
return(BasicType.TFloat);
}
if ((_arg2 == true) || (_arg2 == false)) {
return(BasicType.TBool);
}
if (_arg2 == null) {
return(BasicType.TNull);
}
if (_local3 == "function") {
if (_arg2.__interfaces__ == null) {
return(BasicType.TFunction);
}
return(BasicType.TObject);
}
if ((_local3 == "object") || (_local3 == "string")) {
if (_arg2.__enum__ != null) {
return(BasicType.TEnum);
}
return(BasicType.TObject);
}
return(BasicType.TUnknown);
};
Reflect /*register */.empty = function () {
return(new _global.Object());
};
Reflect /*register */.createInstance = function (_arg2, _arg3) {
var _local4 = {__proto__:_arg2.prototype, __constructor__:_arg2};
_arg2.apply(_local4, _arg3);
return(_local4);
};
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 */.getClass = function (_arg2) {
return(_arg2.__class__);
};
Reflect /*register */.resolveClass = function (_arg2) {
var _local3 = eval (_arg2.join("."));
if ((_local3 == null) || (_local3.__interfaces__ == null)) {
return(null);
}
return(_local3);
};
Reflect /*register */.resolveEnum = function (_arg2) {
var _local3 = eval (_arg2.join("."));
if ((_local3 == null) || (_local3.__ename__ == null)) {
return(null);
}
return(_local3);
};
Reflect /*register */.setPrototype = function (_arg2, _arg3) {
_arg2.__proto__ = _arg3;
};
Reflect /*register */.isFunction = function (_arg2) {
return((_arg2.call == _global.Function.call) && (_arg2.__interfaces__ == null));
};
Reflect /*register */.deleteField = function (_arg2, _arg3) {
if (this.hasOwnProperty.call(_arg2, _arg3) == null) {
return(false);
}
delete _arg2[_arg3];
return(true);
};
((wR@ = new Object())).__ename__ = ["my", "Item_State"];
["appearing"].__enum__ = wR@ /*register */;
wR@ /*register */.appearing = ["appearing"];
["none"].__enum__ = wR@ /*register */;
wR@ /*register */.none = ["none"];
["remove"].__enum__ = wR@ /*register */;
wR@ /*register */.remove = ["remove"];
["standing"].__enum__ = wR@ /*register */;
wR@ /*register */.standing = ["standing"];
["toBin"].__enum__ = wR@ /*register */;
wR@ /*register */.toBin = ["toBin"];
((@5S = function (_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8) {
this.state = wR@.appearing;
this.material = _arg2;
this.materialNum = _arg8;
this.number = _arg3;
this.parent = _arg4;
this.mc = kh@.current.attachMovie(("item_" + this.material) + this.number, "mciItem" + _arg5, 3000 + _arg5);
this.mc._rotation = Math.random() * 180;
this.mc._quality = "BEST";
this._id_ = _arg5;
this.initialX = _arg6;
this.initialY = _arg7;
this.moveToInital();
this.mc.onPress = @closure("onPress", this);
this.moveToBin = "";
this.hiddenCount = 0;
})).__construct__ = @5S /*register */;
@5S /*register */.__name__ = ["my", "Item"];
@5S /*register */.toString = @class_str;
@5S /*register */.__super__ = null;
@5S /*register */.__interfaces__ = [];
_local1 = @5S /*register */.prototype;
_local1.__class__ = @5S /*register */;
_local1._id_ = null;
_local1.hiddenCount = null;
_local1.initialX = null;
_local1.initialY = null;
_local1.makeCloud = function (_arg2, _arg3) {
var _local4 = kh@.current.attachMovie("mcCloud", "mciCloud", 12050 + this.parent.clouds.length);
_local4._x = _arg2;
_local4._y = _arg3;
this.parent.clouds.push(_local4);
};
_local1.material = null;
_local1.materialNum = null;
_local1.mc = null;
_local1.moveToBin = null;
_local1.moveToInital = function () {
this.mc._x = this.initialX;
this.mc._y = this.initialY;
};
_local1.number = null;
_local1.onPress = function () {
if (this.material.toUpperCase() == this.parent.currentBin.toUpperCase()) {
if (!this.parent.moving) {
this.parent.moving = true;
this.moveToBin = this.parent.currentBin;
}
}
};
_local1.parent = null;
_local1.remove = function () {
this.mc.removeMovieClip();
this.state = wR@.remove;
};
_local1.state = null;
_local1.update = function () {
if (this.moveToBin != "") {
var _local2 = Reflect.field(kh@.current, "mciBin" + this.parent.currentBin);
this.mc._x = this.mc._x + ((_local2._x - this.mc._x) / 3);
this.mc._y = this.mc._y + ((_local2._y - this.mc._y) / 3);
if (this.mc._y >= (_local2._y - 6)) {
this.makeCloud(this.mc._x, this.mc._y);
this.moveToBin = "";
this.mc._visible = false;
this.mc.removeMovieClip();
this.remove();
this.hiddenCount = 30;
this.moveToInital();
this.parent.selectNewBin();
var _local3 = new f@0();
_local3.attachSound("grow.mp3");
_local3.start();
this.parent.score = this.parent.score + 5;
this.parent.txtScore.text = "Points: " + this.parent.score;
this.parent.moving = false;
}
}
if (this.hiddenCount > 0) {
this.hiddenCount--;
if (this.hiddenCount <= 0) {
this.makeCloud(this.initialX, this.initialY);
var _local4 = this.parent.getLeastPresentMaterial();
if (_local4 == 1) {
var _local2 = "paper";
}
if (_local4 == 2) {
var _local2 = "plastic";
}
if (_local4 == 3) {
var _local2 = "glass";
}
var _local3 = Math.floor(Math.random() * 2) + 1;
this.parent.items.push(new @5S(_local2, _local3, this.parent, this._id_, this.initialX, this.initialY, _local4));
var _local5 = new f@0();
_local5.attachSound("jewel.mp3");
_local5.start();
}
}
};
((IntIter = function (_arg2, _arg3) {
this.min = _arg2;
this.max = _arg3;
})).__construct__ = IntIter /*register */;
IntIter /*register */.__name__ = ["IntIter"];
IntIter /*register */.toString = @class_str;
IntIter /*register */.__super__ = null;
IntIter /*register */.__interfaces__ = [];
_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++);
};
((sO@ = function (_arg2) {
var me = this;
this.id = _global.setInterval(function () {
me.run();
}, _arg2);
})).__construct__ = sO@ /*register */;
sO@ /*register */.__name__ = ["haxe", "Timer"];
sO@ /*register */.toString = @class_str;
sO@ /*register */.__super__ = null;
sO@ /*register */.__interfaces__ = [];
_local1 = sO@ /*register */.prototype;
_local1.__class__ = sO@ /*register */;
sO@ /*register */.delayed = function (f, time) {
return(function () {
var t = new sO@(time);
t.run = function () {
t.stop();
f();
};
});
};
sO@ /*register */.delayedArg = function (f, time) {
return(function (arg) {
var t = new sO@(time);
t.run = function () {
t.stop();
f(arg);
};
});
};
_local1.id = null;
_local1.run = function () {
};
_local1.stop = function () {
_global.clearInterval(this.id);
this.id = null;
};
((Std = function () {
})).__name__ = ["Std"];
Std /*register */.toString = @class_str;
Std /*register */.__super__ = null;
Std /*register */.__interfaces__ = [];
_local1 = Std /*register */.prototype;
_local1.__class__ = Std /*register */;
Std /*register */.is = function (_arg2, _arg3) {
return(l2@.__instanceof(_arg2, _arg3));
};
Std /*register */.string = function (_arg2) {
return(l2@.__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(l2@.__res[_arg2]);
};
((Void = new Object())).__ename__ = ["Void"];
((Bool = new Object())).__ename__ = ["Bool"];
["false"].__enum__ = Bool /*register */;
Bool /*register */.false = ["false"];
["true"].__enum__ = Bool /*register */;
Bool /*register */.true = ["true"];
((Dynamic = new Object())).__ename__ = ["Dynamic"];
((kh@ = function () {
})).__name__ = ["flash", "Lib"];
kh@ /*register */.toString = @class_str;
kh@ /*register */.__super__ = null;
kh@ /*register */.__interfaces__ = [];
_local1 = kh@ /*register */.prototype;
_local1.__class__ = kh@ /*register */;
kh@ /*register */._global = null;
kh@ /*register */._root = null;
kh@ /*register */.current = null;
kh@ /*register */.trace = function (_arg2) {
trace(_arg2);
};
kh@ /*register */.eval = function (_arg2) {
return(eval (_arg2));
};
kh@ /*register */.getURL = function (_arg2, _arg3, _arg4) {
if (_arg4 != null) {
if (!_arg4) {
getURL (_arg2, _arg3, "GET");
} else {
getURL (_arg2, _arg3, "POST");
}
} else if (_arg3 != null) {
getURL (_arg2, _arg3);
} else {
getURL (_arg2, "_self");
}
};
kh@ /*register */.fscommand = function (_arg2, _arg3) {
getURL ("FSCommand:" + _arg2, ((_arg3 == null) ? "" : (_arg3)));
};
kh@ /*register */.print = function (_arg2, _arg3) {
_arg3 = (((_arg3 == "bframe") || (_arg3 == "bmax")) ? ("print:#" + _arg3) : "print:");
getURL (_arg3, _arg2);
};
kh@ /*register */.getTimer = function () {
return(getTimer());
};
kh@ /*register */.getVersion = function () {
return(kh@._root.$version);
};
kh@ /*register */.registerClass = function (_arg2, _arg3) {
kh@._global.Object.registerClass(_arg2, _arg3);
};
kh@ /*register */.throwException = function () {
var _local2 = l2@.exc;
if (_local2.length != 0) {
@exc.push(_local2.pop());
throw _local2.pop();
}
};
((Recycle = function () {
this.positions = new Array();
this.positions.push([50, 70]);
this.positions.push([140, 60]);
this.positions.push([220, 65]);
this.positions.push([310, 60]);
this.positions.push([400, 65]);
this.positions.push([490, 70]);
this.positions.push([40, 160]);
this.positions.push([120, 145]);
this.positions.push([210, 150]);
this.positions.push([300, 145]);
this.positions.push([390, 150]);
this.positions.push([500, 160]);
this.positions.push([50, 240]);
this.positions.push([120, 235]);
this.positions.push([210, 230]);
this.positions.push([300, 240]);
this.positions.push([390, 230]);
this.positions.push([490, 240]);
this.VSMOnly = false;
this.score = 0;
this.currentBin = "";
this.active = true;
this.clouds = new Array();
this.createMenu();
})).__construct__ = Recycle /*register */;
Recycle /*register */.__name__ = ["Recycle"];
Recycle /*register */.toString = @class_str;
Recycle /*register */.__super__ = null;
Recycle /*register */.__interfaces__ = [];
_local1 = Recycle /*register */.prototype;
_local1.__class__ = Recycle /*register */;
Recycle /*register */.main = function () {
new Recycle();
};
_local1.VSMOnly = null;
_local1.active = null;
_local1.clouds = null;
_local1.createGame = function () {
this.moving = false;
var _local2 = kh@.current.attachMovie("mcBinGlass", "mciBinGlass", 100);
_local2._x = 110;
_local2._y = 335;
_local2.stop();
var _local3 = kh@.current.attachMovie("mcTxtGlass", "mciTxtGlass", 110);
_local3._x = 106;
_local3._y = 388;
var _local4 = kh@.current.attachMovie("mcBinPaper", "mciBinPaper", 101);
_local4._x = 263;
_local4._y = 335;
_local4.stop();
var _local5 = kh@.current.attachMovie("mcTxtPaper", "mciTxtPaper", 111);
_local5._x = 260;
_local5._y = 388;
var _local6 = kh@.current.attachMovie("mcBinPlastic", "mciBinPlastic", 102);
_local6._x = 410;
_local6._y = 335;
_local6.stop();
var _local7 = kh@.current.attachMovie("mcTxtPlastic", "mciTxtPlastic", 112);
_local7._x = 408;
_local7._y = 388;
this.selectNewBin();
this.items = new Array();
var _local8 = 0;
var _local9 = 0;
var _local10 = this.positions.iterator();
while (_local10.hasNext()) {
var _local11 = _local10.next();
while (_local8 == _local9) {
_local8 = Math.floor(Math.random() * 3) + 1;
if (_local8 == 1) {
var _local12 = "paper";
}
if (_local8 == 2) {
var _local12 = "plastic";
}
if (_local8 == 3) {
var _local12 = "glass";
}
var _local13 = Math.floor(Math.random() * 2) + 1;
}
_local9 = _local8;
this.items.push(new @5S(_local12, _local13, this, this.items.length, _local11[0], _local11[1], _local8));
}
this.txtScore = kh@.current.createTextField("txtScore", 22001, 5, 3, 160, 35);
_local10 = new @SA("Arial", 18, 16777011, true, false, false);
this.txtScore.setNewTextFormat(_local10);
this.txtScore.selectable = false;
this.txtScore.text = "Points: 0";
this.score = 0;
this.txtTime = kh@.current.createTextField("txtTime", 22003, 428, 3, 160, 35);
this.txtTime.setNewTextFormat(_local10);
this.txtTime.selectable = false;
this.txtTime.text = "-";
this.startTime = Math.round(kh@.getTimer() / 1000);
kh@.current.onEnterFrame = @closure("mainLoopGame", this);
this.active = true;
};
_local1.createMenu = function () {
kh@.current.attachMovie("mcBackground", "mcBg", 0);
var _local2 = kh@.current.attachMovie("mcMenuImg", "mciMenuImg", 101);
_local2._x = 15;
_local2._y = 14;
var _local3 = kh@.current.attachMovie("mcTitle", "mciTitle", 102);
_local3._x = 255;
_local3._y = 42;
var mc2 = kh@.current.attachMovie("mcPlay", "mciPlay", 103);
mc2._x = 327;
mc2._y = 160;
mc2.onPress = @closure("gotoGame", this);
mc2.gotoAndStop(1);
mc2.onRollOver = function () {
mc2.gotoAndStop(2);
};
mc2.onRollOut = function () {
mc2.gotoAndStop(1);
};
var _local4 = kh@.current.attachMovie("mcInstr", "mciInstr", 104);
_local4._x = 229;
_local4._y = 245;
if (!this.VSMOnly) {
var _local5 = kh@.current.attachMovie("mcBtnVital", "mciBtnVSM", 105);
_local5._x = 260;
_local5._y = 350;
_local5.onPress = @closure("openVSM", this);
var _local6 = kh@.current.attachMovie("mcBtnMidori", "mciBtnMidori", 106);
_local6._x = 354;
_local6._y = 350;
_local6.onPress = @closure("openMidori", this);
var _local7 = kh@.current.attachMovie("mcBtnBKG", "mciBtnBKG", 107);
_local7._x = 449;
_local7._y = 350;
_local7.onPress = @closure("openBKG", this);
} else {
var _local5 = kh@.current.attachMovie("mcBtnVital", "mciBtnVSM", 105);
_local5._x = 449;
_local5._y = 350;
_local5.onPress = @closure("openVSM", this);
}
};
_local1.currentBin = null;
_local1.exitGame = function () {
kh@.current._visible = false;
kh@._root.gotoAndStop("igre");
};
_local1.getLeastPresentMaterial = function () {
var _local2 = new Array();
_local2[1] = 0;
_local2[2] = 0;
_local2[3] = 0;
var _local3 = this.items.iterator();
while (_local3.hasNext()) {
var _local4 = _local3.next();
if (_local4.state != wR@.remove) {
_local2[_local4.materialNum] = _local2[_local4.materialNum] + 1;
}
}
_local3 = 100000 /* 0x0186A0 */;
var _local5 = 1;
var _local6 = 4;
while (_local5 < _local6) {
if (_local2[_local5] < 3) {
return(_local5);
}
_local5++;
}
return(Math.floor(Math.random() * 3) + 1);
};
_local1.gotoGame = function () {
var _local2 = new f@0();
_local2.attachSound("menuselect.mp3");
_local2.start();
this.hideMenu();
this.createGame();
};
_local1.hideMenu = function () {
kh@.current.mciPlay.removeMovieClip();
kh@.current.mciTitle.removeMovieClip();
kh@.current.mciMenuImg.removeMovieClip();
kh@.current.mciInstr.removeMovieClip();
kh@.current.mciExit.removeMovieClip();
if (!this.VSMOnly) {
kh@.current.mciBtnBKG.removeMovieClip();
kh@.current.mciBtnMidori.removeMovieClip();
}
kh@.current.mciBtnVSM.removeMovieClip();
};
_local1.items = null;
_local1.mainLoopGame = function () {
var _local2 = this.clouds.iterator();
while (_local2.hasNext()) {
var _local3 = _local2.next();
if (_local3._currentframe == _local3._totalframes) {
_local3.removeMovieClip();
this.clouds.remove(_local3);
}
}
if (!this.active) {
if (this.toMenuCounter > 50) {
_local2 = kh@.current.createTextField("txtClickMenu", 32014, 183, 200, 200, 35);
var _local3 = new @SA("Arial", 12, 16777011, true, false, false, "", "", "center");
_local2.setNewTextFormat(_local3);
_local2.selectable = false;
_local2.text = "click to return to menu";
kh@.current.mciOverlay.onPress = @closure("returnToMenu", this);
this.toMenuCounter = -1;
}
if (this.toMenuCounter >= 0) {
this.toMenuCounter++;
}
} else {
_local2 = this.items.iterator();
while (_local2.hasNext()) {
var _local3 = _local2.next();
_local3.update();
if (_local3.state == wR@.remove) {
}
}
_local2 = 60 - Math.round((kh@.getTimer() / 1000) - this.startTime);
var _local3 = "Seconds: " + _local2;
if (this.txtTime.text != _local3) {
this.txtTime.text = _local3;
if (_local2 <= 0) {
var _local4 = kh@.current.attachMovie("mcTimeUp", "mciTimeUp", 30001);
_local4._x = 280;
_local4._y = 120;
var _local5 = kh@.current.createTextField("txtScore2", 32011, 183, 170, 200, 35);
var _local6 = new @SA("Arial", 18, 16777011, true, false, false, "", "", "center");
_local5.setNewTextFormat(_local6);
_local5.selectable = false;
_local5.text = ("You earned " + this.score) + " points!";
var _local7 = kh@.current.createEmptyMovieClip("mciOverlay", 30000);
_local7.beginFill(9013679);
_local7.moveTo(0, 0);
_local7.lineTo(550, 0);
_local7.lineTo(550, 400);
_local7.lineTo(0, 400);
_local7._alpha = 80;
_local7.endFill();
this.active = false;
this.toMenuCounter = 0;
}
}
}
};
_local1.mainLoopMenu = function () {
};
_local1.moving = null;
_local1.openBKG = function () {
kh@.getURL("http://www.bravekidgames.com?ref=recycle2", "", false);
};
_local1.openMidori = function () {
kh@.getURL("http://www.midoritech.com?ref=recycle2", "", false);
};
_local1.openVSM = function () {
kh@.getURL("http://www.vitalsudmorvan.org?ref=recycle2", "", false);
};
_local1.positions = null;
_local1.returnToMenu = function () {
kh@.current.mciBinGlass.removeMovieClip();
kh@.current.mciTxtGlass.removeMovieClip();
kh@.current.mciBinPaper.removeMovieClip();
kh@.current.mciTxtPaper.removeMovieClip();
kh@.current.mciBinPlastic.removeMovieClip();
kh@.current.mciTxtPlastic.removeMovieClip();
kh@.current.mciTimeUp.removeMovieClip();
kh@.current.mciOverlay.removeMovieClip();
kh@.current.txtTime.removeTextField();
kh@.current.txtScore.removeTextField();
kh@.current.txtClickMenu.removeTextField();
kh@.current.txtScore2.removeTextField();
var _local2 = this.items.iterator();
while (_local2.hasNext()) {
var _local3 = _local2.next();
_local3.remove();
}
_local2 = 0;
var _local3 = 3;
while (_local2 < _local3) {
_local2++;
}
this.createMenu();
};
_local1.score = null;
_local1.selectNewBin = function () {
if (this.currentBin != "") {
Reflect.field(kh@.current, "mciBin" + this.currentBin).gotoAndStop(1);
}
var _local2 = Math.round(Math.random() * 3);
if (_local2 != 1) {
if (_local2 != 2) {
var _local3 = "Glass";
} else {
var _local3 = "Plastic";
}
} else {
var _local3 = "Paper";
}
this.currentBin = _local3;
Reflect.field(kh@.current, "mciBin" + _local3).gotoAndStop(2);
};
_local1.startTime = null;
_local1.toMenuCounter = null;
_local1.txtScore = null;
_local1.txtTime = null;
((@Main = function () {
})).__name__ = ["@Main"];
@Main /*register */.toString = @class_str;
@Main /*register */.__super__ = null;
@Main /*register */.__interfaces__ = [];
_local1 = @Main /*register */.prototype;
_local1.__class__ = @Main /*register */;
if (!flash) {
flash = new Object();
}
flash.Boot = l2@;
Set("FG@", flash.MovieClip);
Set("O@X", flash.TextField);
Set("@8r", flash.text.StyleSheet);
Set("cy@", flash.Key);
if (!my) {
my = new Object();
}
my.Item = @5S;
Set("@0q", flash.NetConnection);
Set("qa@", flash.Selection);
Set("@zP", flash.Color);
my.Item_State = wR@;
Set("5@K", flash.system.IME);
Set("@fU", flash.SharedObject);
Set("@wg", flash.Camera);
if (!haxe) {
haxe = new Object();
}
haxe.Timer = sO@;
Set("@SA", flash.TextFormat);
Set("BC@", flash.System);
Set("@GQ", flash.MovieClipLoader);
Set("7@V", flash.Stage);
Set("fR@", flash.system.Capabilities);
Set("W3@", flash.Microphone);
Set("2@s", flash.NetStream);
Set("@vw", flash.XMLSocket);
Set("@mz", flash.TextSnapshot);
Set("X@Z", flash.Video);
Set("uq@", flash.Accessibility);
Set("@1y", flash.PrintJob);
flash.Lib = kh@;
Set("@CH", flash.Mouse);
Set("f@0", flash.Sound);
Set("ER@", flash.system.Security);
Set("@mu", flash.LoadVars);
Set("i@I", flash.LocalConnection);
l2@.__init(this);
l2@.__res = {};
try {
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));
};
@Main.init = Recycle.main();
} catch(_local) {
(l2@.__trace( /* Error999 */
, {fileName:"(uncaught exception)"}));// not popped
}