Frame 1
game.core.Core.getInstance(this);
Frame 2
gdp.core.process.ProcessManager.getInstance().run();
Frame 3
gotoAndPlay(_currentframe - 1);
Symbol 16 MovieClip Frame 1
stop();
Symbol 17 MovieClip [fruitAnim_4] Frame 1
stop();
var onEnterFrame = function () {
if ((nDelay--) == 0) {
play();
this.onEnterFrame = null;
}
};
Symbol 17 MovieClip [fruitAnim_4] Frame 20
stop();
Symbol 29 MovieClip [fruits] Frame 1
stop();
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 13
gotoAndPlay (2);
Symbol 34 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 70
stop();
Symbol 42 MovieClip Frame 70
stop();
Symbol 46 MovieClip Frame 70
stop();
Symbol 49 MovieClip Frame 70
stop();
Symbol 52 MovieClip Frame 70
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 16
gotoAndPlay (2);
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 26
gotoAndStop (1);
Symbol 63 MovieClip [Core] Frame 1
#initclip 171
Object.registerClass("Core", game.core.Core);
#endinitclip
Symbol 98 MovieClip Frame 18
startTime = getTimer();
Symbol 98 MovieClip Frame 20
if ((getTimer() - startTime) > 5000) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 171 MovieClip Frame 17
stop();
Symbol 175 MovieClip Frame 17
stop();
Symbol 278 MovieClip Frame 208
gotoAndPlay (1);
Symbol 370 MovieClip Frame 279
gotoAndPlay (1);
Symbol 446 MovieClip Frame 642
gotoAndPlay (1);
Symbol 496 MovieClip Frame 25
stop();
Symbol 500 MovieClip Frame 209
gotoAndPlay (1);
Symbol 509 MovieClip Frame 40
function getDepths(mcField, nWidth, nHeight, nStepX, nStepY) {
var _local4 = new Array();
var _local3 = mcField.getNextHighestDepth();
var _local2 = _local3;
while (_local2 <= nWidth) {
var _local1 = 0;
while (_local1 <= nHeight) {
_local4.push(_local3++);
_local1 = _local1 + nStepY;
}
_local2 = _local2 + nStepX;
}
_local4.sort(shuffle);
return(_local4);
}
function shuffle(nA, nB) {
return([-1, 0, 1][random(3)]);
}
function fillField(mcField, nWidth, nHeight, nStepX, nStepY) {
var _local7 = getDepths(mcField, nWidth, nHeight, nStepX, nStepY);
var _local6 = 0;
var _local2 = nHeight;
while (_local2 >= 0) {
var _local1 = 0;
while (_local1 <= nWidth) {
var _local3 = mcField.attachMovie("fruitAnim_4", ("mcFruit__" + _local1) + _local2, _local7.pop(), {_x:_local1, _y:_local2});
_local3.nDelay = _local6 + random(5);
_local3.mcFruit.gotoAndStop(random(6) + 1);
_local1 = _local1 + nStepX;
}
_local6 = _local6 + 5;
_local2 = _local2 - nStepY;
}
}
mcFruitField._field_.removeMovieClip();
var mc = mcFruitField.createEmptyMovieClip("_field_", mcFruitField.getNextHighestDepth());
fillField(mc, 200, 400, 20, 30);
Symbol 509 MovieClip Frame 160
gotoAndPlay (1);
Symbol 555 MovieClip Frame 40
stop();
Symbol 556 MovieClip Frame 1
stop();
Symbol 556 MovieClip Frame 59
this.banim = false;
stop();
Symbol 556 MovieClip Frame 114
this.banim = false;
stop();
Symbol 556 MovieClip Frame 153
this.banim = false;
stop();
Symbol 556 MovieClip Frame 211
this.banim = false;
stop();
Symbol 556 MovieClip Frame 212
stop();
Symbol 583 MovieClip Frame 1
stop();
Symbol 583 MovieClip Frame 2
stop();
Symbol 583 MovieClip Frame 3
stop();
Symbol 583 MovieClip Frame 4
stop();
Symbol 583 MovieClip Frame 5
stop();
Symbol 583 MovieClip Frame 6
stop();
Symbol 597 MovieClip Frame 1
stop();
Symbol 597 MovieClip Frame 2
stop();
Symbol 597 MovieClip Frame 3
stop();
Symbol 597 MovieClip Frame 4
stop();
Symbol 597 MovieClip Frame 5
stop();
Symbol 630 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 1
stop();
Symbol 650 MovieClip Frame 25
stop();
Symbol 653 MovieClip Frame 1
btnOK._visible = false;
Symbol 653 MovieClip Frame 26
function getDepths(mcField, nWidth, nHeight, nStepX, nStepY) {
var _local4 = new Array();
var _local3 = mcField.getNextHighestDepth();
var _local2 = _local3;
while (_local2 <= nWidth) {
var _local1 = 0;
while (_local1 <= nHeight) {
_local4.push(_local3++);
_local1 = _local1 + nStepY;
}
_local2 = _local2 + nStepX;
}
_local4.sort(shuffle);
return(_local4);
}
function shuffle(nA, nB) {
return([-1, 0, 1][random(3)]);
}
function fillField(mcField, nWidth, nHeight, nStepX, nStepY) {
var _local7 = getDepths(mcField, nWidth, nHeight, nStepX, nStepY);
var _local6 = 0;
var _local2 = nHeight;
while (_local2 >= 0) {
var _local1 = 0;
while (_local1 <= nWidth) {
var _local3 = mcField.attachMovie("fruitAnim_4", ("mcFruit___" + _local1) + _local2, _local7.pop(), {_x:_local1, _y:_local2});
_local3.nDelay = _local6 + random(5);
_local3.mcFruit.gotoAndStop(random(6) + 1);
_local1 = _local1 + nStepX;
}
_local6 = _local6 + 5;
_local2 = _local2 - nStepY;
}
}
fillField(mcFruitField, 200, 205, 20, 30);
Symbol 653 MovieClip Frame 80
btnOK._visible = true;
stop();
Symbol 679 MovieClip Frame 1
stop();
_root.ananas.gotoAndPlay(2);
Symbol 800 MovieClip Frame 2
stop();
Symbol 800 MovieClip Frame 27
stop();
Symbol 800 MovieClip Frame 52
stop();
Symbol 800 MovieClip Frame 77
stop();
Symbol 800 MovieClip Frame 102
stop();
Symbol 800 MovieClip Frame 152
stop();
Symbol 800 MovieClip Frame 192
stop();
Symbol 800 MovieClip Frame 216
stop();
Symbol 800 MovieClip Frame 242
stop();
Symbol 800 MovieClip Frame 272
stop();
Symbol 800 MovieClip Frame 300
stop();
Symbol 819 MovieClip Frame 25
if (this.cur == 16) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 50
if (this.cur == 17) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 75
if (this.cur == 18) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 100
if (this.cur == 19) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 150
if (this.cur == 20) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 200
if (this.cur == 21) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 225
if (this.cur == 22) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 250
if (this.cur == 23) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 275
if (this.cur == 24) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 300
if (this.cur == 25) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 325
if (this.cur == 24) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 350
if (this.cur == 23) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 375
if (this.cur == 22) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 400
if (this.cur == 21) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 450
if (this.cur == 20) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 500
if (this.cur == 19) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 525
if (this.cur == 18) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 550
if (this.cur == 17) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 575
if (this.cur == 16) {
this.bmove = false;
stop();
}
Symbol 819 MovieClip Frame 600
if (this.cur == 15) {
this.bmove = false;
stop();
}
Symbol 915 MovieClip Frame 2
stop();
Symbol 915 MovieClip Frame 27
stop();
Symbol 915 MovieClip Frame 52
stop();
Symbol 915 MovieClip Frame 82
stop();
Symbol 915 MovieClip Frame 112
stop();
Symbol 915 MovieClip Frame 137
stop();
Symbol 915 MovieClip Frame 162
stop();
Symbol 915 MovieClip Frame 197
stop();
Symbol 915 MovieClip Frame 227
stop();
Symbol 915 MovieClip Frame 267
stop();
Symbol 915 MovieClip Frame 307
stop();
Symbol 915 MovieClip Frame 342
stop();
Symbol 915 MovieClip Frame 372
stop();
Symbol 915 MovieClip Frame 432
stop();
Symbol 922 MovieClip Frame 1
Symbol 922 MovieClip Frame 25
if (this.cur == 2) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 50
if (this.cur == 3) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 75
if (this.cur == 4) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 100
if (this.cur == 5) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 125
if (this.cur == 6) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 150
if (this.cur == 7) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 200
if (this.cur == 8) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 250
if (this.cur == 9) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 275
if (this.cur == 10) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 300
if (this.cur == 11) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 325
if (this.cur == 12) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 350
if (this.cur == 13) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 375
if (this.cur == 14) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 400
if (this.cur == 13) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 425
if (this.cur == 12) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 450
if (this.cur == 11) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 475
if (this.cur == 10) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 500
if (this.cur == 9) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 550
if (this.cur == 8) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 600
if (this.cur == 7) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 625
if (this.cur == 6) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 650
if (this.cur == 5) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 675
if (this.cur == 4) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 700
if (this.cur == 3) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 725
if (this.cur == 2) {
this.bmove = false;
stop();
}
Symbol 922 MovieClip Frame 750
if (this.cur == 1) {
this.bmove = false;
stop();
}
Symbol 949 MovieClip Frame 1
Symbol 949 MovieClip Frame 77
stop();
Symbol 949 MovieClip Frame 152
stop();
Symbol 949 MovieClip Frame 227
stop();
Symbol 1001 MovieClip [__Packages.gdp.core.base.SimpleMovieClip] Frame 0
class gdp.core.base.SimpleMovieClip extends MovieClip
{
var _yscale, _xscale, _alpha, _height, _width, _name;
function SimpleMovieClip () {
super();
nClassId = nClassCounter++;
}
function description() {
var _local2 = {_name:_name, _width:_width, _height:_height, _alpha:_alpha, _xscale:_xscale, _yscale:_yscale};
return("BaseMovieClip " + gdp.utils.ObjectUtil.classToString(_local2, true));
}
function toString() {
return(description.apply(this, arguments));
}
function getClass() {
return(gdp.env.reflect.ClassInfo.forInstance(this).getType());
}
function getClassName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getName());
}
function getPackageName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getPackage().getName());
}
function getClassNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getFullName());
}
function isEqual(anObject) {
return(this == anObject);
}
function createEmptyMovieClipWithParams(sName, nDepth, oParams) {
super.createEmptyMovieClip(sName, nDepth);
var _local4 = this[sName];
for (var _local5 in oParams) {
_local4[_local5] = oParams[_local5];
}
return(_local4);
}
static var bCompiledByMTASC = false;
static var nClassCounter = 0;
var nClassId = 0;
}
Symbol 1002 MovieClip [__Packages.gdp.utils.ObjectUtil] Frame 0
class gdp.utils.ObjectUtil
{
function ObjectUtil () {
}
static function classToString(oClass, bNotWrap) {
if (oClass == undefined) {
return("{}");
}
var _local4 = ((!bNotWrap) ? newline : "");
var _local2 = getPrimitivesOnly(oClass);
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = ((_local1 == 0) ? "{" : ", ") + ((!bNotWrap) ? "\n\t" : "");
if (_local2[_local1].data instanceof String) {
_local4 = _local4 + ((((_local3 + _local2[_local1].sName) + ":\"") + _local2[_local1].data) + "\"");
} else if (_local2[_local1].data instanceof Array) {
_local4 = _local4 + ((((_local3 + _local2[_local1].sName) + ":[") + _local2[_local1].data) + "]");
} else {
_local4 = _local4 + (((_local3 + _local2[_local1].sName) + ":") + _local2[_local1].data);
}
_local1++;
}
_local4 = _local4 + ((_local4 == "") ? "{}" : (((!bNotWrap) ? "\n}" : "}")));
return(_local4);
}
static function clone(value) {
if (value.clone instanceof Function) {
return(value.clone());
}
var _local2 = new Object();
for (var _local3 in value) {
if (typeof(value[_local3]) == "object") {
_local2[_local3] = copy(value[_local3]);
} else {
_local2[_local3] = value[_local3];
}
}
return(_local2);
}
static function copy(value) {
return(clone(value));
}
static function mergeObjects(oParent, oChild, ow) {
var _local3;
var _local4;
for (var _local6 in oChild) {
_local3 = oParent[_local6] != undefined;
if (typeof(oChild[_local6].toString()) == "object") {
if (!_local3) {
oParent[_local6] = oChild[_local6];
}
_local4 = oParent[_local6];
_local4 = _local4.mergeObjects(oChild[_local6], ow);
} else {
if (!_local3) {
oParent[_local6] = oChild[_local6];
}
if (_local3 && (ow)) {
oParent[_local6] = oChild[_local6];
}
}
}
}
static function getPrimitivesOnly(oObject, aWithout) {
var _local3 = new Array();
for (var _local7 in oObject) {
if (gdp.utils.ArrayUtil.contains(aWithout, _local7)) {
continue;
}
var _local2 = {sName:_local7, data:oObject[_local7]};
switch (typeof(oObject[_local7])) {
case "string" :
case "boolean" :
case "number" :
_local3.push(_local2);
break;
case "object" :
if (oObject[_local7] instanceof Array) {
_local3.push(_local2);
} else {
if (oObject[_local7].toString() == "[object]") {
break;
}
_local3.push({sName:_local7, data:oObject[_local7].toString(true)});
}
}
}
return(_local3);
}
static function toXMLFormatString(oData) {
var _local2 = "";
for (var _local3 in oData) {
if (typeof(oData[_local3]) == "object") {
_local2 = _local2 + (((((("<" + _local3) + ">") + toXML(oData[_local3])) + "</") + _local3) + ">");
} else if ((typeof(oData[_local3]) == "number") || (typeof(oData[_local3]) == "string")) {
_local2 = _local2 + (((((("<" + _local3) + ">") + oData[_local3]) + "</") + _local3) + ">");
} else if (oData[_local3] == undefined) {
_local2 = _local2 + (((("<" + _local3) + "></") + _local3) + ">");
}
}
return(_local2);
}
static function toXML(oData) {
return(new XML(toXMLFormatString(oData)));
}
static function fromXML(xml) {
return(gdp.utils.XMLUtil.toObject(xml));
}
static function typesMatch(object, type) {
if (type === Object) {
return(true);
}
if (isPrimitiveType(object)) {
var _local2 = typeof(object);
if (((type === String) || (gdp.utils.ClassUtil.isSubClassOf(type, String))) && (_local2 == TYPE_STRING)) {
return(true);
}
if (((type === Boolean) || (gdp.utils.ClassUtil.isSubClassOf(type, Boolean))) && (_local2 == TYPE_BOOLEAN)) {
return(true);
}
if (((type === Number) || (gdp.utils.ClassUtil.isSubClassOf(type, Number))) && (_local2 == TYPE_NUMBER)) {
return(true);
}
return(false);
}
return(isInstanceOf(object, type));
}
static function isPrimitiveType(object) {
var _local1 = typeof(object);
return(((_local1 == TYPE_STRING) || (_local1 == TYPE_NUMBER)) || (_local1 == TYPE_BOOLEAN));
}
static function isTypeOf(object, type) {
return(typeof(object) == type);
}
static function isInstanceOf(object, type) {
if (type === Object) {
return(true);
}
return(object instanceof type);
}
static function isExplicitInstanceOf(object, clazz) {
if (clazz == String) {
return(typeof(object) == TYPE_STRING);
}
if (clazz == Number) {
return(typeof(object) == TYPE_NUMBER);
}
if (clazz == Boolean) {
return(typeof(object) == TYPE_BOOLEAN);
}
return((object instanceof clazz) && (!(object.__proto__ instanceof clazz)));
}
static function equals(valueA, valueB) {
if (isPrimitiveType(valueA) && (isPrimitiveType(valueB))) {
return(equalsPrimitive(valueA, valueB));
}
if ((!isPrimitiveType(valueA)) && (!isPrimitiveType(valueB))) {
if (((valueA.isEqual != null) && (valueB.isEqual != null)) && (valueA.isEqual(valueB))) {
return(true);
}
return(valueA == valueB);
}
return(false);
}
static function equalsPrimitive(valueA, valueB) {
return(valueA == valueB);
}
static function isSimpleObject(value) {
if (!(value instanceof Object)) {
return(false);
}
for (var _local2 in value) {
if ((!isPrimitiveType(value[_local2])) && (value[_local2] != null)) {
return(false);
}
}
return(true);
}
static function isSimpleTypedObject(value) {
if (!(value.constructor === Object)) {
return(false);
}
var _local2 = new Array();
for (var _local3 in value) {
_local2.push(value[_local3]);
}
if (!gdp.utils.ArrayUtil.isTypedPrimitiveArray(_local2)) {
return(false);
}
return(true);
}
static function getTypeOfSimpleTypedObject(value) {
if (!isSimpleTypedObject(value)) {
return(null);
}
var _local2 = new Array();
for (var _local3 in value) {
_local2.push(value[_local3]);
}
return(typeof(_local2[0]));
}
static function isSimpleComplexObject(value) {
if (!(value instanceof Object)) {
return(false);
}
for (var _local2 in value) {
if (value[_local2] instanceof Array) {
if (gdp.utils.ArrayUtil.isTypedPrimitiveArray(value[_local2])) {
return(false);
}
} else if ((!isPrimitiveType(value[_local2])) && (value[_local2] != null)) {
return(false);
}
}
return(true);
}
static function getObjectInfo(value) {
var _local2 = new Array();
for (var _local3 in value) {
_local2.push([_local3, value[_local3]]);
}
return(_local2);
}
static var TYPE_STRING = "string";
static var TYPE_NUMBER = "number";
static var TYPE_OBJECT = "object";
static var TYPE_BOOLEAN = "boolean";
static var TYPE_MOVIECLIP = "movieclip";
static var TYPE_FUNCTION = "function";
static var TYPE_UNDEFINED = "undefined";
static var TYPE_NULL = "null";
}
Symbol 1003 MovieClip [__Packages.gdp.utils.ArrayUtil] Frame 0
class gdp.utils.ArrayUtil
{
function ArrayUtil () {
}
static function fillArray(nSize, value) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < nSize) {
_local2.push(value);
_local1++;
}
return(_local2);
}
static function getRandElem(aArray, nSt, nEnd) {
var _local1 = aArray.slice(nSt | 0, nEnd | aArray.length);
return(_local1[random(_local1.length)]);
}
static function getActualNumbers(aValues, nMinNumber, nMaxNumber) {
var _local6 = aValues.length;
var _local5 = aValues[0];
var _local7 = aValues[_local6 - 1];
if ((_local5 == nMinNumber) && (_local7 == nMaxNumber)) {
return(aValues);
}
var _local4 = new Array();
var _local2;
var _local1 = 0;
while (_local1 < _local6) {
_local2 = (aValues[_local1] - _local5) + nMinNumber;
_local4.push((_local2 / _local7) * nMaxNumber);
_local1++;
}
return(_local4);
}
static function contains(aArray, object) {
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1] === object) {
return(true);
}
_local1++;
}
return(false);
}
static function find(aArray, object) {
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1] === object) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function allItemsToNumber(aArray) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < aArray.length) {
_local3.push(Number(aArray[_local1]));
_local1++;
}
return(_local3);
}
static function trim(aArray) {
return(leftTrim(rightTrim(aArray)));
}
static function leftTrim(aArray) {
return(leftTrimForValues(aArray, [null, undefined]));
}
static function rightTrim(aArray) {
return(rightTrimForValues(aArray, [null, undefined]));
}
static function leftTrimForValues(aArray, aValues) {
var _local3 = aArray.concat();
var _local2 = 0;
while (_local2 < _local3.length) {
var _local1 = 0;
while (_local1 < aValues.length) {
if (_local3[_local2] == aValues[_local1]) {
_local3.splice(_local2, 1);
} else {
return(_local3);
}
_local1++;
}
_local2--;
_local2++;
}
return(_local3);
}
static function rightTrimForValues(aArray, aValues) {
var _local3 = aArray.concat();
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
var _local1 = 0;
while (_local1 < aValues.length) {
if (_local3[_local2] == aValues[_local1]) {
_local3.splice(_local2, 1);
} else {
return(_local3);
}
_local1++;
}
_local2--;
}
return(_local3);
}
static function merge() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < arguments.length) {
_local3 = _local3.concat(arguments[_local2]);
_local2++;
}
return(_local3);
}
static function removeDuplicate(aArray) {
var _local1 = 0;
while (_local1 < aArray.length) {
var _local3 = find(aArray, aArray[_local1]);
if ((_local3 != -1) && (_local3 != _local1)) {
aArray.splice(_local1--, 1);
}
_local1++;
}
return(aArray);
}
static function equals(aA, aB) {
if (aA == aB) {
return(true);
}
if (aA.length != aB.length) {
return(false);
}
var _local1 = 0;
while (_local1 < aA.length) {
if (!gdp.utils.ObjectUtil.equals(aA[_local1], aB[_local1])) {
return(false);
}
_local1++;
}
return(true);
}
static function isTypedPrimitiveArray(aArray) {
var _local3 = typeof(aArray[0]);
var _local1 = 1;
while (_local1 < aArray.length) {
if (aArray[_local1] instanceof Object) {
return(false);
}
if ((typeof(aArray[_local1]) != _local3) && (aArray[_local1] != null)) {
return(false);
}
_local1++;
}
return(true);
}
static function isMatrix(aArray) {
if (aArray instanceof gdp.core.type.array.Matrix) {
return(true);
}
var _local3 = aArray[0].length;
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1].length != _local3) {
return(false);
}
_local1++;
}
return(true);
}
static function matrixToString(aMatrix, sRowSeparator, sColSeparator) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < aMatrix.length) {
_local3.push(aMatrix[_local1].join(sColSeparator));
_local1++;
}
return(_local3.join(sRowSeparator));
}
}
Symbol 1004 MovieClip [__Packages.gdp.core.type.array.Array2D] Frame 0
class gdp.core.type.array.Array2D extends Array
{
function Array2D (nRows, nCols, defaultValue) {
super();
initArray(nRows, nCols, defaultValue);
}
function initArray(nRows, nCols, defaultValue) {
this.nRows = nRows;
this.nCols = nCols;
var _local4 = 0;
while (_local4 < nRows) {
this[_local4] = new Array(nCols);
var _local3 = 0;
while (_local3 < nCols) {
if (defaultValue instanceof Function) {
this[_local4][_local3] = defaultValue();
} else if (defaultValue.clone != null) {
this[_local4][_local3] = defaultValue.clone();
} else {
this[_local4][_local3] = defaultValue;
}
_local3++;
}
_local4++;
}
_global.ASSetPropFlags(this, ["nRows", "nCols"], 1, true);
}
function getRowLength(Void) {
return(nRows);
}
function getColLength(Void) {
return(nCols);
}
function getUp(nRow, nCol) {
return(this[nRow][nCol - 1]);
}
function getDown(nRow, nCol) {
return(this[nRow][nCol + 1]);
}
function getRight(nRow, nCol) {
return(this[nRow + 1][nCol]);
}
function getLeft(nRow, nCol) {
return(this[nRow - 1][nCol]);
}
function getUpLeft(nRow, nCol) {
return(this[nRow - 1][nCol - 1]);
}
function getUpRight(nRow, nCol) {
return(this[nRow + 1][nCol - 1]);
}
function getDownLeft(nRow, nCol) {
return(this[nRow - 1][nCol + 1]);
}
function getDownRight(nRow, nCol) {
return(this[nRow + 1][nCol + 1]);
}
var nRows = null;
var nCols = null;
}
Symbol 1005 MovieClip [__Packages.gdp.core.type.array.Matrix] Frame 0
class gdp.core.type.array.Matrix extends gdp.core.type.array.Array2D
{
var initArray, nRows;
function Matrix (nSize, nDefaultValue) {
super();
initArray(nSize, nSize, nDefaultValue);
}
static function fromArray(aArray) {
var _local4 = new gdp.core.type.array.Matrix(getMatrixSize(aArray), null);
var _local2 = 0;
while (_local2 < aArray.length) {
var _local1 = 0;
while (_local1 < aArray[_local1].length) {
_local4[_local2][_local1] = aArray[_local2][_local1];
_local1++;
}
_local2++;
}
return(_local4);
}
static function getMatrixSize(aArray) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < aArray.length) {
if (aArray[_local1].length > _local3) {
_local3 = aArray[_local1].length;
}
_local1++;
}
return(_local3);
}
function getSize(Void) {
return(nRows);
}
}
Symbol 1006 MovieClip [__Packages.gdp.core.base.SimpleClass] Frame 0
class gdp.core.base.SimpleClass
{
function SimpleClass () {
nClassId = nClassCounter++;
}
function description() {
return(getClassNameWithPackage());
}
function toString() {
return(description.apply(this, arguments));
}
function getClass() {
return(gdp.env.reflect.ClassInfo.forInstance(this).getType());
}
function getClassName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getName());
}
function getPackageName(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getPackage().getName());
}
function getClassNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forInstance(this).getFullName());
}
function isEqual(anObject) {
return(this == anObject);
}
function memberWiseClone() {
var _local2 = new Object();
var _local4 = getClass();
_local2.__proto__ = _local4.prototype;
_local2.__constructor__ = _local4;
_local4.apply(_local2);
for (var _local3 in this) {
_local2[_local3] = this[_local3];
}
return(gdp.core.base.BaseClass(_local2));
}
static var nClassCounter = 0;
var nClassId = 0;
}
Symbol 1007 MovieClip [__Packages.gdp.env.events.IEventDispatcher] Frame 0
interface gdp.env.events.IEventDispatcher
{
}
Symbol 1008 MovieClip [__Packages.gdp.env.events.Event] Frame 0
class gdp.env.events.Event extends gdp.core.base.SimpleClass
{
var getClass, getClassName;
function Event (sType, bBubbles, bCancelable) {
super();
this.sType = sType;
if (bBubbles != null) {
this.bBubbles = bBubbles;
}
if (bCancelable != null) {
this.bCancelable = bCancelable;
}
}
function isBubbles(Void) {
return(bBubbles);
}
function isCancelable(Void) {
return(bCancelable);
}
function getCurrentTarget(Void) {
return(oCurrentTarget);
}
function getEventPhase(Void) {
return(nEventPhase);
}
function getTarget(Void) {
return(oTarget);
}
function getType(Void) {
return(sType);
}
function clone(Void) {
return(gdp.env.events.Event(gdp.utils.ClassUtil.createInstance(getClass(), [sType, bBubbles, bCancelable])));
}
function isDefaultPrevented(Void) {
return(null);
}
function preventDefault(Void) {
}
function stopImmediatePropagation(Void) {
}
function stopPropagation(Void) {
}
function description(Void) {
var _local2 = {type:sType, bubbles:bBubbles, cancelable:bCancelable, currentTarget:oCurrentTarget.toString(), eventPhase:nEventPhase, target:oTarget.toString()};
return(getClassName() + gdp.utils.ObjectUtil.classToString(_local2, true));
}
static var ACTIVATE = "activate";
static var ADDED = "added";
static var CANCEL = "cancel";
static var CHANGE = "change";
static var CLOSE = "close";
static var COMPLETE = "complete";
static var CONNECT = "connect";
static var DEACTIVATE = "deactivate";
static var ENTER_FRAME = "enterFrame";
static var ID3 = "id3";
static var INIT = "init";
static var MOUSE_LEAVE = "mouseLeave";
static var OPEN = "open";
static var REMOVED = "removed";
static var RENDER = "render";
static var RESIZE = "resize";
static var SCROLL = "scroll";
static var SELECT = "select";
static var SOUND_COMPLETE = "soundComplete";
static var TAB_CHILDREN_CHANGE = "tabChildrenChange";
static var TAB_ENABLED_CHANGE = "tabEnabledChange";
static var TAB_INDEX_CHANGE = "tabIndexChange";
static var UNLOAD = "unload";
var bBubbles = false;
var bCancelable = false;
var oCurrentTarget = null;
var nEventPhase = null;
var oTarget = null;
var sType = null;
}
Symbol 1009 MovieClip [__Packages.gdp.utils.ClassUtil] Frame 0
class gdp.utils.ClassUtil extends gdp.core.base.BaseClass
{
function ClassUtil () {
super();
}
static function isSubClassOf(subClass, superClass) {
var _local1 = subClass.prototype;
while (!(_local1 === undefined)) {
_local1 = _local1.__proto__;
if (_local1 === superClass.prototype) {
return(true);
}
}
return(false);
}
static function isImplementationOf(clazz, interfaze) {
var _local2 = clazz.prototype;
if (isSubClassOf(clazz, interfaze)) {
return(false);
}
return(createCleanInstance(clazz) instanceof interfaze);
}
static function createCleanInstance(clazz) {
var _local1 = new Object();
_local1.__proto__ = clazz.prototype;
_local1.__constructor__ = clazz;
return(_local1);
}
static function createInstance(clazz, args) {
if (!clazz) {
return(null);
}
var _local1 = new Object();
_local1.__proto__ = clazz.prototype;
_local1.__constructor__ = clazz;
clazz.apply(_local1, args);
return(_local1);
}
static function applyConstructor(clazz, result, args) {
if ((!clazz) || (!result)) {
return(undefined);
}
clazz.apply(result, args);
}
}
Symbol 1010 MovieClip [__Packages.gdp.core.base.BaseInterface] Frame 0
interface gdp.core.base.BaseInterface extends gdp.env.events.IEventDispatcher
{
}
Symbol 1011 MovieClip [__Packages.gdp.env.reflect.MemberInfo] Frame 0
interface gdp.env.reflect.MemberInfo extends gdp.core.base.BaseInterface
{
}
Symbol 1012 MovieClip [__Packages.gdp.env.reflect.PackageMemberInfo] Frame 0
interface gdp.env.reflect.PackageMemberInfo extends gdp.env.reflect.MemberInfo
{
}
Symbol 1013 MovieClip [__Packages.gdp.env.reflect.TypeInfo] Frame 0
interface gdp.env.reflect.TypeInfo extends gdp.env.reflect.PackageMemberInfo
{
}
Symbol 1014 MovieClip [__Packages.gdp.env.reflect.PackageInfo] Frame 0
class gdp.env.reflect.PackageInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.PackageMemberInfo
{
static var packageAlgorithm, packageMemberAlgorithm, rootPackage;
var package, name, parent, fullName, members;
function PackageInfo (package, name, parent) {
super();
this.package = package;
this.name = name;
this.parent = parent;
}
static function forName(packageName) {
return(getPackageAlgorithm().executeByName(packageName));
}
static function forPackage(package) {
if ((package === null) || (package === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'package' [" + package) + "] must not be 'null' nor 'undefined'.", this, arguments);
}
var packageInfo = gdp.env.reflect.ReflectConfig.getCache().getPackage(package);
if (packageInfo) {
return(packageInfo);
}
return(gdp.env.reflect.ReflectConfig.getCache().addPackage(new gdp.env.reflect.PackageInfo(package)));
}
static function setPackageAlgorithm(newPackageAlgorithm) {
packageAlgorithm = newPackageAlgorithm;
}
static function getPackageAlgorithm(Void) {
if (!packageAlgorithm) {
packageAlgorithm = new gdp.env.reflect.algorithm.PackageAlgorithm();
}
return(packageAlgorithm);
}
static function setPackageMemberAlgorithm(newPackageMemberAlgorithm) {
packageMemberAlgorithm = newPackageMemberAlgorithm;
}
static function getPackageMemberAlgorithm(Void) {
if (!packageMemberAlgorithm) {
packageMemberAlgorithm = new gdp.env.reflect.algorithm.PackageMemberAlgorithm();
}
return(packageMemberAlgorithm);
}
static function getRootPackage(Void) {
if (!rootPackage) {
rootPackage = new gdp.env.reflect.PackageInfo(_global, "_global", null);
}
return(rootPackage);
}
static function setRootPackage(newRootPackage) {
rootPackage = newRootPackage;
}
function getName(Void) {
if (name === undefined) {
initNameAndParent();
}
return(name);
}
function getFullName(Void) {
if (fullName === undefined) {
if (getParent().isRoot() || (isRoot())) {
return((fullName = getName()));
}
fullName = (getParent().getFullName() + ".") + getName();
}
return(fullName);
}
function getPackage(Void) {
return(package);
}
function getParent(Void) {
if (parent === undefined) {
initNameAndParent();
}
return(parent);
}
function initNameAndParent(Void) {
var _local2 = getPackageAlgorithm().execute(getPackage());
if (name === undefined) {
name = ((_local2.name == null) ? null : (_local2.name));
}
if (parent === undefined) {
parent = ((_local2.parent == null) ? null : (_local2.parent));
}
}
function getMembers() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMembersByFlag);
_local3.addHandler([Boolean], getMembersByFlag);
_local3.addHandler([gdp.env.reflect.PackageMemberFilter], getMembersByFilter);
return(_local3.forward(arguments));
}
function getMembersByFlag(filterSubPackages) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (filterSubPackages == null) {
filterSubPackages = true;
}
if (members === undefined) {
members = getPackageMemberAlgorithm().execute(this);
}
var _local3 = members.concat();
if (!filterSubPackages) {
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3.concat(gdp.env.reflect.PackageInfo(_local4[_local2]).getMembersByFlag(filterSubPackages));
_local2++;
}
}
return(_local3);
}
function getMembersByFilter(packageMemberFilter) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (!packageMemberFilter) {
return(getMembersByFlag(true));
}
var _local3 = getMembersByFlag(packageMemberFilter.filterSubPackages());
var _local2 = 0;
while (_local2 < _local3.length) {
if (packageMemberFilter.filter(gdp.env.reflect.PackageMemberInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMemberClasses() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMemberClassesByFlag);
_local3.addHandler([Boolean], getMemberClassesByFlag);
_local3.addHandler([gdp.env.reflect.PackageMemberFilter], getMemberClassesByFilter);
return(_local3.forward(arguments));
}
function getMemberClassesByFlag(filterSubPackages) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (filterSubPackages == null) {
filterSubPackages = true;
}
if (members === undefined) {
members = getPackageMemberAlgorithm().execute(this);
}
var _local3 = members.classes.concat();
if (!filterSubPackages) {
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3.concat(gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberClassesByFlag(filterSubPackages));
_local2++;
}
}
return(_local3);
}
function getMemberClassesByFilter(classFilter) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (!classFilter) {
return(getMemberClassesByFlag(true));
}
var _local3 = getMemberClassesByFlag(classFilter.filterSubPackages());
var _local2 = 0;
while (_local2 < _local3.length) {
if (classFilter.filter(gdp.env.reflect.ClassInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMemberPackages() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMemberPackagesByFlag);
_local3.addHandler([Boolean], getMemberPackagesByFlag);
_local3.addHandler([gdp.env.reflect.PackageMemberFilter], getMemberPackagesByFilter);
return(_local3.forward(arguments));
}
function getMemberPackagesByFlag(filterSubPackages) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (filterSubPackages == null) {
filterSubPackages = true;
}
if (members === undefined) {
members = getPackageMemberAlgorithm().execute(this);
}
var _local3 = members.packages.concat();
if (!filterSubPackages) {
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3.concat(gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberPackagesByFlag(filterSubPackages));
_local2++;
}
}
return(_local3);
}
function getMemberPackagesByFilter(packageFilter) {
if ((getPackage() === null) || (getPackage() === undefined)) {
return(null);
}
if (!packageFilter) {
return(getMemberPackagesByFlag(true));
}
var _local3 = getMemberPackagesByFlag(packageFilter.filterSubPackages());
var _local2 = 0;
while (_local2 < _local3.length) {
if (packageFilter.filter(gdp.env.reflect.PackageInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMember() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMemberByName);
_local3.addHandler([Object], getMemberByMember);
return(_local3.forward(arguments));
}
function getMemberByName(memberName) {
if (memberName == null) {
return(null);
}
if (getMembersByFlag(true)) {
if (members[memberName]) {
return(members[memberName]);
}
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberByName(memberName);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberByMember(concreteMember) {
if (concreteMember == null) {
return(null);
}
if (typeof(concreteMember) == "function") {
return(getMemberClassByClass(concreteMember));
}
return(getMemberPackageByPackage(concreteMember));
}
function getMemberClass(clazz) {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMemberClassByName);
_local3.addHandler([Function], getMemberClassByClass);
return(_local3.forward(arguments));
}
function getMemberClassByName(className) {
if (className == null) {
return(null);
}
if (getMemberClassesByFlag(true)) {
if (members.classes[className]) {
return(members.classes[className]);
}
}
var _local4 = getMemberPackagesByFlag(true);
if (_local4) {
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberClassByName(className);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberClassByClass(concreteClass) {
if (!concreteClass) {
return(null);
}
var _local4 = getMemberClassesByFlag(true);
if (_local4) {
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
if (_local3.getType().valueOf() == concreteClass.valueOf()) {
return(_local3);
}
_local2++;
}
}
var _local5 = getMemberPackagesByFlag(true);
if (_local5) {
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local5[_local2]).getMemberClassByClass(concreteClass);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberPackage(package) {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMemberPackageByName);
_local3.addHandler([Object], getMemberPackageByPackage);
return(_local3.forward(arguments));
}
function getMemberPackageByName(packageName) {
if (packageName == null) {
return(null);
}
if (getMemberPackagesByFlag(true)) {
if (members.packages[packageName]) {
return(members.packages[packageName]);
}
var _local4 = members.packages;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = gdp.env.reflect.PackageInfo(_local4[_local2]).getMemberPackageByName(packageName);
if (_local3) {
return(_local3);
}
_local2++;
}
}
return(null);
}
function getMemberPackageByPackage(concretePackage) {
if (concretePackage == null) {
return(null);
}
var _local3 = getMemberPackagesByFlag(true);
if (_local3) {
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = _local3[_local2];
if (_local4.getPackage().valueOf() == concretePackage.valueOf()) {
return(_local4);
}
_local2++;
}
_local2 = 0;
while (_local2 < _local3.length) {
var _local4 = gdp.env.reflect.PackageInfo(_local3[_local2]).getMemberPackageByPackage(concretePackage);
if (_local4) {
return(_local4);
}
_local2++;
}
}
return(null);
}
function isRoot(Void) {
return(!getParent());
}
function isParentPackage(package) {
if (!package) {
return(false);
}
if (package == this) {
return(false);
}
while (package) {
if (package.isRoot()) {
return(false);
}
package = package.getParent();
if (package == this) {
return(true);
}
}
return(false);
}
function toString() {
var _local5 = "[reflection " + getFullName();
if (arguments[0] == true) {
var _local4 = getMembers();
var _local3 = 0;
while (_local3 < _local4.length) {
_local5 = _local5 + (newline + gdp.utils.StringUtil.addSpaceIndent(_local4[_local3].toString(true), 2));
_local3++;
}
if (_local4.length > 0) {
_local5 = _local5 + newline;
}
}
return(_local5 + "]");
}
}
Symbol 1015 MovieClip [__Packages.gdp.env.reflect.algorithm.PackageAlgorithm] Frame 0
class gdp.env.reflect.algorithm.PackageAlgorithm extends gdp.core.base.BaseClass
{
var c, p;
function PackageAlgorithm (Void) {
super();
}
function setCache(cache) {
c = cache;
}
function getCache(Void) {
if (!c) {
c = gdp.env.reflect.ReflectConfig.getCache();
}
return(c);
}
function execute(o) {
if ((o === null) || (o === undefined)) {
return(null);
}
p = null;
_global.ASSetPropFlags(o, null, 0, true);
_global.ASSetPropFlags(o, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
findAndStore(getCache().getRoot(), o);
return(p);
}
function findAndStore(a, o) {
var _local7 = a.getPackage();
var _local4;
for (_local4 in _local7) {
var _local2 = _local7[_local4];
if (typeof(_local2) == "object") {
if (_local2.valueOf() == o.valueOf()) {
p = new Object();
p.package = o;
p.name = _local4;
p.parent = a;
return(true);
}
var _local3 = c.getPackage(_local2);
if (!_local3) {
_local3 = c.addPackage(new gdp.env.reflect.PackageInfo(_local2, _local4, a));
}
if (!_local3.isParentPackage(a)) {
if (findAndStore(_local3, o)) {
return(true);
}
}
}
}
return(false);
}
function executeByName(n) {
if (!n) {
throw new gdp.env.except.IllegalArgumentException(("The passed-in package name '" + n) + "' is not allowed to be null, undefined or an empty string.", this, arguments);
}
var p = getCache().getRoot();
var x = p.getFullName();
if (!x) {
x = "_global";
}
var f = eval ((x + ".") + n);
if ((f === null) || (f === undefined)) {
throw new gdp.env.reflect.PackageNotFoundException(("A package with the name '" + n) + "' could not be found.", this, arguments);
}
if (typeof(f) != "object") {
throw new gdp.env.except.IllegalArgumentException(("The object corresponding to the passed-in package name '" + n) + "' is not of type object.", this, arguments);
}
var r = c.getPackage(f);
if (r) {
return(r);
}
var a = n.split(".");
var g = p.getPackage();
var i = 0;
while (i < a.length) {
g = g[a[i]];
p = c.addPackage(new gdp.env.reflect.PackageInfo(g, a[i], p));
i++;
}
return(p);
}
}
Symbol 1016 MovieClip [__Packages.gdp.env.reflect.Cache] Frame 0
interface gdp.env.reflect.Cache extends gdp.core.base.BaseInterface
{
}
Symbol 1017 MovieClip [__Packages.gdp.env.reflect.ReflectConfig] Frame 0
class gdp.env.reflect.ReflectConfig extends gdp.core.base.BaseClass
{
static var cache;
function ReflectConfig (Void) {
super();
}
static function getCache(Void) {
if (!cache) {
cache = new gdp.env.reflect.SimpleCache(gdp.env.reflect.PackageInfo.getRootPackage());
}
return(cache);
}
static function setCache(newCache) {
cache = newCache;
}
}
Symbol 1018 MovieClip [__Packages.gdp.env.reflect.SimpleCache] Frame 0
class gdp.env.reflect.SimpleCache extends gdp.core.base.BaseClass implements gdp.env.reflect.Cache
{
var root, cache;
function SimpleCache (root) {
super();
this.root = root;
releaseAll();
}
function getClass() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([Function], getClassByClass);
_local3.addHandler([Object], getClassByInstance);
return(_local3.forward(arguments));
}
function getClassByClass(clazz) {
if ((clazz === null) || (clazz === undefined)) {
return(null);
}
var _local3 = clazz.prototype;
var _local2 = _local3.__as2lib__hashCode;
if (_local2 == undefined) {
return(null);
}
if (_local2 == _local3.__proto__.__as2lib__hashCode) {
return(null);
}
return(cache[_local2]);
}
function getClassByInstance(instance) {
if ((instance === null) || (instance === undefined)) {
return(null);
}
var _local3 = instance.__proto__;
var _local2 = _local3.__as2lib__hashCode;
if (_local2 == undefined) {
return(null);
}
if (_local2 == _local3.__proto__.__as2lib__hashCode) {
return(null);
}
return(cache[_local2]);
}
function addClass(info) {
if (!info) {
return(null);
}
var _local3 = info.getType().prototype;
var _local5 = _local3.__as2lib__hashCode;
if ((_local5 != null) && (_local5 != _local3.__proto__.__as2lib__hashCode)) {
cache[_local5] = info;
} else {
cache[(_local3.__as2lib__hashCode = hashCodeCounter++)] = info;
_global.ASSetPropFlags(_local3, "__as2lib__hashCode", 1, true);
}
return(info);
}
function getPackage(package) {
if ((package === null) || (package === undefined)) {
return(null);
}
var _local2 = package.__as2lib__hashCode;
if (_local2 == null) {
return(null);
}
if (_local2 == package.__proto__.__as2lib__hashCode) {
return(null);
}
return(cache[_local2]);
}
function addPackage(info) {
if (!info) {
return(null);
}
var _local3 = info.getPackage();
var _local5 = _local3.__as2lib__hashCode;
if ((_local5 != null) && (_local5 != _local3.__proto__.__as2lib__hashCode)) {
cache[_local5] = info;
} else {
cache[(_local3.__as2lib__hashCode = hashCodeCounter++)] = info;
_global.ASSetPropFlags(_local3, "__as2lib__hashCode", 1, true);
}
return(info);
}
function getRoot(Void) {
return(root);
}
function releaseAll(Void) {
cache = new Array();
addPackage(root);
}
static var hashCodeCounter = 0;
}
Symbol 1019 MovieClip [__Packages.gdp.env.overload.Overload] Frame 0
class gdp.env.overload.Overload extends gdp.core.base.BaseClass
{
var handlers, target, defaultHandler;
function Overload (target) {
super();
handlers = new Array();
this.target = target;
}
function setDefaultHandler(method) {
if (typeof(method) == "function") {
defaultHandler = new gdp.env.overload.SimpleOverloadHandler(null, method);
} else {
removeDefaultHandler();
}
}
function removeDefaultHandler(Void) {
defaultHandler = null;
}
function addHandler() {
var _local6 = arguments.length;
if (_local6 == 1) {
var _local5 = arguments[0];
if ((_local5 == null) || (_local5 instanceof gdp.env.overload.OverloadHandler)) {
addHandlerByHandler(_local5);
return(undefined);
}
}
if (_local6 == 2) {
var _local3 = arguments[0];
var _local4 = arguments[1];
if (((_local3 == null) || (_local3 instanceof Array)) && ((_local4 == null) || (_local4 instanceof Function))) {
return(addHandlerByValue(_local3, _local4));
}
}
throw new gdp.env.except.IllegalArgumentException(("The types and count of the passed-in arguments [" + arguments) + "] must match one of the available choices.", this, arguments);
}
function addHandlerByHandler(handler) {
if (handler) {
handlers.push(handler);
}
}
function addHandlerByValue(argumentsTypes, method) {
var _local2 = new gdp.env.overload.SimpleOverloadHandler(argumentsTypes, method);
handlers.push(_local2);
return(_local2);
}
function removeHandler(handler) {
if (handler) {
var _local2 = handlers.length;
while (_local2-- , _local2 - -1) {
if (handlers[_local2] == handler) {
handlers.splice(_local2, 1);
}
}
}
}
function forward(args) {
return(doGetMatchingHandler(arguments.caller, args).getMethod().apply(target, args));
}
function getMatchingHandler(args) {
return(doGetMatchingHandler(arguments.caller, args));
}
function doGetMatchingHandler(overloadedMethod, overloadArguments) {
if (!overloadArguments) {
overloadArguments = [];
}
var _local5 = getMatchingHandlers(overloadArguments);
var _local3 = _local5.length;
if (_local3 == 0) {
if (defaultHandler) {
return(defaultHandler);
}
throw new gdp.env.overload.UnknownOverloadHandlerException("No appropriate OverloadHandler found.", this, arguments, target, overloadedMethod, overloadArguments, handlers);
}
_local3--;
var _local6 = _local5[_local3];
while (_local3-- , _local3 - -1) {
var _local4 = _local6.isMoreExplicit(_local5[_local3]);
if (_local4 == null) {
throw new gdp.env.overload.SameTypeSignatureException("Two OverloadHandlers have the same type signature.", this, arguments, target, overloadedMethod, overloadArguments, [_local6, _local5[_local3]]);
}
if (!_local4) {
_local6 = _local5[_local3];
}
}
return(_local6);
}
function getMatchingHandlers(args) {
var _local4 = new Array();
var _local3 = handlers.length;
while (_local3-- , _local3 - -1) {
var _local2 = handlers[_local3];
if (_local2.matches(args)) {
_local4.push(_local2);
}
}
return(_local4);
}
}
Symbol 1020 MovieClip [__Packages.gdp.env.overload.OverloadHandler] Frame 0
interface gdp.env.overload.OverloadHandler extends gdp.core.base.BaseInterface
{
}
Symbol 1021 MovieClip [__Packages.gdp.env.overload.SimpleOverloadHandler] Frame 0
class gdp.env.overload.SimpleOverloadHandler extends gdp.core.base.BaseClass implements gdp.env.overload.OverloadHandler
{
var argumentsTypes, method;
function SimpleOverloadHandler (argumentsTypes, method) {
super();
if (!method) {
throw new gdp.env.except.IllegalArgumentException("Method to be executed by the overload handler must not be null or undefined.", this, arguments);
}
if (!argumentsTypes) {
argumentsTypes = [];
}
this.argumentsTypes = argumentsTypes;
this.method = method;
}
function matches(realArguments) {
if (!realArguments) {
realArguments = [];
}
var _local2 = realArguments.length;
if (_local2 != argumentsTypes.length) {
return(false);
}
while (_local2-- , _local2 - -1) {
if (realArguments[_local2] != null) {
if (argumentsTypes[_local2] != null) {
if (!gdp.utils.ObjectUtil.typesMatch(realArguments[_local2], argumentsTypes[_local2])) {
return(false);
}
}
}
}
return(true);
}
function execute(target, args) {
return(method.apply(target, args));
}
function isMoreExplicit(handler) {
if (!handler) {
return(true);
}
var _local3 = 0;
var _local5 = handler.getArgumentsTypes();
if (!_local5) {
_local5 = [];
}
var _local2 = argumentsTypes.length;
if (_local2 != _local5.length) {
return(true);
}
while (_local2-- , _local2 - -1) {
if (argumentsTypes[_local2] != _local5[_local2]) {
var _local4 = new Object();
_local4.__proto__ = argumentsTypes[_local2].prototype;
if (!argumentsTypes[_local2]) {
_local3--;
} else if (!_local5[_local2]) {
_local3 = _local3 - -1;
} else if (gdp.utils.ObjectUtil.isInstanceOf(_local4, _local5[_local2])) {
_local3 = _local3 - -1;
} else {
_local3--;
}
}
}
if (_local3 == 0) {
return(null);
}
return(_local3 > 0);
}
function getArgumentsTypes(Void) {
return(argumentsTypes);
}
function getMethod(Void) {
return(method);
}
function toString() {
var _local3 = "[object SimpleOverloadHandler";
var _local4 = argumentsTypes.length;
if (_local4 > 0) {
_local3 = _local3 + "(";
}
var _local2 = 0;
while (_local2 < _local4) {
if (_local2 != 0) {
_local3 = _local3 + ", ";
}
_local3 = _local3 + gdp.env.reflect.ReflectUtil.getTypeName(argumentsTypes[_local2]);
_local2++;
}
if (_local4 > 0) {
_local3 = _local3 + ")";
}
return(_local3 + "]");
}
}
Symbol 1022 MovieClip [__Packages.gdp.env.except.AbstractThrowable] Frame 0
class gdp.env.except.AbstractThrowable extends Error
{
var message, thrower, aArgs, name, cause;
function AbstractThrowable (message, thrower, aArgs) {
super();
this.message = message;
this.thrower = thrower;
this.aArgs = aArgs;
name = getClassName();
if (gdp.core.logger.LogWrapper.getLog() != null) {
trace(toString());
}
}
function getMessage(Void) {
return(message);
}
function getThrowerName(Void) {
return(gdp.env.reflect.ClassInfo.forObject(thrower).getName());
}
function getThrowerNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forObject(thrower).getFullName());
}
function getArguments(Void) {
return(aArgs);
}
function getClass(Void) {
return(Object(this).__constructor__);
}
function getClassName(Void) {
return(gdp.env.reflect.ClassInfo.forObject(this).getName());
}
function getPackageName(Void) {
return(gdp.env.reflect.ClassInfo.forObject(this).getPackage().getName());
}
function getClassNameWithPackage(Void) {
return(gdp.env.reflect.ClassInfo.forObject(this).getFullName());
}
function getCause(Void) {
return(cause);
}
function initCause(newCause) {
if (!newCause) {
throw new gdp.env.except.IllegalArgumentException("Cause must not be null or undefined.", this, arguments);
}
if (cause) {
throw new gdp.env.except.IllegalStateException(("The cause [" + cause) + "] has already been initialized.", this, arguments);
}
cause = newCause;
return(gdp.env.except.Throwable(this));
}
function toString() {
return((((("[" + getClassName()) + " in ") + getThrowerName()) + "] :: ") + getMessage());
}
}
Symbol 1023 MovieClip [__Packages.gdp.core.logger.LogWrapper] Frame 0
class gdp.core.logger.LogWrapper
{
static var _instance;
var _log;
function LogWrapper () {
}
static function mtascTrace(message, level, className, fileName, lineNumber) {
var _local1;
switch (level) {
case FATAL :
_local1 = "fatal";
break;
case ERROR :
_local1 = "error";
break;
case WARN :
_local1 = "warn";
break;
case INFO :
_local1 = "info";
break;
case DEBUG :
_local1 = "debug";
break;
default :
lineNumber = Number(fileName);
fileName = className;
className = String(level);
_local1 = "debug";
}
if (logCallingFile) {
getLog()[_local1](((((className + " [") + fileName) + ":") + lineNumber) + "]");
}
getLog()[_local1](message);
}
function init(logId) {
_log = new gdp.core.logger.Logger(logId);
}
function addConsolePublisher() {
_log.addPublisher(new gdp.core.logger.publisher.ConsolePublisher());
}
function addTracePublisher() {
_log.addPublisher(new gdp.core.logger.publisher.TracePublisher());
}
static function getInstance() {
if (_instance == undefined) {
_instance = new gdp.core.logger.LogWrapper();
}
return(_instance);
}
static function getLog() {
return(getInstance()._log);
}
function toString() {
return("[Object - gdp.core.logger.LogWrapper]");
}
static var logCallingFile = true;
static var DEBUG = 2;
static var INFO = 4;
static var WARN = 8;
static var ERROR = 16;
static var FATAL = 32;
}
Symbol 1024 MovieClip [__Packages.gdp.core.logger.Logger] Frame 0
class gdp.core.logger.Logger
{
var _loggerId, _level, _publishers;
function Logger (logId) {
_loggerId = logId;
_level = gdp.core.logger.event.Level.LOG;
_publishers = new Object();
_instances[logId] = log;
}
static function getLogger(logId, maxDepth) {
if (logId.length > 0) {
var _local1 = _instances[logId];
if (_local1 == undefined) {
_local1 = new gdp.core.logger.Logger(logId);
var _local2 = new gdp.core.logger.publisher.TracePublisher();
var _local4 = new gdp.core.logger.publisher.ConsolePublisher();
if (maxDepth == undefined) {
maxDepth = 3;
}
_local2.__set__maxDepth(maxDepth);
_local4.__set__maxDepth(maxDepth);
_local1.addPublisher(_local2);
_local1.addPublisher(_local4);
}
return(_local1);
}
return(null);
}
function log(argument) {
publish(argument, gdp.core.logger.event.Level.LOG);
}
function debug(argument) {
publish(argument, gdp.core.logger.event.Level.DEBUG);
}
function info(argument) {
publish(argument, gdp.core.logger.event.Level.INFO);
}
function warn(argument) {
publish(argument, gdp.core.logger.event.Level.WARN);
}
function error(argument) {
publish(argument, gdp.core.logger.event.Level.ERROR);
}
function fatal(argument) {
publish(argument, gdp.core.logger.event.Level.FATAL);
}
function getId() {
return(_loggerId);
}
function setLevel(level) {
_level = level;
}
function getLevel() {
return(_level);
}
function addPublisher(publisher) {
if (!_publishers[publisher.toString()]) {
_publishers[publisher.toString()] = publisher;
}
}
function removePublisher(publisher) {
delete _publishers[publisher.toString()];
}
function getPublishers() {
return(_publishers);
}
function toString() {
return("[object gdp.core.logger.Logger]");
}
function publish(argument, level) {
if (level.getValue() >= _level.getValue()) {
var _local2 = new gdp.core.logger.event.LogEvent(_loggerId, argument, level);
for (var _local3 in _publishers) {
gdp.core.logger.publisher.IPublisher(_publishers[_local3]).publish(_local2);
}
}
}
static var _instances = new Object();
}
Symbol 1025 MovieClip [__Packages.gdp.core.logger.publisher.IPublisher] Frame 0
interface gdp.core.logger.publisher.IPublisher
{
}
Symbol 1026 MovieClip [__Packages.gdp.core.logger.event.LogEvent] Frame 0
class gdp.core.logger.event.LogEvent
{
var loggerId, argument, level, time;
function LogEvent (loggerId, argument, level) {
this.loggerId = loggerId;
this.argument = argument;
this.level = level;
time = new Date();
}
static function serialize(logEvent) {
var _local1 = new Object();
_local1.loggerId = logEvent.loggerId;
_local1.time = logEvent.time;
_local1.levelName = logEvent.level.getName();
_local1.argument = logEvent.argument;
return(_local1);
}
static function deserialize(o) {
var _local3 = gdp.core.logger.event.Level["" + o.levelName];
var _local1 = new gdp.core.logger.event.LogEvent(o.loggerId, o.argument, _local3);
_local1.time = o.time;
return(_local1);
}
function toString() {
return("[object gdp.core.logger.event.LogEvent]");
}
}
Symbol 1027 MovieClip [__Packages.gdp.core.logger.event.Level] Frame 0
class gdp.core.logger.event.Level
{
var _name, _value;
function Level (name, value) {
_name = name;
_value = value;
}
function getName() {
return(_name);
}
function getValue() {
return(_value);
}
function toString() {
return(("[object gdp.core.logger.event.Level." + getName()) + "]");
}
static var ALL = new gdp.core.logger.event.Level("ALL", 1);
static var LOG = new gdp.core.logger.event.Level("LOG", 1);
static var DEBUG = new gdp.core.logger.event.Level("DEBUG", 2);
static var INFO = new gdp.core.logger.event.Level("INFO", 4);
static var WARN = new gdp.core.logger.event.Level("WARN", 8);
static var ERROR = new gdp.core.logger.event.Level("ERROR", 16);
static var FATAL = new gdp.core.logger.event.Level("FATAL", 32);
static var NONE = new gdp.core.logger.event.Level("NONE", 1024);
}
Symbol 1028 MovieClip [__Packages.gdp.core.logger.publisher.TracePublisher] Frame 0
class gdp.core.logger.publisher.TracePublisher implements gdp.core.logger.publisher.IPublisher
{
var _maxDepth, inProgress;
function TracePublisher () {
maxDepth = (4);
}
function set maxDepth(value) {
_maxDepth = ((_maxDepth > 255) ? 255 : (value));
//return(maxDepth);
}
function get maxDepth() {
return(_maxDepth);
}
function publish(e) {
inProgress = new Array();
var _local4 = e.argument;
var _local2 = ("*" + e.level.getName()) + "*";
if (e.loggerId) {
_local2 = _local2 + (":" + e.loggerId);
}
_local2 = _local2 + ":";
_local2 = _local2 + analyzeObj(_local4, 1);
trace(_local2);
}
function toString() {
return("gdp.core.logger.publisher.TracePublisher");
}
function analyzeObj(o, depth) {
var _local6 = "";
var _local5 = typeof(o);
if (_local5 == "string") {
_local6 = _local6 + (("\"" + o) + "\"");
} else if ((_local5 == "boolean") || (_local5 == "number")) {
_local6 = _local6 + o;
} else if ((_local5 == "undefined") || (_local5 == "null")) {
_local6 = _local6 + (("(" + _local5) + ")");
} else {
var _local8 = false;
var _local9 = true;
if (o instanceof Array) {
_local5 = "array";
_local8 = false;
} else if (o instanceof Button) {
_local5 = "button";
_local8 = true;
} else if (o instanceof Date) {
_local5 = "date";
_local9 = false;
_local8 = true;
} else if (o instanceof Color) {
_local5 = "color";
_local9 = false;
_local8 = true;
o = o.getRGB().toString(16);
} else if (o instanceof MovieClip) {
_local5 = "movieclip";
_local8 = true;
} else if (o instanceof XML) {
_local5 = "xml";
_local9 = false;
_local8 = true;
} else if (o instanceof XMLNode) {
_local5 = "xmlnode";
_local9 = false;
_local8 = true;
} else if (o instanceof Sound) {
_local5 = "sound";
} else if (o instanceof TextField) {
_local5 = "textfield";
_local8 = true;
} else if (o instanceof Function) {
_local5 = "function";
_local9 = false;
}
_local6 = _local6 + "(";
if (_local8) {
_local6 = _local6 + ((_local5 + " ") + o);
} else if (_local5 == "object") {
_local6 = _local6 + o;
} else if (_local5 == "array") {
_local6 = _local6 + ((_local5 + ":") + o.length);
} else {
_local6 = _local6 + _local5;
}
_local6 = _local6 + ")";
var _local3 = 0;
while (_local3 < inProgress.length) {
if (inProgress[_local3] == o) {
return(_local6 + ": **cross-reference**");
}
_local3++;
}
inProgress.push(o);
if (_local9 && (depth <= _maxDepth)) {
var _local7 = "";
if (_local5 == "array") {
_local3 = 0;
while (_local3 < o.length) {
_local7 = _local7 + ((((newline + gdp.utils.StringUtil.multiply("\t", depth + 1)) + _local3) + ":") + analyzeObj(o[_local3], depth + 1));
_local3++;
}
} else {
for (var _local10 in o) {
_local7 = _local7 + ((((newline + gdp.utils.StringUtil.multiply("\t", depth + 1)) + _local10) + ":") + analyzeObj(o[_local10], depth + 1));
}
}
if (_local7.length > 0) {
_local6 = _local6 + ((((" {" + _local7) + newline) + gdp.utils.StringUtil.multiply("\t", depth)) + "}");
}
}
inProgress.pop();
}
return(_local6);
}
}
Symbol 1029 MovieClip [__Packages.gdp.utils.StringUtil] Frame 0
class gdp.utils.StringUtil
{
function StringUtil () {
}
static function addCharsToRight(sString, sChars, nCount) {
var _local1 = 0;
while (_local1 < nCount) {
sString = sString + sChars;
_local1++;
}
return(sString);
}
static function addCharsToLeft(sString, sChars, nCount) {
var _local1 = 0;
while (_local1 < nCount) {
sString = sChars + sString;
_local1++;
}
return(sString);
}
static function isNumber(sString) {
return(((Number(sString) == sString) ? true : false));
}
static function replace(sString, sWhat, sTo) {
return(String(sString.split(sWhat).join(sTo)));
}
static function replaceAll(sString, sWhat, sTo) {
sString = String(sString.split(sWhat).join(sTo));
if (sString.indexOf(sWhat) != -1) {
return(replaceAll(sString, sWhat, sTo));
}
return(sString);
}
static function trim(sString) {
return(leftTrim(rightTrim(sString)));
}
static function leftTrim(sString) {
return(leftTrimForChars(sString, "\n\t\n " + unescape("%0D%0A")));
}
static function rightTrim(sString) {
return(rightTrimForChars(sString, "\n\t\n " + unescape("%0D%0A")));
}
static function leftTrimForChars(sString, sChars) {
var _local1 = 0;
var _local3 = sString.length;
while ((_local1 < _local3) && (sChars.indexOf(sString.charAt(_local1)) >= 0)) {
_local1++;
}
return(String(((_local1 > 0) ? (sString.substr(_local1, _local3)) : (sString))));
}
static function rightTrimForChars(sString, sChars) {
var _local2 = 0;
var _local1 = sString.length - 1;
while ((_local2 < _local1) && (sChars.indexOf(sString.charAt(_local1)) >= 0)) {
_local1--;
}
return(String(((_local1 >= 0) ? (sString.substr(_local2, _local1 + 1)) : (sString))));
}
static function checkEmail(sEmail) {
if (sEmail.length < 6) {
return(false);
}
if ((sEmail.split("@").length > 2) || (sEmail.indexOf("@") < 0)) {
return(false);
}
if (sEmail.lastIndexOf("@") > sEmail.lastIndexOf(".")) {
return(false);
}
if (sEmail.lastIndexOf(".") > (sEmail.length - 3)) {
return(false);
}
if (sEmail.lastIndexOf(".") <= (sEmail.lastIndexOf("@") + 1)) {
return(false);
}
return(true);
}
static function assureLength(sString, nLength) {
if ((nLength < 0) || ((!nLength) && (!(nLength === 0)))) {
return(sString.length >= nLength);
}
}
static function contains(sString, sChars) {
if (((sChars == null) || (sString == null)) || (sChars.length > sString.length)) {
return(false);
}
if (sString.indexOf(sChars) >= 0) {
return(true);
}
return(false);
}
static function startsWith(sString, sSearchString) {
if (sString.indexOf(sSearchString) == 0) {
return(true);
}
return(false);
}
static function endsWith(sString, sSearchString) {
if (sString.lastIndexOf(sSearchString) == (sString.length - sSearchString.length)) {
return(true);
}
return(false);
}
static function addSpaceIndent(sString, nSize) {
if (sString == null) {
sString = "";
}
if (nSize < 0) {
return(String(""));
}
var _local1 = multiply(" ", nSize);
return(_local1 + replace(sString, newline, newline + _local1));
}
static function multiply(sString, nFactor) {
var _local2 = "";
var _local1 = nFactor;
while (_local1 > 0) {
_local2 = _local2 + sString;
_local1--;
}
return(_local2);
}
static function ucFirst(sString) {
return(String(sString.charAt(0).toUpperCase() + sString.substr(1)));
}
static function ucWords(sString) {
var _local2 = sString.split(" ");
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1] = ucFirst(_local2[_local1]);
_local1++;
}
return(String(_local2.join(" ")));
}
static function firstChar(sString) {
return(String(sString.charAt(0)));
}
static function lastChar(sString) {
return(String(sString.charAt(sString.length - 1)));
}
static function toBoolean(value) {
if ((value == "1") || (value == "true")) {
return(true);
}
return(false);
}
static function toNumber(value) {
var _local3 = parseInt(value);
var _local2 = parseFloat(value);
if (value == _local3) {
return(_local3);
}
if (value == _local2) {
return(_local2);
}
return(Number.NaN);
}
static function toArray(sString, sDelimeters, bTrim, bIgnoreEmpty) {
var _local7 = new Array();
var _local5 = sDelimeters.split("");
var _local6 = -1;
var _local3 = 0;
while (_local3 <= sString.length) {
var _local2 = 0;
while (_local2 < _local5.length) {
if ((sString.substr(_local3, 1) == _local5[_local2]) || ((_local2 == (_local5.length - 1)) && (_local3 == sString.length))) {
var _local1 = String(sString.slice(_local6 + 1, _local3));
if (bTrim) {
_local1 = trim(_local1);
}
if (!(bIgnoreEmpty && (_local1.length == 0))) {
_local7.push(_local1);
}
_local6 = _local3;
break;
}
_local2++;
}
_local3++;
}
return(_local7);
}
static function toTypedArray(sString, sDelimeters, fType, bTrim, bIgnoreEmpty) {
var _local2 = toArray(sString, sDelimeters, bTrim, bIgnoreEmpty);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = fType(_local2[_local1]);
_local1++;
}
return(_local2);
}
static function getPath() {
}
}
Symbol 1030 MovieClip [__Packages.gdp.core.logger.publisher.ConsolePublisher] Frame 0
class gdp.core.logger.publisher.ConsolePublisher implements gdp.core.logger.publisher.IPublisher
{
var _maxDepth, _inProgressObjs, _inProgressSerial;
function ConsolePublisher () {
maxDepth = (4);
}
function set maxDepth(value) {
_maxDepth = ((_maxDepth > 255) ? 255 : (value));
//return(maxDepth);
}
function get maxDepth() {
return(_maxDepth);
}
function set showFunctions(value) {
_showFunctions = value;
//return(showFunctions);
}
function get showFunctions() {
return(_showFunctions);
}
function publish(e) {
_inProgressObjs = new Array();
_inProgressSerial = new Array();
var _local2 = gdp.core.logger.event.LogEvent.serialize(e);
_local2.argument = serializeObj(_local2.argument, 1);
_local2.version = _version;
var _local3 = new LocalConnection();
_local3.send("_luminicbox_log_console", "log", _local2);
}
function toString() {
return("gdp.core.logger.publisher.ConsolePublisher");
}
function serializeObj(o, depth) {
var _local15 = new Object();
var _local2 = getType(o);
_local15.type = _local2.name;
if (!_local2.inspectable) {
_local15.value = o;
} else if (_local2.stringify) {
_local15.value = o.toString();
} else {
var _local9 = new Array();
_local15.value = _local9;
if ((((_local2.name == "movieclip") || (_local2.name == "button")) || (_local2.name == "object")) || (_local2.name == "textfield")) {
_local15.id = "" + o;
}
var _local3 = 0;
while (_local3 < _inProgressObjs.length) {
if (_inProgressObjs[_local3] == o) {
var _local5 = _inProgressSerial[_local3];
var _local8 = {value:_local5.value, type:_local5.type, crossRef:true};
if (_local5.id) {
_local8.id = _local5.id;
}
return(_local8);
}
_local3++;
}
_inProgressObjs.push(o);
_inProgressSerial.push(_local15);
if (depth <= _maxDepth) {
if (_local2.properties) {
var _local14 = new Object();
_local3 = 0;
while (_local3 < _local2.properties.length) {
_local14[_local2.properties[_local3]] = o[_local2.properties[_local3]];
_local3++;
}
_local14 = serializeObj(_local14, _maxDepth);
_local14.type = "properties";
_local9.push({property:"$properties", value:_local14});
}
if (o instanceof Array) {
var _local6 = 0;
while (_local6 < o.length) {
_local9.push({property:_local6, value:serializeObj(o[_local6], depth + 1)});
_local6++;
}
} else {
for (var _local16 in o) {
if (!((o[_local16] instanceof Function) && (!_showFunctions))) {
var _local7 = true;
if (_local2.properties) {
_local3 = 0;
while (_local3 < _local2.properties.length) {
if (_local16 == _local2.properties[_local3]) {
_local7 = false;
}
_local3++;
}
}
if (_local7) {
_local9.push({property:_local16, value:serializeObj(o[_local16], depth + 1)});
}
}
}
}
} else {
_local15.reachLimit = true;
}
_inProgressObjs.pop();
_inProgressSerial.pop();
}
return(_local15);
}
function getType(o) {
var _local3 = typeof(o);
var _local1 = new Object();
_local1.inspectable = true;
_local1.name = _local3;
if (((((_local3 == "string") || (_local3 == "boolean")) || (_local3 == "number")) || (_local3 == "undefined")) || (_local3 == "null")) {
_local1.inspectable = false;
} else if (o instanceof Date) {
_local1.inspectable = false;
_local1.name = "date";
} else if (o instanceof Array) {
_local1.name = "array";
} else if (o instanceof Button) {
_local1.name = "button";
_local1.properties = gdp.core.logger.event.PropertyInspector.buttonProperties;
} else if (o instanceof MovieClip) {
_local1.name = "movieclip";
_local1.properties = gdp.core.logger.event.PropertyInspector.movieClipProperties;
} else if (o instanceof XML) {
_local1.name = "xml";
_local1.stringify = true;
} else if (o instanceof XMLNode) {
_local1.name = "xmlnode";
_local1.stringify = true;
} else if (o instanceof Color) {
_local1.name = "color";
} else if (o instanceof Sound) {
_local1.name = "sound";
_local1.properties = gdp.core.logger.event.PropertyInspector.soundProperties;
} else if (o instanceof TextField) {
_local1.name = "textfield";
_local1.properties = gdp.core.logger.event.PropertyInspector.textFieldProperties;
}
return(_local1);
}
var _version = 0.15;
var _showFunctions = false;
}
Symbol 1031 MovieClip [__Packages.gdp.core.logger.event.PropertyInspector] Frame 0
class gdp.core.logger.event.PropertyInspector
{
function PropertyInspector () {
}
static var movieClipProperties = new Array("_alpha", "_currentframe", "_droptarget", "enabled", "focusEnabled", "_focusrect", "_framesloaded", "_height", "hitArea", "_lockroot", "menu", "_name", "_parent", "_quality", "_rotation", "_soundbuftime", "tabChildren", "tabEnabled", "tabIndex", "_target", "_totalframes", "trackAsMenu", "_url", "useHandCursor", "_visible", "_width", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale");
static var buttonProperties = new Array("_alpha", "enabled", "_focusrect", "_height", "_quality", "menu", "_name", "_parent", "_quality", "_rotation", "_soundbuftime", "tabEnabled", "tabIndex", "_target", "trackAsMenu", "_url", "useHandCursor", "_visible", "_width", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale");
static var soundProperties = new Array("duration", "id3", "position");
static var textFieldProperties = new Array("_alpha", "autoSize", "background", "backgroundColor", "border", "borderColor", "bottomScroll", "condenseWhite", "embedFonts", "_height", "hscroll", "html", "htmlText", "length", "maxChars", "maxhscroll", "maxscroll", "menu", "mouseWheelEnabled", "multiline", "_name", "_parent", "password", "_quality", "restrict", "_rotation", "scroll", "selectable", "styleSheet", "tabEnabled", "tabIndex", "_target", "text", "textColor", "textHeight", "textWidth", "type", "_url", "variable", "_visible", "_width", "wordWrap", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale");
}
Symbol 1032 MovieClip [__Packages.gdp.env.except.Throwable] Frame 0
interface gdp.env.except.Throwable
{
}
Symbol 1033 MovieClip [__Packages.gdp.env.except.IllegalStateException] Frame 0
class gdp.env.except.IllegalStateException extends gdp.env.except.FatalException
{
function IllegalStateException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1034 MovieClip [__Packages.gdp.env.except.FatalException] Frame 0
class gdp.env.except.FatalException extends gdp.env.except.AbstractThrowable implements gdp.env.except.Throwable
{
function FatalException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1035 MovieClip [__Packages.gdp.env.except.IllegalArgumentException] Frame 0
class gdp.env.except.IllegalArgumentException extends gdp.env.except.FatalException
{
var aArgs;
function IllegalArgumentException (message, thrower, args) {
super(message, thrower, aArgs);
}
}
Symbol 1036 MovieClip [__Packages.gdp.env.reflect.ReflectUtil] Frame 0
class gdp.env.reflect.ReflectUtil extends gdp.core.base.BaseClass
{
function ReflectUtil (Void) {
super();
}
static function getUnusedMemberName(object) {
var _local1 = 10000;
var _local3 = MEMBER_PREFIX + "_";
var _local2 = MEMBER_PREFIX + "-";
while (_local1-- , _local1 - -1) {
if (object[_local3 + _local1] === undefined) {
return(_local3 + _local1);
}
if (object[_local2 + _local1] === undefined) {
return(_local2 + _local1);
}
}
return(null);
}
static function getTypeAndMethodInfo(object, method) {
if ((object === null) || (object === undefined)) {
return(null);
}
if (typeof(object) == "function") {
return(getTypeAndMethodInfoByType(object, method));
}
return(getTypeAndMethodInfoByInstance(object, method));
}
static function getTypeAndMethodInfoByType(type, method) {
if ((type === null) || (type === undefined)) {
return(null);
}
if (method.valueOf() == type.valueOf()) {
return([false, getTypeNameForType(type), CONSTRUCTOR]);
}
var _local2 = getMethodNameByObject(method, type);
if ((!(_local2 === null)) && (!(_local2 === undefined))) {
return([true, getTypeNameForType(type), _local2]);
}
return(getTypeAndMethodInfoByPrototype(type.prototype, method));
}
static function getTypeAndMethodInfoByInstance(instance, method) {
if ((instance === null) || (instance === undefined)) {
return(null);
}
if (instance.__constructor__) {
if (instance.__constructor__.prototype == instance.__proto__) {
return(getTypeAndMethodInfoByType(instance.__constructor__, method));
}
}
if (instance.constructor) {
var _local2 = instance.constructor;
if (_local2.prototype == instance.__proto__) {
return(getTypeAndMethodInfoByType(instance.constructor, method));
}
}
return(getTypeAndMethodInfoByPrototype(instance.__proto__, method));
}
static function getTypeAndMethodInfoByPrototype(p, m) {
if ((p === null) || (p === undefined)) {
return(null);
}
var _local6 = p;
_global.ASSetPropFlags(_global, null, 0, true);
var _local4;
while (p) {
if (p.constructor.valueOf() == m.valueOf()) {
_local4 = CONSTRUCTOR;
} else {
_local4 = getMethodNameByObject(m, p);
}
if (_local4 != null) {
var _local3 = new Array();
_local3[0] = false;
_local3[1] = getTypeNameByPrototype(p, _global, "", [_global]);
_local3[2] = _local4;
return(_local3);
}
p = p.__proto__;
}
return([null, getTypeNameByPrototype(_local6, _global, "", [_global]), null]);
}
static function getTypeName(object) {
if ((object === null) || (object === undefined)) {
return(null);
}
if (typeof(object) == "function") {
return(getTypeNameForType(object));
}
return(getTypeNameForInstance(object));
}
static function getTypeNameForInstance(instance) {
if ((instance === null) || (instance === undefined)) {
return(null);
}
_global.ASSetPropFlags(_global, null, 0, true);
return(getTypeNameByPrototype(instance.__proto__, _global, "", [_global]));
}
static function getTypeNameForType(type) {
if ((type === null) || (type === undefined)) {
return(null);
}
_global.ASSetPropFlags(_global, null, 0, true);
return(getTypeNameByPrototype(type.prototype, _global, "", [_global]));
}
static function getTypeNameByPrototype(c, p, n, a) {
var y = c.__as2lib__typeName;
if ((y != null) && (y != c.__proto__.__as2lib__typeName)) {
return(y);
}
if (n == null) {
n = "";
}
var s = _global.ASSetPropFlags;
for (var r in p) {
try {
if (((!eval ("_global." + r.split("_").join("."))) || (r.indexOf("_") < 0)) && (p[r].prototype === c)) {
var x = (n + r);
c.__as2lib__typeName = x;
s(c, "__as2lib__typeName", 1, true);
return(x);
}
if (p[r].__constructor__.valueOf() == Object) {
var f = false;
var i = 0;
while (i < a.length) {
if (a[i].valueOf() == p[r].valueOf()) {
f = true;
}
i++;
}
if (!f) {
a.push(p[r]);
r = getTypeNameByPrototype(c, p[r], (n + r) + ".", a);
if (r) {
return(r);
}
}
} else if (typeof(p[r]) == "function") {
p[r].prototype.__as2lib__typeName = n + r;
s(p[r].prototype, "__as2lib__typeName", 1, true);
}
} catch(e) {
}
}
return(null);
}
static function getMethodName(method, object) {
if (((!method) || (object === null)) || (object === undefined)) {
return(null);
}
if (typeof(object) == "function") {
return(getMethodNameByType(method, object));
}
return(getMethodNameByInstance(method, object));
}
static function getMethodNameByInstance(method, instance) {
if (((!method) || (instance === null)) || (instance === undefined)) {
return(null);
}
if (instance.__constructor__) {
if (instance.__constructor__.prototype == instance.__proto__) {
return(getMethodNameByType(method, instance.__constructor__));
}
}
if (instance.constructor) {
var _local3 = instance.constructor;
if (_local3.prototype == instance.__proto__) {
return(getMethodNameByType(method, instance.constructor));
}
}
return(getMethodNameByPrototype(method, instance.__proto__));
}
static function getMethodNameByType(method, type) {
if ((!method) || (!type)) {
return(null);
}
var _local1 = getMethodNameByPrototype(method, type.prototype);
if (_local1 != null) {
return(_local1);
}
return(getMethodNameByObject(method, type));
}
static function getMethodNameByPrototype(m, p) {
if ((((m === null) || (m === undefined)) || (p === null)) || (p === undefined)) {
return(null);
}
while (p) {
var _local2 = getMethodNameByObject(m, p);
if (_local2 != null) {
return(_local2);
}
p = p.__proto__;
}
return(null);
}
static function getMethodNameByObject(m, o) {
var _local6 = m.__as2lib__methodName;
if (_local6 != null) {
return(_local6);
}
var _local5 = _global.ASSetPropFlags;
_local5(o, null, 0, true);
_local5(o, ["__proto__", "prototype", "__constructor__", "constructor"], 7, true);
for (var _local4 in o) {
try {
if (o[_local4].valueOf() == m.valueOf()) {
m.__as2lib__methodName = _local4;
return(_local4);
}
if (typeof(o[_local4]) == "function") {
o[_local4].__as2lib__methodName = _local4;
}
} catch(e) {
}
}
_local5(o, null, 1, true);
return(null);
}
static function isMethodStatic(methodName, object) {
if (((!methodName) || (object === null)) || (object === undefined)) {
return(false);
}
if (typeof(object) == "function") {
return(isMethodStaticByType(methodName, object));
}
return(isMethodStaticByInstance(methodName, object));
}
static function isMethodStaticByInstance(methodName, instance) {
if (((!methodName) || (instance === null)) || (instance === undefined)) {
return(false);
}
return(isMethodStaticByType(methodName, (instance.__constructor__ ? (instance.__constructor) : (instance.constructor))));
}
static function isMethodStaticByType(methodName, type) {
if ((!methodName) || (!type)) {
return(false);
}
try {
if (type[methodName]) {
return(true);
}
} catch(e) {
}
return(false);
}
static function isConstructor(constructor, object) {
if ((((constructor === null) || (constructor === undefined)) || (object === null)) || (object === undefined)) {
return(false);
}
if (typeof(object) == "function") {
return(isConstructorByType(constructor, object));
}
return(isConstructorByInstance(constructor, object));
}
static function isConstructorByInstance(method, instance) {
if (((!method) || (instance === null)) || (instance === undefined)) {
return(false);
}
return(isConstructorByType(method, (instance.__constructor__ ? (instance.__constructor__) : (instance.constructor))));
}
static function isConstructorByType(method, type) {
if ((((method === null) || (method === undefined)) || (type === null)) || (type === undefined)) {
return(false);
}
return(method.valueOf() == type.valueOf());
}
static function getVariableNames(instance) {
var _local3 = new Array();
var _local5 = _global.ASSetPropFlags;
_local5(instance, null, 0, true);
_local5(instance, ["__proto__", "prototype", "__constructor__", "constructor"], 7, true);
for (var _local4 in instance) {
try {
if (typeof(instance[_local4]) != "function") {
_local3.push(_local4);
}
} catch(e) {
}
}
_local5(instance, null, 1, true);
return(_local3);
}
static function getTypeByName(path) {
var result = eval ("_global." + path);
if (!result) {
result = eval ("_global." + path.split(".").join("_"));
}
return(result);
}
static var CONSTRUCTOR = "new";
static var UNKNOWN = "[unknown]";
static var MEMBER_PREFIX = "__as2lib__member";
}
Symbol 1037 MovieClip [__Packages.gdp.env.overload.OverloadException] Frame 0
class gdp.env.overload.OverloadException extends gdp.env.except.FatalException
{
function OverloadException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1038 MovieClip [__Packages.gdp.env.overload.UnknownOverloadHandlerException] Frame 0
class gdp.env.overload.UnknownOverloadHandlerException extends gdp.env.overload.OverloadException
{
var overloadTarget, overloadedMethod, overloadArguments, overloadHandlers, asString, message;
function UnknownOverloadHandlerException (message, thrower, args, overloadTarget, overloadedMethod, overloadArguments, overloadHandlers) {
super(message, thrower, args);
this.overloadTarget = overloadTarget;
this.overloadedMethod = overloadedMethod;
this.overloadArguments = overloadArguments;
this.overloadHandlers = overloadHandlers;
}
function toString(Void) {
if (!asString) {
asString = message;
var _local3 = gdp.env.reflect.ReflectUtil.getTypeAndMethodInfo(overloadTarget, overloadedMethod);
asString = asString + "\n Overloaded Method: ";
asString = asString + ((_local3[0] == null) ? "[unknown]" : ((_local3[0] ? "static " : "")));
asString = asString + ((_local3[1] == null) ? "[unknown]" : (_local3[1]));
asString = asString + ("." + ((_local3[2] == null) ? "[unknown]" : (_local3[2])));
asString = asString + (("\n Used Arguments[" + overloadArguments.length) + "]: ");
var _local2 = 0;
while (_local2 < overloadArguments.length) {
if (_local2 != 0) {
asString = asString + ", ";
}
asString = asString + overloadArguments[_local2];
_local2++;
}
asString = asString + "\n Used Handlers: ";
_local2 = 0;
while (_local2 < overloadHandlers.length) {
asString = asString + ("\n " + overloadHandlers[_local2].toString());
_local2++;
}
}
return(asString);
}
}
Symbol 1039 MovieClip [__Packages.gdp.env.overload.SameTypeSignatureException] Frame 0
class gdp.env.overload.SameTypeSignatureException extends gdp.env.overload.OverloadException
{
var overloadTarget, overloadedMethod, overloadArguments, overloadHandlers, asString, message;
function SameTypeSignatureException (message, thrower, args, overloadTarget, overloadedMethod, overloadArguments, overloadHandlers) {
super(message, thrower, args);
this.overloadTarget = overloadTarget;
this.overloadedMethod = overloadedMethod;
this.overloadArguments = overloadArguments;
this.overloadHandlers = overloadHandlers;
}
function toString(Void) {
if (!asString) {
asString = message;
var _local3 = gdp.env.reflect.ReflectUtil.getTypeAndMethodInfo(overloadTarget, overloadedMethod);
asString = asString + "\n Overloaded Method: ";
asString = asString + ((_local3[0] == null) ? "[unknown]" : ((_local3[0] ? "static " : "")));
asString = asString + ((_local3[1] == null) ? "[unknown]" : (_local3[1]));
asString = asString + ("." + ((_local3[2] == null) ? "[unknown]" : (_local3[2])));
asString = asString + (("\n Used Arguments[" + overloadArguments.length) + "]: ");
var _local2 = 0;
while (_local2 < overloadArguments.length) {
if (_local2 != 0) {
asString = asString + ", ";
}
asString = asString + overloadArguments[_local2];
_local2++;
}
asString = asString + "\n Used Handlers: ";
_local2 = 0;
while (_local2 < overloadHandlers.length) {
asString = asString + ("\n " + overloadHandlers[_local2].toString());
_local2++;
}
}
return(asString);
}
}
Symbol 1040 MovieClip [__Packages.gdp.env.except.Exception] Frame 0
class gdp.env.except.Exception extends gdp.env.except.AbstractThrowable implements gdp.env.except.Throwable
{
var aArgs;
function Exception (message, thrower, args) {
super(message, thrower, aArgs);
}
}
Symbol 1041 MovieClip [__Packages.gdp.env.reflect.ReflectionException] Frame 0
class gdp.env.reflect.ReflectionException extends gdp.env.except.Exception
{
function ReflectionException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1042 MovieClip [__Packages.gdp.env.reflect.PackageNotFoundException] Frame 0
class gdp.env.reflect.PackageNotFoundException extends gdp.env.reflect.ReflectionException
{
function PackageNotFoundException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1043 MovieClip [__Packages.gdp.env.reflect.algorithm.PackageMemberAlgorithm] Frame 0
class gdp.env.reflect.algorithm.PackageMemberAlgorithm extends gdp.core.base.BaseClass
{
var c;
function PackageMemberAlgorithm (Void) {
super();
}
function setCache(cache) {
c = cache;
}
function getCache(Void) {
if (!c) {
c = gdp.env.reflect.ReflectConfig.getCache();
}
return(c);
}
function execute(p) {
if (p == null) {
return(null);
}
var t = p.getPackage();
if (!t) {
return(null);
}
_global.ASSetPropFlags(t, null, 0, true);
_global.ASSetPropFlags(t, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
getCache();
var r = new Array();
var n = new Array();
r.classes = n;
var m = new Array();
r.packages = m;
var i;
for (i in t) {
if (((typeof(t[i]) == "function") && (!(t[i].prototype === undefined))) && (!(t[i].prototype === null))) {
if ((!eval ("_global." + i.split("_").join("."))) || (i.indexOf("_") < 0)) {
var b = c.getClassByClass(t[i]);
if (!b) {
b = c.addClass(new gdp.env.reflect.ClassInfo(t[i], i, p));
}
r[r.length] = b;
r[i] = b;
n[n.length] = b;
n[i] = b;
}
} else if (typeof(t[i]) == "object") {
var a = c.getPackage(t[i]);
if (!a) {
a = c.addPackage(new gdp.env.reflect.PackageInfo(t[i], i, p));
}
r[r.length] = a;
r[i] = a;
m[m.length] = a;
m[i] = a;
}
}
return(r);
}
}
Symbol 1044 MovieClip [__Packages.gdp.env.reflect.PackageMemberFilter] Frame 0
interface gdp.env.reflect.PackageMemberFilter extends gdp.core.base.BaseInterface
{
}
Symbol 1045 MovieClip [__Packages.gdp.env.reflect.TypeMemberFilter] Frame 0
interface gdp.env.reflect.TypeMemberFilter extends gdp.core.base.BaseInterface
{
}
Symbol 1046 MovieClip [__Packages.gdp.env.reflect.TypeMemberInfo] Frame 0
interface gdp.env.reflect.TypeMemberInfo extends gdp.env.reflect.MemberInfo
{
}
Symbol 1047 MovieClip [__Packages.gdp.env.reflect.MethodInfo] Frame 0
class gdp.env.reflect.MethodInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.TypeMemberInfo
{
static var stringifier;
var name, declaringType, staticFlag, method;
function MethodInfo (name, declaringType, staticFlag, method) {
super();
this.name = name;
this.declaringType = declaringType;
this.staticFlag = staticFlag;
this.method = method;
}
static function getStringifier(Void) {
if (!stringifier) {
stringifier = new gdp.env.reflect.stringifier.MethodInfoStringifier();
}
return(stringifier);
}
static function setStringifier(methodInfoStringifier) {
stringifier = methodInfoStringifier;
}
function getName(Void) {
return(name);
}
function getFullName(Void) {
if (declaringType.getFullName()) {
return((declaringType.getFullName() + ".") + name);
}
return(name);
}
function getMethod(Void) {
if (!(method === undefined)) {
return(method);
}
var _local2 = declaringType.getType();
if (staticFlag) {
if (_local2[name] != _local2.__proto__[name]) {
return(_local2[name]);
}
}
var _local3 = _local2.prototype;
if (_local3[name] != _local3.__proto__[name]) {
return(_local3[name]);
}
return(null);
}
function getDeclaringType(Void) {
return(declaringType);
}
function invoke(scope, args) {
if (!staticFlag) {
var _local5 = declaringType.getType();
if (scope instanceof _local5) {
var _local3 = _local5.prototype;
if (scope.__proto__ != _local3) {
var _local2 = scope.__proto__;
while (_local2.__proto__ != _local3) {
_local2 = _local2.__proto__;
}
_local2.__as2lib__invoker = INVOKER;
return(scope.__as2lib__invoker(_local2, getMethod(), args));
}
}
}
return(getMethod().apply(scope, args));
}
function isStatic(Void) {
return(staticFlag);
}
function snapshot(Void) {
return(new gdp.env.reflect.MethodInfo(name, declaringType, staticFlag, getMethod()));
}
function toString() {
return(getStringifier().execute(this));
}
function INVOKER(object, method, args) {
delete object.__as2lib__invoker;
return(method.apply(super, args));
}
}
Symbol 1048 MovieClip [__Packages.gdp.utils.Stringifier] Frame 0
interface gdp.utils.Stringifier extends gdp.core.base.BaseInterface
{
}
Symbol 1049 MovieClip [__Packages.gdp.env.reflect.stringifier.MethodInfoStringifier] Frame 0
class gdp.env.reflect.stringifier.MethodInfoStringifier extends gdp.core.base.BaseClass implements gdp.utils.Stringifier
{
function MethodInfoStringifier () {
super();
}
function execute(target) {
var _local2 = gdp.env.reflect.MethodInfo(target);
var _local1 = "";
if (_local2.isStatic()) {
_local1 = _local1 + "static ";
}
_local1 = _local1 + _local2.getDeclaringType().getFullName();
_local1 = _local1 + ("." + _local2.getName());
return(_local1);
}
}
Symbol 1050 MovieClip [__Packages.gdp.env.reflect.ClassInfo] Frame 0
class gdp.env.reflect.ClassInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.TypeInfo
{
static var classAlgorithm, methodAlgorithm, propertyAlgorithm;
var clazz, name, package, fullName, classConstructor, superClass, methods, properties;
function ClassInfo (clazz, name, package) {
super();
this.clazz = clazz;
this.name = name;
this.package = package;
}
static function forName(className) {
return(getClassAlgorithm().executeByName(className));
}
static function forObject(object) {
if ((object === null) || (object === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'object' [" + object) + "] must not be 'null' or 'undefined'.", this, arguments);
}
var classInfo = gdp.env.reflect.ReflectConfig.getCache().getClass(object);
if (classInfo) {
return(classInfo);
}
if (typeof(object) == "function") {
return(forClass(object));
}
return(forInstance(object));
}
static function forInstance(instance) {
if ((instance === null) || (instance === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'instance' [" + instance) + "] must not be 'null' or 'undefined'.", this, arguments);
}
var classInfo = gdp.env.reflect.ReflectConfig.getCache().getClassByInstance(instance);
if (classInfo) {
return(classInfo);
}
if (instance.__constructor__) {
if (instance.__constructor__.prototype == instance.__proto__) {
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(instance.__constructor__)));
}
}
if (instance.constructor) {
var _constructor = instance.constructor;
if (_constructor.prototype == instance.__proto__) {
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(instance.constructor)));
}
}
var info = getClassAlgorithm().executeByInstance(instance);
if (info) {
if (info.name == null) {
info.name = null;
}
if (!info.clazz) {
info.clazz = null;
}
if (!info.package) {
info.package = null;
}
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(info.clazz, info.name, info.package)));
}
throw new gdp.env.reflect.ClassNotFoundException(("The class corresponding to the passed-in instance '" + instance) + "' could not be found.", this, arguments);
}
static function forClass(clazz) {
if ((clazz === null) || (clazz === undefined)) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'clazz' [" + clazz) + "] must not be 'null' or 'undefined'.", this, arguments);
}
var classInfo = gdp.env.reflect.ReflectConfig.getCache().getClassByClass(clazz);
if (classInfo) {
return(classInfo);
}
return(gdp.env.reflect.ReflectConfig.getCache().addClass(new gdp.env.reflect.ClassInfo(clazz)));
}
static function setClassAlgorithm(newClassAlgorithm) {
classAlgorithm = newClassAlgorithm;
}
static function getClassAlgorithm(Void) {
if (!classAlgorithm) {
classAlgorithm = new gdp.env.reflect.algorithm.ClassAlgorithm();
}
return(classAlgorithm);
}
static function setMethodAlgorithm(newMethodAlgorithm) {
methodAlgorithm = newMethodAlgorithm;
}
static function getMethodAlgorithm(Void) {
if (!methodAlgorithm) {
methodAlgorithm = new gdp.env.reflect.algorithm.MethodAlgorithm();
}
return(methodAlgorithm);
}
static function setPropertyAlgorithm(newPropertyAlgorithm) {
propertyAlgorithm = newPropertyAlgorithm;
}
static function getPropertyAlgorithm(Void) {
if (!propertyAlgorithm) {
propertyAlgorithm = new gdp.env.reflect.algorithm.PropertyAlgorithm();
}
return(propertyAlgorithm);
}
function getName(Void) {
if (name === undefined) {
initNameAndPackage();
}
return(name);
}
function getFullName(Void) {
if (fullName === undefined) {
if (getPackage().isRoot() || (!getPackage())) {
return((fullName = getName()));
}
fullName = (getPackage().getFullName() + ".") + getName();
}
return(fullName);
}
function getType(Void) {
return(clazz);
}
function getConstructor(Void) {
if (classConstructor === undefined) {
classConstructor = new gdp.env.reflect.ConstructorInfo(this);
}
return(classConstructor);
}
function getSuperType(Void) {
if (superClass === undefined) {
if (clazz === Object) {
superClass = null;
} else if (clazz.prototype.__proto__) {
superClass = forInstance(clazz.prototype);
} else {
superClass = null;
}
}
return(superClass);
}
function newInstance() {
return(gdp.utils.ClassUtil.createInstance(getConstructor().getMethod(), arguments));
}
function getPackage(Void) {
if (package === undefined) {
initNameAndPackage();
}
return(package);
}
function initNameAndPackage(Void) {
var _local2 = getClassAlgorithm().executeByClass(clazz);
if (name === undefined) {
name = ((_local2.name == null) ? null : (_local2.name));
}
if (package === undefined) {
package = ((_local2.package == null) ? null : (_local2.package));
}
}
function hasMethod(methodName, filterStaticMethods) {
if (methodName == null) {
return(false);
}
if (filterStaticMethods == null) {
filterStaticMethods = false;
}
if (clazz.prototype[methodName]) {
return(true);
}
if (filterStaticMethods) {
return(false);
}
if (clazz[methodName]) {
return(true);
}
var _local2 = getSuperType();
while (_local2) {
if (_local2.getType()[methodName]) {
return(true);
}
_local2 = _local2.getSuperType();
}
return(false);
}
function getMethods() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getMethodsByFlag);
_local3.addHandler([Boolean], getMethodsByFlag);
_local3.addHandler([gdp.env.reflect.TypeMemberFilter], getMethodsByFilter);
return(_local3.forward(arguments));
}
function getMethodsByFlag(filterSuperClasses) {
if (!clazz) {
return(null);
}
if (methods === undefined) {
methods = getMethodAlgorithm().execute(this);
}
var _local2 = methods.concat();
if (!filterSuperClasses) {
if (getSuperType() != null) {
_local2 = _local2.concat(getSuperType().getMethodsByFlag(filterSuperClasses));
}
}
return(_local2);
}
function getMethodsByFilter(methodFilter) {
if (!clazz) {
return(null);
}
if (!methodFilter) {
return(getMethodsByFlag(false));
}
var _local3 = getMethodsByFlag(methodFilter.filterSuperTypes());
var _local2 = 0;
while (_local2 < _local3.length) {
if (methodFilter.filter(_local3[_local2])) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getMethod() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getMethodByName);
_local3.addHandler([Function], getMethodByMethod);
return(_local3.forward(arguments));
}
function getMethodByName(methodName) {
if (methodName == null) {
return(null);
}
if (getMethodsByFlag(true)) {
if (methods[methodName]) {
return(methods[methodName]);
}
}
if (getSuperType()) {
return(getSuperType().getMethodByName(methodName));
}
return(null);
}
function getMethodByMethod(concreteMethod) {
if (!concreteMethod) {
return(null);
}
var _local4 = getMethodsByFlag(true);
if (_local4) {
var _local5 = _local4.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local4[_local2];
if (_local3.getMethod().valueOf() == concreteMethod.valueOf()) {
return(_local3);
}
_local2 = _local2 - -1;
}
}
if (getSuperType()) {
return(getSuperType().getMethodByMethod(concreteMethod));
}
return(null);
}
function hasProperty(propertyName, filterStaticProperties) {
if (propertyName == null) {
return(false);
}
if (filterStaticProperties == null) {
filterStaticProperties = false;
}
if (clazz.prototype["__get__" + propertyName]) {
return(true);
}
if (clazz.prototype["__set__" + propertyName]) {
return(true);
}
if (filterStaticProperties) {
return(false);
}
if (clazz[propertyName]) {
return(true);
}
var _local2 = getSuperType();
while (_local2) {
if (_local2.getType()["__set__" + propertyName] || (_local2.getType()["__get__" + propertyName])) {
return(true);
}
_local2 = _local2.getSuperType();
}
return(false);
}
function getProperties() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([], getPropertiesByFlag);
_local3.addHandler([Boolean], getPropertiesByFlag);
_local3.addHandler([gdp.env.reflect.TypeMemberFilter], getPropertiesByFilter);
return(_local3.forward(arguments));
}
function getPropertiesByFlag(filterSuperClasses) {
if (!clazz) {
return(null);
}
if (properties === undefined) {
properties = getPropertyAlgorithm().execute(this);
}
var _local2 = properties.concat();
if (!filterSuperClasses) {
if (getSuperType() != null) {
_local2 = _local2.concat(gdp.env.reflect.ClassInfo(getSuperType()).getPropertiesByFlag(filterSuperClasses));
}
}
return(_local2);
}
function getPropertiesByFilter(propertyFilter) {
if (!clazz) {
return(null);
}
if (!propertyFilter) {
return(getPropertiesByFlag(false));
}
var _local3 = getPropertiesByFlag(propertyFilter.filterSuperTypes());
var _local2 = 0;
while (_local2 < _local3.length) {
if (propertyFilter.filter(gdp.env.reflect.PropertyInfo(_local3[_local2]))) {
_local3.splice(_local2, 1);
_local2--;
}
_local2++;
}
return(_local3);
}
function getProperty() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([String], getPropertyByName);
_local3.addHandler([Function], getPropertyByProperty);
return(_local3.forward(arguments));
}
function getPropertyByName(propertyName) {
if (propertyName == null) {
return(null);
}
if (getPropertiesByFlag(true)) {
if (properties[propertyName]) {
return(properties[propertyName]);
}
}
if (getSuperType()) {
return(gdp.env.reflect.ClassInfo(getSuperType()).getPropertyByName(propertyName));
}
return(null);
}
function getPropertyByProperty(concreteProperty) {
if (concreteProperty == null) {
return(null);
}
var _local5 = getPropertiesByFlag(true);
if (_local5) {
var _local6 = _local5.length;
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = _local5[_local3];
if ((_local2.getGetter().getMethod().valueOf() == concreteProperty.valueOf()) || (_local2.getSetter().getMethod().valueOf() == concreteProperty.valueOf())) {
return(_local2);
}
_local3++;
}
}
if (getSuperType()) {
return(gdp.env.reflect.ClassInfo(getSuperType()).getPropertyByProperty(concreteProperty));
}
return(null);
}
function toString() {
var _local5 = "[reflection " + getFullName();
if (arguments[0] == true) {
var _local4 = getMethods();
var _local3 = 0;
while (_local3 < _local4.length) {
_local5 = _local5 + (newline + gdp.utils.StringUtil.addSpaceIndent(_local4[_local3].toString(), 2));
_local3++;
}
if (_local4.length > 0) {
_local5 = _local5 + newline;
}
}
return(_local5 + "]");
}
}
Symbol 1051 MovieClip [__Packages.gdp.env.reflect.algorithm.ClassAlgorithm] Frame 0
class gdp.env.reflect.algorithm.ClassAlgorithm extends gdp.core.base.BaseClass
{
var c, r;
function ClassAlgorithm (Void) {
super();
}
function setCache(cache) {
c = cache;
}
function getCache(Void) {
if (!c) {
c = gdp.env.reflect.ReflectConfig.getCache();
}
return(c);
}
function execute(d) {
if (typeof(d) == "function") {
return(executeByClass(d));
}
return(executeByInstance(d));
}
function executeByClass(d) {
if ((d === null) || (d === undefined)) {
return(null);
}
return(executeByComparator(function (f) {
return(f.valueOf() == d.valueOf());
}));
}
function executeByInstance(d) {
if ((d === null) || (d === undefined)) {
return(null);
}
return(executeByComparator(function (f) {
return(f.prototype === d.__proto__);
}));
}
function executeByComparator(v) {
if (!v) {
return(null);
}
r = null;
var _local4 = getCache().getRoot();
var _local3 = _local4.getPackage();
if (!_local3) {
_local3 = _global;
}
_global.ASSetPropFlags(_local3, null, 0, true);
_global.ASSetPropFlags(_local3, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
findAndStore(_local4, v);
return(r);
}
function findAndStore(a, v) {
var p = a.getPackage();
var i;
for (i in p) {
var f = p[i];
if (typeof(f) == "function") {
if (v(f)) {
if ((!eval ("_global." + i.split("_").join("."))) || (i.indexOf("_") < 0)) {
r = new Object();
r.clazz = f;
r.name = i;
r.package = a;
return(true);
}
}
} else if (typeof(f) == "object") {
var e = c.getPackage(f);
if (!e) {
e = c.addPackage(new gdp.env.reflect.PackageInfo(f, i, a));
}
if (!e.isParentPackage(a)) {
if (findAndStore(e, v)) {
return(true);
}
}
}
}
return(false);
}
function executeByName(n) {
if (!n) {
throw new gdp.env.except.IllegalArgumentException(("The passed-in class name '" + n) + "' is not allowed to be null, undefined or an empty string.", this, arguments);
}
var p = getCache().getRoot();
var x = p.getFullName();
if (!x) {
x = "_global";
}
var f = eval ((x + ".") + n);
if (!f) {
throw new gdp.env.reflect.ClassNotFoundException(("A class with the name '" + n) + "' could not be found.", this, arguments);
}
if (typeof(f) != "function") {
throw new gdp.env.except.IllegalArgumentException(("The object corresponding to the passed-in class name '" + n) + "' is not of type function.", this, arguments);
}
var r = c.getClassByClass(f);
if (r) {
return(r);
}
var a = n.split(".");
var g = p.getPackage();
var i = 0;
while (i < a.length) {
if (i == (a.length - 1)) {
return(c.addClass(new gdp.env.reflect.ClassInfo(f, a[i], p)));
}
g = g[a[i]];
p = c.addPackage(new gdp.env.reflect.PackageInfo(g, a[i], p));
i++;
}
return(null);
}
}
Symbol 1052 MovieClip [__Packages.gdp.env.reflect.ClassNotFoundException] Frame 0
class gdp.env.reflect.ClassNotFoundException extends gdp.env.reflect.ReflectionException
{
function ClassNotFoundException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1053 MovieClip [__Packages.gdp.env.reflect.algorithm.MethodAlgorithm] Frame 0
class gdp.env.reflect.algorithm.MethodAlgorithm extends gdp.core.base.BaseClass
{
var i, r, s;
function MethodAlgorithm (Void) {
super();
}
function execute(i) {
if (i == null) {
return(null);
}
var _local3 = i.getType();
if (!_local3) {
return(null);
}
this.i = i;
r = new Array();
s = true;
_global.ASSetPropFlags(_local3, null, 0, true);
_global.ASSetPropFlags(_local3, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
search(_local3);
s = false;
var _local4 = _local3.prototype;
_global.ASSetPropFlags(_local4, null, 0, true);
_global.ASSetPropFlags(_local4, ["__proto__", "constructor", "__constructor__", "prototype"], 1, true);
search(_local4);
_global.ASSetPropFlags(_local3, null, 1, true);
_global.ASSetPropFlags(_local4, null, 1, true);
return(r);
}
function search(t) {
var _local2;
for (_local2 in t) {
if (((typeof(t[_local2]) == "function") && (_local2.indexOf("__get__") < 0)) && (_local2.indexOf("__set__") < 0)) {
r[r.length] = new gdp.env.reflect.MethodInfo(_local2, i, s);
r[_local2] = r[r.length - 1];
}
}
}
}
Symbol 1054 MovieClip [__Packages.gdp.env.reflect.algorithm.PropertyAlgorithm] Frame 0
class gdp.env.reflect.algorithm.PropertyAlgorithm extends gdp.core.base.BaseClass
{
var c, r, g, s, a;
function PropertyAlgorithm (Void) {
super();
}
function execute(c) {
if (c == null) {
return(null);
}
var _local3 = c.getType();
if (!_local3) {
return(null);
}
this.c = c;
r = new Array();
g = new Object();
s = new Object();
a = true;
_global.ASSetPropFlags(_local3, null, 0, true);
_global.ASSetPropFlags(_local3, ["__proto__", "constructor", "prototype"], 1, true);
search(_local3);
a = false;
var _local4 = _local3.prototype;
_global.ASSetPropFlags(_local4, null, 0, true);
_global.ASSetPropFlags(_local4, ["__proto__", "constructor", "__constructor__"], 1, true);
search(_local4);
_global.ASSetPropFlags(_local3, null, 1, true);
_global.ASSetPropFlags(_local4, null, 1, true);
return(r);
}
function search(t) {
var _local3;
for (_local3 in t) {
if (typeof(t[_local3]) == "function") {
var _local2 = _local3.substring(7);
if (_local3.indexOf("__get__") == 0) {
g[_local2] = true;
if (!s[_local2]) {
r[r.length] = new gdp.env.reflect.PropertyInfo(_local2, c, a, t["__set__" + _local2], t[_local3]);
r[_local2] = r[r.length - 1];
}
} else if (_local3.indexOf("__set__") == 0) {
s[_local2] = true;
if (!g[_local2]) {
r[r.length] = new gdp.env.reflect.PropertyInfo(_local2, c, a, t[_local3], t["__get__" + _local2]);
r[_local2] = r[r.length - 1];
}
}
}
}
}
}
Symbol 1055 MovieClip [__Packages.gdp.env.reflect.PropertyInfo] Frame 0
class gdp.env.reflect.PropertyInfo extends gdp.core.base.BaseClass implements gdp.env.reflect.TypeMemberInfo
{
static var stringifier;
var name, declaringType, staticFlag, setter, getter;
function PropertyInfo (name, declaringType, staticFlag, setter, getter) {
super();
this.name = name;
this.declaringType = declaringType;
this.staticFlag = staticFlag;
this.setter = new gdp.env.reflect.MethodInfo("__set__" + name, declaringType, staticFlag, setter);
this.getter = new gdp.env.reflect.MethodInfo("__get__" + name, declaringType, staticFlag, getter);
}
static function getStringifier(Void) {
if (!stringifier) {
stringifier = new gdp.env.reflect.stringifier.PropertyInfoStringifier();
}
return(stringifier);
}
static function setStringifier(propertyInfoStringifier) {
stringifier = propertyInfoStringifier;
}
function getName(Void) {
return(name);
}
function getFullName(Void) {
if (declaringType.getFullName()) {
return((declaringType.getFullName() + ".") + name);
}
return(name);
}
function getSetter(Void) {
if (setter.getMethod()) {
return(setter);
}
return(null);
}
function getGetter(Void) {
if (getter.getMethod()) {
return(getter);
}
return(null);
}
function getDeclaringType(Void) {
return(declaringType);
}
function isWritable(Void) {
return(getSetter() != null);
}
function isReadable(Void) {
return(getGetter() != null);
}
function isStatic(Void) {
return(staticFlag);
}
function snapshot(Void) {
var _local3 = null;
if (getSetter()) {
_local3 = getSetter().getMethod();
}
var _local2 = null;
if (getGetter()) {
_local2 = getGetter().getMethod();
}
return(new gdp.env.reflect.PropertyInfo(name, declaringType, staticFlag, _local3, _local2));
}
function toString() {
return(getStringifier().execute(this));
}
}
Symbol 1056 MovieClip [__Packages.gdp.env.reflect.stringifier.PropertyInfoStringifier] Frame 0
class gdp.env.reflect.stringifier.PropertyInfoStringifier extends gdp.core.base.BaseClass implements gdp.utils.Stringifier
{
function PropertyInfoStringifier () {
super();
}
function execute(target) {
var _local2 = gdp.env.reflect.PropertyInfo(target);
var _local1 = "";
if (_local2.isStatic()) {
_local1 = _local1 + "static ";
}
_local1 = _local1 + _local2.getDeclaringType().getFullName();
_local1 = _local1 + ("." + _local2.getName());
return(_local1);
}
}
Symbol 1057 MovieClip [__Packages.gdp.env.reflect.ConstructorInfo] Frame 0
class gdp.env.reflect.ConstructorInfo extends gdp.env.reflect.MethodInfo
{
var __proto__, name, method, declaringType, staticFlag;
function ConstructorInfo (declaringClass, constructor) {
super();
__proto__.__proto__ = gdp.env.reflect.MethodInfo.prototype;
name = NAME;
method = constructor;
declaringType = declaringClass;
staticFlag = false;
}
function getMethod(Void) {
if (!(method === undefined)) {
return(method);
}
if ((declaringType.getPackage().getPackage() == null) || (declaringType.getName() == null)) {
return(declaringType.getType());
}
return(declaringType.getPackage().getPackage()[declaringType.getName()]);
}
function snapshot(Void) {
return(new gdp.env.reflect.ConstructorInfo(gdp.env.reflect.ClassInfo(declaringType), getMethod()));
}
static var NAME = "new";
}
Symbol 1058 MovieClip [__Packages.gdp.core.base.BaseClass] Frame 0
class gdp.core.base.BaseClass extends gdp.core.base.SimpleClass implements gdp.core.base.BaseInterface
{
function BaseClass () {
super();
if (gdp.core.logger.LogWrapper.getLog() == null) {
initLogger();
}
eventDispatcher = new gdp.env.events.EventDispatcher();
}
function initLogger() {
gdp.core.logger.LogWrapper.getInstance().init("gdp_log");
gdp.core.logger.LogWrapper.getInstance().addConsolePublisher();
gdp.core.logger.LogWrapper.logCallingFile = false;
}
function addEventListener(sType, fListener, bUseCapture, nPriority) {
eventDispatcher.addEventListener(sType, fListener, bUseCapture, nPriority);
}
function dispatchEvent(event) {
Object(event).oTarget = this;
return(eventDispatcher.dispatchEvent(event));
}
function hasEventListener(sType) {
return(eventDispatcher.hasEventListener(sType));
}
function removeEventListener(sType, fListener, bUseCapture) {
eventDispatcher.removeEventListener(sType, fListener, bUseCapture);
}
function willTrigger(sType) {
return(eventDispatcher.willTrigger(sType));
}
var eventDispatcher = null;
}
Symbol 1059 MovieClip [__Packages.gdp.env.events.EventDispatcher] Frame 0
class gdp.env.events.EventDispatcher extends gdp.core.base.SimpleClass implements gdp.env.events.IEventDispatcher
{
function EventDispatcher () {
super();
oQueues = new Object();
}
function addEventListener(sType, fListener, bUseCapture, nPriority) {
if (bUseCapture == null) {
bUseCapture = false;
}
if (nPriority == null) {
nPriority = gdp.env.events.EventPriority.DEFAULT;
}
var _local2 = oQueues[sType];
if (oQueues[sType] == null) {
_local2 = (oQueues[sType] = new gdp.env.events.QueueListeners());
}
_local2.addListener(fListener, bUseCapture, nPriority);
}
function dispatchEvent(event) {
var _local7 = false;
var _local5 = gdp.env.events.QueueListeners(oQueues[event.getType()]).getListeners();
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = _local5[_local3];
var _local2 = _local4.getFunction();
if (gdp.utils.Delegate.isDelegate(_local2)) {
_local2.bMerge = true;
_local2.apply(null, [event]);
} else {
_local4.getFunction().apply(null, [event]);
}
_local7 = true;
_local3++;
}
return(_local7);
}
function hasEventListener(sType) {
var _local2 = oQueues[sType];
if (_local2.getListeners().length > 0) {
return(true);
}
return(false);
}
function removeEventListener(sType, fListener, bUseCapture) {
var _local2 = oQueues[sType];
_local2.removeListener(fListener, bUseCapture);
}
function willTrigger(sType) {
return(null);
}
var oQueues = null;
}
Symbol 1060 MovieClip [__Packages.gdp.env.events.EventPriority] Frame 0
class gdp.env.events.EventPriority extends gdp.core.base.BaseClass
{
function EventPriority () {
super();
}
static var BINDING = 100;
static var DEFAULT = 0;
static var DEFAULT_HANDLER = -50;
static var EFFECT = -100;
}
Symbol 1061 MovieClip [__Packages.gdp.env.events.QueueListeners] Frame 0
class gdp.env.events.QueueListeners extends gdp.core.base.BaseClass
{
function QueueListeners () {
super();
aCaptureListeners = new Array();
aBubbleListeners = new Array();
}
function addListener(fListener, bUseCapture, nPriority) {
var _local2 = new gdp.env.events.EventListener(fListener, nPriority);
if (bUseCapture) {
aCaptureListeners.push(_local2);
aCaptureListeners.sort(sortListenersByPriority);
} else {
aBubbleListeners.push(_local2);
aBubbleListeners.sort(sortListenersByPriority);
}
}
function removeListener(fListener, bUseCapture) {
if (bUseCapture) {
var _local2 = 0;
while (_local2 < aCaptureListeners.length) {
if (gdp.utils.Delegate.equals(aCaptureListeners[_local2].getFunction(), fListener)) {
aCaptureListeners.splice(_local2--, 1);
}
_local2++;
}
} else {
var _local2 = 0;
while (_local2 < aBubbleListeners.length) {
if (gdp.utils.Delegate.equals(aBubbleListeners[_local2].getFunction(), fListener)) {
aBubbleListeners.splice(_local2--, 1);
}
_local2++;
}
}
}
function getListeners(Void) {
var _local3 = aCaptureListeners.concat(aBubbleListeners);
var _local2 = 0;
while (_local2 < _local3.length) {
if (!_local3[_local2].isValid()) {
_local3.splice(_local2--, 1);
}
_local2++;
}
return(_local3);
}
function sortListenersByPriority(elA, elB) {
if (elA.getPriority() == elB.getPriority()) {
return(0);
}
if (elA.getPriority() > elB.getPriority()) {
return(-1);
}
return(1);
}
var aCaptureListeners = null;
var aBubbleListeners = null;
}
Symbol 1062 MovieClip [__Packages.gdp.env.events.EventListener] Frame 0
class gdp.env.events.EventListener extends gdp.core.base.BaseClass
{
function EventListener (fListener, nPriority) {
super();
this.fListener = fListener;
this.nPriority = ((nPriority == null) ? 0 : (nPriority));
}
function isValid(Void) {
if (fListener == null) {
return(false);
}
if (gdp.utils.Delegate.isDelegate(fListener) && ((fListener.target == null) || (fListener.func == null))) {
return(false);
}
return(true);
}
function setFunction(fListener) {
this.fListener = fListener;
}
function getFunction(Void) {
return(fListener);
}
function setPriority(nPriority) {
this.nPriority = nPriority;
}
function getPriority(Void) {
return(nPriority);
}
var nPriority = null;
var fListener = null;
}
Symbol 1063 MovieClip [__Packages.gdp.utils.Delegate] Frame 0
class gdp.utils.Delegate extends gdp.core.base.BaseClass
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(oClass, fFunc, aArgs, bMerge) {
var _local4 = function () {
var _local5 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local6 = arguments.callee.bMerge;
var _local3;
if (_local6) {
_local3 = arguments;
var _local2 = 0;
while (_local2 < arguments.callee.aArgs.length) {
_local3.push(arguments.callee.aArgs[_local2]);
_local2++;
}
} else {
_local3 = ((arguments.length > 0) ? arguments : (arguments.callee.aArgs));
}
_local4.___nCount = arguments.callee.nCount;
return(_local4.apply(_local5, _local3));
};
var _local8 = function () {
return(gdp.utils.Delegate.toString(this));
};
_local4.type = "Delegate";
_local4.target = oClass;
_local4.func = fFunc;
_local4.nCount = ++nCount;
if (_local4.func.___aInnerValues == undefined) {
_local4.func.___aInnerValues = new Array();
}
_local4.func.___aInnerValues[nCount] = new Object();
_local4.aArgs = aArgs;
_local4.bMerge = bMerge;
_local4.toString = _local8;
return(_local4);
}
static function set(sValueName, value) {
return((arguments.caller.___aInnerValues[arguments.caller.___nCount][sValueName] = value));
}
static function setTo(fFunction, sValueName, value) {
return((fFunction.___aInnerValues[fFunction.___nCount][sValueName] = value));
}
static function get(sValueName) {
return(arguments.caller.___aInnerValues[arguments.caller.___nCount][sValueName]);
}
static function del(sValueName) {
delete arguments.caller.___aInnerValues[arguments.caller.___nCount][sValueName];
}
static function equals(fFunctionA, fFunctionB) {
if (isDelegate(fFunctionA) && (isDelegate(fFunctionB))) {
return(((fFunctionA.func == fFunctionB.func) && (fFunctionA.target == fFunctionB.target)) && (gdp.utils.ArrayUtil.equals(fFunctionA.aArgs, fFunctionB.aArgs)));
}
if ((!isDelegate(fFunctionA)) && (!isDelegate(fFunctionB))) {
return(fFunctionA.func == fFunctionB.func);
}
return(false);
}
static function isDelegate(fFunction) {
return(fFunction.type == "Delegate");
}
static function clone(fDelegate) {
if ((fDelegate.target != undefined) && (fDelegate.func != undefined)) {
return(create(fDelegate.target, fDelegate.func, fDelegate.aArgs, fDelegate.bMerge));
}
return(fDelegate);
}
static function toString(fDelegate) {
if (isDelegate(fDelegate)) {
var _local3 = ((fDelegate.target.getClassNameWithPackage == null) ? (gdp.env.reflect.ReflectUtil.getTypeName(fDelegate.target)) : (fDelegate.target.getClassNameWithPackage(true)));
var _local2 = gdp.env.reflect.ReflectUtil.getMethodName(fDelegate.func, fDelegate.target);
var _local4 = fDelegate.aArgs.toString();
return(((((("Delegate {class:" + _local3) + ", method:") + _local2) + ", arguments:") + _local4) + "}");
}
return("[Function]");
}
function createDelegate(obj) {
return(create(obj, func));
}
static var nCount = 0;
}
Symbol 1064 MovieClip [__Packages.gdp.utils.XMLUtil] Frame 0
class gdp.utils.XMLUtil extends gdp.core.base.BaseClass
{
function XMLUtil () {
super();
}
static function isHasAttributes(node) {
for (var _local2 in node.attributes) {
return(true);
}
return(false);
}
static function toObject(node, oRes) {
if (oRes == undefined) {
oRes = new Object();
}
node.ignoreWhite = true;
var _local3 = node.childNodes.length - 1;
while (_local3 >= 0) {
var _local1 = node.childNodes[_local3];
if (_local1.childNodes[0].nodeValue == undefined) {
var _local4 = new Object();
if (isHasAttributes(_local1)) {
_local4.attributes = gdp.utils.ObjectUtil.copy(_local1.attributes);
}
toObject(_local1, _local4);
oRes[_local1.nodeName] = _local4;
} else if (_local1.hasChildNodes()) {
if ((_local1.nodeName == node.childNodes[_local3 - 1].nodeName) || (oRes[_local1.nodeName] instanceof Array)) {
if (!(oRes[_local1.nodeName] instanceof Array)) {
oRes[_local1.nodeName] = new Array();
}
oRes[_local1.nodeName].unshift(_local1.firstChild.nodeValue);
} else {
oRes[_local1.nodeName] = _local1.firstChild.nodeValue;
}
}
_local3--;
}
return(oRes);
}
static function format(xmlData, sMargin) {
if (sMargin == null) {
sMargin = newline;
}
var _local3 = "";
var _local2 = 0;
while (_local2 < xmlData.childNodes.length) {
var _local1 = xmlData.childNodes[_local2];
if (_local1.nodeType == 1) {
var _local7 = formateAttributes(_local1.attributes);
var _local4 = format(_local1, sMargin + "\t");
_local3 = _local3 + (((sMargin + "<") + _local1.nodeName) + _local7);
var _local6 = ((_local1.firstChild.nodeType == 1) ? (sMargin) : "");
if (_local4 == "") {
_local3 = _local3 + "/>";
} else {
_local3 = _local3 + (((((">" + _local4) + _local6) + "</") + _local1.nodeName) + ">");
}
} else if (_local1.nodeType == 3) {
_local3 = _local3 + _local1.nodeValue;
}
_local2++;
}
if (sMargin == newline) {
return(_local3.substring(1));
}
return(_local3);
}
static function formateAttributes(oAttributes) {
var _local2 = "";
for (var _local3 in oAttributes) {
_local2 = _local2 + ((((" " + _local3) + "=\"") + oAttributes[_local3]) + "\"");
}
return(_local2);
}
}
Symbol 1065 MovieClip [__Packages.gdp.core.base.BaseMovieClip] Frame 0
class gdp.core.base.BaseMovieClip extends gdp.core.base.SimpleMovieClip
{
function BaseMovieClip () {
super();
eventDispatcher = new gdp.env.events.EventDispatcher();
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psInitMovieClip));
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
function initLogger() {
gdp.core.logger.LogWrapper.getInstance().init("gdp_log");
gdp.core.logger.LogWrapper.getInstance().addConsolePublisher();
gdp.core.logger.LogWrapper.logCallingFile = false;
}
function psInitMovieClip(Void) {
dispatchEvent(new gdp.core.base.BaseMovieClipEvent(gdp.env.events.Event.INIT));
return(0);
}
function addEventListener(sType, fListener, bUseCapture, nPriority) {
eventDispatcher.addEventListener(sType, fListener, bUseCapture, nPriority);
}
function dispatchEvent(event) {
Object(event).oTarget = this;
return(eventDispatcher.dispatchEvent(event));
}
function hasEventListener(sType) {
return(eventDispatcher.hasEventListener(sType));
}
function removeEventListener(sType, fListener, bUseCapture) {
eventDispatcher.removeEventListener(sType, fListener, bUseCapture);
}
function willTrigger(sType) {
return(eventDispatcher.willTrigger(sType));
}
var eventDispatcher = null;
}
Symbol 1066 MovieClip [__Packages.gdp.core.process.Process] Frame 0
class gdp.core.process.Process extends gdp.core.base.BaseClass
{
var fFunc, aArgs, nPriority, nId, bReadOnly;
function Process (fFunc, aArgs, nPriority) {
super();
setFunction(fFunc);
setArguments(((aArgs == null) ? ([]) : (aArgs)));
setPriority(nPriority | -1);
}
function run(Void) {
return(Number(fFunc.apply(null, aArgs)));
}
function setFunction(fFunc) {
this.fFunc = fFunc;
gdp.utils.Delegate.setTo(fFunc, "process", this);
}
function getFunction(Void) {
return(fFunc);
}
function setArguments(aArgs) {
this.aArgs = aArgs;
}
function getArguments(Void) {
return(aArgs);
}
function setPriority(nPriority) {
this.nPriority = nPriority;
}
function getPriority(Void) {
return(nPriority);
}
function getId(Void) {
return(nId);
}
function setReadOnly(bReadOnly) {
this.bReadOnly = bReadOnly;
}
function isReadOnly(Void) {
return(bReadOnly);
}
function isValid(Void) {
if ((fFunc == null) || (typeof(fFunc) != "function")) {
return(false);
}
return(true);
}
function isEqual(process) {
if (process != this) {
return(false);
}
return(true);
}
function checkArguments(process) {
var _local3 = process.getArguments();
var _local4 = aArgs;
if (_local3.length != _local4.length) {
return(false);
}
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] != _local4[_local2]) {
return(false);
}
_local2++;
}
return(true);
}
function description(Void) {
var _local2 = {func:gdp.utils.Delegate.toString(fFunc), args:aArgs, id:nId};
return("Process " + gdp.utils.ObjectUtil.classToString(_local2, true));
}
}
Symbol 1067 MovieClip [__Packages.gdp.core.process.ProcessManager] Frame 0
class gdp.core.process.ProcessManager extends gdp.core.base.BaseClass
{
static var instance;
function ProcessManager () {
super();
aProcessesList = new Array();
aAddingProcessesList = new Array();
aRemovingProcessesList = new Array();
}
static function getInstance() {
if (instance == null) {
instance = new gdp.core.process.ProcessManager();
}
return(instance);
}
function run(Void) {
if (bPause) {
return(undefined);
}
bWaiting = true;
var _local2 = 0;
while (_local2 < aProcessesList.length) {
var _local3 = aProcessesList[_local2];
if ((aRemovingProcessesList.length > 0) && (gdp.utils.ArrayUtil.contains(aRemovingProcessesList, _local3))) {
} else {
var _local4 = _local3.run();
if ((_local4 == PROCESS_KILL) || (!_local3.isValid())) {
aProcessesList.splice(_local2--, 1);
} else if (_local4 == PROCESS_HOLD) {
return(undefined);
}
}
_local2++;
}
bWaiting = false;
if ((aRemovingProcessesList.length > 0) || (aAddingProcessesList.length > 0)) {
updateProcessList();
}
}
function pause(Void) {
bPause = true;
}
function unpause(Void) {
bPause = false;
}
function updateProcessList(bIgnoreWait) {
if (bWaiting && (!bIgnoreWait)) {
return(undefined);
}
while (aRemovingProcessesList.length) {
var _local3 = gdp.utils.ArrayUtil.find(aProcessesList, aRemovingProcessesList.shift());
if (_local3 != -1) {
aProcessesList.splice(_local3, 1);
}
}
while (aAddingProcessesList.length) {
var _local2 = aAddingProcessesList.shift();
if (_local2.getPriority() > -1) {
aProcessesList.splice(_local2.getPriority(), 0, _local2);
} else {
aProcessesList.push(_local2);
}
}
}
function addProcess(process) {
if (process.isValid()) {
process.nId = nNextFreeId++;
aAddingProcessesList.push(process);
updateProcessList();
return(process.nId);
}
return(-1);
}
function getProcess(nId) {
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].getId() == nId) {
return(aProcessesList[_local2]);
}
_local2++;
}
}
function removeProcess(value) {
if (typeof(value) == "number") {
return(removeProcessById(value));
}
if (value instanceof gdp.core.process.Process) {
return(removeProcessByProcess(value));
}
return(false);
}
function removeProcessById(nId) {
updateProcessList(true);
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].getId() == nId) {
aRemovingProcessesList.push(aProcessesList[_local2]);
return(true);
}
_local2++;
}
return(false);
}
function removeProcessByProcess(process) {
return(removeProcessById(process.getId()));
}
function hasProcess(process) {
updateProcessList(true);
if (process == null) {
return(false);
}
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].isEqual(process)) {
return(true);
}
_local2++;
}
return(false);
}
function hasProcessByFunction(fFunction) {
return(getCountProcessesByFunction(fFunction) > 0);
}
function getCountProcessesByFunction(fFunction) {
var _local5 = gdp.utils.Delegate.isDelegate(fFunction);
var _local4 = 0;
var _local2 = 0;
while (_local2 < aProcessesList.length) {
var _local3 = aProcessesList[_local2].getFunction();
if (_local5 && (_local3.func == fFunction.func)) {
_local4++;
}
if ((!_local5) && (_local3.func == fFunction)) {
_local4++;
}
_local2++;
}
return(_local4);
}
static var PROCESS_KILL = 0;
static var PROCESS_HOLD = -1;
var aProcessesList = null;
var aAddingProcessesList = null;
var aRemovingProcessesList = null;
var bPause = false;
var bWaiting = false;
var nNextFreeId = 0;
}
Symbol 1068 MovieClip [__Packages.gdp.core.base.BaseMovieClipEvent] Frame 0
class gdp.core.base.BaseMovieClipEvent extends gdp.env.events.Event
{
function BaseMovieClipEvent (sType, bBubbles, bCancelable) {
super(sType, bBubbles, bCancelable);
}
}
Symbol 1069 MovieClip [__Packages.game.core.Core] Frame 0
class game.core.Core extends gdp.core.base.BaseMovieClip
{
function Core () {
super();
initGame();
initConfig();
}
static function getInstance() {
if (instance == null) {
instance = _root.attachMovie("Core", "coreMc", _root.getNextHighestDepth());
}
return(instance);
}
function initGame(Void) {
fscommand ("trapallkeys", "true");
gdp.core.time.FrameTimer.getInstance().setFps(31);
}
function initConfig(Void) {
var _local2 = new gdp.core.config.ConfigLoader("./xml/Monkey's Tower/config.xml", gdp.utils.Delegate.create(this, onConfigLoad));
}
function onConfigLoad(Void) {
var _local1 = gdp.core.beans.BeansFactoryCollection.getInstance().getFactory("Monkey's Tower");
var _local2 = game.units.controllers.GameEngine(_local1.getComponentInstanceFromBeanName("gameengine"));
var _local10 = game.units.controllers.PregameController(_local1.getComponentInstanceFromBeanName("pregamecontroller"));
var _local16 = game.units.controllers.ChooseController(_local1.getComponentInstanceFromBeanName("choosecontroller"));
var _local7 = game.units.controllers.MapQuestController(_local1.getComponentInstanceFromBeanName("mapquestcontroller"));
var _local3 = game.units.controllers.MapPracticeController(_local1.getComponentInstanceFromBeanName("mappracticecontroller"));
var _local15 = game.units.controllers.InstrController(_local1.getComponentInstanceFromBeanName("instrcontroller"));
var _local11 = game.units.controllers.MenuController(_local1.getComponentInstanceFromBeanName("menucontroller"));
var _local14 = game.units.controllers.FieldController(_local1.getComponentInstanceFromBeanName("fieldcontroller"));
var _local4 = game.units.views.Pregame(_local1.getComponentInstanceFromBeanName("pregame"));
var _local6 = game.units.views.Choose(_local1.getComponentInstanceFromBeanName("choose"));
var _local12 = game.units.views.MapQuest(_local1.getComponentInstanceFromBeanName("mapquest"));
var _local13 = game.units.views.MapPractice(_local1.getComponentInstanceFromBeanName("mappractice"));
var _local5 = game.units.views.Instructions(_local1.getComponentInstanceFromBeanName("instructions"));
var _local9 = game.units.views.Field(_local1.getComponentInstanceFromBeanName("field"));
var _local8 = game.units.views.Menu(_local1.getComponentInstanceFromBeanName("menu"));
_local2.run();
}
static function main(mcTarget) {
registerClasses();
_global.bCompiledByMTASC = true;
var _local2 = getInstance(mcTarget);
}
static function registerClasses(Void) {
Object.registerClass("game.core.Core", game.core.Core);
Object.registerClass("game.units.controllers.GameEngine", game.units.controllers.GameEngine);
Object.registerClass("game.units.controllers.PregameController", game.units.controllers.PregameController);
Object.registerClass("game.units.controllers.ChooseController", game.units.controllers.ChooseController);
Object.registerClass("game.units.controllers.MapQuestController", game.units.controllers.MapQuestController);
Object.registerClass("game.units.controllers.MapPracticeController", game.units.controllers.MapPracticeController);
Object.registerClass("game.units.controllers.InstrController", game.units.controllers.InstrController);
Object.registerClass("game.units.controllers.MenuController", game.units.controllers.MenuController);
Object.registerClass("game.units.controllers.FieldController", game.units.controllers.FieldController);
Object.registerClass("game.helpers.Settings", game.helpers.Settings);
Object.registerClass("game.units.views.Pregame", game.units.views.Pregame);
Object.registerClass("game.units.views.Choose", game.units.views.Choose);
Object.registerClass("game.units.views.MapQuest", game.units.views.MapQuest);
Object.registerClass("game.units.views.MapPractice", game.units.views.MapPractice);
Object.registerClass("game.units.views.Instructions", game.units.views.Instructions);
Object.registerClass("game.units.views.Menu", game.units.views.Menu);
Object.registerClass("game.units.views.Field", game.units.views.Field);
}
function registerDebugClasses(Void) {
Object.registerClass("debug.request.reader.RequestReaderFromXML", gdp.core.debug.request.reader.RequestReaderFromXML);
Object.registerClass("debug.request.player.RequestPlayer", gdp.core.debug.request.player.RequestPlayer);
Object.registerClass("debug.log.RequestController", gdp.core.debug.request.controller.RequestController);
Object.registerClass("debug.log.RequestFactory", gdp.core.debug.request.RequestFactory);
Object.registerClass("debug.log.RequestLogger", gdp.core.debug.request.logger.RequestLogger);
Object.registerClass("debug.request.writer.RequestWriterToXml", gdp.core.debug.request.writer.RequestWriterToXml);
Object.registerClass("debug.router.Router", gdp.core.debug.router.Router);
}
static var instance = null;
}
Symbol 1070 MovieClip [__Packages.gdp.core.time.FrameTimer] Frame 0
class gdp.core.time.FrameTimer extends gdp.core.base.BaseClass
{
static var instance;
function FrameTimer () {
super();
nFramesCount = 0;
nFps = 0;
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, addFrame), [], 0);
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
static function getInstance() {
if (instance == null) {
instance = new gdp.core.time.FrameTimer();
}
return(instance);
}
function addFrame(Void) {
nFramesCount++;
}
function setFps(nFps) {
this.nFps = nFps;
}
function getFps(Void) {
return(nFps);
}
function getTime(Void) {
return(int((nFramesCount / nFps) * 1000));
}
function getFrames(Void) {
return(nFramesCount);
}
function frameToMilliseconds(nFrame) {
return(int((nFrame / nFps) * 1000));
}
function millisecondsToFrame(nMs) {
return(Math.round((nMs * nFps) / 1000));
}
var nFps = null;
var nFramesCount = null;
}
Symbol 1071 MovieClip [__Packages.gdp.core.config.ConfigLoader] Frame 0
class gdp.core.config.ConfigLoader extends gdp.core.base.BaseClass
{
var xml, sConfigFileUrl, fCallback, dispatchEvent;
function ConfigLoader () {
super();
init();
var _local4 = new gdp.env.overload.Overload(this);
_local4.addHandler([String], initWithFileAndCallback);
_local4.addHandler([String, Function], initWithFileAndCallback);
_local4.addHandler([String, Function, Boolean], initWithFileAndCallback);
_local4.addHandler([XML], initWithXML);
_local4.addHandler([XML, Function], initWithXML);
_local4.forward(arguments);
}
function init(Void) {
xml = new XML();
xml.ignoreWhite = true;
gdp.core.config.XMLParser.setDebug(bDebug);
}
function initWithFileAndCallback(sConfigFileUrl, fCallback, bNotAutoLoad) {
this.sConfigFileUrl = sConfigFileUrl;
xml.onLoad = gdp.utils.Delegate.create(this, onXMLLoad);
this.fCallback = fCallback;
if (!bNotAutoLoad) {
load();
}
}
function initWithXML(xmlConfig, fCallback, bNotAutoLoad) {
this.fCallback = fCallback;
loadFromString(xmlConfig.toString(), bNotAutoLoad);
}
function load() {
xml.load(sConfigFileUrl);
}
function loadFromString(sXmlConfig, bNotAutoLoad) {
init();
xml.parseXML(sXmlConfig);
if (!bNotAutoLoad) {
onXMLLoad(true);
}
}
function psParse() {
try {
if (bParserWait) {
return(null);
}
if (xmlCurrentNode == null) {
xmlCurrentNode = xml.firstChild.firstChild;
} else {
xmlCurrentNode = xmlCurrentNode.nextSibling;
}
if (xmlCurrentNode == null) {
dispatchEvent(new gdp.core.config.ConfigLoaderEvent(gdp.core.config.ConfigLoaderEvent.LOAD, null, null, true, this));
fCallback(true);
return(0);
}
var _local3 = new gdp.core.config.XMLParser(xmlCurrentNode);
var _local2 = _local3.run();
if (_local2 instanceof gdp.core.config.ConfigLoader) {
waitLoadImportFile(gdp.core.config.ConfigLoader(_local2));
}
} catch(e) {
dispatchEvent(new gdp.core.config.ConfigLoaderEvent(gdp.core.config.ConfigLoaderEvent.ERROR, null, null, false, this, e));
return(0);
}
}
function onXMLLoad(bSuccess) {
if (!bSuccess) {
throw new gdp.env.except.FileNotFoundException(("File [" + sConfigFileUrl) + "] is not found", this, arguments);
}
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psParse));
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
function waitLoadImportFile(configLoader) {
bParserWait = true;
var _local3 = gdp.utils.StringUtil.toArray(sConfigFileUrl, "/\\");
_local3.splice(_local3.length - 1, 1);
configLoader.sConfigFileUrl = String((_local3.join("/") + "/") + configLoader.sConfigFileUrl);
configLoader.fCallback = gdp.utils.Delegate.create(this, onLoadOtherConfig, [configLoader], true);
configLoader.load();
}
function onLoadOtherConfig(bSuccess, configLoader) {
bParserWait = false;
}
function description(Void) {
return(("[gdp.core.config.ConfigLoader fileName=" + sConfigFileUrl) + "]");
}
static var bDebug = false;
var xmlCurrentNode = null;
var bParserWait = false;
}
Symbol 1072 MovieClip [__Packages.gdp.core.config.XMLParser] Frame 0
class gdp.core.config.XMLParser extends gdp.core.base.BaseClass
{
static var aModules;
var xmlString;
function XMLParser (xmlString, bCheckTypeOfFirstChild) {
super();
toInfo(("gdp.core.config.XMLParser.XMLParser(" + [arguments]) + ")");
if (bCheckTypeOfFirstChild && (xmlString.firstChild != null)) {
if (xmlString.firstChild.nodeType == 3) {
this.xmlString = xmlString;
} else if (xmlString.firstChild.nodeType == 1) {
this.xmlString = xmlString.firstChild;
}
} else {
this.xmlString = xmlString;
}
if (!aModules) {
initModules();
}
}
static function addModule(oModuleClass, nPriority) {
if (aModules == undefined) {
initModules();
}
if (nPriority == undefined) {
aModules.push(oModuleClass);
} else {
aModules.splice(nPriority, 0, oModuleClass);
}
}
static function initModules() {
aModules = new Array();
addModule(gdp.core.config.modules.XMLImport);
addModule(gdp.core.config.modules.XML2Beans);
addModule(gdp.core.config.modules.XML2Class);
addModule(gdp.core.config.modules.XML2TypedData);
addModule(gdp.core.config.modules.XML2Array);
addModule(gdp.core.config.modules.XML2Object);
addModule(gdp.core.config.modules.XML2Null);
}
static function setDebug(bValue) {
bDebug = bValue;
}
static function getDebug() {
return(bDebug);
}
function toInfo(sMsg) {
if (getDebug()) {
trace(sMsg);
}
}
function run() {
return(matches(xmlString));
}
function matches(xmlCurrentNode) {
var _local2 = 0;
while (_local2 < aModules.length) {
if (aModules[_local2].match(xmlCurrentNode)) {
var _local3 = gdp.core.config.modules.AbstractModule(gdp.utils.ClassUtil.createInstance(aModules[_local2], [xmlCurrentNode, this]));
return(_local3.convert());
}
_local2++;
}
return(null);
}
static var bDebug = false;
}
Symbol 1073 MovieClip [__Packages.gdp.core.config.modules.AbstractModule] Frame 0
class gdp.core.config.modules.AbstractModule extends gdp.core.base.BaseClass
{
var xmlNode, parser;
function AbstractModule (xmlNode, parser) {
super();
if (!xmlNode) {
throw new gdp.env.except.IllegalArgumentException("Undefined xmlNode", this, arguments);
}
this.xmlNode = xmlNode;
this.parser = parser;
}
function setParser(parser) {
this.parser = parser;
}
function getParser(Void) {
return(parser);
}
static function match(xmlNode) {
throw new gdp.env.except.AbstractOperationException("match() is abstract and has to be implemented.", null, arguments);
return(null);
}
function convert() {
throw new gdp.env.except.AbstractOperationException("convert() is abstract and has to be implemented.", this, arguments);
return(null);
}
function toInfo(sMsg) {
parser.toInfo(sMsg);
}
}
Symbol 1074 MovieClip [__Packages.gdp.env.except.AbstractOperationException] Frame 0
class gdp.env.except.AbstractOperationException extends gdp.env.except.FatalException
{
function AbstractOperationException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1075 MovieClip [__Packages.gdp.core.config.modules.XMLImport] Frame 0
class gdp.core.config.modules.XMLImport extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XMLImport (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(xmlNode.nodeName == IMPORT_NODE);
}
function convert(Void) {
toInfo(("gdp.core.config.modules.XMLImport.convert(" + [xmlNode]) + ")");
var _local2 = new gdp.core.config.ConfigLoader(xmlNode.attributes[RESOURCE_ATTRIBUTE], null, true);
return(_local2);
}
static var IMPORT_NODE = "import";
static var RESOURCE_ATTRIBUTE = "resource";
}
Symbol 1076 MovieClip [__Packages.gdp.core.config.modules.XML2Beans] Frame 0
class gdp.core.config.modules.XML2Beans extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XML2Beans (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(((xmlNode.nodeName == BEANS_NODE) || (xmlNode.nodeName == REF_ELEMENT)) || (xmlNode.nodeName == BEAN_ELEMENT));
}
function convert() {
toInfo(("gdp.core.config.modules.XML2Beans.convert(" + [xmlNode.nodeName]) + ")");
switch (xmlNode.nodeName) {
case BEANS_NODE :
gdp.core.beans.BeansFactoryCollection.getInstance().addFactory(parseBeanDefinitions(xmlNode), xmlNode.attributes[NAME_ATTRIBUTE]);
break;
case BEAN_ELEMENT :
return(beanToBeanRef(parseBeanDefinitionElement(xmlNode)));
case REF_ELEMENT :
return(parseBeanReference(xmlNode));
}
}
function parseBeanDefinitions(xmlRoot) {
beanFactory = new gdp.core.beans.factory.BeanFactory();
beanFactory.setName(xmlRoot.attributes[NAME_ATTRIBUTE]);
switch (xmlRoot.attributes[DEFAULT_AUTOWIRE]) {
case "byName" :
beanFactory.setDefaultAutowire(gdp.core.beans.factory.support.AbstractAutowireCapableBeanFactory.AUTOWIRE_BY_NAME);
break;
case "no" :
default :
beanFactory.setDefaultAutowire(beanFactory.getDefaultAutowire());
}
var _local4;
var _local2 = 0;
while (_local2 < xmlRoot.childNodes.length) {
if (xmlRoot.childNodes[_local2].nodeName == BEAN_ELEMENT) {
_local4 = parseBeanDefinitionElement(xmlRoot.childNodes[_local2]);
beanFactory.addBean(_local4);
}
_local2++;
}
return(beanFactory);
}
function parseBeanDefinitionElement(xmlElement) {
var _local4 = xmlElement.attributes[ID_ATTRIBUTE];
var _local16 = xmlElement.attributes[NAME_ATTRIBUTE];
var _local8 = xmlElement.attributes[CLASS_ATTRIBUTE];
var _local9 = xmlElement.attributes[PARENT_ATTRIBUTE];
var _local15 = xmlElement.attributes[MOVIECLIP_ATTRIBUTE];
var _local13 = gdp.utils.StringUtil.toBoolean(xmlElement.attributes[SINGLETON_ATTRIBUTE]);
var _local14 = gdp.utils.StringUtil.toBoolean(xmlElement.attributes[LAZY_INIT_ATTRIBUTE]);
var _local7 = xmlElement.attributes[FACTORY_BEAN_ATTRIBUTE];
var _local10 = xmlElement.attributes[INIT_METHOD_ATTRIBUTE];
var _local11 = xmlElement.attributes[FACTORY_METHOD_ATTRIBUTE];
var _local12 = xmlElement.attributes[DESTROY_METHOD_ATTRIBUTE];
var _local6 = parseConstructorArgsElements(xmlElement, _local4);
var _local5 = parsePropertyElements(xmlElement, _local4);
var _local3;
if (_local8 != null) {
_local3 = new gdp.core.beans.factory.support.RootBean(_local4, _local8, _local6, _local5);
_local3.setLazyInit(_local14);
} else if (_local9 != null) {
_local3 = new gdp.core.beans.factory.support.ChildBean(_local4, _local9, _local6, _local5);
} else if (_local7 != null) {
_local3 = new gdp.core.beans.factory.support.FactoryBean(_local4, _local7, _local6, _local5);
}
switch (xmlElement.attributes[AUTOWIRE_ATTRIBUTE].toLowerCase()) {
case "no" :
_local3.setAutoWire(gdp.core.beans.factory.support.AbstractAutowireCapableBeanFactory.AUTOWIRE_NO);
break;
case "byName" :
_local3.setAutoWire(gdp.core.beans.factory.support.AbstractAutowireCapableBeanFactory.AUTOWIRE_BY_NAME);
break;
case "default" :
default :
_local3.setAutoWire(beanFactory.getDefaultAutowire());
}
_local3.setFactoryBean(_local7);
_local3.setFactoryMethod(_local11);
_local3.setInitMethod(_local10);
_local3.setDestroyMethod(_local12);
_local3.setSingleton(_local13);
return(_local3);
}
function parseConstructorArgsElements(xmlElement, sBeanName) {
var _local6 = new gdp.core.beans.factory.support.ConstructorArgumentValues(xmlElement.childNodes.length);
var _local4 = 0;
while (_local4 < xmlElement.childNodes.length) {
var _local3 = xmlElement.childNodes[_local4];
if (_local3.nodeName == CONSTRUCTOR_ARG_ELEMENT) {
var _local2 = parseValue(_local3);
if ((_local2 instanceof gdp.core.beans.factory.support.BeanReference) && (gdp.core.beans.factory.support.BeanReference(_local2).getFactoryName() == null)) {
gdp.core.beans.factory.support.BeanReference(_local2).setFactory(beanFactory);
}
_local6.addArgument(_local3.attributes[INDEX_ATTRIBUTE], _local2);
}
_local4++;
}
return(_local6);
}
function parsePropertyElements(xmlElement, sBeanName) {
var _local6 = new gdp.utils.Properties();
var _local4 = 0;
while (_local4 < xmlElement.childNodes.length) {
var _local3 = xmlElement.childNodes[_local4];
if (_local3.nodeName == PROPERTY_ELEMENT) {
var _local2 = parseValue(_local3);
if ((_local2 instanceof gdp.core.beans.factory.support.BeanReference) && (gdp.core.beans.factory.support.BeanReference(_local2).getFactoryName() == null)) {
gdp.core.beans.factory.support.BeanReference(_local2).setFactory(beanFactory);
}
_local6.setProperty(_local3.attributes[NAME_ATTRIBUTE], _local2);
}
_local4++;
}
return(_local6);
}
function parseValue(xmlElement) {
if (xmlElement.firstChild.nodeName == BEAN_ELEMENT) {
return((new gdp.core.config.XMLParser(xmlElement.firstChild)).run());
}
if (xmlElement.attributes[REF_ATTRIBUTE] != null) {
return(new gdp.core.beans.factory.support.BeanReference(xmlElement.attributes[REF_ATTRIBUTE]));
}
if (xmlElement.attributes[PARENT_REF_ATTRIBUTE] != null) {
return(new gdp.core.beans.factory.support.BeanReference(null, null, gdp.utils.StringUtil.toBoolean(xmlElement.attributes[PARENT_REF_ATTRIBUTE])));
}
return((new gdp.core.config.XMLParser(xmlElement.firstChild, true)).run());
}
function parseBeanReference(xmlElement) {
if (xmlElement.firstChild.nodeType == 3) {
return(new gdp.core.beans.factory.support.BeanReference(xmlElement.firstChild.toString(), xmlElement.attributes[LOCAL_REF_ATTRIBUTE], gdp.utils.StringUtil.toBoolean(xmlElement.attributes[PARENT_ATTRIBUTE])));
}
return(new gdp.core.beans.factory.support.BeanReference(xmlElement.attributes[BEAN_REF_ATTRIBUTE], xmlElement.attributes[LOCAL_REF_ATTRIBUTE], gdp.utils.StringUtil.toBoolean(xmlElement.attributes[PARENT_ATTRIBUTE])));
}
function beanToBeanRef(bean) {
var _local3 = "__beanref__" + (nLastRefId++);
if (bean.getBeanName() != null) {
_local3 = bean.getBeanName();
} else {
bean.setBeanName(_local3);
}
beanFactory.addBean(bean);
var _local2 = new gdp.core.beans.factory.support.BeanReference(bean.getBeanName());
_local2.setFactory(beanFactory);
return(_local2);
}
static var BEAN_NAME_DELIMITERS = ",; ";
static var BEANS_NODE = "beans";
static var DEFAULT_AUTOWIRE = "default-autowire";
static var NAME_ATTRIBUTE = "name";
static var BEAN_ELEMENT = "bean";
static var ID_ATTRIBUTE = "id";
static var PARENT_ATTRIBUTE = "parent";
static var CLASS_ATTRIBUTE = "class";
static var MOVIECLIP_ATTRIBUTE = "movieclip";
static var ABSTRACT_ATTRIBUTE = "abstract";
static var SINGLETON_ATTRIBUTE = "singleton";
static var LAZY_INIT_ATTRIBUTE = "lazy-init";
static var AUTOWIRE_ATTRIBUTE = "autowire";
static var DEPENDENCY_CHECK_ATTRIBUTE = "dependency-check";
static var DEPENDS_ON_ATTRIBUTE = "depends-on";
static var INIT_METHOD_ATTRIBUTE = "init-method";
static var DESTROY_METHOD_ATTRIBUTE = "destroy-method";
static var FACTORY_METHOD_ATTRIBUTE = "factory-method";
static var FACTORY_BEAN_ATTRIBUTE = "factory-bean";
static var CONSTRUCTOR_ARG_ELEMENT = "constructor-arg";
static var INDEX_ATTRIBUTE = "index";
static var TYPE_ATTRIBUTE = "type";
static var PROPERTY_ELEMENT = "property";
static var VALUE_ELEMENT = "value";
static var MOVIECLIP_PROPERTY_ELEMENT = "mc-property";
static var REF_ATTRIBUTE = "ref";
static var PARENT_REF_ATTRIBUTE = "parent-ref";
static var VALUE_ATTRIBUTE = "value";
static var LOOKUP_METHOD_ELEMENT = "lookup-method";
static var REF_ELEMENT = "ref";
static var IDREF_ELEMENT = "idref";
static var BEAN_REF_ATTRIBUTE = "bean";
static var LOCAL_REF_ATTRIBUTE = "local";
static var nLastRefId = 0;
static var beanFactory = null;
}
Symbol 1077 MovieClip [__Packages.gdp.core.beans.factory.IBeanFactory] Frame 0
interface gdp.core.beans.factory.IBeanFactory
{
}
Symbol 1078 MovieClip [__Packages.gdp.core.beans.factory.IBeanDefinition] Frame 0
interface gdp.core.beans.factory.IBeanDefinition
{
}
Symbol 1079 MovieClip [__Packages.gdp.utils.Properties] Frame 0
class gdp.utils.Properties extends gdp.core.base.BaseClass
{
var oProps;
function Properties (propOther) {
super();
if (propOther == null) {
oProps = new Object();
} else {
oProps = propOther.clone();
}
}
function isEmpty(Void) {
return(nCountProps == 0);
}
function clone(Void) {
var _local2 = new gdp.utils.Properties();
for (var _local3 in oProps) {
_local2.setProperty(_local3, oProps[_local3]);
}
return(_local2);
}
function mergeProperties(propOther) {
for (var _local3 in propOther.oProps) {
setProperty(_local3, propOther.oProps[_local3]);
}
}
function setProperty(sKey, value) {
if (sKey != undefined) {
oProps[sKey] = value;
nCountProps++;
}
}
function getProperty(sKey) {
return(oProps[sKey]);
}
function getPropertiesNames(Void) {
var _local2 = new Array();
for (var _local3 in oProps) {
_local2.push(_local3);
}
return(_local2);
}
function getPropertiesNamesWithValue(Void) {
var _local2 = new Array();
for (var _local3 in oProps) {
_local2.push([_local3, oProps[_local3]]);
}
return(_local2);
}
function getMethodName(sKey) {
return(SETTER_PREFIX + gdp.utils.StringUtil.ucFirst(sKey));
}
function getMethodsNames(Void) {
var _local2 = new Array();
for (var _local3 in oProps) {
_local2.push(getMethodName(_local3));
}
return(_local2);
}
function getMethodsNamesWithValue(Void) {
var _local2 = new Array();
for (var _local3 in oProps) {
_local2.push([getMethodName(_local3), oProps[_local3]]);
}
return(_local2);
}
function setPropertyForClass(sKey, oClass) {
var _local4 = gdp.env.reflect.ClassInfo.forObject(oClass).getMethods();
oClass[getMethodName(sKey)](oProps[sKey]);
}
function setAllPropertiesForClass(oClass) {
for (var _local3 in oProps) {
setPropertyForClass(_local3, oClass);
}
}
function description(Void) {
var _local2 = new gdp.data.holder.map.HashMap(oProps);
return(_local2.toString());
}
static var SETTER_PREFIX = "set";
var nCountProps = 0;
}
Symbol 1080 MovieClip [__Packages.gdp.data.holder.map.AbstractMap] Frame 0
class gdp.data.holder.map.AbstractMap extends gdp.core.base.BaseClass
{
var put;
function AbstractMap () {
super();
}
function populate(source) {
if (source) {
for (var _local3 in source) {
put(_local3, source[_local3]);
}
}
}
function description() {
var _local5 = gdp.data.holder.Map(this);
var _local3 = "{";
var _local4 = new gdp.data.holder.array.ArrayIterator(_local5.getValues());
var _local2 = new gdp.data.holder.array.ArrayIterator(_local5.getKeys());
while (_local2.hasNext()) {
_local3 = _local3 + ((_local2.next().toString() + "=") + _local4.next().toString());
if (_local2.hasNext()) {
_local3 = _local3 + ", ";
}
}
_local3 = _local3 + "}";
return(_local3);
}
}
Symbol 1081 MovieClip [__Packages.gdp.data.holder.Map] Frame 0
interface gdp.data.holder.Map extends gdp.core.base.BaseInterface
{
}
Symbol 1082 MovieClip [__Packages.gdp.data.holder.Iterator] Frame 0
interface gdp.data.holder.Iterator
{
}
Symbol 1083 MovieClip [__Packages.gdp.data.holder.array.ArrayIterator] Frame 0
class gdp.data.holder.array.ArrayIterator extends gdp.core.base.BaseClass implements gdp.data.holder.Iterator
{
var t, i, __proto__;
function ArrayIterator (target) {
super();
if (!target) {
throw new gdp.env.except.IllegalArgumentException(("Argument 'target' [" + target) + "] must not be 'null' nor 'undefined'.", this, arguments);
}
t = target;
i = -1;
var t = target;
var g = -1;
var p = gdp.data.holder.array.ArrayIterator.prototype;
var s = this;
if ((__proto__ == p) && (t.length > 25)) {
var y = function () {
if (g < (t.length - 1)) {
arguments.callee = p.next;
throw new gdp.data.holder.NoSuchElementException("There is no more element.", this, arguments);
}
return(t[++g]);
};
var x = function () {
s.next = y;
return(t[++g]);
};
var z = function () {
s.next = y;
arguments.callee = p.next;
throw new gdp.data.holder.NoSuchElementException("There is no more element.", this, arguments);
};
next = y;
hasNext = function () {
if (g < (t.length - 1)) {
s.next = x;
return(true);
}
s.next = z;
return(false);
};
remove = function () {
if (g < 0) {
arguments.callee = p.remove;
throw new gdp.env.except.IllegalStateException("You tried to remove an element before calling the 'next' method. There is thus no element selected to remove.", this, arguments);
}
t.splice(g--, 1);
};
}
}
function hasNext() {
return(i < (t.length - 1));
}
function next() {
if (!hasNext()) {
throw new gdp.data.holder.NoSuchElementException("There is no more element.", this, arguments);
}
return(t[++i]);
}
function remove() {
if (i < 0) {
throw new gdp.env.except.IllegalStateException("You tried to remove an element before calling the 'next' method. There is thus no element selected to remove.", this, arguments);
}
t.splice(i--, 1);
}
}
Symbol 1084 MovieClip [__Packages.gdp.data.holder.DataHolderException] Frame 0
class gdp.data.holder.DataHolderException extends gdp.env.except.Exception
{
function DataHolderException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1085 MovieClip [__Packages.gdp.data.holder.NoSuchElementException] Frame 0
class gdp.data.holder.NoSuchElementException extends gdp.data.holder.DataHolderException
{
function NoSuchElementException (message, thrower, args) {
super(message, thrower, args);
}
}
Symbol 1086 MovieClip [__Packages.gdp.data.holder.map.HashMap] Frame 0
class gdp.data.holder.map.HashMap extends gdp.data.holder.map.AbstractMap implements gdp.data.holder.Map
{
var keys, values, populate;
function HashMap (source) {
super();
keys = new Array();
values = new Array();
populate(source);
}
function containsKey(key) {
return(findKey(key) > -1);
}
function containsValue(value) {
return(findValue(value) > -1);
}
function getKeys() {
return(keys.slice());
}
function getValues() {
return(values.slice());
}
function get(key) {
return(values[findKey(key)]);
}
function put(key, value) {
var _local3;
var _local2 = findKey(key);
if (_local2 < 0) {
keys.push(key);
values.push(value);
} else {
_local3 = values[_local2];
values[_local2] = value;
}
return(_local3);
}
function putAll(map) {
var _local4 = map.getValues();
var _local3 = map.getKeys();
var _local5 = _local3.length;
var _local2 = 0;
while (_local2 < _local5) {
put(_local3[_local2], _local4[_local2]);
_local2 = _local2 - -1;
}
}
function clear() {
keys = new Array();
values = new Array();
}
function remove(key) {
var _local2 = findKey(key);
if (_local2 > -1) {
var _local3 = values[_local2];
values.splice(_local2, 1);
keys.splice(_local2, 1);
return(_local3);
}
return(undefined);
}
function iterator() {
return(new gdp.data.holder.map.ValueMapIterator(this));
}
function valueIterator() {
return(iterator());
}
function keyIterator() {
return(new gdp.data.holder.map.KeyMapIterator(this));
}
function size() {
return(keys.length);
}
function isEmpty() {
return(size() < 1);
}
function findValue(value) {
var _local2 = values.length;
_local2--;
while ((!(values[_local2] === value)) && (_local2 > -1)) {
}
return(_local2);
}
function findKey(key) {
var _local2 = keys.length;
_local2--;
while ((!(keys[_local2] === key)) && (_local2 > -1)) {
}
return(_local2);
}
static var __proto__ = gdp.data.holder.map.AbstractMap;
}
Symbol 1087 MovieClip [__Packages.gdp.data.holder.map.ValueMapIterator] Frame 0
class gdp.data.holder.map.ValueMapIterator extends gdp.core.base.BaseClass implements gdp.data.holder.Iterator
{
var target, iterator, key;
function ValueMapIterator (target) {
super();
if (!target) {
throw new gdp.env.except.IllegalArgumentException(("The passed-in target map '" + target) + "' is not allowed to be null or undefined.", this, arguments);
}
this.target = target;
iterator = new gdp.data.holder.array.ArrayIterator(target.getKeys());
}
function hasNext() {
return(iterator.hasNext());
}
function next() {
key = iterator.next();
return(target.get(key));
}
function remove() {
iterator.remove();
target.remove(key);
}
}
Symbol 1088 MovieClip [__Packages.gdp.data.holder.map.KeyMapIterator] Frame 0
class gdp.data.holder.map.KeyMapIterator extends gdp.core.base.BaseClass implements gdp.data.holder.Iterator
{
var target, iterator, key;
function KeyMapIterator (target) {
super();
if (!target) {
throw new gdp.env.except.IllegalArgumentException(("The passed-in target map '" + target) + "' is not allowed to be null or undefined.", this, arguments);
}
this.target = target;
iterator = new gdp.data.holder.array.ArrayIterator(target.getKeys());
}
function hasNext() {
return(iterator.hasNext());
}
function next() {
key = iterator.next();
return(key);
}
function remove() {
iterator.remove();
target.remove(key);
}
}
Symbol 1089 MovieClip [__Packages.gdp.core.beans.factory.support.ConstructorArgumentValues] Frame 0
class gdp.core.beans.factory.support.ConstructorArgumentValues extends gdp.core.base.BaseClass
{
var aArgs;
function ConstructorArgumentValues (nArgsCount) {
super();
aArgs = new Array(nArgsCount);
}
function clone(Void) {
var _local2 = new gdp.core.beans.factory.support.ConstructorArgumentValues(aArgs.length);
_local2.aArgs = aArgs.concat();
return(_local2);
}
function size(Void) {
return(getArgumentsForApply().length);
}
function isEmpty(Void) {
return(getArgumentsForApply().length == 0);
}
function addArgument(nIndex, value) {
aArgs.splice(((nIndex == null) ? (nArgsCount++) : (nIndex)), 1, value);
}
function getArgument(nIndex) {
return(getArgumentsForApply()[nIndex]);
}
function getArgumentsForApply(Void) {
return(gdp.utils.ArrayUtil.rightTrim(aArgs));
}
function description(Void) {
return(("[" + getArgumentsForApply().toString()) + "]");
}
var nArgsCount = 0;
}
Symbol 1090 MovieClip [__Packages.gdp.core.beans.BeansFactoryCollection] Frame 0
class gdp.core.beans.BeansFactoryCollection extends gdp.core.base.BaseClass
{
static var instance;
function BeansFactoryCollection () {
super();
}
static function getInstance() {
if (instance == null) {
instance = new gdp.core.beans.BeansFactoryCollection();
}
return(instance);
}
function addFactory(beansFactory) {
if (oMap[beansFactory.getName()] == null) {
oMap[beansFactory.getName()] = beansFactory;
} else {
oMap[beansFactory.getName()].mergeBeanFactory(beansFactory);
}
}
function getFactoriesMap(Void) {
return(oMap);
}
function getFactory(sName) {
return(oMap[sName]);
}
var oMap = new Object();
}
Symbol 1091 MovieClip [__Packages.gdp.core.beans.factory.support.AbstractBeanFactory] Frame 0
class gdp.core.beans.factory.support.AbstractBeanFactory extends gdp.core.base.BaseClass implements gdp.core.beans.factory.IBeanFactory
{
function AbstractBeanFactory () {
super();
oBeans = new Object();
oFactoryBeans = new Object();
oRefsBuilded = new Object();
oAliasesMaps = new Object();
oSingletonCache = new Object();
}
function getName(Void) {
return(sName);
}
function setName(sName) {
this.sName = sName;
}
function getDefaultAutowire(Void) {
return(nDefaultAutowire);
}
function setDefaultAutowire(nDefaultAutowire) {
this.nDefaultAutowire = nDefaultAutowire;
}
function addBean(bean) {
if (!(bean instanceof gdp.core.beans.factory.IBeanDefinition)) {
throw new gdp.core.beans.IsNotBeanException("Try add info BeanFactory object not extended form IBeanDefinition", this, arguments);
}
oBeans[bean.getBeanName()] = bean;
bean.setParentFactory(this);
}
function getBean(sName) {
if (oBeans[sName] == undefined) {
throw new gdp.core.beans.BeanNotFoundException(("Bean [" + sName) + "] not found in BeanFactory", this, arguments);
}
return(oBeans[sName]);
}
function getBeans(Void) {
var _local2 = new Array();
for (var _local3 in oBeans) {
_local2.push(oBeans[_local3]);
}
return(_local2);
}
function getComponentInstanceFromBeanName(sName) {
return(preBuildBeanByName(sName));
}
function getComponentInstanceFromBean(bean) {
return(getComponentInstanceFromBeanName(bean.getBeanName()));
}
function containsBeans(Void) {
for (var _local2 in oBeans) {
if (oBeans[_local2] != undefined) {
return(true);
}
}
return(false);
}
function mergeBeanFactory(beanFactory) {
var _local3 = beanFactory.getBeans();
var _local2 = 0;
while (_local2 < _local3.length) {
addBean(_local3[_local2]);
_local2++;
}
}
function getAliasMap(sBeanName) {
if (oAliasesMaps[sBeanName] != null) {
return(oAliasesMaps[sBeanName]);
}
var _local5 = new Array();
var _local6 = getBean(sBeanName);
if (_local6 instanceof gdp.core.beans.factory.support.RootBean) {
return([sBeanName]);
}
if (_local6 instanceof gdp.core.beans.factory.support.ChildBean) {
var _local4 = gdp.core.beans.factory.support.ChildBean(_local6);
var _local3 = getBean(_local4.getParentName());
_local5.push(_local4.getBeanName());
while ((!(_local3 instanceof gdp.core.beans.factory.support.RootBean)) && (_local3 != undefined)) {
_local4 = gdp.core.beans.factory.support.ChildBean(_local3);
_local3 = getBean(_local4.getParentName());
if (gdp.utils.ArrayUtil.contains(_local5, _local4.getBeanName())) {
throw new gdp.core.beans.factory.xml.IllegalParentExeption((((("Name [" + _local3.getParentName()) + "] of the parent bean") + " in the bean [") + _local3.getBeanName()) + "] is not correct.", this, arguments);
}
_local5.push(_local4.getBeanName());
}
_local5.push(_local3.getBeanName());
}
return((oAliasesMaps[sBeanName] = _local5));
}
function preBuildBeanByName(sName, parentInstance) {
var _local2 = getBean(sName);
return(preBuildBean(_local2, parentInstance));
}
function preBuildBean(bean, parentInstance) {
var _local6 = bean.getBeanName();
if (((bean.getFactoryBean() == null) && (bean.isSingleton())) && (oSingletonCache[_local6] != null)) {
return(oSingletonCache[_local6]);
}
var _local7;
if (bean instanceof gdp.core.beans.factory.support.RootBean) {
_local7 = beanBuild(bean, parentInstance);
} else if (bean instanceof gdp.core.beans.factory.support.ChildBean) {
var _local4 = getAliasMap(_local6);
var _local3 = gdp.core.beans.factory.support.RootBean(getBean(String(_local4.pop())));
var _local2 = _local4.length - 1;
while (_local2 >= 0) {
_local3 = mergeBeans(_local3, gdp.core.beans.factory.support.ChildBean(getBean(_local4[_local2])));
_local2--;
}
_local7 = beanBuild(_local3, parentInstance);
} else if (bean instanceof gdp.core.beans.factory.support.FactoryBean) {
bean = createFactoryBean(bean);
_local7 = preBuildBean(bean, parentInstance);
}
if (bean.isSingleton() && (oSingletonCache[_local6] == null)) {
oSingletonCache[_local6] = _local7;
}
return(_local7);
}
function createFactoryBean(factoryBean) {
if (oFactoryBeans[(factoryBean.getBeanName() + "_") + factoryBean.getFactoryBean()] != null) {
return(oFactoryBeans[(factoryBean.getBeanName() + "_") + factoryBean.getFactoryBean()]);
}
var _local3 = oBeans[factoryBean.getFactoryBean()];
_local3 = _local3.clone();
_local3.setBeanName(_local3.getBeanName() + "_factorybean");
_local3.setSingleton(false);
if (factoryBean.getFactoryMethod() != null) {
_local3.setFactoryMethod(factoryBean.getFactoryMethod());
}
if (!factoryBean.getPropertyValues().isEmpty()) {
_local3.getPropertyValues().mergeProperties(factoryBean.getPropertyValues());
}
return((oFactoryBeans[(factoryBean.getBeanName() + "_") + factoryBean.getFactoryBean()] = _local3));
}
function beanBuild(bean, parentInstance) {
var _local3;
if (bean.getFactoryMethod() == null) {
_local3 = gdp.utils.ClassUtil.createCleanInstance(bean.getBeanClass());
} else {
_local3 = bean.getBeanClass()[bean.getFactoryMethod()].apply(bean.getBeanClass(), []);
}
if (bean.getFactoryMethod() == null) {
var _local5 = preBuildConstructorArgs(bean, _local3, parentInstance);
gdp.utils.ClassUtil.applyConstructor(bean.getBeanClass(), _local3, _local5.getArgumentsForApply());
}
var _local6 = preBuildProperties(bean, _local3, parentInstance);
_local6.setAllPropertiesForClass(_local3);
if (bean.getInitMethod() != null) {
var _local4 = gdp.env.reflect.ClassInfo.forObject(_local3);
_local4.getMethodByName(bean.getInitMethod()).invoke(_local3, []);
}
return(_local3);
}
function preBuildConstructorArgs(bean, instance, parentInstance) {
var _local4 = bean.getConstructorArgumentValues();
var _local2 = 0;
while (_local2 < _local4.size()) {
var _local3 = _local4.getArgument(_local2);
if (_local3 instanceof gdp.core.beans.factory.support.BeanReference) {
_local4.addArgument(_local2, buildRef(_local3, instance, parentInstance));
}
_local2++;
}
return(_local4);
}
function preBuildProperties(bean, instance, parentInstance) {
var _local4 = bean.getPropertyValues().clone();
var _local3 = _local4.getPropertiesNamesWithValue();
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2][1] instanceof gdp.core.beans.factory.support.BeanReference) {
_local4.setProperty(_local3[_local2][0], buildRef(_local3[_local2][1], instance, parentInstance));
}
_local2++;
}
return(_local4);
}
function buildRef(beanRef, instance, parentInstance) {
if (beanRef.isParentBean()) {
return(parentInstance);
}
var _local2 = beanRef.getBeanName();
if ((oRefsBuilded[_local2] != null) && (beanRef.getBean().getFactoryBean() == null)) {
return(oRefsBuilded[_local2]);
}
return((oRefsBuilded[_local2] = preBuildBeanByName(_local2, instance)));
}
function mergeBeans(rootBean, childBean) {
var _local2 = rootBean.clone();
if (!childBean.getConstructorArgumentValues().isEmpty()) {
_local2.setConstructorArgumentValues(childBean.getConstructorArgumentValues());
}
if (!childBean.getPropertyValues().isEmpty()) {
_local2.getPropertyValues().mergeProperties(childBean.getPropertyValues());
}
if (childBean.isSingleton()) {
_local2.setSingleton(childBean.isSingleton());
}
if (childBean.isLazyInit()) {
_local2.setLazyInit(childBean.isLazyInit());
}
if (childBean.getInitMethod() != null) {
_local2.setInitMethod(childBean.getInitMethod());
}
if (childBean.getFactoryMethod() != null) {
_local2.setFactoryMethod(childBean.getFactoryMethod());
}
if (childBean.getDestroyMethod() != null) {
_local2.setDestroyMethod(childBean.getDestroyMethod());
}
return(_local2);
}
var sName = null;
var oBeans = null;
var oRefsBuilded = null;
var oFactoryBeans = null;
var oSingletonCache = null;
var oAliasesMaps = null;
var nDefaultAutowire = null;
}
Symbol 1092 MovieClip [__Packages.gdp.core.beans.BeansException] Frame 0
class gdp.core.beans.BeansException extends gdp.env.except.FatalException
{
function BeansException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1093 MovieClip [__Packages.gdp.core.beans.IsNotBeanException] Frame 0
class gdp.core.beans.IsNotBeanException extends gdp.core.beans.BeansException
{
function IsNotBeanException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1094 MovieClip [__Packages.gdp.core.beans.BeanNotFoundException] Frame 0
class gdp.core.beans.BeanNotFoundException extends gdp.core.beans.BeansException
{
function BeanNotFoundException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1095 MovieClip [__Packages.gdp.core.beans.factory.support.AbstractBean] Frame 0
class gdp.core.beans.factory.support.AbstractBean extends gdp.core.base.BaseClass implements gdp.core.beans.factory.IBeanDefinition
{
var beanParent;
function AbstractBean (sName, constArgs, propValues) {
super();
setBeanName(sName);
setConstructorArgumentValues(constArgs.clone());
setPropertyValues(propValues.clone());
}
function clone(Void) {
throw new gdp.env.except.AbstractOperationException("clone() is abstract and has to be implemented.", this, arguments);
return(null);
}
function setParentFactory(beanFactory) {
this.beanFactory = beanFactory;
}
function getParentFactory(Void) {
return(beanFactory);
}
function getBeanName(Void) {
return(sBeanName);
}
function setBeanName(sValue) {
sBeanName = sValue;
}
function setBeanClassName(sClassName) {
sBeanClassName = sClassName;
oBeanClass = gdp.env.reflect.ClassInfo.forName(sBeanClassName).getType();
if (oBeanClass == undefined) {
throw new gdp.core.config.IllegalNameOfObjectException(((("Illegal name of class [" + sBeanClassName) + "] in bean [") + getBeanName()) + "]", this, arguments);
}
}
function getBeanClassName(Void) {
return(sBeanClassName);
}
function hasBeanClass(Void) {
return(gdp.utils.ClassUtil.isSubClassOf(oBeanClass, gdp.core.base.BaseClass));
}
function getBeanClass(Void) {
if (!hasBeanClass()) {
throw new gdp.env.except.IllegalStateException(("Bean definition does not carry a resolved bean class [" + getBeanClassName()) + "]", this, arguments);
}
return(oBeanClass);
}
function setSingleton(bValue) {
bSingleton = bValue;
}
function isSingleton(Void) {
return(bSingleton);
}
function setAutoWire(nValue) {
nAutoWire = nValue;
}
function getAutoWire(Void) {
return(nAutoWire);
}
function setLazyInit(bValue) {
bLazyInit = bValue;
}
function isLazyInit(Void) {
return(bLazyInit);
}
function setPropertyValues(propValues) {
propertiesValues = propValues;
}
function getPropertyValues(Void) {
return(propertiesValues);
}
function setConstructorArgumentValues(constArgs) {
constuctorArgs = constArgs;
}
function getConstructorArgumentValues(Void) {
return(constuctorArgs);
}
function setInitMethod(sValue) {
sInitMethodName = sValue;
}
function getInitMethod(Void) {
return(sInitMethodName);
}
function setFactoryBean(sValue) {
sFactoryBean = sValue;
}
function getFactoryBean(Void) {
return(sFactoryBean);
}
function setFactoryMethod(sValue) {
sFactoryMethodName = sValue;
}
function getFactoryMethod(Void) {
return(sFactoryMethodName);
}
function setDestroyMethod(sValue) {
sDestroyMethodName = sValue;
}
function getDestroyMethod(Void) {
return(sDestroyMethodName);
}
function getComponentInstance(Void) {
return(gdp.core.beans.factory.IBeanFactory(getParentFactory()).getComponentInstanceFromBeanName(sBeanName));
}
function setParentBean(beanParent) {
this.beanParent = beanParent;
}
function getParentBean(Void) {
return(beanParent);
}
function hasParentBean(Void) {
return(beanParent != null);
}
var sBeanName = null;
var sBeanClassName = null;
var oBeanClass = null;
var bSingleton = true;
var bLazyInit = false;
var nAutoWire = null;
var constuctorArgs = null;
var propertiesValues = null;
var sInitMethodName = null;
var sDestroyMethodName = null;
var sFactoryMethodName = null;
var sFactoryBean = null;
var beanFactory = null;
}
Symbol 1096 MovieClip [__Packages.gdp.core.config.IllegalNameOfObjectException] Frame 0
class gdp.core.config.IllegalNameOfObjectException extends gdp.env.except.FatalException
{
function IllegalNameOfObjectException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1097 MovieClip [__Packages.gdp.core.beans.factory.support.RootBean] Frame 0
class gdp.core.beans.factory.support.RootBean extends gdp.core.beans.factory.support.AbstractBean
{
var setBeanClassName, getBeanName, getBeanClassName, getConstructorArgumentValues, getPropertyValues, getAutoWire, isSingleton, isLazyInit, getInitMethod, getFactoryMethod, getDestroyMethod, getParentFactory, propertiesValues, constuctorArgs, sBeanClassName, bLazyInit, bSingleton, sBeanName;
function RootBean (sBeanName, sClassName, constArgs, propValues) {
super(sBeanName, constArgs, propValues);
setBeanClassName(sClassName);
}
function clone() {
var _local2 = new gdp.core.beans.factory.support.RootBean(getBeanName(), getBeanClassName(), getConstructorArgumentValues(), getPropertyValues());
_local2.setAutoWire(getAutoWire());
_local2.setSingleton(isSingleton());
_local2.setLazyInit(isLazyInit());
_local2.setInitMethod(getInitMethod());
_local2.setFactoryMethod(getFactoryMethod());
_local2.setDestroyMethod(getDestroyMethod());
_local2.setParentFactory(getParentFactory());
return(_local2);
}
function description() {
var _local2 = {beanName:sBeanName, singleton:bSingleton, lazyinit:bLazyInit, beanClassName:sBeanClassName, constuctorArguments:constuctorArgs.toString(), propertiesValues:propertiesValues.toString()};
return("Bean Root" + gdp.utils.ObjectUtil.classToString(_local2));
}
}
Symbol 1098 MovieClip [__Packages.gdp.core.beans.factory.support.ChildBean] Frame 0
class gdp.core.beans.factory.support.ChildBean extends gdp.core.beans.factory.support.AbstractBean
{
var sParentName, getBeanName, getConstructorArgumentValues, getPropertyValues, getAutoWire, isSingleton, isLazyInit, getInitMethod, getFactoryMethod, getDestroyMethod, getParentFactory, propertiesValues, constuctorArgs, bSingleton, sBeanName;
function ChildBean (sBeanName, sParentName, constArgs, propValues) {
super(sBeanName, constArgs, propValues);
this.sParentName = sParentName;
}
function clone() {
var _local2 = new gdp.core.beans.factory.support.ChildBean(getBeanName(), getParentName(), getConstructorArgumentValues(), getPropertyValues());
_local2.setAutoWire(getAutoWire());
_local2.setSingleton(isSingleton());
_local2.setLazyInit(isLazyInit());
_local2.setInitMethod(getInitMethod());
_local2.setFactoryMethod(getFactoryMethod());
_local2.setDestroyMethod(getDestroyMethod());
_local2.setParentFactory(getParentFactory());
return(_local2);
}
function getParentName() {
return(sParentName);
}
function description() {
var _local2 = {beanName:sBeanName, parentName:sParentName, singleton:bSingleton, constuctorArguments:constuctorArgs.toString(), propertiesValues:propertiesValues.toString()};
return("Bean Child" + gdp.utils.ObjectUtil.classToString(_local2));
}
}
Symbol 1099 MovieClip [__Packages.gdp.core.beans.factory.xml.IllegalParentExeption] Frame 0
class gdp.core.beans.factory.xml.IllegalParentExeption extends gdp.core.beans.BeansException
{
function IllegalParentExeption (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1100 MovieClip [__Packages.gdp.core.beans.factory.support.FactoryBean] Frame 0
class gdp.core.beans.factory.support.FactoryBean extends gdp.core.beans.factory.support.AbstractBean
{
var setFactoryBean, getBeanName, getFactoryMethod, getConstructorArgumentValues, getPropertyValues, getAutoWire, isSingleton, isLazyInit, getInitMethod, getDestroyMethod, getParentFactory, propertiesValues, constuctorArgs, sFactoryBean, bLazyInit, bSingleton, sBeanName;
function FactoryBean (sBeanName, sFactoryBeanName, constArgs, propValues) {
super(sBeanName, constArgs, propValues);
setFactoryBean(sFactoryBeanName);
}
function clone() {
var _local2 = new gdp.core.beans.factory.support.FactoryBean(getBeanName(), getFactoryMethod(), getConstructorArgumentValues(), getPropertyValues());
_local2.setAutoWire(getAutoWire());
_local2.setSingleton(isSingleton());
_local2.setLazyInit(isLazyInit());
_local2.setInitMethod(getInitMethod());
_local2.setFactoryMethod(getFactoryMethod());
_local2.setDestroyMethod(getDestroyMethod());
_local2.setParentFactory(getParentFactory());
return(_local2);
}
function description() {
var _local2 = {beanName:sBeanName, singleton:bSingleton, lazyinit:bLazyInit, factory_bean:sFactoryBean, constuctorArguments:constuctorArgs.toString(), propertiesValues:propertiesValues.toString()};
return("Factory Bean" + gdp.utils.ObjectUtil.classToString(_local2));
}
}
Symbol 1101 MovieClip [__Packages.gdp.core.beans.factory.support.BeanReference] Frame 0
class gdp.core.beans.factory.support.BeanReference extends gdp.core.base.BaseClass
{
function BeanReference (sBeanName, sFactoryName, bIsParentBean) {
super();
this.sBeanName = sBeanName;
this.sFactoryName = sFactoryName;
sParentBeanName = sParentBeanName;
this.bIsParentBean = bIsParentBean;
}
function getBeanName(Void) {
return(sBeanName);
}
function getBean(Void) {
return(getFactory().getBean(sBeanName));
}
function isParentBean(Void) {
return(bIsParentBean);
}
function setParentBean(beanParent) {
sParentBeanName = beanParent.getBeanName();
}
function getParentBean(Void) {
return(getFactory().getBean(sParentBeanName));
}
function setParentBeanName(sParentBeanName) {
this.sParentBeanName = sParentBeanName;
}
function getParentBeanName(Void) {
return(sParentBeanName);
}
function getFactoryName(Void) {
return(sFactoryName);
}
function setFactoryName(sFactoryName) {
this.sFactoryName = sFactoryName;
}
function getFactory(Void) {
return(gdp.core.beans.BeansFactoryCollection.getInstance().getFactory(sFactoryName));
}
function setFactory(factoryBean) {
sFactoryName = factoryBean.getName();
}
function description(Void) {
var _local2 = {beanName:sBeanName, factoryName:sFactoryName, isParent:bIsParentBean};
return("BeanReference " + gdp.utils.ObjectUtil.classToString(_local2, true));
}
var sBeanName = null;
var sFactoryName = null;
var sParentBeanName = null;
var bIsParentBean = null;
}
Symbol 1102 MovieClip [__Packages.gdp.core.beans.factory.support.IAutowireCapableBeanFactory] Frame 0
interface gdp.core.beans.factory.support.IAutowireCapableBeanFactory extends gdp.core.beans.factory.IBeanFactory
{
}
Symbol 1103 MovieClip [__Packages.gdp.core.beans.factory.support.AbstractAutowireCapableBeanFactory] Frame 0
class gdp.core.beans.factory.support.AbstractAutowireCapableBeanFactory extends gdp.core.beans.factory.support.AbstractBeanFactory implements gdp.core.beans.factory.support.IAutowireCapableBeanFactory
{
var oBeans;
function AbstractAutowireCapableBeanFactory () {
super();
}
function addBean(bean) {
super.addBean(bean);
autowireAll();
}
function autowireAll(Void) {
for (var _local3 in oBeans) {
var _local2 = oBeans[_local3];
if (_local2 instanceof gdp.core.beans.factory.support.RootBean) {
oBeans[_local3] = autowire(_local2, _local2.getAutoWire());
}
}
}
function autowire(beanClass, nAutowireMode) {
if (nAutowireMode == AUTOWIRE_NO) {
return(beanClass);
}
var _local2 = beanClass.clone();
if (nAutowireMode == AUTOWIRE_BY_NAME) {
autowireBeanProperties(_local2);
}
return(_local2);
}
function autowireBeanProperties(beanClass) {
var _local6 = beanClass.getPropertyValues().getPropertiesNames();
var _local4 = getMethodsProperties(beanClass);
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = oBeans[_local4[_local2]];
if ((oBeans[_local4[_local2]] != null) && (!gdp.utils.ArrayUtil.contains(_local6, _local3.getBeanName()))) {
var _local5 = new gdp.core.beans.factory.support.BeanReference(_local3.getBeanName(), _local3.getParentFactory().getName());
beanClass.getPropertyValues().setProperty(_local4[_local2], _local5);
}
_local2++;
}
}
function getMethodsProperties(beanClass) {
var _local4 = new Array();
var _local3 = gdp.env.reflect.ClassInfo.forClass(beanClass.getBeanClass()).getMethods();
var _local2 = 0;
while (_local2 < _local3.length) {
var _local1 = _local3[_local2].getName();
if (gdp.utils.StringUtil.startsWith(_local1, "set") && (_local1.substr(3, 1).toUpperCase() == _local1.substr(3, 1))) {
_local4.push(_local1.substr(3, 1).toLowerCase() + _local1.substring(4));
}
_local2++;
}
return(_local4);
}
static var AUTOWIRE_NO = 0;
static var AUTOWIRE_BY_NAME = 1;
}
Symbol 1104 MovieClip [__Packages.gdp.core.beans.factory.BeanFactory] Frame 0
class gdp.core.beans.factory.BeanFactory extends gdp.core.beans.factory.support.AbstractAutowireCapableBeanFactory
{
var oBeans;
function BeanFactory () {
super();
}
function description() {
var _local2 = new Array();
for (var _local3 in oBeans) {
_local2.push(_local3);
}
var _local4 = {beans:_local2};
return("BeanFactory" + gdp.utils.ObjectUtil.classToString(_local4));
}
}
Symbol 1105 MovieClip [__Packages.gdp.core.config.modules.XML2Class] Frame 0
class gdp.core.config.modules.XML2Class extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XML2Class (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(xmlNode.nodeName == CLASS_NODE);
}
function convert() {
toInfo(("gdp.core.config.modules.XML2Class.convert(" + [xmlNode.nodeName]) + ")");
var _local3 = xmlNode.attributes[NAME_ATTRIBUTE];
var _local5 = gdp.utils.StringUtil.toBoolean(xmlNode.attributes[SINGLETON_ATTRIBUTE]);
var _local6;
var _local4 = gdp.env.reflect.ClassInfo.forName(_local3).getType();
if (_local4 == undefined) {
throw new gdp.core.config.IllegalNameOfObjectException(("Illegal name of class [" + _local3) + "]", this, arguments);
}
if (_local5) {
if (gdp.env.reflect.ReflectUtil.isMethodStatic("getInstance", _local4)) {
_local6 = _local4.getInstance();
} else {
throw new gdp.env.except.IllegalStateException(("Function getInstance() is not defined in class [" + _local3) + "].", this, arguments);
}
}
var _local8 = parseClassVariables(xmlNode);
var _local7 = parseClassProperties(xmlNode);
setClassVariables(_local8, _local3, _local6, _local4, _local5);
setClassProperties(_local7, _local3, _local6, _local4, _local5);
}
function parseClassVariables(xmlElement) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < xmlElement.childNodes.length) {
var _local1 = xmlElement.childNodes[_local2];
if (_local1.nodeName == STATIC_VARIABLE_ELEMENT) {
var _local3 = new gdp.core.config.XMLParser(_local1, true);
_local5[_local1.attributes[NAME_ATTRIBUTE]] = _local3.run();
}
_local2++;
}
return(_local5);
}
function setClassVariables(oVars, sClassName, oInstance, oClass, bSinglenot) {
for (var _local10 in oVars) {
var _local4 = gdp.env.reflect.ReflectUtil.getTypeName(oVars[_local10]);
var _local6 = gdp.env.reflect.ReflectUtil.getTypeName(oClass[_local10]);
var _local7 = gdp.env.reflect.ReflectUtil.getTypeNameForInstance(oInstance);
if ((_local4 == _local6) || (oClass[_local10] == undefined)) {
oClass[_local10] = oVars[_local10];
} else {
throw new gdp.core.config.modules.type.IllegalTypeException((((((((("In config type of set value '" + oVars[_local10]) + "' is '") + _local4) + "' ") + "and type variable '") + _local10) + "' in class [") + sClassName) + "] discrepancy.", this, arguments);
}
}
}
function parseClassProperties(xmlElement) {
var _local6 = new gdp.utils.Properties();
var _local2 = 0;
while (_local2 < xmlElement.childNodes.length) {
var _local1 = xmlElement.childNodes[_local2];
if (_local1.nodeName == PROPERTY_ELEMENT) {
var _local5 = _local1.attributes[NAME_ATTRIBUTE];
var _local3 = new gdp.core.config.XMLParser(_local1.firstChild, true);
_local6.setProperty(_local1.attributes[NAME_ATTRIBUTE], _local3.run());
}
_local2++;
}
return(_local6);
}
function setClassProperties(propValues, sClassName, oInstance, oClass, bSinglenot) {
var _local5 = propValues.getMethodsNames();
var _local4 = 0;
while (_local4 < _local5.length) {
var _local3 = _local5[_local4];
if (bSinglenot && (oInstance[_local3] == undefined)) {
throw new gdp.env.except.IllegalStateException(((("Function " + _local3) + "() is not defined in class [") + sClassName) + "].", this, arguments);
} else if ((!bSinglenot) && (!gdp.env.reflect.ReflectUtil.isMethodStatic(_local3, oClass))) {
throw new gdp.env.except.IllegalStateException(((("Static function " + _local3) + "() is not defined in class [") + sClassName) + "].", this, arguments);
}
_local4++;
}
propValues.setAllPropertiesForClass((bSinglenot ? (oInstance) : (oClass)));
}
static var CLASS_NODE = "class";
static var NAME_ATTRIBUTE = "name";
static var SINGLETON_ATTRIBUTE = "singleton";
static var STATIC_VARIABLE_ELEMENT = "static-variable";
static var PROPERTY_ELEMENT = "property";
static var VALUE_ATTRIBUTE = "value";
}
Symbol 1106 MovieClip [__Packages.gdp.core.config.modules.type.IllegalTypeException] Frame 0
class gdp.core.config.modules.type.IllegalTypeException extends gdp.env.except.FatalException
{
function IllegalTypeException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1107 MovieClip [__Packages.gdp.core.config.modules.XML2TypedData] Frame 0
class gdp.core.config.modules.XML2TypedData extends gdp.core.config.modules.AbstractModule
{
static var oModulesTypes;
var toInfo, xmlNode, parser;
function XML2TypedData (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(((xmlNode.firstChild.nodeType == 3) && (xmlNode.attributes.type == undefined)) || (xmlNode.attributes.type != undefined));
}
static function addType(sTypeName, oClass) {
if (oModulesTypes == undefined) {
initModules();
}
oModulesTypes[sTypeName.toLowerCase()] = oClass;
}
static function initModules() {
oModulesTypes = new Object();
addType("boolean", gdp.core.config.modules.type.BooleanType);
addType("number", gdp.core.config.modules.type.NumberType);
addType("array", gdp.core.config.modules.type.ArrayType);
addType("matrix", gdp.core.config.modules.type.MatrixType);
addType("object", gdp.core.config.modules.type.ObjectType);
}
function convert() {
toInfo(("gdp.core.config.modules.XML2TypedData.convert(" + [xmlNode.nodeName]) + ")");
if (oModulesTypes == undefined) {
initModules();
}
var _local3;
var _local6;
var _local4 = xmlNode.attributes[TYPE_ATTRIBUTES].toLowerCase();
if (xmlNode.attributes[VALUE_ATTRIBUTES] != null) {
var _local5 = xmlNode.cloneNode(true);
var _local7 = new XML().createTextNode(_local5.attributes[VALUE_ATTRIBUTES]);
delete _local5.attributes[VALUE_ATTRIBUTES];
_local5.appendChild(_local7);
xmlNode = _local5.cloneNode(true);
}
if (xmlNode.firstChild.nodeValue == NULL_VALUE) {
_local3 = null;
} else if (_local4 == "string") {
_local3 = xmlNode.firstChild.toString();
} else if (_local4 == null) {
_local3 = convertPrimitiveType(xmlNode.firstChild.nodeValue);
} else {
_local6 = oModulesTypes[_local4.toLowerCase()];
if (_local6 == undefined) {
throw new gdp.core.config.modules.type.IllegalTypeException(("Illegal name of type [" + _local4) + "]", this, arguments);
}
_local3 = gdp.utils.ClassUtil.createInstance(_local6, [xmlNode, parser]).getValue();
}
return(_local3);
}
function convertPrimitiveType(sText) {
if (sText.indexOf(":") == 1) {
var _local2 = sText.charAt(0).toLowerCase();
sText = sText.substring(1);
switch (_local2) {
case "b" :
return(gdp.utils.StringUtil.toBoolean(sText));
case "n" :
return(Number(sText));
return(sText);
}
}
return(sText);
}
static var TYPE_ATTRIBUTES = "type";
static var VALUE_ATTRIBUTES = "value";
static var NULL_VALUE = "null";
}
Symbol 1108 MovieClip [__Packages.gdp.core.config.modules.type.AbstractType] Frame 0
class gdp.core.config.modules.type.AbstractType extends gdp.core.base.BaseClass
{
var xmlNode, parser, value;
function AbstractType (xmlNode, parser) {
super();
this.xmlNode = xmlNode;
this.parser = parser;
value = convert();
}
function getValue() {
return(value);
}
function convert() {
throw new gdp.env.except.AbstractOperationException("convert() is abstract and has to be implemented.", this, arguments);
return(null);
}
function toInfo(sMsg) {
parser.toInfo(sMsg);
}
}
Symbol 1109 MovieClip [__Packages.gdp.core.config.modules.type.BooleanType] Frame 0
class gdp.core.config.modules.type.BooleanType extends gdp.core.config.modules.type.AbstractType
{
var toInfo, xmlNode;
function BooleanType (xmlNode, parser) {
super(xmlNode, parser);
}
function convert() {
toInfo(("gdp.core.config.modules.type.BooleanType.convert(" + [xmlNode]) + ")");
return(gdp.utils.StringUtil.toBoolean(xmlNode.firstChild.nodeValue));
}
}
Symbol 1110 MovieClip [__Packages.gdp.core.config.modules.type.NumberType] Frame 0
class gdp.core.config.modules.type.NumberType extends gdp.core.config.modules.type.AbstractType
{
var toInfo, xmlNode;
function NumberType (xmlNode, parser) {
super(xmlNode, parser);
}
function convert() {
toInfo(("gdp.core.config.modules.type.NumberType.convert(" + [xmlNode]) + ")");
return(gdp.utils.StringUtil.toNumber(xmlNode.firstChild.nodeValue));
}
}
Symbol 1111 MovieClip [__Packages.gdp.core.config.modules.type.ArrayType] Frame 0
class gdp.core.config.modules.type.ArrayType extends gdp.core.config.modules.type.AbstractType
{
var toInfo, xmlNode, parser;
function ArrayType (xmlNode, parser) {
super(xmlNode, parser);
}
function convert() {
toInfo(("gdp.core.config.modules.type.ArrayType.convert(" + [xmlNode]) + ")");
var _local6 = xmlNode.attributes[ITEM_TYPE_ATTRIBUTE];
var _local7 = xmlNode.attributes[SEPARATOR_ATTRIBUTE] || (DEFAULT_SEPARATOR);
var _local3 = xmlNode.firstChild.nodeValue.split(_local7);
if (_local6 != undefined) {
var _local2 = 0;
while (_local2 < _local3.length) {
var _local5 = new XML(((((("<value " + gdp.core.config.modules.XML2TypedData.TYPE_ATTRIBUTES) + "=\"") + _local6) + "\">") + _local3[_local2]) + "</value>");
var _local4 = new gdp.core.config.modules.XML2TypedData(_local5.firstChild, parser);
_local3[_local2] = _local4.convert();
_local2++;
}
}
return(_local3);
}
static var ITEM_TYPE_ATTRIBUTE = "itemType";
static var SEPARATOR_ATTRIBUTE = "separator";
static var DEFAULT_SEPARATOR = ",";
}
Symbol 1112 MovieClip [__Packages.gdp.core.config.modules.type.MatrixType] Frame 0
class gdp.core.config.modules.type.MatrixType extends gdp.core.config.modules.type.AbstractType
{
var toInfo, xmlNode;
function MatrixType (xmlNode, parser) {
super(xmlNode, parser);
}
function convert() {
toInfo(("gdp.core.config.modules.type.MatrixType.convert(" + [xmlNode]) + ")");
var _local7 = xmlNode.attributes[ITEM_TYPE_ATTRIBUTE];
var _local8 = xmlNode.attributes[ROW_SEPARATOR_ATTRIBUTE] || (DEFAULT_ROW_SEPARATOR);
var _local6 = xmlNode.attributes[COL_SEPARATOR_ATTRIBUTE] || (DEFAULT_COL_SEPARATOR);
var _local3 = xmlNode.firstChild.nodeValue.split(_local8);
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = new XML(((((((((((("<value " + gdp.core.config.modules.XML2TypedData.TYPE_ATTRIBUTES) + "='array' ") + gdp.core.config.modules.type.ArrayType.ITEM_TYPE_ATTRIBUTE) + "='") + _local7) + "' ") + gdp.core.config.modules.type.ArrayType.SEPARATOR_ATTRIBUTE) + "='") + _local6) + "'>") + _local3[_local2]) + "</value>");
var _local5 = new gdp.core.config.modules.type.ArrayType(_local4.firstChild);
_local3[_local2] = _local5.getValue();
_local2++;
}
return(gdp.core.type.array.Matrix.fromArray(_local3));
}
static var ITEM_TYPE_ATTRIBUTE = "itemType";
static var ROW_SEPARATOR_ATTRIBUTE = "rowSeparator";
static var COL_SEPARATOR_ATTRIBUTE = "colSeparator";
static var DEFAULT_ROW_SEPARATOR = "|";
static var DEFAULT_COL_SEPARATOR = ",";
}
Symbol 1113 MovieClip [__Packages.gdp.core.config.modules.type.ObjectType] Frame 0
class gdp.core.config.modules.type.ObjectType extends gdp.core.config.modules.type.AbstractType
{
var toInfo, xmlNode, parser;
function ObjectType (xmlNode, parser) {
super(xmlNode, parser);
}
function convert() {
toInfo(("gdp.core.config.modules.type.ObjectType.convert(" + [xmlNode]) + ")");
var _local8 = new Object();
var _local9 = gdp.utils.StringUtil.rightTrimForChars(gdp.utils.StringUtil.leftTrimForChars(xmlNode.firstChild.nodeValue, "{"), "}");
var _local7 = xmlNode.attributes[ITEM_TYPE_ATTRIBUTE];
var _local6 = gdp.utils.StringUtil.toArray(_local9, DEFAULT_FIELD_SEPARATOR, true);
if (_local7 != undefined) {
var _local2 = _local6.length - 1;
while (_local2 >= 0) {
var _local3 = gdp.utils.StringUtil.toArray(_local6[_local2], DEFAULT_FIELDNAME_SEPARATOR, true);
var _local5 = new XML(((((("<value " + gdp.core.config.modules.XML2TypedData.TYPE_ATTRIBUTES) + "=\"") + _local7) + "\">") + _local3[1]) + "</value>");
var _local4 = new gdp.core.config.modules.XML2TypedData(_local5.firstChild, parser);
_local8[_local3[0]] = _local4.convert();
_local2--;
}
}
return(_local8);
}
static var ITEM_TYPE_ATTRIBUTE = "itemType";
static var DEFAULT_FIELDNAME_SEPARATOR = ":";
static var DEFAULT_FIELD_SEPARATOR = ",";
}
Symbol 1114 MovieClip [__Packages.gdp.core.config.modules.XML2Array] Frame 0
class gdp.core.config.modules.XML2Array extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XML2Array (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(xmlNode.nodeName == ARRAY_NODE);
}
function convert() {
toInfo(("gdp.core.config.modules.XML2Array.convert(" + [xmlNode.nodeName]) + ")");
var _local5 = new Array();
var _local8;
var _local4 = 0;
while (_local4 < xmlNode.childNodes.length) {
var _local7 = xmlNode.childNodes[_local4];
var _local6 = _local7.attributes[ID_ATTRIBUTE];
if (_local7.nodeName == ITEM_ELEMENT) {
_local8 = new gdp.core.config.XMLParser(_local7, true);
var _local3 = _local5.length;
while (_local3 < (_local6 | _local4)) {
_local5[_local3] = undefined;
_local3++;
}
_local5.splice(_local6 | _local4, 0, _local8.run());
} else {
throw new gdp.core.config.IllegalFormatOfXmlDataException(("Using of the element '" + xmlNode.childNodes[_local4].nodeName) + "' is incorrect. You can use only element 'item' in node 'array'", this, arguments);
}
_local4++;
}
return(_local5);
}
static var ARRAY_NODE = "array";
static var ITEM_ELEMENT = "item";
static var ID_ATTRIBUTE = "id";
}
Symbol 1115 MovieClip [__Packages.gdp.core.config.IllegalFormatOfXmlDataException] Frame 0
class gdp.core.config.IllegalFormatOfXmlDataException extends gdp.env.except.FatalException
{
function IllegalFormatOfXmlDataException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1116 MovieClip [__Packages.gdp.core.config.modules.XML2Object] Frame 0
class gdp.core.config.modules.XML2Object extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XML2Object (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(xmlNode.nodeName == OBJECT_NODE);
}
function convert() {
toInfo(("gdp.core.config.modules.XML2Object.convert(" + [xmlNode.nodeName]) + ")");
var _local6 = new Object();
var _local3 = 0;
while (_local3 < xmlNode.childNodes.length) {
var _local4 = xmlNode.childNodes[_local3];
if (_local4.nodeName == FIELD_ELEMENT) {
var _local5 = new gdp.core.config.XMLParser(_local4, true);
_local6[_local4.attributes[NAME_ATTRIBUTE]] = _local5.run();
} else {
throw new gdp.core.config.IllegalFormatOfXmlDataException(("Using of the element '" + xmlNode.childNodes[_local3].nodeName) + "' is incorrect. You can use only element 'field' in node 'object'", this, arguments);
}
_local3++;
}
return(_local6);
}
static var OBJECT_NODE = "object";
static var FIELD_ELEMENT = "field";
static var NAME_ATTRIBUTE = "name";
}
Symbol 1117 MovieClip [__Packages.gdp.core.config.modules.XML2Null] Frame 0
class gdp.core.config.modules.XML2Null extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XML2Null (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(xmlNode.nodeName == NULL_NODE);
}
function convert() {
toInfo(("gdp.core.config.modules.XML2Null.convert(" + [xmlNode.nodeName]) + ")");
return(null);
}
static var NULL_NODE = "null";
}
Symbol 1118 MovieClip [__Packages.gdp.core.config.ConfigLoaderEvent] Frame 0
class gdp.core.config.ConfigLoaderEvent extends gdp.env.events.Event
{
function ConfigLoaderEvent (sType, bBubbles, bCancelable, bSuccess, configLoader, exception) {
super(sType, bBubbles, bCancelable);
this.bSuccess = bSuccess;
this.configLoader = configLoader;
this.exception = exception;
}
function getSuccess(Void) {
return(bSuccess);
}
function getConfigLoader(Void) {
return(configLoader);
}
function getException(Void) {
return(exception);
}
static var LOAD = "load";
static var ERROR = "error";
var bSuccess = null;
var configLoader = null;
var exception = null;
}
Symbol 1119 MovieClip [__Packages.gdp.env.except.FileNotFoundException] Frame 0
class gdp.env.except.FileNotFoundException extends gdp.env.except.FatalException
{
function FileNotFoundException (message, thrower, aArgs) {
super(message, thrower, aArgs);
}
}
Symbol 1120 MovieClip [__Packages.gdp.core.debug.request.IRequestHandler] Frame 0
interface gdp.core.debug.request.IRequestHandler extends gdp.core.base.BaseInterface
{
}
Symbol 1121 MovieClip [__Packages.gdp.core.debug.request.controller.IRequestController] Frame 0
interface gdp.core.debug.request.controller.IRequestController extends gdp.core.base.BaseInterface
{
}
Symbol 1122 MovieClip [__Packages.gdp.core.debug.request.logger.IRequestLogger] Frame 0
interface gdp.core.debug.request.logger.IRequestLogger extends gdp.core.base.BaseInterface
{
}
Symbol 1123 MovieClip [__Packages.gdp.core.debug.request.IRequestFactory] Frame 0
interface gdp.core.debug.request.IRequestFactory extends gdp.core.base.BaseInterface
{
}
Symbol 1124 MovieClip [__Packages.gdp.core.debug.request.IRequest] Frame 0
interface gdp.core.debug.request.IRequest extends gdp.core.base.BaseInterface
{
}
Symbol 1125 MovieClip [__Packages.gdp.core.debug.request.writer.IRequestWriter] Frame 0
interface gdp.core.debug.request.writer.IRequestWriter extends gdp.core.base.BaseInterface
{
}
Symbol 1126 MovieClip [__Packages.gdp.core.debug.request.reader.IRequestReader] Frame 0
interface gdp.core.debug.request.reader.IRequestReader extends gdp.core.base.BaseInterface
{
}
Symbol 1127 MovieClip [__Packages.gdp.core.debug.request.player.IRequestPlayer] Frame 0
interface gdp.core.debug.request.player.IRequestPlayer extends gdp.core.base.BaseInterface
{
}
Symbol 1128 MovieClip [__Packages.gdp.core.debug.unit.IUnit] Frame 0
interface gdp.core.debug.unit.IUnit extends gdp.core.debug.request.IRequestHandler
{
}
Symbol 1129 MovieClip [__Packages.gdp.core.debug.router.IRouter] Frame 0
interface gdp.core.debug.router.IRouter extends gdp.core.debug.request.IRequestHandler
{
}
Symbol 1130 MovieClip [__Packages.gdp.core.debug.router.IRouteMessage] Frame 0
interface gdp.core.debug.router.IRouteMessage extends gdp.core.base.BaseInterface
{
}
Symbol 1131 MovieClip [__Packages.gdp.core.debug.unit.BaseClassUnit] Frame 0
class gdp.core.debug.unit.BaseClassUnit extends gdp.core.base.BaseClass implements gdp.core.debug.unit.IUnit
{
var getClassNameWithPackage;
function BaseClassUnit (router, requestController) {
super();
setRouter(router);
setRequestController(requestController);
}
function setRequestPlayer(requestPlayer) {
this.requestPlayer = requestPlayer;
}
function getRequestPlayer(Void) {
return(requestPlayer);
}
function setRequestController(requestController) {
this.requestController = requestController;
}
function getRequestController(Void) {
return(requestController);
}
function setRouter(router) {
this.router = router;
}
function getRouter(Void) {
return(router);
}
function routeMessage(sMessage) {
if (getRouter() == null) {
throw new gdp.env.except.IllegalStateException(("Class [" + getClassNameWithPackage()) + "] hasn't router", this, arguments);
}
if (sMessage == null) {
throw new gdp.env.except.IllegalArgumentException("Message name isn't defined", this, arguments);
}
var _local3 = arguments.slice(1);
logRequest(sMessage, _local3);
getRouter().routeUserMessage(sMessage, this, _local3);
}
function routeSystemMessage(sMessage) {
if (getRouter() == null) {
throw new gdp.env.except.IllegalStateException(("Class [" + getClassNameWithPackage()) + "] hasn't router", this, arguments);
}
if (sMessage == null) {
throw new gdp.env.except.IllegalArgumentException("Message name isn't defined", this, arguments);
}
var _local3 = arguments.slice(1);
getRouter().routeSystemMessage(sMessage, this, _local3);
}
function logRequest(sMessage, aArgs) {
if (requestController == null) {
return(undefined);
}
getRequestController().getRequestLogger().logRequest(sMessage, aArgs);
}
var router = null;
var requestPlayer = null;
var requestController = null;
}
Symbol 1132 MovieClip [__Packages.game.units.controllers.GameEngine] Frame 0
class game.units.controllers.GameEngine extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage;
function GameEngine () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local2 = new gdp.core.debug.router.RouteMessage("handXXXController", gdp.utils.Delegate.create(this, handController));
getRouter().addMessageHandler(_local2);
}
function run() {
game.model.users.User.getInstance().update();
handController("pregame", "");
routeSystemMessage("GameEngine.handMenuController");
}
function handController(sNameView, sNameHide) {
var _local2;
var _local3;
switch (sNameHide) {
case "pregame" :
routeSystemMessage("GameEngine.blockPregameController");
break;
case "choose" :
_local3 = false;
routeSystemMessage("GameEngine.blockChooseController");
break;
case "map_quest" :
_local2 = true;
routeSystemMessage("GameEngine.blockMapQuestController");
break;
case "map_practice" :
_local2 = true;
routeSystemMessage("GameEngine.blockMapPracticeController");
break;
case "instructions" :
_local2 = false;
routeSystemMessage("GameEngine.blockInstrController");
break;
case "field" :
_local3 = true;
routeSystemMessage("GameEngine.blockFieldController");
}
routeSystemMessage("GameEngine.currentView", sNameView);
switch (sNameView) {
case "pregame" :
routeSystemMessage("GameEngine.handPregameController");
break;
case "choose" :
routeSystemMessage("GameEngine.handChooseController");
break;
case "map_quest" :
routeSystemMessage("GameEngine.handMapQuestController", _local3);
break;
case "map_practice" :
routeSystemMessage("GameEngine.handMapPracticeController");
break;
case "instructions" :
routeSystemMessage("GameEngine.handInstrController", sNameHide);
break;
case "field" :
routeSystemMessage("GameEngine.handFieldController", _local2);
}
}
}
Symbol 1133 MovieClip [__Packages.gdp.core.debug.router.RouteMessage] Frame 0
class gdp.core.debug.router.RouteMessage extends gdp.core.base.BaseClass implements gdp.core.debug.router.IRouteMessage
{
function RouteMessage (sName, fFunction) {
super();
setName(sName);
setFunction(fFunction);
}
function setName(sName) {
this.sName = sName;
}
function getName(Void) {
return(sName);
}
function setFunction(fFunction) {
this.fFunction = fFunction;
}
function getFunction(Void) {
return(fFunction);
}
function call(aArgs) {
getFunction().apply(null, aArgs);
}
var sName = null;
var fFunction = null;
}
Symbol 1134 MovieClip [__Packages.game.model.users.User] Frame 0
class game.model.users.User extends gdp.core.base.BaseClass
{
var nId, nScoreQ, nScoreP, nBonus, nScoreQFixd, nLevelQuest, nLevelQuestMax, bHint1, bHint2, bHint3, bBonusView;
function User () {
super();
}
static function getInstance() {
if (instance == null) {
instance = new game.model.users.User();
}
return(instance);
}
function update() {
nId = 1;
sName = "player";
nScoreQ = 0;
nScoreP = 0;
nBonus = 0;
nScoreQFixd = 0;
nLevelQuest = 1;
nLevelQuestMax = 1;
bHint1 = true;
bHint2 = true;
bHint3 = true;
}
function updateScoreQ(nIU, nID, aTower) {
var _local2 = nID;
while (_local2 <= nIU) {
nScoreQ = nScoreQ + aTower[_local2];
_local2++;
}
}
function updateScoreP(nIU, nID, aTower) {
var _local2 = nID;
while (_local2 <= nIU) {
nScoreP = nScoreP + aTower[_local2];
_local2++;
}
}
function getId() {
return(nId);
}
function getName() {
return(sName);
}
function getBonusView() {
return(bBonusView);
}
function setBonusView(bValue) {
bBonusView = bValue;
}
function getScoreQ() {
return(nScoreQ);
}
function setScoreQ(nValue) {
nScoreQ = nValue;
}
function getScoreP() {
return(nScoreP);
}
function getBonus() {
return(nBonus);
}
function getScoreQFixd() {
return(nScoreQFixd);
}
function getLevelQuest() {
return(nLevelQuest);
}
function getLevelQuestMax() {
return(nLevelQuestMax);
}
function getHint1() {
return(bHint1);
}
function getHint2() {
return(bHint2);
}
function getHint3() {
return(bHint3);
}
function setScoreP(nValue) {
nScoreP = nValue;
}
function setBonus(nValue) {
nBonus = nValue;
}
function setScoreQFixd(nValue) {
nScoreQFixd = nValue;
}
function setLevelQuest(nValue) {
nLevelQuest = nValue;
}
function setLevelQuestMax(nValue) {
nLevelQuestMax = nValue;
}
function setHint1(bValue) {
bHint1 = bValue;
}
function setHint2(bValue) {
bHint2 = bValue;
}
function setHint3(bValue) {
bHint3 = bValue;
}
function traceUser() {
trace("|--------user--------|");
trace("|nId: " + nId);
trace("|sName: " + sName);
trace("|nScoreQ: " + nScoreQ);
trace("|nScoreP: " + nScoreP);
trace("|nScoreQF: " + nScoreQFixd);
trace("|nQuest: " + nLevelQuest);
trace("|nLevelQuestMax: " + nLevelQuestMax);
trace("|bHint1: " + bHint1);
trace("|bHint2: " + bHint2);
trace("|bHint3: " + bHint3);
trace("|--------------------|");
}
static var instance = null;
var sName = "online";
}
Symbol 1135 MovieClip [__Packages.game.units.controllers.PregameController] Frame 0
class game.units.controllers.PregameController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage;
function PregameController () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local3 = new gdp.core.debug.router.RouteMessage("Pregame.play", gdp.utils.Delegate.create(this, responsePlay));
var _local2 = new gdp.core.debug.router.RouteMessage("Pregame.instructions", gdp.utils.Delegate.create(this, responseInstr));
var _local4 = new gdp.core.debug.router.RouteMessage("GameEngine.handPregameController", gdp.utils.Delegate.create(this, hand));
var _local5 = new gdp.core.debug.router.RouteMessage("GameEngine.blockPregameController", gdp.utils.Delegate.create(this, block));
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local2);
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local5);
}
function hand() {
routeSystemMessage("PregameController.viewHead");
}
function block() {
routeSystemMessage("PregameController.hideHead");
}
function responsePlay() {
game.model.wave.Wave.getInstance().playSound("button play");
routeSystemMessage("handXXXController", "choose", "pregame");
}
function responseInstr() {
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", "instructions", "pregame");
}
}
Symbol 1136 MovieClip [__Packages.game.model.wave.Wave] Frame 0
class game.model.wave.Wave extends gdp.core.base.BaseClass
{
var nVolumeSound, oMusic, oSound;
function Wave () {
super();
nVolumeSound = 100;
oMusic = new gdp.io.sound.WaveEngine(2);
oSound = new gdp.io.sound.WaveEngine(1);
}
static function getInstance() {
if (instance == null) {
instance = new game.model.wave.Wave();
}
return(instance);
}
function volumeSound(bVolume) {
nVolumeSound = (bVolume ? 100 : 0);
oSound.setAllVolume(nVolumeSound);
}
function playSound(sName) {
oSound.play(oSound.addStream(sName, true));
oSound.setAllVolume(nVolumeSound);
}
static var instance = null;
}
Symbol 1137 MovieClip [__Packages.gdp.io.sound.WaveEngine] Frame 0
class gdp.io.sound.WaveEngine
{
var type, stack, debugOn, mute, _mc;
function WaveEngine (type, debugOn) {
this.type = ((type == undefined) ? 1 : (type));
stack = new Object();
this.debugOn = ((type == undefined) ? false : (debugOn));
mute = false;
init();
}
function init() {
_numClass++;
_mc = _root.createEmptyMovieClip((("CWaveEngine_" + _numClass) + "_") + type, _root.getNextHighestDepth());
}
function soundOff() {
if (!mute) {
debug("soundOff()");
for (var _local2 in stack) {
stack[_local2]._oldVolume = stack[_local2].getVolume();
setVolume(Number(_local2), 0);
}
mute = true;
}
}
function soundOn() {
if (mute) {
mute = false;
debug("soundOn()");
for (var _local3 in stack) {
var _local2 = ((stack[_local3]._oldVolume == undefined) ? 100 : (stack[_local3]._oldVolume));
setVolume(Number(_local3), _local2);
}
}
}
function getSoundStatus() {
return(!mute);
}
function play(id, secondsOffset, loops) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
if (type == 2) {
stopAll();
}
secondsOffset = ((secondsOffset == undefined) ? 0 : (secondsOffset));
loops = ((loops == undefined) ? 1 : (loops));
var _local3 = stack[id];
if (mute) {
_local3.setVolume(0);
} else {
_local3.setVolume(100);
}
if (type == 2) {
loops = 65536;
}
_local3.start(secondsOffset, loops);
debug(((((("play(" + _local3.__link) + ", ") + secondsOffset) + ", ") + loops) + ")");
}
function playAll(secondsOffset, loops, autoDelete) {
for (var _local5 in stack) {
play(Number(_local5), secondsOffset, loops, autoDelete);
}
}
function addStream(link_name, autoDelete) {
if (link_name == undefined) {
return(0);
}
autoDelete = ((autoDelete == undefined) ? true : (autoDelete));
var _local4 = _mc.createEmptyMovieClip("attachS_" + (++_numSound), _mc.getNextHighestDepth());
var _local2 = new Sound(_local4);
_local2.attachSound(link_name);
_local2.__parent = this;
_local2.__link = link_name;
_local2.__num = _numSound;
_local2.__mc = _local4;
_local2.__autoDelete = autoDelete;
_local2.onSoundComplete = function () {
if (this.__autoDelete) {
this.__parent.deleteSound(this.__num);
}
};
debug(("addStream(" + link_name) + ")");
stack[_numSound] = _local2;
return(_local2.__num);
}
function deleteSound(id) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
debug("Stack deletes a " + _local2.__link);
delete stack[id];
_local2.__mc.removeMovieClip();
}
function deleteAllSound() {
debug("deleteAllSound()");
for (var _local2 in stack) {
deleteSound(Number(_local2));
}
}
function stop(id) {
if ((id == undefined) || (stack[id] == undefined)) {
return(0);
}
var _local3 = stack[id];
_local3.stop();
debug(("stop(" + _local3.__link) + ")");
if (_local3.__autoDelete) {
if ((id != _numSound) || (type != 2)) {
deleteSound(id);
}
}
}
function stopAll() {
debug("stopAll()");
for (var _local2 in stack) {
stop(Number(_local2));
}
}
function setVolume(id, volume) {
if (((id == undefined) || (volume == undefined)) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
if (mute) {
_local2._oldVolume = volume;
return(0);
}
debug(((("setVolume(" + _local2.__link) + ", ") + volume) + ")");
if (_local2 != undefined) {
_local2.setVolume(volume);
}
}
function setAllVolume(volume) {
for (var _local2 in stack) {
setVolume(Number(_local2), volume);
}
}
function debug(msg) {
if (debugOn) {
trace((type + " ") + msg);
}
}
function toString() {
return("[sound.CWaveEngine]");
}
var _numSound = 0;
static var _numClass = 0;
}
Symbol 1138 MovieClip [__Packages.game.units.controllers.ChooseController] Frame 0
class game.units.controllers.ChooseController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage;
function ChooseController () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local4 = new gdp.core.debug.router.RouteMessage("GameEngine.handChooseController", gdp.utils.Delegate.create(this, hand));
var _local5 = new gdp.core.debug.router.RouteMessage("GameEngine.blockChooseController", gdp.utils.Delegate.create(this, block));
var _local2 = new gdp.core.debug.router.RouteMessage("Choose.quest", gdp.utils.Delegate.create(this, responseQuest));
var _local6 = new gdp.core.debug.router.RouteMessage("Choose.practice", gdp.utils.Delegate.create(this, responsePract));
var _local3 = new gdp.core.debug.router.RouteMessage("Choose.back", gdp.utils.Delegate.create(this, responseBack));
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local2);
getRouter().addMessageHandler(_local6);
getRouter().addMessageHandler(_local3);
}
function hand() {
routeSystemMessage("ChooseController.viewHead");
}
function block() {
routeSystemMessage("ChooseController.hideHead");
}
function responseQuest() {
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", "map_quest", "choose");
}
function responsePract() {
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", "map_practice", "choose");
}
function responseBack() {
game.model.wave.Wave.getInstance().playSound("button play");
routeSystemMessage("handXXXController", "pregame", "choose");
}
}
Symbol 1139 MovieClip [__Packages.game.units.controllers.MapQuestController] Frame 0
class game.units.controllers.MapQuestController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage;
function MapQuestController () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local4 = new gdp.core.debug.router.RouteMessage("GameEngine.handMapQuestController", gdp.utils.Delegate.create(this, hand));
var _local6 = new gdp.core.debug.router.RouteMessage("GameEngine.blockMapQuestController", gdp.utils.Delegate.create(this, block));
var _local3 = new gdp.core.debug.router.RouteMessage("MapQuest.select.level", gdp.utils.Delegate.create(this, responseSelectLevel));
var _local5 = new gdp.core.debug.router.RouteMessage("MapQuest.play", gdp.utils.Delegate.create(this, responsePlay));
var _local2 = new gdp.core.debug.router.RouteMessage("MapQuest.back", gdp.utils.Delegate.create(this, responseBack));
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local6);
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local2);
}
function hand(bNextLevel) {
routeSystemMessage("MapQuestController.viewHead", game.model.users.User.getInstance().getLevelQuest(), game.model.users.User.getInstance().getLevelQuestMax(), bNextLevel);
}
function block() {
routeSystemMessage("MapQuestController.hideHead");
}
function responseSelectLevel(nSelectLevel) {
game.model.users.User.getInstance().setLevelQuest(nSelectLevel);
routeSystemMessage("MapQuestController.select.level");
}
function responsePlay(nLevel) {
game.model.wave.Wave.getInstance().playSound("button");
game.model.field.FieldData.getInstance().setNameMode("quest");
game.model.field.FieldData.getInstance().setLevelQuest(nLevel);
game.model.field.FieldData.getInstance().createTins();
routeSystemMessage("handXXXController", "field", "map_quest");
}
function responseBack() {
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", "choose", "map_quest");
}
}
Symbol 1140 MovieClip [__Packages.game.model.field.FieldData] Frame 0
class game.model.field.FieldData extends gdp.core.base.BaseClass
{
var aBonusQuest, sNameMode, nTowers, nHTower, nBricks, bHideTower, aTinValues, nTinView, aTinUser1, aTinAI1, aTinUser2, aTinAI2, nIndexTinHide, nTinHide, nTinCur, sNameWndView;
function FieldData () {
super();
instance = this;
initBonusQuest();
}
static function getInstance() {
if (instance == null) {
instance = new game.model.field.FieldData();
}
return(instance);
}
function initBonusQuest() {
aBonusQuest = new Array();
aBonusQuest[0] = new Object({sname:"palm1", nstop:59, nplay:2});
aBonusQuest[1] = new Object({sname:"palm1", nstop:114, nplay:60});
aBonusQuest[2] = new Object({sname:"palm1", nstop:153, nplay:115});
aBonusQuest[3] = new Object({sname:"palm1", nstop:212, nplay:154});
}
function initParams() {
if (sNameMode == "quest") {
nTowers = game.helpers.Settings.getInstance().getTowersQuest(nLevelQuest);
nHTower = game.helpers.Settings.getInstance().getHTowerQuest(nLevelQuest);
nBricks = game.helpers.Settings.getInstance().getBriksQuest(nLevelQuest);
bHideTower = game.helpers.Settings.getInstance().getHideTowerQuest(nLevelQuest);
} else {
nTowers = game.helpers.Settings.getInstance().getTowersPractice(nLevelPractice);
nHTower = game.helpers.Settings.getInstance().getHTowerPractice(nLevelPractice);
nBricks = game.helpers.Settings.getInstance().getBriksPractice(nLevelPractice);
bHideTower = game.helpers.Settings.getInstance().getHideTowerPractice(nLevelPractice);
}
game.model.field.AI.getInstance().setCountOfBriks(nBricks);
}
function initTinValues() {
aTinValues = new Array();
var _local2 = 0;
while (_local2 < nBricks) {
aTinValues.push(_local2 + 1);
_local2++;
}
}
function createTins() {
initParams();
initTinValues();
switch (nTowers) {
case 1 :
createTins1();
break;
case 2 :
createTins1();
createTins2();
}
var _local2 = random(aTinValues.length);
nTinView = aTinValues[_local2];
aTinValues.splice(_local2, 1);
}
function createTins1() {
aTinUser1 = new Array();
aTinAI1 = new Array();
var _local3;
var _local2 = 0;
while (_local2 < (2 * nHTower)) {
_local3 = random(aTinValues.length);
if ((_local2 % 2) == 0) {
aTinUser1.push(aTinValues[_local3]);
} else {
aTinAI1.push(aTinValues[_local3]);
}
aTinValues.splice(_local3, 1);
_local2++;
}
}
function createTins2() {
aTinUser2 = new Array();
aTinAI2 = new Array();
var _local3;
var _local2 = 0;
while (_local2 < (2 * nHTower)) {
_local3 = random(aTinValues.length);
if ((_local2 % 2) == 0) {
aTinUser2.push(aTinValues[_local3]);
} else {
aTinAI2.push(aTinValues[_local3]);
}
aTinValues.splice(_local3, 1);
_local2++;
}
}
function addTinValue(nValue) {
aTinValues.push(nValue);
}
function delTinValue() {
aTinValues.splice(nIndexTinHide, 1);
}
function updateTinValues() {
if (nTinCur == nTinHide) {
delTinValue();
addTinValue(nTinView);
}
}
function updateUserTins(i, nChooseTower) {
updateTinValues();
var _local2 = ((nChooseTower == 1) ? (aTinUser1) : (aTinUser2));
var _local3 = _local2[i];
_local2[i] = nTinCur;
nTinCur = (nTinView = _local3);
}
function updateAITins(i, nChooseTower) {
updateTinValues();
var _local2 = ((nChooseTower == 1) ? (aTinAI1) : (aTinAI2));
var _local3 = _local2[i];
_local2[i] = nTinCur;
nTinCur = (nTinView = _local3);
}
function checkWinUser() {
var _local3 = true;
var _local2 = 0;
while (_local2 < (nHTower - 1)) {
if ((aTinUser1[_local2] < aTinUser1[_local2 + 1]) || ((aTinUser2[_local2] < aTinUser2[_local2 + 1]) && (nTowers == 2))) {
_local3 = false;
break;
}
_local2++;
}
return(_local3);
}
function checkWinAI() {
var _local3 = true;
var _local2 = 0;
while (_local2 < (nHTower - 1)) {
if ((aTinAI1[_local2] < aTinAI1[_local2 + 1]) || ((aTinAI2[_local2] < aTinAI2[_local2 + 1]) && (nTowers == 2))) {
_local3 = false;
break;
}
_local2++;
}
return(_local3);
}
function getIUBonus(i, nChooseTower) {
var _local4 = i;
var _local3 = ((nChooseTower == 1) ? (aTinUser1) : (aTinUser2));
var _local2 = i;
while (_local2 < (nHTower - 1)) {
if ((_local3[_local2] - _local3[_local2 + 1]) == 1) {
_local4 = _local2 + 1;
} else {
break;
}
_local2++;
}
return(_local4);
}
function getIDBonus(i, nChooseTower) {
var _local4 = i;
var _local3 = ((nChooseTower == 1) ? (aTinUser1) : (aTinUser2));
var _local2 = i;
while (_local2 > 0) {
if ((_local3[_local2] - _local3[_local2 - 1]) == -1) {
_local4 = _local2 - 1;
} else {
break;
}
_local2--;
}
return(_local4);
}
function sumbonus() {
var _local3 = 0;
if (nTowers == 1) {
var _local2 = 0;
while (_local2 < nHTower) {
_local3 = _local3 + aTinUser1[_local2];
_local2++;
}
} else {
var _local2 = 0;
while (_local2 < nHTower) {
_local3 = _local3 + (aTinUser1[_local2] + aTinUser2[_local2]);
_local2++;
}
}
game.model.users.User.getInstance().setBonus(_local3);
}
function updateQuestParams(bWin) {
var _local1 = game.model.users.User.getInstance();
if (bWin) {
if (_local1.getLevelQuest() == _local1.getLevelQuestMax()) {
var _local2 = ((_local1.getLevelQuestMax() == 5) ? 1 : (_local1.getLevelQuestMax() + 1));
_local1.setLevelQuest(_local2);
_local1.setLevelQuestMax(_local2);
} else {
_local1.setLevelQuest(_local1.getLevelQuest() + 1);
}
}
}
function getNameWndView() {
return(sNameWndView);
}
function setNameWndView(sValue) {
sNameWndView = sValue;
}
function getNameMode() {
return(sNameMode);
}
function setNameMode(sValue) {
sNameMode = sValue;
}
function getBonusQuest() {
return(aBonusQuest);
}
function getTowers() {
return(nTowers);
}
function setTowers(nValue) {
nTowers = nValue;
}
function getHTower() {
return(nHTower);
}
function setHTower(nValue) {
nHTower = nValue;
}
function getHideTower() {
return(bHideTower);
}
function setHideTower(bValue) {
bHideTower = bValue;
}
function getLevelQuest() {
return(nLevelQuest);
}
function setLevelQuest(nValue) {
nLevelQuest = nValue;
}
function getLevelPractice() {
return(nLevelPractice);
}
function setLevelPractice(nValue) {
nLevelPractice = nValue;
}
function getTinUser(nChooseTower) {
switch (nChooseTower) {
case 1 :
return(aTinUser1);
case 2 :
return(aTinUser2);
}
}
function getTinUserFromIndex(i, nChooseTower) {
switch (nChooseTower) {
case 1 :
return(aTinUser1[i]);
case 2 :
return(aTinUser2[i]);
}
}
function getTinAI(nChooseTower) {
switch (nChooseTower) {
case 1 :
return(aTinAI1);
case 2 :
return(aTinAI2);
}
}
function getTinAIFromIndex(i, nChooseTower) {
switch (nChooseTower) {
case 1 :
return(aTinAI1[i]);
case 2 :
return(aTinAI2[i]);
}
}
function getTinValues() {
return(aTinValues);
}
function getTinView() {
return(nTinView);
}
function setTinView(nValue) {
nTinView = nValue;
}
function getTinHide() {
return(nTinHide);
}
function setTinHide() {
nIndexTinHide = random(aTinValues.length);
nTinHide = aTinValues[nIndexTinHide];
}
function clearTinHide() {
nIndexTinHide = null;
nTinHide = null;
}
function getTinCur() {
return(nTinCur);
}
function setTinCur(nValue) {
nTinCur = nValue;
}
function getDelayMin() {
return(nDelayMin);
}
function getDelayMax() {
return(nDelayMax);
}
static var instance = null;
var nDelayMin = 500;
var nDelayMax = 500;
var nLevelQuest = 1;
var nLevelPractice = 1;
}
Symbol 1141 MovieClip [__Packages.game.helpers.Settings] Frame 0
class game.helpers.Settings extends gdp.core.base.BaseClass
{
var aLogos, oPractice, oLevels, oInstr, oPrehistory, oHint, sLinkdownload, sTextdownload;
function Settings () {
super();
aLogos = new Array();
oPractice = new Object();
oLevels = new Object();
oInstr = new Object();
oPrehistory = new Object();
oHint = new Object();
}
static function getInstance() {
if (instance == null) {
instance = new game.helpers.Settings();
}
return(instance);
}
function getLogos() {
return(aLogos);
}
function setLogos(aLogosAt) {
aLogos = aLogosAt;
}
function getLinkdownload() {
return(sLinkdownload);
}
function setLinkdownload(sAtLink) {
sLinkdownload = sAtLink;
}
function getTextdownload() {
return(sTextdownload);
}
function setTextdownload(sAtText) {
sTextdownload = sAtText;
}
function getPractice() {
return(oPractice);
}
function setPractice(oPract) {
for (var _local3 in oPract) {
oPractice[_local3] = oPract[_local3];
}
}
function getLevels() {
return(oLevels);
}
function setLevels(oAtLevels) {
for (var _local3 in oAtLevels) {
oLevels[_local3] = oAtLevels[_local3];
}
}
function getInstr() {
return(oInstr);
}
function setInstr(oAtInstr) {
for (var _local3 in oAtInstr) {
oInstr[_local3] = oAtInstr[_local3];
}
}
function getPrehistory() {
return(oPrehistory);
}
function setPrehistory(oAtPrehistory) {
for (var _local3 in oAtPrehistory) {
oPrehistory[_local3] = oAtPrehistory[_local3];
}
}
function getHint() {
return(oHint);
}
function setHint(oAtHint) {
for (var _local3 in oAtHint) {
oHint[_local3] = oAtHint[_local3];
}
}
function getTowersPractice(nId) {
var _local2 = "TowersPractice" + nId;
return(oPractice[_local2]);
}
function getHTowerPractice(nId) {
var _local2 = "HTowerPractice" + nId;
return(oPractice[_local2]);
}
function getBriksPractice(nId) {
var _local2 = "BricksPractice" + nId;
return(oPractice[_local2]);
}
function getHideTowerPractice(nId) {
var _local2 = "HideTowerPractice" + nId;
return(oPractice[_local2]);
}
function getTowersQuest(nId) {
var _local2 = "TowersQuest" + nId;
return(oLevels[_local2]);
}
function getHTowerQuest(nId) {
var _local2 = "HTowerQuest" + nId;
return(oLevels[_local2]);
}
function getBriksQuest(nId) {
var _local2 = "BricksQuest" + nId;
return(oLevels[_local2]);
}
function getHideTowerQuest(nId) {
var _local2 = "HideTowerQuest" + nId;
return(oLevels[_local2]);
}
function getInstrPage(nId) {
var _local2 = "Page" + nId;
return(oInstr[_local2]);
}
function getPrehistoryPage(nId) {
var _local2 = "Page" + nId;
return(oPrehistory[_local2]);
}
function getHintText(nId) {
var _local2 = "Hint" + nId;
return(oHint[_local2]);
}
static var instance = null;
}
Symbol 1142 MovieClip [__Packages.game.model.field.AI] Frame 0
class game.model.field.AI extends gdp.core.base.BaseClass
{
var nCh_n, nCountOfBriks;
function AI () {
super();
}
static function getInstance() {
if (instance == null) {
instance = new game.model.field.AI();
}
return(instance);
}
function whatChange(aPossible, aTowersAI) {
var _local4;
if (aPossible[1] == -1) {
var _local12 = false;
var _local3 = 0;
while (_local3 < aTowersAI.length) {
var _local6 = getBrikP(aPossible[0], aTowersAI[_local3].length);
var _local9 = aTowersAI[_local3][_local6];
var _local11 = getBrikP(_local9, aTowersAI[_local3].length);
if (_local6 != _local11) {
_local4 = 0;
nChoosedTower = _local3 + 1;
_local12 = true;
break;
}
_local3++;
}
if (!_local12) {
_local4 = possibleAlterChoose();
}
} else if (aPossible[1] == -2) {
var _local12 = false;
var _local3 = 0;
while (_local3 < aTowersAI.length) {
var _local6 = getBrikP(aPossible[0], aTowersAI[_local3].length);
var _local9 = aTowersAI[_local3][_local6];
var _local11 = getBrikP(_local9, aTowersAI[_local3].length);
if (_local6 != _local11) {
_local4 = 0;
nChoosedTower = _local3 + 1;
_local12 = true;
break;
}
_local3++;
}
if (!_local12) {
_local4 = possibleAlterChoose();
}
} else {
var _local12 = false;
var _local3 = 0;
while (_local3 < aTowersAI.length) {
var _local6 = getBrikP(aPossible[0], aTowersAI[_local3].length);
var _local9 = aTowersAI[_local3][_local6];
var _local11 = getBrikP(_local9, aTowersAI[_local3].length);
if (_local6 != _local11) {
_local4 = 0;
nChoosedTower = _local3 + 1;
_local12 = true;
break;
}
_local3++;
}
if (!_local12) {
_local3 = 0;
while (_local3 < aTowersAI.length) {
var _local7 = getBrikP(aPossible[1], aTowersAI[_local3].length);
var _local8 = aTowersAI[_local3][_local7];
var _local10 = getBrikP(_local8, aTowersAI[_local3].length);
if (_local7 != _local10) {
_local4 = 1;
nChoosedTower = _local3 + 1;
_local12 = true;
break;
}
_local3++;
}
}
if (!_local12) {
_local4 = random(2);
}
}
nCh_n = aPossible[_local4];
return(_local4);
}
function getBrikP(nValue, nTowerLen) {
return((nTowerLen - Math.floor(((nValue - 0.5) / nCountOfBriks) * nTowerLen)) - 1);
}
function possibleAlterChoose() {
return(1);
}
function onWhatChange(aTowersAI) {
var _local2 = getBrikP(nCh_n, aTowersAI[nChoosedTower - 1].length);
var _local3 = new Object({tower:nChoosedTower, place:_local2});
return(_local3);
}
function getCh_n() {
return(nCh_n);
}
function getCountOfBriks() {
return(nCountOfBriks);
}
function setCountOfBriks(nValue) {
nCountOfBriks = nValue;
}
static var instance = null;
var nChoosedTower = 1;
}
Symbol 1143 MovieClip [__Packages.game.units.controllers.MapPracticeController] Frame 0
class game.units.controllers.MapPracticeController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage;
function MapPracticeController () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local3 = new gdp.core.debug.router.RouteMessage("GameEngine.handMapPracticeController", gdp.utils.Delegate.create(this, hand));
var _local5 = new gdp.core.debug.router.RouteMessage("GameEngine.blockMapPracticeController", gdp.utils.Delegate.create(this, block));
var _local4 = new gdp.core.debug.router.RouteMessage("MapPractice.playLevel", gdp.utils.Delegate.create(this, responsePlayLevel));
var _local2 = new gdp.core.debug.router.RouteMessage("MapPractice.back", gdp.utils.Delegate.create(this, responseBack));
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local2);
}
function hand() {
routeSystemMessage("MapPracticeController.viewHead");
}
function block() {
routeSystemMessage("MapPracticeController.hideHead");
}
function responsePlayLevel(nLevel) {
game.model.wave.Wave.getInstance().playSound("button");
game.model.field.FieldData.getInstance().setNameMode("practice");
game.model.field.FieldData.getInstance().setLevelPractice(nLevel);
game.model.field.FieldData.getInstance().createTins();
routeSystemMessage("handXXXController", "field", "map_practice");
}
function responseBack() {
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", "choose", "map_practice");
}
}
Symbol 1144 MovieClip [__Packages.game.units.controllers.InstrController] Frame 0
class game.units.controllers.InstrController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, sNameView, routeSystemMessage;
function InstrController () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local2 = new gdp.core.debug.router.RouteMessage("GameEngine.handInstrController", gdp.utils.Delegate.create(this, hand));
var _local5 = new gdp.core.debug.router.RouteMessage("GameEngine.blockInstrController", gdp.utils.Delegate.create(this, block));
var _local4 = new gdp.core.debug.router.RouteMessage("Instr.back", gdp.utils.Delegate.create(this, responseBack));
var _local6 = new gdp.core.debug.router.RouteMessage("Instr.next", gdp.utils.Delegate.create(this, responseNext));
var _local3 = new gdp.core.debug.router.RouteMessage("Instr.prev", gdp.utils.Delegate.create(this, responsePrev));
getRouter().addMessageHandler(_local2);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local6);
getRouter().addMessageHandler(_local3);
}
function hand(sName) {
nCurrentPage = nMinPages;
sNameView = sName;
routeSystemMessage("InstrController.viewHead");
}
function block() {
routeSystemMessage("InstrController.hideHead");
}
function responseBack() {
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", sNameView, "instructions");
}
function responseNext() {
var _local2;
var _local3 = true;
nCurrentPage++;
if (nCurrentPage < nMaxPages) {
_local2 = true;
} else {
_local2 = false;
}
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("InstrController.nextpage", nCurrentPage, _local2, _local3);
}
function responsePrev() {
var _local3 = true;
var _local2;
nCurrentPage--;
if (nCurrentPage > nMinPages) {
_local2 = true;
} else {
_local2 = false;
}
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("InstrController.prevpage", nCurrentPage, _local3, _local2);
}
var nMinPages = 1;
var nMaxPages = 5;
var nCurrentPage = 1;
}
Symbol 1145 MovieClip [__Packages.game.units.controllers.MenuController] Frame 0
class game.units.controllers.MenuController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage, sNameView;
function MenuController () {
super();
}
function init(Void) {
loadSettings();
initRequests();
}
function initRequests(Void) {
var _local4 = new gdp.core.debug.router.RouteMessage("GameEngine.handMenuController", gdp.utils.Delegate.create(this, hand));
var _local3 = new gdp.core.debug.router.RouteMessage("GameEngine.currentView", gdp.utils.Delegate.create(this, currentView));
var _local5 = new gdp.core.debug.router.RouteMessage("Menu.sound", gdp.utils.Delegate.create(this, responseSound));
var _local2 = new gdp.core.debug.router.RouteMessage("Menu.help", gdp.utils.Delegate.create(this, responseHelp));
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local2);
}
function hand() {
routeSystemMessage("MenuController.viewHead", bSound);
}
function currentView(sName) {
sNameView = sName;
}
function loadSettings() {
bSound = true;
game.model.wave.Wave.getInstance().volumeSound(bSound);
}
function saveSettings() {
}
function responseSound() {
if (bSound) {
game.model.wave.Wave.getInstance().volumeSound(false);
bSound = false;
} else {
game.model.wave.Wave.getInstance().volumeSound(true);
bSound = true;
}
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("MenuController.viewSound", bSound);
}
function responseHelp() {
if (sNameView == "instructions") {
return(undefined);
}
game.model.wave.Wave.getInstance().playSound("button");
routeSystemMessage("handXXXController", "instructions", sNameView);
}
var bSound = true;
}
Symbol 1146 MovieClip [__Packages.game.units.controllers.FieldController] Frame 0
class game.units.controllers.FieldController extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeSystemMessage;
function FieldController () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local12 = new gdp.core.debug.router.RouteMessage("GameEngine.handFieldController", gdp.utils.Delegate.create(this, hand));
var _local15 = new gdp.core.debug.router.RouteMessage("GameEngine.blockFieldController", gdp.utils.Delegate.create(this, block));
var _local2 = new gdp.core.debug.router.RouteMessage("Field.gameover.ok", gdp.utils.Delegate.create(this, responseGameOverOk));
var _local5 = new gdp.core.debug.router.RouteMessage("Field.nextlevel.ok", gdp.utils.Delegate.create(this, responseNextLevelOk));
var _local16 = new gdp.core.debug.router.RouteMessage("Field.winner.ok", gdp.utils.Delegate.create(this, responseWinnerOk));
var _local11 = new gdp.core.debug.router.RouteMessage("Field.field_game.user.btnView", gdp.utils.Delegate.create(this, responseBtnView));
var _local7 = new gdp.core.debug.router.RouteMessage("Field.field_game.user.btnHide", gdp.utils.Delegate.create(this, responseBtnHide));
var _local3 = new gdp.core.debug.router.RouteMessage("Field.field_game.user.btnYes", gdp.utils.Delegate.create(this, responseBtnYes));
var _local4 = new gdp.core.debug.router.RouteMessage("Field.field_game.user.btnSkip", gdp.utils.Delegate.create(this, responseBtnSkip));
var _local8 = new gdp.core.debug.router.RouteMessage("Field.field_game.user.select", gdp.utils.Delegate.create(this, responseSelect));
var _local13 = new gdp.core.debug.router.RouteMessage("Field.ai.select.view", gdp.utils.Delegate.create(this, responseAISelectBtnView));
var _local9 = new gdp.core.debug.router.RouteMessage("Field.ai.select.hide", gdp.utils.Delegate.create(this, responseAISelectBtnHide));
var _local10 = new gdp.core.debug.router.RouteMessage("Field.ai.select.yes", gdp.utils.Delegate.create(this, responseAISelectBtnYes));
var _local14 = new gdp.core.debug.router.RouteMessage("Field.ai.over.tin", gdp.utils.Delegate.create(this, responseAIOverTin));
var _local6 = new gdp.core.debug.router.RouteMessage("Field.transfer", gdp.utils.Delegate.create(this, transfer));
getRouter().addMessageHandler(_local12);
getRouter().addMessageHandler(_local15);
getRouter().addMessageHandler(_local2);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local16);
getRouter().addMessageHandler(_local11);
getRouter().addMessageHandler(_local7);
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local8);
getRouter().addMessageHandler(_local13);
getRouter().addMessageHandler(_local9);
getRouter().addMessageHandler(_local10);
getRouter().addMessageHandler(_local14);
getRouter().addMessageHandler(_local6);
}
function hand(bNewField) {
switch (bNewField) {
case true :
hand_1();
break;
case false :
hand_2();
}
}
function hand_1() {
game.model.field.FieldData.getInstance().setNameWndView("field_game");
var _local2;
var _local3;
game.model.users.User.getInstance().setBonus(0);
switch (game.model.field.FieldData.getInstance().getNameMode()) {
case "quest" :
game.model.users.User.getInstance().setScoreQ(game.model.users.User.getInstance().getScoreQFixd());
_local3 = game.model.users.User.getInstance().getScoreQ();
_local2 = game.model.field.FieldData.getInstance().getLevelQuest();
break;
case "practice" :
game.model.users.User.getInstance().setScoreP(0);
_local3 = game.model.users.User.getInstance().getScoreP();
_local2 = game.model.field.FieldData.getInstance().getLevelPractice();
}
var _local7 = game.model.field.FieldData.getInstance().getHideTower();
var _local8 = game.model.field.FieldData.getInstance().getTowers();
var _local9 = game.model.field.FieldData.getInstance().getHTower();
var _local4 = game.model.field.FieldData.getInstance().getTinUser(1);
var _local11 = game.model.field.FieldData.getInstance().getTinUser(2);
var _local6 = game.model.field.FieldData.getInstance().getTinAI(1);
var _local5 = game.model.field.FieldData.getInstance().getTinAI(2);
var _local10 = game.model.field.FieldData.getInstance().getTinView();
routeSystemMessage("FieldController.field_game.create", _local2, _local8, _local9, _local4, _local11, _local6, _local5, _local10, _local3, _local7);
}
function hand_2() {
routeSystemMessage("FieldController.viewHead");
}
function block() {
routeSystemMessage("FieldController.hideHead");
}
function responseGameOverOk() {
game.model.wave.Wave.getInstance().playSound("button");
game.model.field.FieldData.getInstance().setNameWndView("field_game");
routeSystemMessage("handXXXController", "pregame", "field");
}
function responseNextLevelOk() {
game.model.wave.Wave.getInstance().playSound("button");
game.model.field.FieldData.getInstance().setNameWndView("field_game");
routeSystemMessage("handXXXController", "map_quest", "field");
}
function responseWinnerOk() {
game.model.wave.Wave.getInstance().playSound("button");
game.model.field.FieldData.getInstance().setNameWndView("field_game");
routeSystemMessage("handXXXController", "pregame", "field");
}
function responseBtnView() {
game.model.field.FieldData.getInstance().clearTinHide();
game.model.field.FieldData.getInstance().setTinCur(game.model.field.FieldData.getInstance().getTinView());
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.select.view");
}
function responseBtnHide() {
game.model.field.FieldData.getInstance().setTinHide();
game.model.field.FieldData.getInstance().setTinCur(game.model.field.FieldData.getInstance().getTinHide());
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.select.hide", game.model.field.FieldData.getInstance().getTinCur());
}
function responseBtnYes() {
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.select.yes");
}
function responseBtnSkip() {
game.model.field.FieldData.getInstance().delTinValue();
game.model.field.FieldData.getInstance().addTinValue(game.model.field.FieldData.getInstance().getTinView());
game.model.field.FieldData.getInstance().setTinView(game.model.field.FieldData.getInstance().getTinCur());
game.model.field.FieldData.getInstance().clearTinHide();
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.select.skip", game.model.field.FieldData.getInstance().getTinView());
}
function responseSelect(i, nChooseTower) {
game.model.field.FieldData.getInstance().updateUserTins(i, nChooseTower);
var _local7 = game.model.field.FieldData.getInstance().getTinCur();
var _local6 = game.model.field.FieldData.getInstance().getTinUserFromIndex(i, nChooseTower);
var _local3 = game.model.field.FieldData.getInstance().getIUBonus(i, nChooseTower);
var _local4 = game.model.field.FieldData.getInstance().getIDBonus(i, nChooseTower);
if (_local3 != _local4) {
game.model.wave.Wave.getInstance().playSound("bonus");
switch (game.model.field.FieldData.getInstance().getNameMode()) {
case "quest" :
game.model.users.User.getInstance().updateScoreQ(_local3, _local4, game.model.field.FieldData.getInstance().getTinUser(nChooseTower));
break;
case "practice" :
game.model.users.User.getInstance().updateScoreP(_local3, _local4, game.model.field.FieldData.getInstance().getTinUser(nChooseTower));
}
}
var _local8 = ((game.model.field.FieldData.getInstance().getNameMode() == "quest") ? (game.model.users.User.getInstance().getScoreQ()) : (game.model.users.User.getInstance().getScoreP()));
game.model.wave.Wave.getInstance().playSound("insert");
routeSystemMessage("FieldController.select.tin", i, nChooseTower, _local7, _local6, _local3, _local4, _local8);
}
function transfer(sName) {
if (sName == "user") {
if (game.model.field.FieldData.getInstance().checkWinUser()) {
winUser();
} else {
aiWhatChange();
}
} else if (game.model.field.FieldData.getInstance().checkWinAI()) {
winAI();
} else {
routeSystemMessage("FieldController.transfer.user");
}
}
function winUser() {
routeSystemMessage("FieldController.user.prewinner", true);
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_winUser, []));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_winUser() {
var _local4 = gdp.core.time.FrameTimer.getInstance().getTime();
if (gdp.utils.Delegate.get("Timer") == undefined) {
gdp.utils.Delegate.set("Timer", _local4);
}
if ((_local4 - gdp.utils.Delegate.get("Timer")) > nDelayWin) {
game.model.field.FieldData.getInstance().sumbonus();
var _local2;
var _local3 = game.model.users.User.getInstance().getBonus();
switch (game.model.field.FieldData.getInstance().getNameMode()) {
case "quest" :
_local2 = game.model.users.User.getInstance().getScoreQ();
game.model.users.User.getInstance().setScoreQFixd(_local2 + _local3);
game.model.users.User.getInstance().setScoreQ(_local2 + _local3);
if (game.model.users.User.getInstance().getLevelQuestMax() == 5) {
game.model.field.FieldData.getInstance().setNameWndView("download");
} else {
game.model.field.FieldData.getInstance().setNameWndView("next_level");
}
game.model.field.FieldData.getInstance().updateQuestParams(true);
break;
case "practice" :
_local2 = game.model.users.User.getInstance().getScoreP();
game.model.users.User.getInstance().setScoreP(_local2 + _local3);
game.model.field.FieldData.getInstance().setNameWndView("winner");
}
game.model.wave.Wave.getInstance().playSound("win");
routeSystemMessage("FieldController.user.winner", game.model.field.FieldData.getInstance().getNameMode(), _local2, _local3);
return(0);
}
}
function winAI() {
routeSystemMessage("FieldController.ai.prewinner", true);
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_winAI, []));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_winAI() {
var _local2 = gdp.core.time.FrameTimer.getInstance().getTime();
if (gdp.utils.Delegate.get("Timer") == undefined) {
gdp.utils.Delegate.set("Timer", _local2);
}
if ((_local2 - gdp.utils.Delegate.get("Timer")) > nDelayWin) {
var _local3;
switch (game.model.field.FieldData.getInstance().getNameMode()) {
case "quest" :
_local3 = game.model.users.User.getInstance().getScoreQ();
game.model.field.FieldData.getInstance().updateQuestParams(false);
break;
case "practice" :
_local3 = game.model.users.User.getInstance().getScoreP();
}
game.model.field.FieldData.getInstance().setNameWndView("game_over");
game.model.wave.Wave.getInstance().playSound("lose");
routeSystemMessage("FieldController.ai.winner", _local3);
return(0);
}
}
function aiWhatChange() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < game.model.field.FieldData.getInstance().getTowers()) {
_local3.push(game.model.field.FieldData.getInstance().getTinAI(_local2 + 1));
_local2++;
}
var _local4 = game.model.field.AI.getInstance().whatChange([game.model.field.FieldData.getInstance().getTinCur(), -1], _local3);
if (_local4 == 0) {
timepause("ai.select.view");
} else {
timepause("ai.select.hide");
}
}
function responseAISelectBtnView() {
timepause("ai.over.tin");
}
function responseAISelectBtnHide() {
var _local2 = game.model.field.AI.getInstance().whatChange([game.model.field.FieldData.getInstance().getTinCur(), -2], game.model.field.FieldData.getInstance().getTinAI());
if (_local2 == 0) {
timepause("ai.select.yes");
} else {
timepause("ai.select.skip");
}
}
function responseAISelectBtnYes() {
timepause("ai.over.tin");
}
function responseAIOverTin() {
timepause("ai.select.tin");
}
function timepause(sName) {
var _local2 = game.model.field.FieldData.getInstance().getDelayMin() + random(game.model.field.FieldData.getInstance().getDelayMax());
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_timepause, [_local2, sName]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
function ps_timepause(nDelay, sName) {
var _local2 = gdp.core.time.FrameTimer.getInstance().getTime();
if (gdp.utils.Delegate.get("Timer") == undefined) {
gdp.utils.Delegate.set("Timer", _local2);
}
if ((_local2 - gdp.utils.Delegate.get("Timer")) > nDelay) {
gdp.utils.Delegate.set("Timer", undefined);
endpause(sName);
return(0);
}
}
function endpause(sName) {
switch (sName) {
case "ai.select.view" :
game.model.field.FieldData.getInstance().clearTinHide();
game.model.field.FieldData.getInstance().setTinCur(game.model.field.FieldData.getInstance().getTinView());
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.aiselect.view");
break;
case "ai.select.hide" :
game.model.field.FieldData.getInstance().setTinHide();
game.model.field.FieldData.getInstance().setTinCur(game.model.field.FieldData.getInstance().getTinHide());
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.aiselect.hide", game.model.field.FieldData.getInstance().getTinCur());
break;
case "ai.over.tin" :
var _local3 = new Array();
var _local2 = 0;
while (_local2 < game.model.field.FieldData.getInstance().getTowers()) {
_local3.push(game.model.field.FieldData.getInstance().getTinAI(_local2 + 1));
_local2++;
}
var _local5 = new Object();
_local5 = game.model.field.AI.getInstance().onWhatChange(_local3);
var _local4 = _local5.place;
var _local6 = _local5.tower;
routeSystemMessage("FieldController.aiover.tin", _local4, _local6);
break;
case "ai.select.tin" :
_local3 = new Array();
_local2 = 0;
while (_local2 < game.model.field.FieldData.getInstance().getTowers()) {
_local3.push(game.model.field.FieldData.getInstance().getTinAI(_local2 + 1));
_local2++;
}
_local5 = new Object();
_local5 = game.model.field.AI.getInstance().onWhatChange(_local3);
_local4 = _local5.place;
_local6 = _local5.tower;
game.model.field.FieldData.getInstance().updateAITins(_local4, _local6);
var _local8 = game.model.field.FieldData.getInstance().getTinCur();
var _local7 = game.model.field.FieldData.getInstance().getTinAIFromIndex(_local4, _local6);
game.model.wave.Wave.getInstance().playSound("insert");
routeSystemMessage("FieldController.aiselect.tin", _local4, _local6, _local8, _local7);
break;
case "ai.select.yes" :
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.aiselect.yes");
break;
case "ai.select.skip" :
game.model.field.FieldData.getInstance().delTinValue();
game.model.field.FieldData.getInstance().addTinValue(game.model.field.FieldData.getInstance().getTinView());
game.model.field.FieldData.getInstance().setTinView(game.model.field.FieldData.getInstance().getTinCur());
game.model.field.FieldData.getInstance().clearTinHide();
game.model.wave.Wave.getInstance().playSound("block choise");
routeSystemMessage("FieldController.aiselect.skip", game.model.field.FieldData.getInstance().getTinView());
}
}
var nDelayWin = 1000;
}
Symbol 1147 MovieClip [__Packages.game.units.views.Pregame] Frame 0
class game.units.views.Pregame extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, btnPLAY, btnINSTR, btnDOWNLOAD, routeMessage;
function Pregame () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local3 = new gdp.core.debug.router.RouteMessage("PregameController.viewHead", gdp.utils.Delegate.create(this, view));
var _local2 = new gdp.core.debug.router.RouteMessage("PregameController.hideHead", gdp.utils.Delegate.create(this, hide));
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local2);
}
function view() {
if (wndHead == null) {
initGraphics();
}
wndHead.welcome.name.text = game.model.users.User.getInstance().getName();
wndHead._visible = true;
}
function hide() {
wndHead._visible = false;
}
function initGraphics() {
wndHead = game.core.Core.getInstance().attachMovie("pregame", "pregameMc", game.core.Core.getInstance().getNextHighestDepth());
wndHead.cacheAsBitmap = true;
loadLogos();
btnPLAY = wndHead.btnPLAY;
btnINSTR = wndHead.btnINSTR;
btnDOWNLOAD = wndHead.btnDOWNLOAD;
btnPLAY.onRelease = gdp.utils.Delegate.create(this, releasePlay);
btnINSTR.onRelease = gdp.utils.Delegate.create(this, releaseInstr);
btnDOWNLOAD.onRelease = gdp.utils.Delegate.create(this, releaseDownload);
hide();
}
function loadLogos() {
var _local4 = game.helpers.Settings.getInstance().getLogos();
var _local2 = 0;
while (_local2 < _local4.length) {
var _local7 = _local4[_local2][0];
var _local6 = gdp.utils.StringUtil.toNumber(_local4[_local2][1]);
var _local5 = gdp.utils.StringUtil.toNumber(_local4[_local2][2]);
var _local3 = wndHead.createEmptyMovieClip("mcLogo" + _local2, wndHead.getNextHighestDepth(), {_x:_local6, _y:_local5});
_local3._x = _local6;
_local3._y = _local5;
_local3.loadMovie(_local7);
_local2++;
}
}
function releasePlay() {
routeMessage("Pregame.play");
}
function releaseInstr() {
routeMessage("Pregame.instructions");
}
function releaseDownload() {
getURL (game.helpers.Settings.getInstance().getLinkdownload(), "_blank");
}
var wndHead = null;
}
Symbol 1148 MovieClip [__Packages.game.units.views.Choose] Frame 0
class game.units.views.Choose extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, routeMessage;
function Choose () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local3 = new gdp.core.debug.router.RouteMessage("ChooseController.viewHead", gdp.utils.Delegate.create(this, view));
var _local2 = new gdp.core.debug.router.RouteMessage("ChooseController.hideHead", gdp.utils.Delegate.create(this, hide));
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local2);
}
function view() {
if (wndHead == null) {
initGraphics();
}
wndHead._visible = true;
}
function hide() {
wndHead._visible = false;
}
function initGraphics() {
wndHead = game.core.Core.getInstance().attachMovie("choose_game_type", "choose_game_typeMc", game.core.Core.getInstance().getNextHighestDepth());
wndHead.cacheAsBitmap = true;
wndHead.btnQUEST.onRelease = gdp.utils.Delegate.create(this, releaseChooseQuest);
wndHead.btnPRACTICE.onRelease = gdp.utils.Delegate.create(this, releaseChoosePractice);
wndHead.btnBACK.onRelease = gdp.utils.Delegate.create(this, releaseChooseBack);
}
function releaseChooseQuest() {
routeMessage("Choose.quest");
}
function releaseChoosePractice() {
routeMessage("Choose.practice");
}
function releaseChooseBack() {
routeMessage("Choose.back");
}
var wndHead = null;
}
Symbol 1149 MovieClip [__Packages.game.units.views.MapQuest] Frame 0
class game.units.views.MapQuest extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, nMaxLevel, nCurLevel, nPreLevel, mcPrehistory, mcMap1, mcMap2, mcMonkey1, mcMonkey2, mcPath1, mcPath2, btnNext, btnPrev, aForward1, aBack1, aForward2, aBack2, aPath1, aPath2, routeMessage, mcCurPoint;
function MapQuest () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local4 = new gdp.core.debug.router.RouteMessage("MapQuestController.viewHead", gdp.utils.Delegate.create(this, view));
var _local3 = new gdp.core.debug.router.RouteMessage("MapQuestController.hideHead", gdp.utils.Delegate.create(this, hide));
var _local2 = new gdp.core.debug.router.RouteMessage("MapQuestController.select.level", gdp.utils.Delegate.create(this, selectLevel));
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local2);
}
function view(nLevel, nLevelMax, bNext) {
if (wndHead == null) {
initGraphics();
}
if (!bNext) {
bNextLevel = false;
}
nMaxLevel = nLevelMax;
viewPoints();
viewMaxPoint();
nCurLevel = nLevel;
if (bNextLevel) {
nPreLevel = nLevel - 1;
selectLevel();
} else {
nPreLevel = nLevel;
viewMonkey();
}
viewPaths();
if (nLevelMax == 1) {
prehistory(true);
} else {
prehistory(false);
}
wndHead._visible = true;
}
function hide() {
wndHead._visible = false;
}
function initGraphics() {
wndHead = game.core.Core.getInstance().attachMovie("map_quest", "map_questMc", game.core.Core.getInstance().getNextHighestDepth());
wndHead.cacheAsBitmap = true;
mcPrehistory = wndHead.prehistory;
mcMap1 = wndHead.map1;
mcMap2 = wndHead.map2;
mcMonkey1 = mcMap1.monkey;
mcMonkey2 = mcMap2.monkey;
mcPath1 = mcMap1.path;
mcPath2 = mcMap2.path;
btnNext = wndHead.btnNEXT;
btnPrev = wndHead.btnPREV;
mcPrehistory.btnNext.onRelease = gdp.utils.Delegate.create(this, prehistoryNext);
btnNext.onRelease = gdp.utils.Delegate.create(this, releaseNext);
btnPrev.onRelease = gdp.utils.Delegate.create(this, releasePrev);
var _local2 = 1;
while (_local2 < 6) {
mcMap1["btn" + _local2].onRelease = gdp.utils.Delegate.create(this, releaseBtn, [_local2]);
_local2++;
}
wndHead.btnPLAY.onRelease = gdp.utils.Delegate.create(this, releaseQuestPlay);
wndHead.btnBACK.onRelease = gdp.utils.Delegate.create(this, releaseQuestBack);
initMonkeysPoint();
}
function prehistory(bView) {
mcPrehistory._visible = bView;
if (bView) {
nPrehistory = 1;
mcPrehistory.gotoAndPlay(2);
mcPrehistory.txtPrehistory.text = game.helpers.Settings.getInstance().getPrehistoryPage(1);
mcMap1._visible = (btnNext._visible = false);
mcMap2._visible = (btnPrev._visible = false);
} else if (nCurLevel <= 14) {
viewMaps(true);
} else {
viewMaps(false);
}
}
function prehistoryNext() {
nPrehistory++;
switch (nPrehistory) {
case 2 :
mcPrehistory.gotoAndPlay(78);
mcPrehistory.txtPrehistory.text = game.helpers.Settings.getInstance().getPrehistoryPage(2);
break;
case 3 :
mcPrehistory.gotoAndPlay(153);
mcPrehistory.txtPrehistory.text = game.helpers.Settings.getInstance().getPrehistoryPage(3);
break;
case 4 :
prehistory(false);
}
}
function initMonkeysPoint() {
aForward1 = new Array(1, 25, 50, 75, 100, 125, 150, 200, 250, 275, 300, 325, 350);
aBack1 = new Array(376, 400, 425, 450, 475, 500, 550, 600, 625, 650, 675, 700, 725);
aForward2 = new Array(1, 25, 50, 75, 100, 150, 200, 225, 250, 275);
aBack2 = new Array(301, 325, 350, 375, 400, 450, 500, 525, 550, 575);
aPath1 = new Array(2, 27, 52, 82, 112, 137, 162, 197, 227, 267, 307, 342, 372, 432);
aPath2 = new Array(2, 27, 52, 77, 102, 152, 192, 216, 242, 272, 300);
}
function releaseNext() {
bNextLevel = false;
viewMaps(false);
viewMonkey();
}
function releasePrev() {
bNextLevel = false;
viewMaps(true);
viewMonkey();
}
function releaseBtn(nLevel) {
nPreLevel = nCurLevel;
nCurLevel = nLevel;
if (nPreLevel == nCurLevel) {
return(undefined);
}
routeMessage("MapQuest.select.level", nLevel);
}
function selectLevel() {
if (nCurLevel < 15) {
mcMonkey1._visible = true;
mcMonkey2._visible = false;
mcMonkey1.cur = nCurLevel;
if (nPreLevel < 15) {
mcMonkey1.bmove = true;
mcMonkey1.cur = nCurLevel;
blockBtn(mcMonkey1);
if (nPreLevel < nCurLevel) {
mcMonkey1.gotoAndPlay(aForward1[nPreLevel - 1]);
} else {
mcMonkey1.gotoAndPlay(aBack1[(aBack1.length - nPreLevel) + 1]);
}
} else if (nCurLevel == 14) {
mcMonkey1.bmove = false;
mcMonkey1.gotoAndStop(aBack1[0]);
} else {
mcMonkey1.bmove = true;
blockBtn(mcMonkey1);
mcMonkey1.gotoAndPlay(aBack1[0]);
}
} else {
mcMonkey1._visible = false;
mcMonkey2._visible = true;
mcMonkey2.cur = nCurLevel;
if (nPreLevel > 14) {
mcMonkey2.bmove = true;
blockBtn(mcMonkey2);
if (nPreLevel < nCurLevel) {
mcMonkey2.gotoAndPlay(aForward2[(nPreLevel - 14) - 1]);
} else {
mcMonkey2.gotoAndPlay(aBack2[(aBack2.length - (nPreLevel - 14)) + 1]);
}
} else if (nCurLevel == 15) {
mcMonkey2.bmove = false;
mcMonkey2.gotoAndStop(aForward2[0]);
} else {
mcMonkey2.bmove = true;
blockBtn(mcMonkey2);
mcMonkey2.gotoAndPlay(aForward2[0]);
}
}
}
function releaseQuestPlay() {
if (nCurLevel != nMaxLevel) {
bNextLevel = false;
game.model.users.User.getInstance().setBonusView(false);
} else {
bNextLevel = true;
if (nMaxLevel == 1) {
game.model.users.User.getInstance().setBonusView(false);
} else {
game.model.users.User.getInstance().setBonusView(true);
}
}
routeMessage("MapQuest.play", nCurLevel);
}
function releaseQuestBack() {
routeMessage("MapQuest.back");
}
function viewPoints() {
var _local2 = 1;
while (_local2 < 6) {
if (_local2 > nMaxLevel) {
mcMap1["btn" + _local2].enabled = false;
} else {
mcMap1["btn" + _local2].enabled = true;
}
_local2++;
}
}
function blockPoints() {
var _local2 = 1;
while (_local2 < 6) {
mcMap1["btn" + _local2].enabled = false;
_local2++;
}
}
function viewMaps(bView) {
mcMap1._visible = (btnNext._visible = bView);
mcMap2._visible = (btnPrev._visible = !bView);
}
function viewMaxPoint() {
var _local2 = ((nMaxLevel < 15) ? (mcMap1) : (mcMap2));
mcCurPoint.removeMovieClip();
mcCurPoint = _local2.empty.attachMovie("cur_point", "CUR_POINT", _local2.empty.getNextHighestDepth());
mcCurPoint._x = _local2["btn" + nMaxLevel]._x;
mcCurPoint._y = _local2["btn" + nMaxLevel]._y;
mcCurPoint.cacheAsBitmap = true;
}
function viewPaths() {
if (bNextLevel) {
if (nMaxLevel < 15) {
mcPath1.gotoAndPlay(aPath1[nMaxLevel - 1]);
} else {
mcPath2.gotoAndPlay(aPath2[nMaxLevel - 15]);
}
} else if (nMaxLevel < 15) {
mcPath1.gotoAndStop(aPath1[nMaxLevel - 1]);
} else {
mcPath2.gotoAndStop(aPath2[nMaxLevel - 15]);
}
if (nMaxLevel > 14) {
mcPath1.gotoAndStop(aPath1[aPath1.length - 1]);
if (nMaxLevel == 15) {
mcPath2.gotoAndStop(aPath2[0]);
}
} else {
if (nMaxLevel == 1) {
mcPath1.gotoAndStop(aPath1[0]);
}
mcPath2.gotoAndStop(1);
}
}
function viewMonkey() {
mcMonkey1.bmove = false;
mcMonkey2.bmove = false;
if (nCurLevel < 15) {
mcMonkey1.cur = nCurLevel;
if (nCurLevel == 14) {
mcMonkey1.gotoAndStop(aBack1[0]);
} else {
mcMonkey1.gotoAndStop(aForward1[nCurLevel - 1]);
}
mcMonkey1._visible = true;
mcMonkey2._visible = false;
} else {
mcMonkey2.cur = nCurLevel;
if (nCurLevel == 25) {
mcMonkey2.gotoAndStop(aBack2[0]);
} else {
mcMonkey2.gotoAndStop(aForward2[nCurLevel - 15]);
}
mcMonkey1._visible = false;
mcMonkey2._visible = true;
}
}
function blockBtn(mcMonkey) {
blockPoints();
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_blockBtn, [mcMonkey]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_blockBtn(mcMonkey) {
if ((!mcMonkey.bmove) || (!mcMonkey._visible)) {
viewPoints();
return(0);
}
}
var wndHead = null;
var nPrehistory = 1;
var bNextLevel = false;
}
Symbol 1150 MovieClip [__Packages.game.units.views.MapPractice] Frame 0
class game.units.views.MapPractice extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, mcMap1, mcMap2, btnNext, btnPrev, routeMessage, wndDownload;
function MapPractice () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local3 = new gdp.core.debug.router.RouteMessage("MapPracticeController.viewHead", gdp.utils.Delegate.create(this, view));
var _local2 = new gdp.core.debug.router.RouteMessage("MapPracticeController.hideHead", gdp.utils.Delegate.create(this, hide));
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local2);
}
function view() {
if (wndHead == null) {
initGraphics();
}
viewMaps(true);
wndHead._visible = true;
}
function hide() {
wndHead._visible = false;
}
function initGraphics() {
wndHead = game.core.Core.getInstance().attachMovie("map_practice", "map_practiceMc", game.core.Core.getInstance().getNextHighestDepth());
wndHead.cacheAsBitmap = true;
mcMap1 = wndHead.map1;
mcMap2 = wndHead.map2;
btnNext = wndHead.btnNEXT;
btnPrev = wndHead.btnPREV;
mcMap1.monkey.gotoAndStop(1);
mcMap2.monkey.gotoAndStop(1);
mcMap1.monkey._visible = (mcMap1.monkey.enabled = false);
mcMap2.monkey._visible = (mcMap2.monkey.enabled = false);
viewPaths();
btnNext.onRelease = gdp.utils.Delegate.create(this, releaseNext);
btnPrev.onRelease = gdp.utils.Delegate.create(this, releasePrev);
wndHead.btnBACK.onRelease = gdp.utils.Delegate.create(this, releasePracticeBack);
var _local3;
var _local2 = 1;
while (_local2 < 6) {
mcMap1["btn" + _local2].onRelease = gdp.utils.Delegate.create(this, releasePracticeBtn, [_local2]);
_local2++;
}
_local2 = 6;
while (_local2 < 15) {
mcMap1["btn" + _local2].onRelease = gdp.utils.Delegate.create(this, viewWndDownload);
_local2++;
}
_local2 = 15;
while (_local2 < 26) {
mcMap2["btn" + _local2].onRelease = gdp.utils.Delegate.create(this, viewWndDownload);
_local2++;
}
}
function releaseNext() {
viewMaps(false);
}
function releasePrev() {
viewMaps(true);
}
function releasePracticeBack() {
routeMessage("MapPractice.back");
}
function releasePracticeBtn(nLevel) {
routeMessage("MapPractice.playLevel", nLevel);
}
function viewWndDownload() {
wndDownload = wndHead.attachMovie("download", "downloadMc", wndHead.getNextHighestDepth());
wndDownload.txtDownload.text = game.helpers.Settings.getInstance().getTextdownload();
wndDownload.btn.useHandCursor = false;
wndDownload.btnDOWNLOAD.onRelease = gdp.utils.Delegate.create(this, download);
wndDownload.btnLATER.onRelease = gdp.utils.Delegate.create(this, later);
}
function download() {
getURL (game.helpers.Settings.getInstance().getLinkdownload(), "_blank");
}
function later() {
wndDownload.removeMovieClip();
}
function viewMaps(bView) {
mcMap1._visible = (btnNext._visible = bView);
mcMap2._visible = (btnPrev._visible = !bView);
}
function viewPaths() {
mcMap1.path.gotoAndStop(850);
mcMap2.path.gotoAndStop(711);
}
var wndHead = null;
}
Symbol 1151 MovieClip [__Packages.game.units.views.Instructions] Frame 0
class game.units.views.Instructions extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, wndPages, btnBACK, btnDOWNLOAD, btnNEXT, btnPREV, routeMessage;
function Instructions () {
super();
}
function init(Void) {
initRequests();
}
function initRequests(Void) {
var _local5 = new gdp.core.debug.router.RouteMessage("InstrController.viewHead", gdp.utils.Delegate.create(this, view));
var _local4 = new gdp.core.debug.router.RouteMessage("InstrController.hideHead", gdp.utils.Delegate.create(this, hide));
var _local3 = new gdp.core.debug.router.RouteMessage("InstrController.nextpage", gdp.utils.Delegate.create(this, goPage));
var _local2 = new gdp.core.debug.router.RouteMessage("InstrController.prevpage", gdp.utils.Delegate.create(this, goPage));
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local2);
}
function view() {
if (wndHead == null) {
initGraphics();
}
goPage(1, true, false);
wndHead._visible = true;
}
function hide() {
wndHead._visible = false;
}
function initGraphics() {
wndHead = game.core.Core.getInstance().attachMovie("instructions", "instructionsMc", game.core.Core.getInstance().getNextHighestDepth());
wndHead.cacheAsBitmap = true;
wndPages = wndHead.wndPages;
btnBACK = wndHead.btnBACK;
btnDOWNLOAD = wndHead.btnDOWNLOAD;
btnNEXT = wndPages.btnNEXT;
btnPREV = wndPages.btnPREV;
btnBACK.onRelease = gdp.utils.Delegate.create(this, releaseBack);
btnDOWNLOAD.onRelease = gdp.utils.Delegate.create(this, releaseDownload);
btnNEXT.onRelease = gdp.utils.Delegate.create(this, releaseNext);
btnPREV.onRelease = gdp.utils.Delegate.create(this, releasePrev);
hide();
}
function releaseBack() {
routeMessage("Instr.back");
}
function releaseDownload() {
getURL (game.helpers.Settings.getInstance().getLinkdownload(), "_blank");
}
function releaseNext() {
routeMessage("Instr.next");
}
function releasePrev() {
routeMessage("Instr.prev");
}
function goPage(nPage, bVisNext, bVisPrev) {
wndPages.gotoAndStop(nPage);
switch (nPage) {
case 1 :
wndPages.page1.gotoAndPlay(1);
wndPages.txtPage1.text = game.helpers.Settings.getInstance().getInstrPage(1);
break;
case 2 :
wndPages.page2.gotoAndPlay(1);
wndPages.txtPage2.text = game.helpers.Settings.getInstance().getInstrPage(2);
break;
case 3 :
wndPages.page3.gotoAndPlay(1);
wndPages.txtPage3.text = game.helpers.Settings.getInstance().getInstrPage(3);
break;
case 4 :
wndPages.page4.gotoAndPlay(1);
wndPages.txtPage4.text = game.helpers.Settings.getInstance().getInstrPage(4);
break;
case 5 :
wndPages.page5.gotoAndPlay(1);
wndPages.txtPage5.text = game.helpers.Settings.getInstance().getInstrPage(5);
}
btnNEXT._visible = bVisNext;
btnPREV._visible = bVisPrev;
}
var wndHead = null;
}
Symbol 1152 MovieClip [__Packages.game.units.views.Field] Frame 0
class game.units.views.Field extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, wndHead, wndGameOver, wndFieldGame, wndWinner, wndNextLevel, wndDownload, routeSystemMessage, mcZanaves, mcTowers, mcHelp, mcHideSkip, mcHideYes, btnYES, btnSKIP, mcVIEW, mcHIDE, btnVIEW, btnHIDE, txtView, txtHide, routeMessage, nLevelView, nTowersView, nHTowerView, mcTowersLayer, mcZanavesTemp, mcHint, aAI1, aUser1, aSelect1, aAI2, aUser2, aSelect2, bAnim1, bAnim2, d_rotate, d_x;
function Field () {
super();
}
function init(Void) {
initGraphics();
initRequests();
}
function initRequests(Void) {
var _local15 = new gdp.core.debug.router.RouteMessage("FieldController.viewHead", gdp.utils.Delegate.create(this, view));
var _local12 = new gdp.core.debug.router.RouteMessage("FieldController.hideHead", gdp.utils.Delegate.create(this, hide));
var _local13 = new gdp.core.debug.router.RouteMessage("FieldController.field_game.create", gdp.utils.Delegate.create(this, createFieldGame));
var _local9 = new gdp.core.debug.router.RouteMessage("FieldController.select.view", gdp.utils.Delegate.create(this, selectUserView));
var _local16 = new gdp.core.debug.router.RouteMessage("FieldController.select.hide", gdp.utils.Delegate.create(this, selectUserHide));
var _local7 = new gdp.core.debug.router.RouteMessage("FieldController.select.yes", gdp.utils.Delegate.create(this, selectUserYes));
var _local17 = new gdp.core.debug.router.RouteMessage("FieldController.select.skip", gdp.utils.Delegate.create(this, selectUserSkip));
var _local11 = new gdp.core.debug.router.RouteMessage("FieldController.select.tin", gdp.utils.Delegate.create(this, selectUserTin));
var _local19 = new gdp.core.debug.router.RouteMessage("FieldController.aiselect.view", gdp.utils.Delegate.create(this, selectAIView));
var _local2 = new gdp.core.debug.router.RouteMessage("FieldController.aiselect.hide", gdp.utils.Delegate.create(this, selectAIHide));
var _local3 = new gdp.core.debug.router.RouteMessage("FieldController.aiselect.yes", gdp.utils.Delegate.create(this, selectAIYes));
var _local10 = new gdp.core.debug.router.RouteMessage("FieldController.aiselect.skip", gdp.utils.Delegate.create(this, selectAISkip));
var _local18 = new gdp.core.debug.router.RouteMessage("FieldController.aiover.tin", gdp.utils.Delegate.create(this, overAISelect));
var _local4 = new gdp.core.debug.router.RouteMessage("FieldController.aiselect.tin", gdp.utils.Delegate.create(this, selectAITin));
var _local5 = new gdp.core.debug.router.RouteMessage("FieldController.user.prewinner", gdp.utils.Delegate.create(this, prewinnerUser));
var _local6 = new gdp.core.debug.router.RouteMessage("FieldController.ai.prewinner", gdp.utils.Delegate.create(this, prewinnerAI));
var _local14 = new gdp.core.debug.router.RouteMessage("FieldController.user.winner", gdp.utils.Delegate.create(this, winnerUser));
var _local8 = new gdp.core.debug.router.RouteMessage("FieldController.ai.winner", gdp.utils.Delegate.create(this, winnerAI));
var _local20 = new gdp.core.debug.router.RouteMessage("FieldController.transfer.user", gdp.utils.Delegate.create(this, transferUser));
getRouter().addMessageHandler(_local15);
getRouter().addMessageHandler(_local12);
getRouter().addMessageHandler(_local13);
getRouter().addMessageHandler(_local9);
getRouter().addMessageHandler(_local16);
getRouter().addMessageHandler(_local7);
getRouter().addMessageHandler(_local17);
getRouter().addMessageHandler(_local11);
getRouter().addMessageHandler(_local19);
getRouter().addMessageHandler(_local2);
getRouter().addMessageHandler(_local10);
getRouter().addMessageHandler(_local3);
getRouter().addMessageHandler(_local18);
getRouter().addMessageHandler(_local4);
getRouter().addMessageHandler(_local5);
getRouter().addMessageHandler(_local6);
getRouter().addMessageHandler(_local14);
getRouter().addMessageHandler(_local8);
getRouter().addMessageHandler(_local20);
}
function view() {
wndHead._visible = true;
}
function viewGameOver(nScores) {
wndGameOver.scores.text = nScores;
wndFieldGame._visible = true;
wndGameOver._visible = true;
wndGameOver.cocos.cocos.gotoAndPlay(2);
wndGameOver.cherep.gotoAndPlay(2);
}
function viewWinner(nScores, nBonus) {
wndWinner.scores.text = nScores;
wndWinner.bonus.text = nBonus;
wndWinner.mcAnim.gotoAndPlay(2);
wndFieldGame._visible = true;
wndWinner._visible = true;
}
function viewNextLevel(nScores, nBonus) {
wndNextLevel.scores.text = nScores;
wndNextLevel.bonus.text = nBonus;
wndFieldGame._visible = true;
wndNextLevel._visible = true;
}
function viewWndDownload() {
wndDownload = wndHead.attachMovie("download", "downloadMc", wndHead.getNextHighestDepth());
wndDownload.txtDownload.text = game.helpers.Settings.getInstance().getTextdownload();
wndDownload.btn.useHandCursor = false;
wndDownload.btnDOWNLOAD.onRelease = gdp.utils.Delegate.create(this, download);
wndDownload.btnLATER.onRelease = gdp.utils.Delegate.create(this, later);
}
function download() {
game.model.wave.Wave.getInstance().playSound("button");
getURL (game.helpers.Settings.getInstance().getLinkdownload(), "_blank");
}
function later() {
wndDownload.removeMovieClip();
game.model.wave.Wave.getInstance().playSound("button");
game.model.field.FieldData.getInstance().setNameWndView("field_game");
routeSystemMessage("handXXXController", "pregame", "field");
}
function hide() {
wndHead._visible = false;
}
function hideGameOver() {
wndGameOver._visible = false;
wndGameOver.cocos.cocos.gotoAndStop(1);
wndGameOver.cherep.gotoAndStop(1);
}
function hideWinner() {
wndWinner._visible = false;
wndWinner.mcAnim.gotoAndStop(1);
}
function hideNextLevel() {
wndNextLevel._visible = false;
}
function hideAllWnd() {
hideGameOver();
hideWinner();
hideNextLevel();
}
function initGraphics() {
wndHead = game.core.Core.getInstance().createEmptyMovieClip("fieldHeadMc", game.core.Core.getInstance().getNextHighestDepth());
initGraphicFieldGame();
initGraphicGameOver();
initGraphicNextLevel();
initGraphicWinner();
hideGameOver();
hideNextLevel();
hideWinner();
hide();
}
function initGraphicFieldGame() {
wndFieldGame = wndHead.attachMovie("field_game", "field_gameMc", wndHead.getNextHighestDepth());
wndFieldGame.cacheAsBitmap = true;
mcZanaves = wndFieldGame.zanaves;
mcTowers = wndFieldGame.towers;
mcHelp = wndFieldGame.help;
mcHideSkip = wndFieldGame.hide_skip;
mcHideYes = wndFieldGame.hide_yes;
btnYES = wndFieldGame.btnYES;
btnSKIP = wndFieldGame.btnSKIP;
mcVIEW = wndFieldGame.mcTinView;
mcHIDE = wndFieldGame.mcTinHide;
trace("mcHIDE._x: " + mcHIDE._x);
btnVIEW = mcVIEW.btn;
btnHIDE = mcHIDE.btn;
txtView = mcVIEW.value;
txtHide = mcHIDE.value;
btnYES.onRelease = gdp.utils.Delegate.create(this, releaseBtnYes);
btnSKIP.onRelease = gdp.utils.Delegate.create(this, releaseBtnSkip);
btnVIEW.onRelease = gdp.utils.Delegate.create(this, releaseBtnView);
btnHIDE.onRelease = gdp.utils.Delegate.create(this, releaseBtnHide);
}
function initGraphicGameOver() {
wndGameOver = wndHead.attachMovie("game_over", "game_overMc", wndHead.getNextHighestDepth());
wndGameOver.cacheAsBitmap = true;
wndGameOver.btn.useHandCursor = false;
wndGameOver.btnOK.onRelease = gdp.utils.Delegate.create(this, releaseGameOverOk);
}
function initGraphicNextLevel() {
wndNextLevel = wndHead.attachMovie("you_won_the_level", "next_levelMc", wndHead.getNextHighestDepth());
wndNextLevel.cacheAsBitmap = true;
wndNextLevel.btn.useHandCursor = false;
wndNextLevel.btnOK.onRelease = gdp.utils.Delegate.create(this, releaseNextLevelOk);
}
function initGraphicWinner() {
wndWinner = wndHead.attachMovie("you're_winner", "winnerMc", wndHead.getNextHighestDepth());
wndWinner.cacheAsBitmap = true;
wndWinner.btn.useHandCursor = false;
wndWinner.mcAnim.btnOK.onRelease = gdp.utils.Delegate.create(this, releaseWinnerOk);
}
function releaseGameOverOk() {
routeMessage("Field.gameover.ok");
}
function releaseNextLevelOk() {
routeMessage("Field.nextlevel.ok");
}
function releaseWinnerOk() {
routeMessage("Field.winner.ok");
}
function createFieldGame(nLevel, nTowers, nHTower, aTinUser1, aTinUser2, aTinAI1, aTinAI2, nTinView, nBonus, bHideTower) {
nLevelView = nLevel - (5 * (Math.ceil(nLevel / 5) - 1));
nTowersView = nTowers;
nHTowerView = nHTower;
hideAllWnd();
mcHideSkip.gotoAndStop(nLevelView);
mcHideYes.gotoAndStop(nLevelView);
mcVIEW.gotoAndStop(nLevelView);
mcHIDE.gotoAndStop(nLevelView);
txtHide.text = "?";
txtView.text = String(nTinView);
animView(false);
animHide(false);
wndFieldGame.bonusValue.text = nBonus;
mcHelp._visible = false;
mcTowersLayer.removeMovieClip();
btnVIEW.enabled = (btnHIDE.enabled = false);
mcZanavesTemp.removeMovieClip();
mcHint.removeMovieClip();
var _local2 = viewBonus(nLevel);
if (_local2 == null) {
createField(aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower);
} else {
_local2.banim = true;
animbonus(_local2, aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower);
}
view();
}
function createField(aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower) {
switch (nTowersView) {
case 1 :
createFieldGame1(aTinUser1, aTinAI1);
break;
case 2 :
createFieldGame2(aTinUser1, aTinUser2, aTinAI1, aTinAI2);
}
hideUserHelpBtnHide();
btnVIEW.enabled = (btnHIDE.enabled = false);
var _local2 = checkHint(aTinUser1, aTinUser2, bHideTower);
if (_local2 == null) {
transferUser();
mcHelp._visible = true;
help(1);
if (bHideTower) {
fillField();
}
} else {
hint(_local2);
}
}
function createFieldGame1(aTinUser1, aTinAI1) {
aAI1 = new Array();
aUser1 = new Array();
aSelect1 = new Array();
mcTowersLayer = mcTowers.createEmptyMovieClip("towersLayer", mcTowers.getNextHighestDepth());
var _local4;
var _local5;
var _local3;
var _local7;
var _local6;
var _local9;
var _local8;
var _local20 = 503;
var _local19 = 538;
var _local17 = 41;
var _local18 = 528;
var _local14 = _local20;
var _local12 = _local20;
var _local13 = _local20;
var _local2 = 0;
while (_local2 < nHTowerView) {
_local4 = mcTowersLayer.attachMovie("brick_", "brickAI_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local17, _y:_local12});
_local12 = _local12 - 35;
_local5 = mcTowersLayer.attachMovie("brick_", "brickUser_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local18, _y:_local13});
_local13 = _local13 - 35;
_local3 = mcTowersLayer.attachMovie("select", "selectUser_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local19, _y:_local14});
_local14 = _local14 - 35;
_local4.value.text = aTinAI1[_local2];
_local7 = _local4.skin;
_local7.gotoAndStop(nLevelView);
_local7.skin.gotoAndStop(aTinAI1[_local2]);
_local9 = _local7.sian;
_local9.gotoAndStop(aTinAI1[_local2]);
_local9._visible = false;
_local4.arrow._visible = false;
_local5.value.text = aTinUser1[_local2];
_local6 = _local5.skin;
_local6.gotoAndStop(nLevelView);
_local6.skin.gotoAndStop(aTinUser1[_local2]);
_local8 = _local6.sian;
_local8.gotoAndStop(aTinUser1[_local2]);
_local8._visible = false;
_local5.arrow._visible = false;
_local3._visible = false;
_local3.btn.onRelease = gdp.utils.Delegate.create(this, releaseSelect, [_local2, 1]);
_local3.btn.onRollOver = gdp.utils.Delegate.create(this, overUserSelect, [_local2, 1]);
_local3.btn.onRollOut = gdp.utils.Delegate.create(this, outUserSelect, [_local2, 1]);
aAI1.push(_local4);
aUser1.push(_local5);
aSelect1.push(_local3);
_local2++;
}
}
function createFieldGame2(aTinUser1, aTinUser2, aTinAI1, aTinAI2) {
aAI1 = new Array();
aUser1 = new Array();
aSelect1 = new Array();
aAI2 = new Array();
aUser2 = new Array();
aSelect2 = new Array();
mcTowersLayer = mcTowers.createEmptyMovieClip("towersLayer", mcTowers.getNextHighestDepth());
var _local8;
var _local6;
var _local3;
var _local11;
var _local13;
var _local7;
var _local5;
var _local4;
var _local12;
var _local10;
var _local15;
var _local14;
var _local16;
var _local17;
var _local9 = 28;
var _local37 = 503;
var _local22 = 80;
var _local31 = 515;
var _local36 = 25;
var _local34 = 515;
var _local32 = 645;
var _local35 = 155;
var _local33 = 645;
var _local23 = _local37;
var _local28 = _local37;
var _local26 = _local37;
var _local24 = _local37;
var _local27 = _local37;
var _local25 = _local37;
var _local2 = 0;
while (_local2 < nHTowerView) {
_local8 = mcTowersLayer.attachMovie("brick_", "brickAI1_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local36, _y:_local28});
_local28 = _local28 - _local9;
_local7 = mcTowersLayer.attachMovie("brick_", "brickAI2_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local35, _y:_local27});
_local27 = _local27 - _local9;
_local6 = mcTowersLayer.attachMovie("brick_", "brickUser1_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local34, _y:_local26});
_local26 = _local26 - _local9;
_local5 = mcTowersLayer.attachMovie("brick_", "brickUser2_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local33, _y:_local25});
_local25 = _local25 - _local9;
_local3 = mcTowersLayer.attachMovie("select", "selectUser1_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local31, _y:_local23});
_local23 = _local23 - _local9;
_local4 = mcTowersLayer.attachMovie("select", "selectUser2_" + _local2, mcTowersLayer.getNextHighestDepth(), {_x:_local32, _y:_local24});
_local24 = _local24 - _local9;
_local8._xscale = (_local6._xscale = (_local3._xscale = (_local7._xscale = (_local5._xscale = (_local4._xscale = _local22)))));
_local8._yscale = (_local6._yscale = (_local3._yscale = (_local7._yscale = (_local5._yscale = (_local4._yscale = _local22)))));
_local8.value.text = aTinAI1[_local2];
_local11 = _local8.skin;
_local11.gotoAndStop(nLevelView);
_local11.skin.gotoAndStop(aTinAI1[_local2]);
_local15 = _local11.sian;
_local15.gotoAndStop(aTinAI1[_local2]);
_local15._visible = false;
_local8.arrow._visible = false;
_local7.value.text = aTinAI2[_local2];
_local12 = _local7.skin;
_local12.gotoAndStop(nLevelView);
_local12.skin.gotoAndStop(aTinAI2[_local2]);
_local16 = _local12.sian;
_local16.gotoAndStop(aTinAI2[_local2]);
_local16._visible = false;
_local7.arrow._visible = false;
_local6.value.text = aTinUser1[_local2];
_local13 = _local6.skin;
_local13.gotoAndStop(nLevelView);
_local13.skin.gotoAndStop(aTinUser1[_local2]);
_local14 = _local13.sian;
_local14.gotoAndStop(aTinUser1[_local2]);
_local14._visible = false;
_local6.arrow._visible = false;
_local3._visible = false;
_local5.value.text = aTinUser2[_local2];
_local10 = _local5.skin;
_local10.gotoAndStop(nLevelView);
_local10.skin.gotoAndStop(aTinUser2[_local2]);
_local17 = _local10.sian;
_local17.gotoAndStop(aTinUser2[_local2]);
_local17._visible = false;
_local5.arrow._visible = false;
_local4._visible = false;
_local3.btn.onRelease = gdp.utils.Delegate.create(this, releaseSelect, [_local2, 1]);
_local3.btn.onRollOver = gdp.utils.Delegate.create(this, overUserSelect, [_local2, 1]);
_local3.btn.onRollOut = gdp.utils.Delegate.create(this, outUserSelect, [_local2, 1]);
_local4.btn.onRelease = gdp.utils.Delegate.create(this, releaseSelect, [_local2, 2]);
_local4.btn.onRollOver = gdp.utils.Delegate.create(this, overUserSelect, [_local2, 2]);
_local4.btn.onRollOut = gdp.utils.Delegate.create(this, outUserSelect, [_local2, 2]);
aAI1.push(_local8);
aAI2.push(_local7);
aUser1.push(_local6);
aUser2.push(_local5);
aSelect1.push(_local3);
aSelect2.push(_local4);
_local2++;
}
}
function checkHint(aTinUser1, aTinUser2, bHideTower) {
var _local1 = game.model.users.User.getInstance();
if (bHideTower && (_local1.getHint3())) {
_local1.setHint3(false);
return(3);
}
if (((aTinUser1 != undefined) && (aTinUser2 == undefined)) && (_local1.getHint1())) {
_local1.setHint1(false);
return(1);
}
if (((aTinUser1 != undefined) && (aTinUser2 != undefined)) && (_local1.getHint2())) {
_local1.setHint2(false);
return(2);
}
return(null);
}
function hint(nHint) {
game.model.field.FieldData.getInstance().setNameWndView("hint");
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_hint, [nHint]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_hint(nHint) {
var _local2 = gdp.core.time.FrameTimer.getInstance().getTime();
if (gdp.utils.Delegate.get("Timer") == undefined) {
gdp.utils.Delegate.set("Timer", _local2);
}
if ((_local2 - gdp.utils.Delegate.get("Timer")) > nDelayHint) {
hintView(nHint);
return(0);
}
}
function hintView(nHint) {
mcHint = wndHead.attachMovie("hint" + nHint, "HINT_MC" + nHint, wndHead.getNextHighestDepth());
mcHint.txtHint.text = game.helpers.Settings.getInstance().getHintText(nHint);
mcHint.btn.useHandCursor = false;
mcHint.btnOK.onRelease = gdp.utils.Delegate.create(this, releaseHintOk, [nHint]);
}
function releaseHintOk(nHint) {
game.model.field.FieldData.getInstance().setNameWndView("field_game");
transferUser();
mcHelp._visible = true;
help(1);
if (nHint == 3) {
fillField();
}
mcHint.removeMovieClip();
}
function viewBonus(nLevel) {
var _local2;
var _local3 = game.model.field.FieldData.getInstance().getBonusQuest();
if (game.model.field.FieldData.getInstance().getNameMode() == "quest") {
if (game.model.users.User.getInstance().getBonusView()) {
trace(["view bonus", "nLevel: " + nLevel]);
var _local6 = _local3[nLevel - 2];
var _local4 = 0;
while (_local4 < (nLevel - 2)) {
_local2 = _local3[_local4];
if (_local6.sname != _local2.sname) {
wndFieldGame[_local2.sname].gotoAndStop(_local2.nstop);
}
_local4++;
}
wndFieldGame[_local6.sname].gotoAndPlay(_local6.nplay);
return(wndFieldGame[_local6.sname]);
}
if (nLevel == 1) {
var _local4 = 0;
while (_local4 < _local3.length) {
_local2 = _local3[_local4];
wndFieldGame[_local2.sname].gotoAndStop(1);
_local4++;
}
}
var _local4 = 0;
while (_local4 <= (nLevel - 2)) {
_local2 = _local3[_local4];
wndFieldGame[_local2.sname].gotoAndStop(_local2.nstop);
_local4++;
}
return(null);
}
var _local4 = 0;
while (_local4 < _local3.length) {
_local2 = _local3[_local4];
wndFieldGame[_local2.sname].gotoAndStop(1);
_local4++;
}
return(null);
}
function prewinnerUser(bView) {
var _local4;
var _local2;
var _local3 = 0;
while (_local3 < aUser1.length) {
_local4 = aUser1[_local3].skin;
_local2 = _local4.sian;
if (bView) {
_local2.sn.gotoAndPlay(2);
} else {
_local2.sn.gotoAndStop(1);
}
_local2._visible = bView;
_local3++;
}
if (nTowersView == 2) {
_local3 = 0;
while (_local3 < aUser2.length) {
_local4 = aUser2[_local3].skin;
_local2 = _local4.sian;
if (bView) {
_local2.sn.gotoAndPlay(2);
} else {
_local2.sn.gotoAndStop(1);
}
_local2._visible = bView;
_local3++;
}
}
}
function winnerUser(sNameMode, nScores, nBonus) {
prewinnerUser(false);
switch (sNameMode) {
case "quest" :
if (game.model.field.FieldData.getInstance().getNameWndView() == "next_level") {
viewNextLevel(nScores, nBonus);
} else {
viewWndDownload();
}
break;
case "practice" :
viewWinner(nScores, nBonus);
}
}
function prewinnerAI(bView) {
mcZanavesTemp.removeMovieClip();
var _local4;
var _local2;
var _local3 = 0;
while (_local3 < aAI1.length) {
_local4 = aAI1[_local3].skin;
_local2 = _local4.sian;
if (bView) {
_local2.sn.gotoAndPlay(2);
} else {
_local2.sn.gotoAndStop(1);
}
_local2._visible = bView;
_local3++;
}
if (nTowersView == 2) {
_local3 = 0;
while (_local3 < aAI2.length) {
_local4 = aAI2[_local3].skin;
_local2 = _local4.sian;
if (bView) {
_local2.sn.gotoAndPlay(2);
} else {
_local2.sn.gotoAndStop(1);
}
_local2._visible = bView;
_local3++;
}
}
}
function winnerAI(nScores) {
prewinnerAI(false);
viewGameOver(nScores);
}
function transferUser() {
btnVIEW.enabled = (btnHIDE.enabled = true);
}
function releaseBtnView() {
help(3);
routeMessage("Field.field_game.user.btnView");
}
function selectUserView() {
btnVIEW.enabled = false;
animView(true);
viewUserSelects();
}
function viewUserSelects() {
var _local2 = 0;
while (_local2 < nHTowerView) {
aUser1[_local2].arrow._visible = true;
aUser2[_local2].arrow._visible = true;
aSelect1[_local2]._visible = true;
aSelect2[_local2]._visible = true;
_local2++;
}
}
function hideUserSelects() {
var _local2 = 0;
while (_local2 < nHTowerView) {
aUser1[_local2].arrow._visible = false;
aUser2[_local2].arrow._visible = false;
aSelect1[_local2]._visible = false;
aSelect2[_local2]._visible = false;
_local2++;
}
}
function selectAIView() {
btnVIEW.enabled = false;
animView(true);
help(3);
viewAISelects();
routeSystemMessage("Field.ai.select.view");
}
function viewAISelects() {
var _local2 = 0;
while (_local2 < nHTowerView) {
aAI1[_local2].arrow._visible = true;
aAI2[_local2].arrow._visible = true;
_local2++;
}
}
function hideAISelects() {
var _local2 = 0;
while (_local2 < nHTowerView) {
aAI1[_local2].arrow._visible = false;
aAI2[_local2].arrow._visible = false;
_local2++;
}
}
function releaseBtnHide() {
help(2);
routeMessage("Field.field_game.user.btnHide");
}
function selectUserHide(nTinHide) {
btnVIEW.enabled = false;
btnHIDE.enabled = false;
txtHide.text = String(nTinHide);
animView(false);
hideUserSelects();
viewUserHelpBtnHide();
}
function viewUserHelpBtnHide() {
mcHideYes._visible = (mcHideSkip._visible = false);
btnYES._visible = (btnSKIP._visible = true);
}
function hideUserHelpBtnHide() {
mcHideYes._visible = (mcHideSkip._visible = true);
btnYES._visible = (btnSKIP._visible = false);
}
function selectAIHide(nTinHide) {
btnVIEW.enabled = false;
btnHIDE.enabled = false;
txtHide.text = String(nTinHide);
animView(false);
help(2);
hideAISelects();
viewAIHelpBtnHide();
routeSystemMessage("Field.ai.select.hide");
}
function viewAIHelpBtnHide() {
mcHideYes._visible = (mcHideSkip._visible = false);
btnYES.enabled = (btnSKIP.enabled = false);
btnYES._visible = (btnSKIP._visible = true);
}
function hideAIHelpBtnHide() {
mcHideYes._visible = (mcHideSkip._visible = true);
btnYES.enabled = (btnSKIP.enabled = true);
btnYES._visible = (btnSKIP._visible = false);
}
function releaseBtnYes() {
help(3);
routeMessage("Field.field_game.user.btnYes");
}
function selectUserYes() {
animHide(true);
hideUserHelpBtnHide();
viewUserSelects();
}
function selectAIYes() {
help(3);
animHide(true);
hideAIHelpBtnHide();
viewAISelects();
routeSystemMessage("Field.ai.select.yes");
}
function releaseBtnSkip() {
help(1);
routeMessage("Field.field_game.user.btnSkip");
}
function selectUserSkip(nTinView) {
help(1);
hideUserHelpBtnHide();
txtHide.text = "?";
txtView.text = String(nTinView);
routeSystemMessage("Field.transfer", "user");
}
function selectAISkip(nTinView) {
help(1);
hideAIHelpBtnHide();
txtHide.text = "?";
txtView.text = String(nTinView);
routeSystemMessage("Field.transfer", "ai");
}
function releaseSelect(i, nTower) {
routeMessage("Field.field_game.user.select", i, nTower);
}
function selectUserTin(nIndex, nChooseTower, nCurTin, nTinValue, nIU, nID, nBonus) {
var _local3 = ((nChooseTower == 1) ? (aUser1[nIndex]) : (aUser2[nIndex]));
var _local2 = _local3.skin;
btnVIEW.enabled = false;
btnHIDE.enabled = false;
bonus(nIU, nID, nChooseTower, nBonus);
help(1);
hideUserSelects();
txtHide.text = "?";
txtView.text = String(nCurTin);
animView(false);
animHide(false);
_local3.value.text = nTinValue;
_local2.skin.gotoAndStop(nTinValue);
_local2.sian.gotoAndStop(nTinValue);
routeSystemMessage("Field.transfer", "user");
}
function bonus(nIU, nID, nChooseTower, nBonus) {
if (nIU != nID) {
var _local3;
var _local2 = nID;
while (_local2 <= nIU) {
_local3 = ((nChooseTower == 1) ? (aUser1[_local2]) : (aUser2[_local2]));
_local3.bonus.play();
_local2++;
}
}
wndFieldGame.bonusValue.text = nBonus;
}
function selectAITin(nIndex, nChooseTower, nCurTin, nTinValue) {
var _local3 = ((nChooseTower == 1) ? (aAI1[nIndex]) : (aAI2[nIndex]));
var _local2 = _local3.skin;
outAISelect(nIndex, nChooseTower);
help(1);
hideAISelects();
txtHide.text = "?";
txtView.text = String(nCurTin);
animView(false);
animHide(false);
_local3.value.text = nTinValue;
_local2.skin.gotoAndStop(nTinValue);
_local2.sian.gotoAndStop(nTinValue);
routeSystemMessage("Field.transfer", "ai");
}
function overUserSelect(i, nTower) {
var _local2 = ((nTower == 1) ? (aUser1[i]) : (aUser2[i]));
_local2.arrow.gotoAndPlay(2);
}
function outUserSelect(i, nTower) {
var _local2 = ((nTower == 1) ? (aUser1[i]) : (aUser2[i]));
_local2.arrow.gotoAndStop(1);
}
function overAISelect(i, nTower) {
var _local2 = ((nTower == 1) ? (aAI1[i]) : (aAI2[i]));
_local2.arrow.gotoAndPlay(2);
routeSystemMessage("Field.ai.over.tin");
}
function outAISelect(i, nTower) {
var _local2 = ((nTower == 1) ? (aAI1[i]) : (aAI2[i]));
_local2.arrow.gotoAndStop(1);
}
function help(nFrame) {
mcHelp.text.gotoAndStop(nFrame);
}
function animView(bAnim) {
if (bAnim) {
bAnim1 = true;
mcVIEW.svet._visible = true;
anim1();
} else {
bAnim1 = false;
mcVIEW.svet._visible = false;
}
}
function animHide(bAnim) {
if (bAnim) {
bAnim2 = true;
mcHIDE.svet._visible = true;
anim2();
} else {
bAnim2 = false;
mcHIDE.svet._visible = false;
}
}
function fillField() {
var _local9 = getWidth();
var _local7 = getHeight();
var _local11 = 20;
var _local12 = 30;
var _local10 = 400 - _local7;
var _local8 = 100;
var _local6;
var _local5 = new Array();
var _local3;
mcZanavesTemp = mcZanaves.createEmptyMovieClip("zanavesTemp", mcZanaves.getNextHighestDepth());
mcZanavesTemp._y = _local10;
_local5 = getDepths(_local9, _local7, _local11, _local12);
var _local4 = _local7;
while (_local4 >= 0) {
var _local2 = 0;
while (_local2 <= _local9) {
_local6 = ((_local5.length != 0) ? (Number(_local5.pop())) : (mcZanavesTemp.getNextHighestDepth()));
_local3 = mcZanavesTemp.attachMovie("fruits", (((("fruit_" + _local2) + "_") + _local4) + "_") + gdp.core.time.FrameTimer.getInstance().getTime(), _local6);
_local3._x = _local2;
_local3._y = ((_local4 - _local7) - 200) - _local10;
_local3.gotoAndStop(random(6) + 1);
_local3.cacheAsBitmap = true;
fallFruit(_local3, _local4, _local8 + random(80));
_local2 = _local2 + _local11;
}
_local8 = _local8 + 100;
_local4 = _local4 - _local12;
}
}
function getWidth() {
switch (nTowersView) {
case 1 :
return(200);
case 2 :
return(250);
}
}
function getHeight() {
switch (nHTowerView) {
case 10 :
return(400);
case 9 :
return(400);
case 8 :
return(300);
case 7 :
return(300);
case 6 :
return(200);
case 5 :
return(200);
case 4 :
return(150);
}
return(100);
}
function getDepths(nWidth, nHeight, nStepX, nStepY) {
var _local5 = new Array();
var _local4 = mcZanavesTemp.getNextHighestDepth();
var _local3 = _local4;
while (_local3 <= nWidth) {
var _local2 = 0;
while (_local2 <= nHeight) {
_local5.push(_local4++);
_local2 = _local2 + nStepY;
}
_local3 = _local3 + nStepX;
}
_local5.sort(shuffle);
return(_local5);
}
function shuffle(nA, nB) {
return([-1, 0, 1][random(3)]);
}
function fallFruit(mc_fruit, nYEnd, nDelay) {
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_fallFruit, [mc_fruit, nYEnd, nDelay]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_fallFruit(mc_fruit, nYEnd, nDelay) {
var _local3 = gdp.core.time.FrameTimer.getInstance().getTime();
if (mc_fruit == undefined) {
return(0);
}
if (gdp.utils.Delegate.get("Timer") == undefined) {
gdp.utils.Delegate.set("Timer", _local3);
}
if ((_local3 - gdp.utils.Delegate.get("Timer")) > nDelay) {
var _local2 = mc_fruit._y - nYEnd;
if (Math.abs(_local2) < nSpeedFruit) {
mc_fruit._y = nYEnd;
return(0);
}
var _local5 = Math.sqrt(_local2 * _local2);
var _local6 = _local2 / _local5;
mc_fruit._y = mc_fruit._y - (_local6 * nSpeedFruit);
}
}
function anim1() {
d_rotate = -0.5;
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_anim1, [d_rotate]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function anim2() {
d_x = -1;
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_anim2, [d_x]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_anim1(nDR) {
if (mcVIEW._rotation < -1.5) {
d_rotate = -nDR;
mcVIEW._rotation = -1.5;
}
if (mcVIEW._rotation > 1.5) {
d_rotate = nDR;
mcVIEW._rotation = 1.5;
}
mcVIEW._rotation = mcVIEW._rotation + d_rotate;
if (!bAnim1) {
mcVIEW._rotation = 0;
return(0);
}
}
function ps_anim2(nDX) {
if (mcHIDE._x < 322.65) {
d_x = -nDX;
mcHIDE._x = 322.65;
}
if (mcHIDE._x > 332.65) {
d_x = nDX;
mcHIDE._x = 332.65;
}
mcHIDE._x = mcHIDE._x + d_x;
if (!bAnim2) {
mcHIDE._x = 328.65;
return(0);
}
}
function animbonus(mcBonus, aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower) {
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_animbonus, [mcBonus, aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function ps_animbonus(mcBonus, aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower) {
if (!wndHead._visible) {
mcBonus.banim = false;
return(0);
}
if (!Boolean(mcBonus.banim)) {
createField(aTinUser1, aTinAI1, aTinUser2, aTinAI2, bHideTower);
return(0);
}
}
var nSpeedFruit = 60;
var nDelayHint = 800;
}
Symbol 1153 MovieClip [__Packages.game.units.views.Menu] Frame 0
class game.units.views.Menu extends gdp.core.debug.unit.BaseClassUnit
{
var getRouter, btnSOUNDON, btnSOUNDOFF, wndHead, btnHELP, routeMessage;
function Menu () {
super();
}
function init(Void) {
initGraphics();
initRequests();
}
function initRequests(Void) {
var _local2 = new gdp.core.debug.router.RouteMessage("MenuController.viewHead", gdp.utils.Delegate.create(this, view));
var _local3 = new gdp.core.debug.router.RouteMessage("MenuController.viewSound", gdp.utils.Delegate.create(this, viewSound));
getRouter().addMessageHandler(_local2);
getRouter().addMessageHandler(_local3);
}
function view(bSound) {
btnSOUNDON._visible = bSound;
btnSOUNDOFF._visible = !bSound;
wndHead._visible = true;
}
function hide() {
wndHead._visible = false;
}
function initGraphics() {
wndHead = _root.attachMovie("menu", "menuMc", _root.getNextHighestDepth());
wndHead.cacheAsBitmap = true;
btnSOUNDON = wndHead.btnSOUNDON;
btnSOUNDOFF = wndHead.btnSOUNDOFF;
btnHELP = wndHead.btnHELP;
btnSOUNDON.onRelease = gdp.utils.Delegate.create(this, releaseSound);
btnSOUNDOFF.onRelease = gdp.utils.Delegate.create(this, releaseSound);
btnHELP.onRelease = gdp.utils.Delegate.create(this, releaseHelp);
hide();
}
function releaseSound() {
routeMessage("Menu.sound");
}
function releaseHelp() {
routeMessage("Menu.help");
}
function viewSound(bSound) {
btnSOUNDON._visible = bSound;
btnSOUNDOFF._visible = !bSound;
}
}
Symbol 1154 MovieClip [__Packages.gdp.core.debug.request.reader.RequestReaderFromXML] Frame 0
class gdp.core.debug.request.reader.RequestReaderFromXML extends gdp.core.base.BaseClass implements gdp.core.debug.request.reader.IRequestReader
{
function RequestReaderFromXML (handler, sFileUrl) {
super();
this.handler = handler;
this.sFileUrl = sFileUrl;
}
function init(Void) {
if (sFileUrl == null) {
return(undefined);
}
xmlRequestLog = new XML();
xmlRequestLog.onLoad = gdp.utils.Delegate.create(this, onLoadXmlRequestLog);
xmlRequestLog.load(sFileUrl);
}
function setHandler(handler) {
this.handler = handler;
}
function getHandler(Void) {
return(handler);
}
function getAllRequests(Void) {
return(aRequests);
}
function setAllRequests(aRequests) {
this.aRequests = aRequests;
}
function setFileUrl(sFileUrl) {
this.sFileUrl = sFileUrl;
}
function getFileUrl(Void) {
return(sFileUrl);
}
function onLoadXmlRequestLog(bSuccess) {
if (!bSuccess) {
return(undefined);
}
gdp.core.debug.request.reader.XML2Requests.requestReader = this;
gdp.core.config.XMLParser.addModule(gdp.core.debug.request.reader.XML2Requests);
var _local2 = new gdp.core.config.ConfigLoader(xmlRequestLog, gdp.utils.Delegate.create(this, onParseXmlRequestLog));
}
function onParseXmlRequestLog(bSuccess) {
if (!bSuccess) {
return(undefined);
}
getHandler().getRequestController().getRequestLogger().setRequests(aRequests);
getHandler().getRequestPlayer().play();
}
var handler = null;
var sFileUrl = null;
var aRequests = null;
var xmlRequestLog = null;
}
Symbol 1155 MovieClip [__Packages.gdp.core.debug.request.writer.RequestWriterToXml] Frame 0
class gdp.core.debug.request.writer.RequestWriterToXml extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.IRequestWriter
{
static var aModules;
function RequestWriterToXml () {
super();
if (!aModules) {
initModules();
}
createLog();
}
static function addModule(oModuleClass, nPriority) {
if (aModules == undefined) {
initModules();
}
if (nPriority == undefined) {
aModules.push(oModuleClass);
} else {
aModules.splice(nPriority, 0, oModuleClass);
}
}
static function initModules() {
aModules = new Array();
addModule(gdp.core.debug.request.writer.module.NullValue);
addModule(gdp.core.debug.request.writer.module.PrimitiveValue);
addModule(gdp.core.debug.request.writer.module.MatrixValue);
addModule(gdp.core.debug.request.writer.module.ArrayValue);
addModule(gdp.core.debug.request.writer.module.SimpleTypeObjectValue);
addModule(gdp.core.debug.request.writer.module.SimpleComplexObjectValue);
}
function setHandler(handler) {
this.handler = handler;
}
function getHandler(Void) {
return(handler);
}
function setFormating(bFormating) {
this.bFormating = bFormating;
}
function getFormating(Void) {
return(bFormating);
}
function createLog(Void) {
xmlLog = new XML();
xmlNodeRequests = xmlLog.createElement(REQUESTS_NODE);
xmlLog.appendChild(xmlNodeRequests);
}
function writeRequest(request) {
var _local3 = parseRequest(request);
xmlNodeRequests.appendChild(_local3);
traceRequest(_local3);
var _local2;
if (bFormating) {
_local2 = gdp.utils.XMLUtil.format(xmlLog);
} else {
_local2 = xmlLog.toString();
}
System.setClipboard(_local2);
}
function writeAllRequests(aRequests) {
createLog();
var _local2 = 0;
while (_local2 < aRequests.length) {
var _local3 = parseRequest(aRequests[_local2]);
xmlNodeRequests.appendChild(_local3);
_local2++;
}
var _local5;
if (bFormating) {
_local5 = gdp.utils.XMLUtil.format(xmlLog);
} else {
_local5 = xmlLog.toString();
}
System.setClipboard(_local5);
}
function traceRequest(xmlNodeRequest) {
var _local1 = new XML();
_local1.appendChild(xmlNodeRequest.cloneNode(true));
trace(gdp.utils.XMLUtil.format(_local1));
}
function parseRequest(request) {
var _local2 = new XML().createElement(REQUEST_ELEMENT);
_local2.attributes[DELAY_ATTRIBUTE] = request.getDelay();
_local2.attributes[MESSAGE_ATTRIBUTE] = request.getMessage();
_local2.attributes[HANDLER_ATTRIBUTE] = request.getHandlerName();
if (request.getArguments().length > 0) {
_local2.appendChild(parseArguments(request.getArguments()));
}
return(_local2);
}
function parseArguments(aArgs) {
var _local5 = new XML().createElement(ARGUMENTS_ELEMENT);
var _local2 = 0;
while (_local2 < aArgs.length) {
var _local3 = new XML().createElement(ITEM_ELEMENT);
parseValue(aArgs[_local2], _local3);
_local5.appendChild(_local3);
_local2++;
}
return(_local5);
}
function parseValue(value, xmlNodeItem) {
var _local3 = 0;
while (_local3 < aModules.length) {
var _local4 = aModules[_local3];
if (_local4.match(value)) {
var _local5 = gdp.core.debug.request.writer.module.IParseModule(gdp.utils.ClassUtil.createInstance(_local4, []));
_local5.parse(value, xmlNodeItem, gdp.utils.Delegate.create(this, parseValue));
return(xmlNodeItem);
}
_local3++;
}
var _local8 = gdp.env.reflect.ClassInfo.forObject(value);
throw new gdp.env.except.IllegalStateException(("Parsing module doesn't exist for class [" + _local8.getFullName()) + "]", this, arguments);
}
static var REQUESTS_NODE = "requests";
static var REQUEST_ELEMENT = "request";
static var DELAY_ATTRIBUTE = "delay";
static var MESSAGE_ATTRIBUTE = "message";
static var HANDLER_ATTRIBUTE = "handler";
static var ARGUMENTS_ELEMENT = "arguments";
static var ITEM_ELEMENT = "item";
static var ITEM_VALUE_ATTRIBUTE = "value";
static var ITEM_TYPE_ATTRIBUTE = gdp.core.config.modules.XML2TypedData.TYPE_ATTRIBUTES;
static var ITEM_ITEMTYPE_ATTRIBUTE = gdp.core.config.modules.type.ArrayType.ITEM_TYPE_ATTRIBUTE;
static var DEFAULT_SEPARATOR = gdp.core.config.modules.type.ArrayType.DEFAULT_SEPARATOR;
static var ARRAY_ELEMENT = gdp.core.config.modules.XML2Array.ARRAY_NODE;
static var ARRAY_ITEM_ELEMENT = gdp.core.config.modules.XML2Array.ITEM_ELEMENT;
static var ARRAY_ITEM_ID_ATTRIBUTE = gdp.core.config.modules.XML2Array.ID_ATTRIBUTE;
static var MATRIX_ROW_SEPARATOR_ATTRIBUTE = gdp.core.config.modules.type.MatrixType.ROW_SEPARATOR_ATTRIBUTE;
static var MATRIX_COL_SEPARATOR_ATTRIBUTE = gdp.core.config.modules.type.MatrixType.ROW_SEPARATOR_ATTRIBUTE;
static var MATRIX_DEFAULT_ROW_SEPARATOR = gdp.core.config.modules.type.MatrixType.DEFAULT_ROW_SEPARATOR;
static var MATRIX_DEFAULT_COL_SEPARATOR = gdp.core.config.modules.type.MatrixType.DEFAULT_COL_SEPARATOR;
static var OBJECT_ELEMENT = gdp.core.config.modules.XML2Object.OBJECT_NODE;
static var OBJECT_FIELD_ELEMENT = gdp.core.config.modules.XML2Object.FIELD_ELEMENT;
static var OBJECT_NAME_ATTRIBUTE = gdp.core.config.modules.XML2Object.NAME_ATTRIBUTE;
static var OBJECT_DEFAULT_FIELDNAME_SEPARATOR = gdp.core.config.modules.type.ObjectType.DEFAULT_FIELDNAME_SEPARATOR;
static var OBJECT_DEFAULT_FIELD_SEPARATOR = gdp.core.config.modules.type.ObjectType.DEFAULT_FIELD_SEPARATOR;
static var NULL_VALUE = gdp.core.config.modules.XML2TypedData.NULL_VALUE;
var handler = null;
var xmlLog = null;
var xmlNodeRequests = null;
var bFormating = false;
}
Symbol 1156 MovieClip [__Packages.gdp.core.debug.request.writer.module.IParseModule] Frame 0
interface gdp.core.debug.request.writer.module.IParseModule extends gdp.core.base.BaseInterface
{
}
Symbol 1157 MovieClip [__Packages.gdp.core.debug.request.writer.module.NullValue] Frame 0
class gdp.core.debug.request.writer.module.NullValue extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.module.IParseModule
{
function NullValue () {
super();
}
static function match(value) {
return(value == null);
}
function parse(value, xmlNodeItem, fParse) {
var _local1 = new XML().createTextNode(gdp.core.debug.request.writer.RequestWriterToXml.NULL_VALUE);
xmlNodeItem.appendChild(_local1);
}
}
Symbol 1158 MovieClip [__Packages.gdp.core.debug.request.writer.module.PrimitiveValue] Frame 0
class gdp.core.debug.request.writer.module.PrimitiveValue extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.module.IParseModule
{
function PrimitiveValue () {
super();
}
static function match(value) {
return(gdp.utils.ObjectUtil.isPrimitiveType(value));
}
function parse(value, xmlNodeItem, fParse) {
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_VALUE_ATTRIBUTE] = value.toString();
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_TYPE_ATTRIBUTE] = typeof(value);
}
}
Symbol 1159 MovieClip [__Packages.gdp.core.debug.request.writer.module.MatrixValue] Frame 0
class gdp.core.debug.request.writer.module.MatrixValue extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.module.IParseModule
{
function MatrixValue () {
super();
}
static function match(value) {
return(value instanceof gdp.core.type.array.Matrix);
}
function parse(value, xmlNodeItem, fParse) {
var _local2 = new XML().createTextNode(gdp.utils.ArrayUtil.matrixToString(value, gdp.core.debug.request.writer.RequestWriterToXml.MATRIX_DEFAULT_ROW_SEPARATOR, gdp.core.debug.request.writer.RequestWriterToXml.MATRIX_DEFAULT_COL_SEPARATOR));
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_ITEMTYPE_ATTRIBUTE] = typeof(value[0][0]);
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.MATRIX_COL_SEPARATOR_ATTRIBUTE] = gdp.core.debug.request.writer.RequestWriterToXml.MATRIX_DEFAULT_COL_SEPARATOR;
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.MATRIX_ROW_SEPARATOR_ATTRIBUTE] = gdp.core.debug.request.writer.RequestWriterToXml.MATRIX_DEFAULT_ROW_SEPARATOR;
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_TYPE_ATTRIBUTE] = "matrix";
xmlNodeItem.appendChild(_local2);
}
}
Symbol 1160 MovieClip [__Packages.gdp.core.debug.request.writer.module.ArrayValue] Frame 0
class gdp.core.debug.request.writer.module.ArrayValue extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.module.IParseModule
{
function ArrayValue () {
super();
}
static function match(value) {
return(value instanceof Array);
}
function parse(value, xmlNodeItem, fParse) {
if (gdp.utils.ArrayUtil.isTypedPrimitiveArray(value)) {
parsePrimitiveArray(value, xmlNodeItem);
} else {
parseComplexArray(value, xmlNodeItem, fParse);
}
}
function parsePrimitiveArray(value, xmlNodeItem) {
var _local2 = new XML().createTextNode(value.join(gdp.core.debug.request.writer.RequestWriterToXml.DEFAULT_SEPARATOR));
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_ITEMTYPE_ATTRIBUTE] = typeof(value[0]);
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_TYPE_ATTRIBUTE] = "array";
xmlNodeItem.appendChild(_local2);
}
function parseComplexArray(value, xmlNodeItem, fParse) {
var _local4 = new XML().createElement(gdp.core.debug.request.writer.RequestWriterToXml.ARRAY_ELEMENT);
var _local1 = 0;
while (_local1 < value.length) {
var _local2 = new XML().createElement(gdp.core.debug.request.writer.RequestWriterToXml.ARRAY_ITEM_ELEMENT);
fParse(value[_local1], _local2);
_local4.appendChild(_local2);
_local1++;
}
xmlNodeItem.appendChild(_local4);
}
}
Symbol 1161 MovieClip [__Packages.gdp.core.debug.request.writer.module.SimpleTypeObjectValue] Frame 0
class gdp.core.debug.request.writer.module.SimpleTypeObjectValue extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.module.IParseModule
{
function SimpleTypeObjectValue () {
super();
}
static function match(value) {
return(gdp.utils.ObjectUtil.isSimpleTypedObject(value));
}
function parse(value, xmlNodeItem, fParse) {
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_ITEMTYPE_ATTRIBUTE] = gdp.utils.ObjectUtil.getTypeOfSimpleTypedObject(value);
xmlNodeItem.attributes[gdp.core.debug.request.writer.RequestWriterToXml.ITEM_TYPE_ATTRIBUTE] = "object";
var _local3 = "{";
var _local2 = gdp.utils.ObjectUtil.getObjectInfo(value);
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + ((_local2[_local1][0] + gdp.core.debug.request.writer.RequestWriterToXml.OBJECT_DEFAULT_FIELDNAME_SEPARATOR) + _local2[_local1][1]);
if (_local1 != (_local2.length - 1)) {
_local3 = _local3 + ",";
} else {
_local3 = _local3 + "}";
}
_local1++;
}
var _local5 = new XML().createTextNode(_local3);
xmlNodeItem.appendChild(_local5);
}
}
Symbol 1162 MovieClip [__Packages.gdp.core.debug.request.writer.module.SimpleComplexObjectValue] Frame 0
class gdp.core.debug.request.writer.module.SimpleComplexObjectValue extends gdp.core.base.BaseClass implements gdp.core.debug.request.writer.module.IParseModule
{
function SimpleComplexObjectValue () {
super();
}
static function match(value) {
return(value instanceof Array);
}
function parse(value, xmlNodeItem, fParse) {
var _local3 = new XML().createElement(gdp.core.debug.request.writer.RequestWriterToXml.OBJECT_ELEMENT);
for (var _local5 in value) {
var _local1 = new XML().createElement(gdp.core.debug.request.writer.RequestWriterToXml.OBJECT_FIELD_ELEMENT);
fParse(value[_local5], _local1);
_local1.attributes[gdp.core.debug.request.writer.RequestWriterToXml.OBJECT_NAME_ATTRIBUTE] = _local5;
_local3.appendChild(_local1);
}
xmlNodeItem.appendChild(_local3);
}
}
Symbol 1163 MovieClip [__Packages.gdp.core.debug.request.reader.XML2Requests] Frame 0
class gdp.core.debug.request.reader.XML2Requests extends gdp.core.config.modules.AbstractModule
{
var toInfo, xmlNode;
function XML2Requests (xmlNode, parser) {
super(xmlNode, parser);
}
static function match(xmlNode) {
return(xmlNode.nodeName == REQUESTS_NODE);
}
function convert(Void) {
toInfo(("gdp.core.debug.request.reader.XML2Requests.convert(" + [xmlNode.nodeName]) + ")");
var _local5 = new Array();
var _local4 = 0;
while (_local4 < xmlNode.childNodes.length) {
var _local3 = xmlNode.childNodes[_local4];
if (_local3.nodeName == REQUEST_ELEMENT) {
_local5.push(parseRequest(_local3));
} else {
throw new gdp.core.config.IllegalFormatOfXmlDataException(((((("Using of the element '" + _local3.nodeName) + "' is incorrect. You can use only element '") + REQUEST_ELEMENT) + "' in node '") + REQUESTS_NODE) + "'", this, arguments);
}
_local4++;
}
requestReader.setAllRequests(_local5);
}
function parseRequest(xmlNodeRequest) {
var _local6 = requestReader.getHandler().getRequestController().getRequestFactory().createRequest();
_local6.setHandlerName(xmlNodeRequest.attributes[HANDLER_ATTRIBUTE]);
_local6.setDelay(gdp.utils.StringUtil.toNumber(xmlNodeRequest.attributes[DELAY_ATTRIBUTE]));
_local6.setMessage(xmlNodeRequest.attributes[MESSAGE_ATTRIBUTE]);
var _local4 = 0;
while (_local4 < xmlNodeRequest.childNodes.length) {
var _local3 = xmlNodeRequest.childNodes[_local4];
if (_local3.nodeName == ARGUMENTS_ELEMENT) {
_local6.setArguments(parseArguments(_local3));
} else {
throw new gdp.core.config.IllegalFormatOfXmlDataException(((((("Using of the element '" + _local3.nodeName) + "' is incorrect. You can use only element '") + ARGUMENTS_ELEMENT) + "' in node '") + REQUEST_ELEMENT) + "'", this, arguments);
}
_local4++;
}
return(_local6);
}
function parseArguments(xmlNodeArguments) {
var _local7 = new Array();
var _local4 = 0;
while (_local4 < xmlNodeArguments.childNodes.length) {
var _local3 = xmlNodeArguments.childNodes[_local4];
if (_local3.nodeName == ITEM_ELEMENT) {
var _local5 = new gdp.core.config.XMLParser(_local3, true);
_local7.push(_local5.run());
} else {
throw new gdp.core.config.IllegalFormatOfXmlDataException(((((("Using of the element '" + _local3.nodeName) + "' is incorrect. You can use only element '") + ITEM_ELEMENT) + "' in node '") + ARGUMENTS_ELEMENT) + "'", this, arguments);
}
_local4++;
}
return(_local7);
}
static var requestReader = null;
static var REQUESTS_NODE = gdp.core.debug.request.writer.RequestWriterToXml.REQUESTS_NODE;
static var REQUEST_ELEMENT = gdp.core.debug.request.writer.RequestWriterToXml.REQUEST_ELEMENT;
static var DELAY_ATTRIBUTE = gdp.core.debug.request.writer.RequestWriterToXml.DELAY_ATTRIBUTE;
static var MESSAGE_ATTRIBUTE = gdp.core.debug.request.writer.RequestWriterToXml.MESSAGE_ATTRIBUTE;
static var HANDLER_ATTRIBUTE = gdp.core.debug.request.writer.RequestWriterToXml.HANDLER_ATTRIBUTE;
static var ARGUMENTS_ELEMENT = gdp.core.debug.request.writer.RequestWriterToXml.ARGUMENTS_ELEMENT;
static var ITEM_ELEMENT = gdp.core.debug.request.writer.RequestWriterToXml.ITEM_ELEMENT;
}
Symbol 1164 MovieClip [__Packages.gdp.core.debug.request.player.RequestPlayer] Frame 0
class gdp.core.debug.request.player.RequestPlayer extends gdp.core.base.BaseClass implements gdp.core.debug.request.player.IRequestPlayer
{
var dispatchEvent;
function RequestPlayer (handler) {
super();
setHandler(handler);
nCurrentRequest = 0;
nLastFrame = 0;
}
function setHandler(handler) {
this.handler = handler;
}
function getHandler(Void) {
return(handler);
}
function play(Void) {
trace("---------------PLAY---------------");
bIsPlayed = true;
aRequest = handler.getRequestController().getRequestLogger().getRequests();
var _local2 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psPlay), [], 1);
gdp.core.process.ProcessManager.getInstance().addProcess(_local2);
}
function isPlayed(Void) {
return(bIsPlayed);
}
function gotoAndPlay(nStep) {
}
function gotoAndStop(nStep) {
}
function stop(Void) {
trace("---------------STOP---------------");
bIsPlayed = false;
nCurrentRequest = 0;
nLastFrame = 0;
dispatchEvent(new gdp.core.debug.request.player.RequestPlayerEvent(gdp.core.debug.request.player.RequestPlayerEvent.STOP, null, null, null));
}
function psPlay() {
if (nLastFrame == 0) {
nLastFrame = gdp.core.time.FrameTimer.getInstance().getFrames();
}
var _local2 = aRequest[nCurrentRequest];
if ((gdp.core.time.FrameTimer.getInstance().getFrames() - nLastFrame) == _local2.getDelay()) {
dispatchEvent(new gdp.core.debug.request.player.RequestPlayerEvent(gdp.core.debug.request.player.RequestPlayerEvent.NOTIFY_REQUEST_EXECUTE, null, null, aRequest[nCurrentRequest]));
nLastFrame = gdp.core.time.FrameTimer.getInstance().getFrames();
if (nCurrentRequest == (aRequest.length - 1)) {
stop();
return(0);
}
nCurrentRequest++;
return(psPlay());
}
}
var sXmlFile = null;
var handler = null;
var aRequest = null;
var bIsPlayed = false;
var nCurrentRequest = null;
var nLastFrame = null;
}
Symbol 1165 MovieClip [__Packages.gdp.core.debug.request.player.RequestPlayerEvent] Frame 0
class gdp.core.debug.request.player.RequestPlayerEvent extends gdp.env.events.Event
{
function RequestPlayerEvent (sType, bBubbles, bCancelable, request) {
super(sType, bBubbles, bCancelable);
this.request = request;
}
function getRequest(Void) {
return(request);
}
static var NOTIFY_REQUEST_EXECUTE = "notifyRequestExecute";
static var STOP = "stop";
var request = null;
}
Symbol 1166 MovieClip [__Packages.gdp.core.debug.request.controller.RequestController] Frame 0
class gdp.core.debug.request.controller.RequestController extends gdp.core.base.BaseClass implements gdp.core.debug.request.controller.IRequestController
{
function RequestController (handler, requestLogger, requestFactory) {
super();
setHandler(handler);
setRequestFactory(requestFactory);
setRequestLogger(requestLogger);
}
function setHandler(handler) {
this.handler = handler;
updateHandler();
}
function getHandler(Void) {
return(handler);
}
function setRequestLogger(requestLogger) {
this.requestLogger = requestLogger;
updateHandler();
}
function getRequestLogger(Void) {
return(requestLogger);
}
function setRequestFactory(requestFactory) {
this.requestFactory = requestFactory;
}
function getRequestFactory(Void) {
return(requestFactory);
}
function setRequestWriter(requestWriter) {
this.requestWriter = requestWriter;
updateHandler();
}
function getRequestWriter(Void) {
return(requestWriter);
}
function setRequestReader(requestReader) {
this.requestReader = requestReader;
updateHandler();
}
function getRequestReader(Void) {
return(requestReader);
}
function updateHandler(Void) {
if (handler != null) {
requestLogger.setHandler(handler);
requestWriter.setHandler(handler);
requestReader.setHandler(handler);
}
}
var handler = null;
var requestFactory = null;
var requestLogger = null;
var requestWriter = null;
var requestReader = null;
}
Symbol 1167 MovieClip [__Packages.gdp.core.debug.request.RequestFactory] Frame 0
class gdp.core.debug.request.RequestFactory extends gdp.core.base.BaseClass implements gdp.core.debug.request.IRequestFactory
{
function RequestFactory () {
super();
}
function createRequest(Void) {
return(new gdp.core.debug.request.Request());
}
}
Symbol 1168 MovieClip [__Packages.gdp.core.debug.request.Request] Frame 0
class gdp.core.debug.request.Request extends gdp.core.base.BaseClass implements gdp.core.debug.request.IRequest
{
function Request (handler, sMessage, aArgs, nDelay) {
super();
this.handler = handler;
this.sMessage = sMessage;
this.aArgs = aArgs;
nFramesDelay = nFramesDelay;
}
function setHandler(handler) {
this.handler = handler;
var _local2 = gdp.env.reflect.ClassInfo.forInstance(handler);
sHandlerName = _local2.getFullName();
}
function getHandler(Void) {
return(handler);
}
function setHandlerName(sHandlerName) {
this.sHandlerName = sHandlerName;
}
function getHandlerName(Void) {
return(sHandlerName);
}
function setDelay(nFramesDelay) {
this.nFramesDelay = nFramesDelay;
}
function getDelay(Void) {
return(nFramesDelay);
}
function setMessage(sMessage) {
this.sMessage = sMessage;
}
function getMessage(Void) {
return(sMessage);
}
function setArguments(aArgs) {
this.aArgs = aArgs;
}
function getArguments(Void) {
return(aArgs);
}
function description(Void) {
var _local3 = {handler:handler.toString(), message:sMessage, arguments:aArgs, framedelay:nFramesDelay};
return("Request" + gdp.utils.ObjectUtil.classToString(_local3, true));
}
var handler = null;
var sHandlerName = null;
var sMessage = null;
var aArgs = null;
var nFramesDelay = null;
}
Symbol 1169 MovieClip [__Packages.gdp.core.debug.request.logger.RequestLogger] Frame 0
class gdp.core.debug.request.logger.RequestLogger extends gdp.core.base.BaseClass implements gdp.core.debug.request.logger.IRequestLogger
{
function RequestLogger (handler) {
super();
aRequests = new Array();
nLastFrame = gdp.core.time.FrameTimer.getInstance().getFrames();
setHandler(handler);
}
function setHandler(handler) {
this.handler = handler;
}
function getHandler(Void) {
return(handler);
}
function setNotLoggingRequests(value) {
setNotLoggingRequestsByArray(gdp.utils.StringUtil.toArray(value, "\n,; " + unescape("%0D%0A"), true, true));
}
function getNotLoggingRequests(Void) {
return(aNotLogginRequestsList.join(","));
}
function setNotLoggingRequestsByArray(aNotLogginRequestsList) {
this.aNotLogginRequestsList = aNotLogginRequestsList;
}
function getNotLoggingRequestsByArray(Void) {
return(aNotLogginRequestsList);
}
function logRequest() {
var _local3 = new gdp.env.overload.Overload(this);
_local3.addHandler([gdp.core.debug.request.IRequest], logRequestByRequest);
_local3.addHandler([String, Array], logRequestByMessage);
_local3.forward(arguments);
}
function logRequestByRequest(request) {
if (gdp.utils.ArrayUtil.contains(aNotLogginRequestsList, request.getMessage())) {
return(undefined);
}
if (request.getHandler() == null) {
request.setHandler(handler);
}
request.setDelay(getFrameDelay());
aRequests.push(request);
getHandler().getRequestController().getRequestWriter().writeRequest(request);
}
function logRequestByMessage(sMessage, aArgs) {
var _local2 = handler.getRequestController().getRequestFactory().createRequest();
_local2.setMessage(sMessage);
_local2.setArguments(aArgs);
logRequestByRequest(_local2);
}
function setRequests(aRequests) {
this.aRequests = aRequests;
}
function getRequests(Void) {
return(aRequests);
}
function getFrameDelay(Void) {
var _local2 = gdp.core.time.FrameTimer.getInstance().getFrames() - nLastFrame;
nLastFrame = gdp.core.time.FrameTimer.getInstance().getFrames();
return(_local2);
}
var aRequests = null;
var nLastFrame = null;
var handler = null;
var aNotLogginRequestsList = null;
}
Symbol 1170 MovieClip [__Packages.gdp.core.debug.router.Router] Frame 0
class gdp.core.debug.router.Router extends gdp.core.base.BaseClass implements gdp.core.debug.router.IRouter
{
var bShowSystemMessage;
function Router () {
super();
aMessages = new Array();
}
function setRequestPlayer(requestPlayer) {
this.requestPlayer.removeEventListener(gdp.core.debug.request.player.RequestPlayerEvent.NOTIFY_REQUEST_EXECUTE, gdp.utils.Delegate.create(this, evNotifyRequestExecute));
this.requestPlayer = requestPlayer;
this.requestPlayer.addEventListener(gdp.core.debug.request.player.RequestPlayerEvent.NOTIFY_REQUEST_EXECUTE, gdp.utils.Delegate.create(this, evNotifyRequestExecute));
this.requestPlayer.addEventListener(gdp.core.debug.request.player.RequestPlayerEvent.STOP, gdp.utils.Delegate.create(this, evRequestPlayerStop));
}
function getRequestPlayer(Void) {
return(requestPlayer);
}
function setRequestController(requestController) {
this.requestController = requestController;
}
function getRequestController(Void) {
return(requestController);
}
function addMessageHandler(handler) {
var _local3 = findMessageHandler(handler.getName());
if (_local3 != -1) {
throw new gdp.env.except.IllegalArgumentException("Message already added " + handler.toString(), this, arguments);
}
aMessages.push(handler);
}
function getAllMessagesHandlers(Void) {
return(aMessages);
}
function removeMessageHandler(handler) {
var _local3 = findMessageHandler(handler.getName());
if (_local3 == -1) {
throw new gdp.env.except.IllegalArgumentException("Not found message " + handler.toString(), this, arguments);
}
aMessages.splice(_local3, 1);
}
function removeAllMessagesHandlers(Void) {
aMessages = new Array();
}
function routeUserMessage(sMessage, handler, aArgs) {
if (handler == null) {
throw new gdp.env.except.IllegalArgumentException("Handler isn't define", this, arguments);
}
if (!isPermission(handler)) {
var _local6 = gdp.env.reflect.ClassInfo.forObject(handler);
var _local7 = _local6.getFullName();
trace(("Router :: Permission deny for class [" + _local7) + "]");
return(undefined);
}
var _local4 = findMessageHandler(sMessage);
if (_local4 == -1) {
throw new gdp.env.except.IllegalArgumentException(("Not found message with name [" + sMessage) + "]", this, arguments);
}
var _local3 = aMessages[_local4];
logRequest(_local3.getName(), handler, aArgs);
_local3.call(aArgs);
}
function routeSystemMessage(sMessage, handler, aArgs) {
if (bShowSystemMessage) {
trace(("gdp.core.debug.router.Router.routeSystemMessage(" + [arguments]) + ")");
}
if (handler == null) {
throw new gdp.env.except.IllegalArgumentException("Handler isn't define", this, arguments);
}
var _local3 = findMessageHandler(sMessage);
if (_local3 == -1) {
throw new gdp.env.except.IllegalArgumentException(("Not found message with name [" + sMessage) + "]", this, arguments);
}
var _local4 = aMessages[_local3];
_local4.call(aArgs);
}
function evNotifyRequestExecute(event) {
var _local3 = event.getRequest();
var _local4 = findMessageHandler(_local3.getMessage());
if (_local4 == -1) {
throw new gdp.env.except.IllegalArgumentException("Not found message with name " + _local3.getMessage(), this, arguments);
}
var _local5 = aMessages[_local4];
_local5.call(_local3.getArguments());
}
function evRequestPlayerStop(event) {
setDeny("");
}
function logRequest(sMessage, handler, aArgs) {
if (requestController == null) {
return(undefined);
}
var _local2 = getRequestController().getRequestFactory().createRequest();
_local2.setMessage(sMessage);
_local2.setArguments(aArgs);
_local2.setHandler(handler);
getRequestController().getRequestLogger().logRequest(_local2);
}
function findMessageHandler(sName) {
var _local2 = 0;
while (_local2 < aMessages.length) {
if (gdp.core.debug.router.RouteMessage(aMessages[_local2]).getName() == sName) {
return(_local2);
}
_local2++;
}
return(-1);
}
function isPermission(handler) {
if ((getAllow() == null) && (getDeny() == null)) {
return(true);
}
if ((nOrder == ORDER_ALLOW_DENY) && (aDeny[0] == ALL_NAME)) {
return(false);
}
if ((nOrder == ORDER_DENY_ALLOW) && (aAllow[0] == ALL_NAME)) {
return(true);
}
var _local4 = gdp.env.reflect.ClassInfo.forObject(handler);
var _local3 = _local4.getName();
var _local2 = _local4.getFullName();
if (nOrder == ORDER_ALLOW_DENY) {
if (gdp.utils.ArrayUtil.contains(aDeny, _local3) || (gdp.utils.ArrayUtil.contains(aDeny, _local2))) {
return(false);
}
return(true);
}
if (nOrder == ORDER_DENY_ALLOW) {
if (aDeny[0] == ALL_NAME) {
if (gdp.utils.ArrayUtil.contains(aAllow, _local3) || (gdp.utils.ArrayUtil.contains(aAllow, _local2))) {
return(true);
}
return(false);
}
if (gdp.utils.ArrayUtil.contains(aDeny, _local3) || (gdp.utils.ArrayUtil.contains(aDeny, _local2))) {
return(false);
}
return(true);
}
return(false);
}
function setShowSystemMessage(bShowSystemMessage) {
this.bShowSystemMessage = bShowSystemMessage;
}
function getShowSystemMessage(Void) {
return(bShowSystemMessage);
}
function setOrder(value) {
var _local2 = gdp.utils.StringUtil.toArray(value, ",", true, true);
if (_local2.join(",") == "allow,deny") {
nOrder = ORDER_ALLOW_DENY;
}
if (_local2.join(",") == "deny,allow") {
nOrder = ORDER_DENY_ALLOW;
}
}
function getOrder(Void) {
if (nOrder == null) {
return(null);
}
if (nOrder == ORDER_ALLOW_DENY) {
return("allow,deny");
}
if (nOrder == ORDER_DENY_ALLOW) {
return("deny,allow");
}
}
function setOrderByNumber(value) {
nOrder = value;
}
function getOrderByNumber(Void) {
return(nOrder);
}
function setAllow(value) {
setAllowByArray(gdp.utils.StringUtil.toArray(value, ",; ", true, true));
}
function getAllow(Void) {
return(aAllow.join(","));
}
function setAllowByArray(value) {
aAllow = value;
var _local2 = 0;
while (_local2 < aAllow.length) {
if (String(aAllow[_local2]).toLowerCase() == ALL_NAME) {
aAllow = [ALL_NAME];
break;
}
_local2++;
}
}
function getAllowByArray(Void) {
return(aAllow);
}
function setDeny(value) {
setDenyByArray(gdp.utils.StringUtil.toArray(value, ",; ", true, true));
}
function getDeny(Void) {
return(aDeny.join(","));
}
function setDenyByArray(value) {
aDeny = value;
var _local2 = 0;
while (_local2 < aDeny.length) {
if (String(aDeny[_local2]).toLowerCase() == ALL_NAME) {
aDeny = [ALL_NAME];
break;
}
_local2++;
}
}
function getDenyByArray(Void) {
return(aDeny);
}
static var ORDER_ALLOW_DENY = 1;
static var ORDER_DENY_ALLOW = 2;
static var ALL_NAME = "all";
var aMessages = null;
var requestPlayer = null;
var requestController = null;
var handler = null;
var nOrder = null;
var aDeny = null;
var aAllow = null;
}