Frame 1
function round2(num) {
return(Math.round(num * 100) / 100);
}
System.security.allowDomain("www.enkord.com");
System.security.allowInsecureDomain("www.enkord.com");
if (bannerURL == undefined) {
bannerURL = "http://www.enkord.com/games/armadatanks/banner.swf";
}
lang = "en";
stop();
_focusrect = false;
Stage.showMenu = false;
Stage.width = 480;
Stage.height = 360;
Stage.scaleMode = "noScale";
percent_mc._xscale = 0;
var to = _root.getBytesTotal();
var prevLo = 0;
total_txt.text = round2(to / 1024).toString() + " KB";
var hasAds = false;
var loadListener = new Object();
loadListener.onLoadError = function (target_mc, errorCode) {
preload_logo_mc._visible = true;
loaded_txt._visible = true;
total_txt._visible = true;
percent_mc._visible = true;
percent_txt._visible = true;
frame_mc._visible = true;
preload_logo_mc.onPress = function () {
getURL ("http://www.enkord.com/", "_blank");
};
hasAds = false;
gotoAndPlay ("load");
};
if (downloadURL == undefined) {
loaded_txt._visible = false;
total_txt._visible = false;
percent_mc._visible = false;
percent_txt._visible = false;
frame_mc._visible = false;
var mcLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
var mc = this.createEmptyMovieClip("bannerstub", this.getNextHighestDepth());
hasAds = true;
mcLoader.loadClip(bannerURL, mc);
}
play();
Frame 2
play();
Frame 3
var lo = _root.getBytesLoaded();
var speed = round2((lo - prevLo) / 64);
speed_txt.text = speed.toString() + " Kb/s";
loaded_txt.text = Math.round(lo / 1024).toString() + " KB";
var per = Math.round((lo / to) * 100);
percent_txt.text = per + " %";
percent_mc._xscale = per;
prevLo = lo;
if ((lo < to) && (preload_logo_mc._visible)) {
gotoAndPlay ("load");
} else if (hasAds) {
stop();
} else {
play();
}
Frame 4
var rootURL = "http://www.enkord.com/";
if (hiscoreURL == null) {
if (downloadURL == undefined) {
hiscoreURL = rootURL + "games/armadatanks/online/hiscore.php";
} else {
hiscoreURL = rootURL + "games/armadatanks/online/hiscore-nolinks.php";
}
}
var gameInstance = core.Game.getInstance(_root);
trace("init");
play();
Frame 5
gdp.core.process.ProcessManager.getInstance().run();
trace("process");
play();
Frame 6
trace("repeat");
gotoAndPlay ("process");
Symbol 889 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 890 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 toXML(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(new XML(_local2));
}
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 891 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 892 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]);
}
var nRows = null;
var nCols = null;
}
Symbol 893 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[_local2].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 894 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 895 MovieClip [__Packages.gdp.env.events.IEventDispatcher] Frame 0
interface gdp.env.events.IEventDispatcher
{
}
Symbol 896 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 897 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 898 MovieClip [__Packages.gdp.core.base.BaseInterface] Frame 0
interface gdp.core.base.BaseInterface extends gdp.env.events.IEventDispatcher
{
}
Symbol 899 MovieClip [__Packages.gdp.env.reflect.MemberInfo] Frame 0
interface gdp.env.reflect.MemberInfo extends gdp.core.base.BaseInterface
{
}
Symbol 900 MovieClip [__Packages.gdp.env.reflect.PackageMemberInfo] Frame 0
interface gdp.env.reflect.PackageMemberInfo extends gdp.env.reflect.MemberInfo
{
}
Symbol 901 MovieClip [__Packages.gdp.env.reflect.TypeInfo] Frame 0
interface gdp.env.reflect.TypeInfo extends gdp.env.reflect.PackageMemberInfo
{
}
Symbol 902 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 903 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 904 MovieClip [__Packages.gdp.env.reflect.Cache] Frame 0
interface gdp.env.reflect.Cache extends gdp.core.base.BaseInterface
{
}
Symbol 905 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 906 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 907 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 908 MovieClip [__Packages.gdp.env.overload.OverloadHandler] Frame 0
interface gdp.env.overload.OverloadHandler extends gdp.core.base.BaseInterface
{
}
Symbol 909 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 910 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 911 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 912 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 913 MovieClip [__Packages.gdp.core.logger.publisher.IPublisher] Frame 0
interface gdp.core.logger.publisher.IPublisher
{
}
Symbol 914 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 915 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 916 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 917 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 918 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 919 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 920 MovieClip [__Packages.gdp.env.except.Throwable] Frame 0
interface gdp.env.except.Throwable
{
}
Symbol 921 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 922 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 923 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 924 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 925 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 926 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 927 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 928 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 929 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 930 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 931 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 932 MovieClip [__Packages.gdp.env.reflect.PackageMemberFilter] Frame 0
interface gdp.env.reflect.PackageMemberFilter extends gdp.core.base.BaseInterface
{
}
Symbol 933 MovieClip [__Packages.gdp.env.reflect.TypeMemberFilter] Frame 0
interface gdp.env.reflect.TypeMemberFilter extends gdp.core.base.BaseInterface
{
}
Symbol 934 MovieClip [__Packages.gdp.env.reflect.TypeMemberInfo] Frame 0
interface gdp.env.reflect.TypeMemberInfo extends gdp.env.reflect.MemberInfo
{
}
Symbol 935 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 936 MovieClip [__Packages.gdp.utils.Stringifier] Frame 0
interface gdp.utils.Stringifier extends gdp.core.base.BaseInterface
{
}
Symbol 937 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 938 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 939 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 940 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 941 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 942 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 943 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 944 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 945 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 946 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 947 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 948 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 949 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 950 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 951 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 _local3 = 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));
};
_local3.type = "Delegate";
_local3.target = oClass;
_local3.func = fFunc;
_local3.nCount = ++nCount;
if (_local3.func.___aInnerValues == undefined) {
_local3.func.___aInnerValues = new Array();
}
_local3.func.___aInnerValues[nCount] = new Object();
_local3.aArgs = aArgs;
_local3.bMerge = bMerge;
return(_local3);
}
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 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 952 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 953 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 954 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 (((!gdp.utils.Delegate.equals(process.getFunction(), fFunc)) || ((!process.getId()) != nId)) || (!checkArguments(process))) {
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 955 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(Void) {
if (bWaiting) {
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) {
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].getId() == nId) {
aRemovingProcessesList.push(aProcessesList[_local2]);
updateProcessList();
return(true);
}
_local2++;
}
return(false);
}
function removeProcessByProcess(process) {
return(removeProcessById(process.getId()));
}
function hasProcess(process) {
var _local2 = 0;
while (_local2 < aProcessesList.length) {
if (aProcessesList[_local2].isEqual(process)) {
return(true);
}
_local2++;
}
return(false);
}
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 956 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 957 MovieClip [__Packages.core.Game] Frame 0
class core.Game extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var bShowHelp, useHS, mcBorder, attachMovie, getNextHighestDepth, workshop, betweenLevels, winScreen, afterLevel, preGameScreen, looseScreen, winGameScreen, nLevelNumber, nIterationNumber, nPlayerMoney, nPlayerScore, nPlayerLifes;
function Game (Void) {
super();
gdp.core.time.FrameTimer.getInstance().setFps(31);
bShowHelp = true;
if (_root.downloadURL != null) {
helpers.World.sDownloadURL = _root.downloadURL;
}
if (_root.orderURL != null) {
helpers.World.sBuyURL = _root.orderURL;
}
if (_root.music_trig == 0) {
helpers.soundEngine.CSound.getInstance().setMusic(false);
}
if (_root.sound_trig == 0) {
helpers.soundEngine.CSound.getInstance().setSound(false);
}
if (_root.hiscore == 0) {
useHS = false;
} else {
useHS = true;
}
mcBorder = attachMovie("mcBorder", "mcBorder", getNextHighestDepth(), {_x:5, _y:4});
resetParameters();
showPreGame();
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = core.Game(mcParent.attachMovie("Game", "GameInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function showWorkShop() {
workshop = screens.WorkshopScreen.getInstance(this);
}
function showBetweenLevelsScreen(Void) {
betweenLevels = screens.BetweenLevels.getInstance(this);
}
function showWinScreen(Void) {
winScreen = screens.Win.getInstance(this);
}
function showAfterLevelScreen(obj) {
afterLevel = screens.AfterLevel.getInstance(this);
afterLevel.setData(obj);
}
function showPreGame(Void) {
preGameScreen = screens.PreGame.getInstance(this);
}
function showLoseScreen(Void) {
looseScreen = screens.Loose.getInstance(this);
}
function showGameWinScreen(Void) {
winGameScreen = screens.GameWin.getInstance(this);
}
function showHelp(Void) {
screens.Help.getInstance(this);
}
function showMGMessage(Void) {
screens.Message.getInstance(this);
}
function getCurLevel(Void) {
return(nLevelNumber);
}
function setCurLevel(nSet) {
nLevelNumber = nSet;
}
function getIterationNumber() {
return(nIterationNumber);
}
function increaseCurLevel(Void) {
nLevelNumber++;
_root.numberOfLevel = nLevelNumber;
}
function increaseIteration(Void) {
nIterationNumber++;
_root.numberOfGame = nIterationNumber - 1;
}
function isLastLevel(Void) {
if (nLevelNumber == gameLevels.LevelsMap.nLevelsCount) {
return(true);
}
return(false);
}
function addScoreAndMoney(nValue) {
nPlayerMoney = nPlayerMoney + nMissionReward;
nPlayerScore = nPlayerScore + nValue;
_root.score = nPlayerScore;
}
function getPlyerMoney(Void) {
return(nPlayerMoney);
}
function getPlayerScore(Void) {
return(nPlayerScore);
}
function getPlayerLifes(Void) {
return(nPlayerLifes);
}
function substractPlayerMoney(nValue) {
nPlayerMoney = nPlayerMoney - nValue;
}
function substractPlayerLife() {
nPlayerLifes--;
}
function resetParameters(Void) {
nLevelNumber = 1;
nIterationNumber = 1;
_root.numberOfGame = 0;
gameLevels.LevelsMap.getInstance();
_root.levelsNumber = gameLevels.LevelsMap.nLevelsCount;
_root.numberOfLevel = 1;
nPlayerMoney = 0;
nPlayerScore = 0;
_root.score = 0;
nPlayerLifes = 3;
}
function resetAll() {
resetParameters();
vehicles.tanks.player.Player.getInstance().resetTank();
}
var nMissionReward = 100;
}
Symbol 958 MovieClip [__Packages.screens.Win] Frame 0
class screens.Win extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var gotoAndStop, btnContinue, btnDownload, btnBuy, removeMovieClip, getURL;
function Win (Void) {
super();
gotoAndStop(nFrame);
if (nFrame == 1) {
nFrame = 2;
} else if (nFrame == 2) {
nFrame = 3;
} else {
nFrame = 1;
}
btnContinue.onRelease = gdp.utils.Delegate.create(this, continueLevel);
btnDownload.onRelease = gdp.utils.Delegate.create(this, downloadFullGame);
btnBuy.onRelease = gdp.utils.Delegate.create(this, buyGame);
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.Win(mcParent.attachMovie("Win", "WinInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function continueLevel(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
engine.GamePlayEngine.getInstance().initLevel(parentMc.getCurLevel());
parentMc.showBetweenLevelsScreen();
removeInstance();
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
function buyGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sBuyURL, helpers.World.sTarget);
}
function downloadFullGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sDownloadURL, helpers.World.sTarget);
}
static var nFrame = 1;
}
Symbol 959 MovieClip [__Packages.helpers.soundEngine.CSound] Frame 0
class helpers.soundEngine.CSound
{
static var PICK_UP_BONUS, SIMPLE_SHOT, ROCKET_SHOT, CLICK, TANK_HIT, TANK_DESTROY, WALL_DESTROY, BRICK_DESTROY, SALUTE, TRUBA, MENU_MUSIC, GAME_MUSIC, instance;
var Snd, Mus, musType;
function CSound () {
Snd = new helpers.soundEngine.WaveEngine(1);
Mus = new helpers.soundEngine.WaveEngine(2);
Mus.setAllVolume(100);
Snd.setAllVolume(100);
PICK_UP_BONUS = Snd.addStream("bonusTake", false);
SIMPLE_SHOT = Snd.addStream("cannon", false);
ROCKET_SHOT = Snd.addStream("rocket", false);
CLICK = Snd.addStream("click", false);
TANK_HIT = Snd.addStream("tankHit", false);
TANK_DESTROY = Snd.addStream("destroyTank", false);
WALL_DESTROY = Snd.addStream("destroyWall", false);
BRICK_DESTROY = Snd.addStream("destroyBrick", false);
SALUTE = Snd.addStream("salute", false);
TRUBA = Snd.addStream("truba", false);
MENU_MUSIC = Mus.addStream("musMenu", false);
GAME_MUSIC = Mus.addStream("musGame", false);
}
static function getInstance() {
if (instance == null) {
instance = new helpers.soundEngine.CSound();
}
return(instance);
}
function playSound(nId, nLoops) {
if (!bSound) {
return(undefined);
}
Snd.stop(nId);
if (nLoops == null) {
Snd.play(nId);
} else {
Snd.play(nId, 0, nLoops);
}
}
function setSound(bSet) {
bSound = bSet;
if (!bSound) {
Snd.stopAll();
}
}
function setMusic(bSet) {
bMusic = bSet;
if (!bMusic) {
Mus.stopAll();
} else {
Mus.play(musType, 0, 9999);
}
}
function getMusic(Void) {
return(bMusic);
}
function getSound(Void) {
return(bSound);
}
function playMenuMusic(Void) {
if (!bMusic) {
return(undefined);
}
if (musType == MENU_MUSIC) {
return(undefined);
}
musType = MENU_MUSIC;
Mus.stopAll();
Mus.play(MENU_MUSIC, 0, 9999);
}
function playGameMusic(Void) {
if (!bMusic) {
return(undefined);
}
if (musType == GAME_MUSIC) {
return(undefined);
}
musType = GAME_MUSIC;
Mus.stopAll();
Mus.play(GAME_MUSIC, 0, 9999);
}
var bSound = true;
var bMusic = true;
}
Symbol 960 MovieClip [__Packages.helpers.soundEngine.WaveEngine] Frame 0
class helpers.soundEngine.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((("WaveEngine_" + _numClass) + "_") + type, _root.getNextHighestDepth());
}
function soundOff() {
if (!mute) {
debug("soundOff()");
for (var _local2 in stack) {
stack[_local2]._oldVolume = stack[_local2].getVolume();
setVolume(_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(_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 if (type == 2) {
_local3.setVolume(nMucisVolume);
}
if (type == 2) {
loops = 65536;
}
_local3.start(secondsOffset, loops);
debug(((((((("play(" + _local3.__link) + ", ") + secondsOffset) + ", ") + loops) + " ") + nMucisVolume) + ")");
}
function playAll(secondsOffset, loops, autoDelete) {
for (var _local5 in stack) {
play(_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];
removeMovieClip(_local2.__mc);
}
function deleteAllSound() {
debug("deleteAllSound()");
for (var _local2 in stack) {
deleteSound(_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(_local2);
}
}
function setVolume(id, volume) {
if (((id == undefined) || (volume == undefined)) || (stack[id] == undefined)) {
return(0);
}
var _local2 = stack[id];
if (type == 2) {
nMucisVolume = volume;
}
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(_local2, volume);
}
}
function debug(msg) {
if (debugOn) {
trace((type + " ") + msg);
}
}
function toString() {
return("[sound.Chelpers.soundEngine.WaveEngine]");
}
var _numSound = 0;
var nMucisVolume = 100;
static var _numClass = 0;
}
Symbol 961 MovieClip [__Packages.engine.GamePlayEngine] Frame 0
class engine.GamePlayEngine
{
static var instance;
var tankFactory, mcParent, gamePole, isPaused, bonusFactory, playerTank, prcReactKeyDown, prcActivity, prcShooting, prcEnemyTankCreating, prcCountBonusTime, nLevel, aEnemyTanks, aPlayerShells, aEnemyShells, aBlocks, aObstacles, aEnemiesToCreate, aRespawnCoors, aActiveBonuses, aBonuses, nLevelScore, nTankScore, nBonusScore, nSecondsPast, nCreatedTankIndex, bAllEnemyTanksDestroyed, bEnemyWeaponsBlocked, bEnemyTankMovingBlocked, bFastReload, bLevelEnded, bGameOver, objKeyListener, objCurrentTank, nToWaitForNextTank, nActiveTime, playerSight, playerHeadquarters;
function GamePlayEngine (_parent) {
tankFactory = factories.tanks.TankFactory.getInstance();
instance = this;
mcParent = _parent;
gamePole = gameField.GameField.getInstance(mcParent);
isPaused = false;
bonusFactory = factories.bonuses.BonusFactory.getInstance(gamePole.getGameFieldForBonuses());
tankFactory.setEnemyParent(gamePole.getGameFieldForEnemyTanks());
tankFactory.setPlayerParent(gamePole.getGameFieldForPlayerTanks());
playerTank = tankFactory.createPlayerTank();
prcReactKeyDown = new gdp.core.process.Process(gdp.utils.Delegate.create(this, keyReactFunction));
prcActivity = new gdp.core.process.Process(gdp.utils.Delegate.create(this, enemyTankActivity));
prcShooting = new gdp.core.process.Process(gdp.utils.Delegate.create(this, moveAllShells));
prcEnemyTankCreating = new gdp.core.process.Process(gdp.utils.Delegate.create(this, createEnemyTanks));
prcCountBonusTime = new gdp.core.process.Process(gdp.utils.Delegate.create(this, countBonusTime));
}
static function getInstance(_parent) {
if (instance == null) {
instance = new engine.GamePlayEngine(_parent);
}
return(instance);
}
function initLevel(nLevelNumber) {
nLevel = nLevelNumber;
aEnemyTanks = new Array();
aPlayerShells = new Array();
aEnemyShells = new Array();
aBlocks = new Array();
aObstacles = new Array();
aEnemiesToCreate = new Array();
aRespawnCoors = new Array();
aActiveBonuses = new Array();
aBonuses = new Array();
nLevelScore = 0;
nTankScore = 0;
nBonusScore = 0;
nSecondsPast = 0;
nCreatedTankIndex = 0;
bAllEnemyTanksDestroyed = false;
bEnemyWeaponsBlocked = false;
bEnemyTankMovingBlocked = false;
bFastReload = false;
bLevelEnded = false;
bGameOver = false;
bonusFactory.initLevelParams();
gamePole.createLevel(nLevelNumber);
}
function startLevel(Void) {
helpers.soundEngine.CSound.getInstance().playGameMusic();
initPlayer();
aEnemiesToCreate = gamePole.getEnemiesToCreate();
aRespawnCoors = gamePole.getRespawnCoors();
gamePole.showLevelNumber(nLevel, core.Game.getInstance().getIterationNumber() - 1);
objKeyListener = new Object();
objKeyListener.onKeyDown = gdp.utils.Delegate.create(this, evKeyDown);
Key.addListener(objKeyListener);
gdp.core.process.ProcessManager.getInstance().addProcess(prcActivity);
gdp.core.process.ProcessManager.getInstance().addProcess(prcShooting);
gdp.core.process.ProcessManager.getInstance().addProcess(prcEnemyTankCreating);
gdp.core.process.ProcessManager.getInstance().addProcess(prcReactKeyDown);
gdp.core.process.ProcessManager.getInstance().addProcess(prcCountBonusTime);
elements.ScoreDigits.getInstance().setNumber(nLevelScore + mcParent.getPlayerScore());
elements.ScoreDigits.getInstance().setTanks(aEnemiesToCreate.length);
elements.Lifes.getInstance().setLifes(core.Game.getInstance().getPlayerLifes());
objCurrentTank = aEnemiesToCreate[nCreatedTankIndex++];
nToWaitForNextTank = objCurrentTank.delay;
nActiveTime = gdp.core.time.FrameTimer.getInstance().getTime();
buildCurrentTank();
}
function endLevel(Void) {
removeGraphics();
mcParent.showLoseScreen();
}
function looseLevel() {
if (bGameOver) {
return(undefined);
}
bGameOver = true;
stopProcesses();
mcParent.addScoreAndMoney(nLevelScore);
var _local4 = _root.attachMovie("game_over", "goMsg", _root.getNextHighestDepth());
_local4.mcBlock.useHandCursor = false;
_local4.mcBlock.onPress = null;
var _local3 = new gdp.core.executor.Executor();
_local3.addDelay(2000);
_local3.addTaskByFunction(gdp.utils.Delegate.create(_root.goMsg, _root.goMsg.removeMovieClip));
_local3.addTaskByFunction(gdp.utils.Delegate.create(this, endLevel));
_local3.run();
}
function completeLevel(Void) {
stopProcesses();
helpers.soundEngine.CSound.getInstance().playMenuMusic();
if (mcParent.isLastLevel()) {
mcParent.addScoreAndMoney(nLevelScore);
mcParent.showAfterLevelScreen({nextType:"GameWinScreen", tankScore:nTankScore, bonusScore:nBonusScore});
} else {
mcParent.addScoreAndMoney(nLevelScore);
mcParent.increaseCurLevel();
mcParent.showAfterLevelScreen({nextType:"WinScreen", tankScore:nTankScore, bonusScore:nBonusScore});
}
}
function initPlayer(Void) {
var _local4;
var _local3 = gamePole.getPlayerRespawnCoors();
_local4 = gamePole.getTileCoors(_local3.i, _local3.j);
playerTank.setIJ(_local3.i, _local3.j);
playerTank._x = _local4.x;
playerTank._y = _local4.y;
gamePole.setOccupationType(_local3.i, _local3.j, gameField.tiles.Tile.PLAYER_TANK_OCCUPIED);
gamePole.addTankToTile(_local3.i, _local3.j, playerTank);
playerTank.initTankBeforeLevel();
playerSight = elements.Sight(_root.attachMovie("mcSight", "playerSight", _root.getNextHighestDepth()));
}
function addShell(shellToAdd, bPlayerShell) {
if (bLevelEnded) {
return(undefined);
}
if (bPlayerShell) {
aPlayerShells.push(shellToAdd);
} else {
aEnemyShells.push(shellToAdd);
}
}
function addBlock(blockToAdd) {
aBlocks.push(blockToAdd);
}
function addObstacle(obstToAdd) {
aObstacles.push(obstToAdd);
}
function addHeadquarters(hq) {
playerHeadquarters = hq;
}
function clearAllLevel(Void) {
stopProcesses();
removeGraphics();
}
function stopProcesses() {
bLevelEnded = true;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcActivity);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShooting);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcEnemyTankCreating);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcReactKeyDown);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcCountBonusTime);
var _local2 = 0;
while (_local2 < aEnemyShells.length) {
aEnemyShells[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aPlayerShells.length) {
aPlayerShells[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aActiveBonuses.length) {
aActiveBonuses[_local2].removeMovieClip();
_local2++;
}
playerTank.disable();
playerSight.removeMovieClip();
Key.removeListener(objKeyListener);
Mouse.show();
}
function removeGraphics() {
var _local2 = 0;
while (_local2 < aEnemyTanks.length) {
aEnemyTanks[_local2].removeMovieClip();
_local2++;
}
playerHeadquarters.removeMovieClip();
playerTank.destroyVehicle();
elements.ScoreDigits.getInstance().removeInstance();
elements.Lifes.getInstance().removeInstance();
elements.Stars.getInstance().removeInstance();
gamePole.clearPole();
}
function enemyTankActivity(Void) {
var _local2;
if (bEnemyWeaponsBlocked) {
return(undefined);
}
var _local3 = 0;
while (_local3 < aEnemyTanks.length) {
_local2 = aEnemyTanks[_local3];
if (_local2.isCanShoot() && (!bEnemyWeaponsBlocked)) {
_local2.shoot(gamePole);
}
if ((!_local2.isMoving()) && (!bEnemyTankMovingBlocked)) {
_local2.moveVehicle(gamePole);
}
_local3++;
}
}
function countBonusTime(Void) {
var _local2 = 0;
while (_local2 < aActiveBonuses.length) {
aActiveBonuses[_local2].decreaseTime();
if (aActiveBonuses[_local2].timeRemaining() == 0) {
unloadBonus(aActiveBonuses[_local2].getType());
aActiveBonuses[_local2].removeMovieClip();
aActiveBonuses.splice(_local2--, 1);
}
_local2++;
}
}
function moveAllShells(Void) {
var _local2;
var _local3;
var _local6;
var _local4 = gameField.GameField.getInstance().getFieldForBullet();
_local2 = 0;
while (_local2 < aPlayerShells.length) {
_local6 = false;
aPlayerShells[_local2].moveShell();
if (aPlayerShells[_local2].getPath() >= 600) {
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
} else {
_local3 = 0;
while (_local3 < aObstacles.length) {
if (aObstacles[_local3].getHitMC().hitTest(aPlayerShells[_local2].getHitZone())) {
if (aPlayerShells[_local2].isRocket) {
var _local8 = aPlayerShells[_local2].getHitZone().attachMovie("rocketBoomRadius", "boomRad" + (helpers.World.boomID++), aPlayerShells[_local2].getHitZone().getNextHighestDepth());
gamePole.makeRocketBoom(aPlayerShells[_local2]._x, aPlayerShells[_local2]._y);
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
var _local5 = 0;
while (_local5 < aEnemyTanks.length) {
if (aEnemyTanks[_local5].getHitZone().hitTest(_local8)) {
aEnemyTanks[_local5].hit(aPlayerShells[_local2], false);
if (aEnemyTanks[_local5].isDestroyed()) {
addScoresForItem(aEnemyTanks[_local5].getType());
if (aEnemyTanks[_local5].getBonusFlag()) {
createBonus();
}
gamePole.makeBoom(aEnemyTanks[_local5]._x, aEnemyTanks[_local5]._y);
aEnemyTanks[_local5].destroyVehicle(gamePole);
aEnemyTanks.splice(_local5--, 1);
}
}
_local5++;
}
_local5 = 0;
while (_local5 < aBlocks.length) {
if (aBlocks[_local5].onRocketHit(aPlayerShells[_local2])) {
if (aBlocks[_local5].isDestroyed()) {
aBlocks[_local5].removeMovieClip();
aBlocks.splice(_local5--, 1);
}
}
_local5++;
}
_local6 = true;
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
break;
}
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aPlayerShells[_local2]._x, _y:aPlayerShells[_local2]._y});
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
_local6 = true;
break;
}
_local3++;
}
if (_local6) {
} else {
_local3 = 0;
while (_local3 < aEnemyShells.length) {
if (aEnemyShells[_local3].getHitZone().hitTest(aPlayerShells[_local2].getHitZone())) {
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aPlayerShells[_local2]._x, _y:aPlayerShells[_local2]._y});
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
aEnemyShells[_local3].removeMovieClip();
aEnemyShells.splice(_local3, 1);
_local6 = true;
break;
}
_local3++;
}
if (_local6) {
} else {
_local3 = 0;
while (_local3 < aEnemyTanks.length) {
if (aPlayerShells[_local2].isRocket) {
if (aEnemyTanks[_local3].getHitZone().hitTest(aPlayerShells[_local2].getHitZone())) {
var _local8 = aPlayerShells[_local2].getHitZone().attachMovie("rocketBoomRadius", "boomRad" + (helpers.World.boomID++), aPlayerShells[_local2].getHitZone().getNextHighestDepth());
gamePole.makeRocketBoom(aPlayerShells[_local2]._x, aPlayerShells[_local2]._y);
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
var _local5 = 0;
while (_local5 < aEnemyTanks.length) {
if (aEnemyTanks[_local5].getHitZone().hitTest(_local8)) {
aEnemyTanks[_local5].hit(aPlayerShells[_local2], false);
if (aEnemyTanks[_local5].isDestroyed()) {
addScoresForItem(aEnemyTanks[_local5].getType());
if (aEnemyTanks[_local5].getBonusFlag()) {
createBonus();
}
gamePole.makeBoom(aEnemyTanks[_local5]._x, aEnemyTanks[_local5]._y);
aEnemyTanks[_local5].destroyVehicle(gamePole);
aEnemyTanks.splice(_local5--, 1);
}
}
_local5++;
}
_local5 = 0;
while (_local5 < aBlocks.length) {
if (aBlocks[_local5].onRocketHit(aPlayerShells[_local2])) {
if (aBlocks[_local5].isDestroyed()) {
aBlocks[_local5].removeMovieClip();
aBlocks.splice(_local5--, 1);
}
}
_local5++;
}
_local6 = true;
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
break;
}
} else if (aEnemyTanks[_local3].hit(aPlayerShells[_local2])) {
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aPlayerShells[_local2]._x, _y:aPlayerShells[_local2]._y});
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
if (aEnemyTanks[_local3].isDestroyed()) {
addScoresForItem(aEnemyTanks[_local3].getType());
if (aEnemyTanks[_local3].getBonusFlag()) {
createBonus();
}
gamePole.makeBoom(aEnemyTanks[_local3]._x, aEnemyTanks[_local3]._y);
aEnemyTanks[_local3].destroyVehicle(gamePole);
aEnemyTanks.splice(_local3--, 1);
_local6 = true;
break;
}
}
_local3++;
}
if (_local6) {
} else {
_local3 = 0;
while (_local3 < aBlocks.length) {
if (aPlayerShells[_local2].isRocket) {
if (aBlocks[_local3].hitRocketTest(aPlayerShells[_local2])) {
var _local8 = aPlayerShells[_local2].getHitZone().attachMovie("rocketBoomRadius", "boomRad" + (helpers.World.boomID++), aPlayerShells[_local2].getHitZone().getNextHighestDepth());
gamePole.makeRocketBoom(aPlayerShells[_local2]._x, aPlayerShells[_local2]._y);
var _local7 = false;
var _local5 = 0;
while (_local5 < aEnemyTanks.length) {
if (aEnemyTanks[_local5].getHitZone().hitTest(_local8)) {
aEnemyTanks[_local5].hit(aPlayerShells[_local2], false);
_local7 = true;
if (aEnemyTanks[_local5].isDestroyed()) {
addScoresForItem(aEnemyTanks[_local5].getType());
if (aEnemyTanks[_local5].getBonusFlag()) {
createBonus();
}
gamePole.makeBoom(aEnemyTanks[_local5]._x, aEnemyTanks[_local5]._y);
aEnemyTanks[_local5].destroyVehicle(gamePole);
aEnemyTanks.splice(_local5--, 1);
}
}
_local5++;
}
if (_local7) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
}
_local5 = 0;
while (_local5 < aBlocks.length) {
if (aBlocks[_local5].onRocketHit(aPlayerShells[_local2])) {
if (aBlocks[_local5].isDestroyed()) {
aBlocks[_local5].removeMovieClip();
aBlocks.splice(_local5--, 1);
}
}
_local5++;
}
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
break;
}
} else if (aPlayerShells[_local2].hitTest(aBlocks[_local3])) {
if (aBlocks[_local3].onHit(aPlayerShells[_local2])) {
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aPlayerShells[_local2]._x, _y:aPlayerShells[_local2]._y});
aPlayerShells[_local2].removeMovieClip();
aPlayerShells.splice(_local2--, 1);
if (aBlocks[_local3].isDestroyed()) {
aBlocks[_local3].removeMovieClip();
aBlocks.splice(_local3--, 1);
}
break;
}
}
_local3++;
}
}
}
}
}
_local2++;
}
if ((aEnemyTanks.length == 0) && (checkForLevelCompletion())) {
completeLevel();
}
_local2 = 0;
while (_local2 < aEnemyShells.length) {
_local6 = false;
aEnemyShells[_local2].moveShell();
if (aEnemyShells[_local2].getPath() >= 600) {
aEnemyShells[_local2].removeMovieClip();
aEnemyShells.splice(_local2--, 1);
} else {
_local3 = 0;
while (_local3 < aObstacles.length) {
if (aObstacles[_local3].getHitMC().hitTest(aEnemyShells[_local2].getHitZone())) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aEnemyShells[_local2]._x, _y:aEnemyShells[_local2]._y});
aEnemyShells[_local2].removeMovieClip();
aEnemyShells.splice(_local2--, 1);
_local6 = true;
break;
}
_local3++;
}
if (_local6) {
} else if (playerHeadquarters.onHit(aEnemyShells[_local2])) {
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aEnemyShells[_local2]._x, _y:aEnemyShells[_local2]._y});
aEnemyShells[_local2].removeMovieClip();
aEnemyShells.splice(_local2--, 1);
if (playerHeadquarters.isDestroyed()) {
looseLevel();
}
} else if (playerTank.hit(aEnemyShells[_local2])) {
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aEnemyShells[_local2]._x, _y:aEnemyShells[_local2]._y});
aEnemyShells[_local2].removeMovieClip();
aEnemyShells.splice(_local2--, 1);
if (playerTank.isDestroyed()) {
playerDestroyed();
}
} else {
_local3 = 0;
while (_local3 < aBlocks.length) {
if (aEnemyShells[_local2].hitTest(aBlocks[_local3])) {
if (aBlocks[_local3].onHit(aEnemyShells[_local2])) {
_local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth(), {_x:aEnemyShells[_local2]._x, _y:aEnemyShells[_local2]._y});
aEnemyShells[_local2].removeMovieClip();
aEnemyShells.splice(_local2--, 1);
if (aBlocks[_local3].isDestroyed()) {
aBlocks[_local3].removeMovieClip();
aBlocks.splice(_local3--, 1);
}
}
}
_local3++;
}
}
}
_local2++;
}
}
function playerDestroyed() {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_DESTROY);
playerTank.destroyVehicle();
if (playerTank.isMoving()) {
gamePole.setOccupationType(playerTank.getNextIJ().i, playerTank.getNextIJ().j, gameField.tiles.Tile.FREE_TILE);
gamePole.removeTankFromTile(playerTank.getNextIJ().i, playerTank.getNextIJ().j, playerTank);
} else {
gamePole.setOccupationType(playerTank.getIJ().i, playerTank.getIJ().j, gameField.tiles.Tile.FREE_TILE);
gamePole.removeTankFromTile(playerTank.getIJ().i, playerTank.getIJ().j, playerTank);
}
core.Game.getInstance().substractPlayerLife();
gamePole.makeBoom(playerTank._x, playerTank._y);
elements.Lifes.getInstance().setLifes(core.Game.getInstance().getPlayerLifes());
if (core.Game.getInstance().getPlayerLifes() > 0) {
var _local3;
var _local2;
var _local4;
var _local5 = gamePole.getPoleWidth();
var _local7;
var _local6 = gamePole.getPlayerRespawnCoors();
_local4 = false;
while (!_local4) {
_local3 = _local6.i;
_local2 = random(_local5);
_local4 = gamePole.isFreeForBonus(_local3, _local2);
}
_local7 = gamePole.getTileCoors(_local3, _local2);
playerTank.setIJ(_local3, _local2);
playerTank._x = _local7.x;
playerTank._y = _local7.y;
gamePole.setOccupationType(_local3, _local2, gameField.tiles.Tile.PLAYER_TANK_OCCUPIED);
gamePole.addTankToTile(_local3, _local2, playerTank);
gamePole.resetFieldLocation();
playerTank.initTankBeforeLevel();
} else {
looseLevel();
}
}
function createEnemyTanks(Void) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nActiveTime) >= 1000) {
nActiveTime = gdp.core.time.FrameTimer.getInstance().getTime();
nSecondsPast++;
if (nSecondsPast >= nToWaitForNextTank) {
buildCurrentTank();
if (nCreatedTankIndex < aEnemiesToCreate.length) {
objCurrentTank = aEnemiesToCreate[nCreatedTankIndex++];
nToWaitForNextTank = objCurrentTank.delay;
nSecondsPast = 0;
} else {
bAllEnemyTanksDestroyed = true;
return(0);
}
}
}
}
function buildCurrentTank(Void) {
var _local3 = tankFactory.createEnemyTank(objCurrentTank.type, aEnemyTanks.length);
var _local2 = aRespawnCoors.shift();
var _local4 = gamePole.getTileCoors(_local2.i, _local2.j);
_local3.setIJ(_local2.i, _local2.j);
_local3._x = _local4.x;
_local3._y = _local4.y;
elements.ScoreDigits.getInstance().setTanks(aEnemiesToCreate.length - nCreatedTankIndex);
gamePole.setOccupationType(_local2.i, _local2.j, gameField.tiles.Tile.ENEMY_TANK_OCCUPIED);
gamePole.addTankToTile(_local2.i, _local2.j, _local3);
aEnemyTanks.push(_local3);
aRespawnCoors.push(_local2);
}
function createBonus(Void) {
if (bLevelEnded || (bGameOver)) {
return(undefined);
}
if (!bonusFactory.isBonuses()) {
return(undefined);
}
var _local8;
var _local7;
var _local6;
var _local2;
var _local3 = gamePole.getPoleWidth();
var _local4 = gamePole.getPoleHeight();
_local2 = false;
while (!_local2) {
_local8 = random(_local4);
_local7 = random(_local3);
_local2 = gamePole.isFreeForBonus(_local8, _local7);
}
if (aBonuses.length >= 2) {
var _local5 = aBonuses.shift();
gamePole.setBonusOnTile(_local5.i, _local5.j, false);
}
_local6 = bonusFactory.createBonus();
gamePole.setBonusOnTile(_local8, _local7, true, _local6);
aBonuses.push({i:_local8, j:_local7, bonus:_local6});
}
function addScoresForItem(nItem) {
switch (nItem) {
case vehicles.tanks.AbstractTank.EASY_TANK :
nLevelScore = nLevelScore + 2;
nTankScore = nTankScore + 2;
break;
case vehicles.tanks.AbstractTank.NORMAL_TANK :
nLevelScore = nLevelScore + 3;
nTankScore = nTankScore + 3;
break;
case vehicles.tanks.AbstractTank.HARD_TANK :
nLevelScore = nLevelScore + 4;
nTankScore = nTankScore + 4;
break;
default :
nLevelScore = nLevelScore + factories.bonuses.BonusFactory.SCORE_BONUS;
nBonusScore = nBonusScore + factories.bonuses.BonusFactory.SCORE_BONUS;
}
elements.ScoreDigits.getInstance().setNumber(nLevelScore + mcParent.getPlayerScore());
}
function checkForLevelCompletion(Void) {
if (bAllEnemyTanksDestroyed) {
return(true);
}
nSecondsPast = nToWaitForNextTank;
}
function evKeyDown() {
if (Key.isDown(32)) {
isPaused = !isPaused;
gamePole.updatePauseState();
}
}
function keyReactFunction(Void) {
if (playerTank.isMoving() || (isPaused)) {
return(undefined);
}
var _local3 = null;
if (Key.isDown(37) || (Key.isDown(65))) {
_local3 = vehicles.tanks.AbstractTank.DIRECTION_LEFT;
}
if (Key.isDown(38) || (Key.isDown(87))) {
_local3 = vehicles.tanks.AbstractTank.DIRECTION_UP;
}
if (Key.isDown(39) || (Key.isDown(68))) {
_local3 = vehicles.tanks.AbstractTank.DIRECTION_RIGHT;
}
if (Key.isDown(40) || (Key.isDown(83))) {
_local3 = vehicles.tanks.AbstractTank.DIRECTION_DOWN;
}
if (_local3 == null) {
return(undefined);
}
var _local5 = vehicles.tanks.AbstractTank.aDirectionsArray[_local3].i;
var _local4 = vehicles.tanks.AbstractTank.aDirectionsArray[_local3].j;
var _local2 = playerTank.getIJ();
if (gamePole.isFreeForPlayerTank(_local2.i + _local5, _local2.j + _local4)) {
var _local6 = gamePole.getTileCoors(_local2.i + _local5, _local2.j + _local4);
gamePole.removeTankFromTile(_local2.i, _local2.j, playerTank);
gamePole.setOccupationType(_local2.i, _local2.j, gameField.tiles.Tile.FREE_TILE);
gamePole.addTankToTile(_local2.i + _local5, _local2.j + _local4, playerTank);
gamePole.setOccupationType(_local2.i + _local5, _local2.j + _local4, gameField.tiles.Tile.PLAYER_TANK_OCCUPIED);
playerTank.moveVehicle(_local6.x, _local6.y, _local3, gamePole);
}
}
function unloadBonus(nBonusType) {
switch (nBonusType) {
case factories.bonuses.BonusFactory.BULLETS :
playerTank.setFastReloadBonus(false);
break;
case factories.bonuses.BonusFactory.LOCK :
bEnemyWeaponsBlocked = false;
break;
case factories.bonuses.BonusFactory.CLOCK :
bEnemyTankMovingBlocked = false;
break;
case factories.bonuses.BonusFactory.SHIELD :
playerTank.setInvincible(false);
break;
case factories.bonuses.BonusFactory.SPADE :
gamePole.removeHeadquartersProtect();
}
}
function addBonusElement(nType) {
if (bLevelEnded || (bGameOver)) {
return(undefined);
}
var _local2;
var _local6;
var _local4;
var _local3;
_local4 = false;
_local2 = 0;
while (_local2 < aActiveBonuses.length) {
_local3 = aActiveBonuses[_local2].getType();
if (_local3 == nType) {
aActiveBonuses[_local2].restartTime();
_local4 = true;
break;
}
_local2++;
}
if (!_local4) {
_local6 = elements.BonusElement(mcParent.attachMovie("mcBonusElement", "BonusElement" + aActiveBonuses.length, mcParent.getNextHighestDepth()));
_local6._y = helpers.World.nBonusY + (aActiveBonuses.length * (_local6._height + 5));
_local6._x = helpers.World.nBonusX;
_local6.setType(nType);
aActiveBonuses.push(_local6);
}
}
function playerMovingEnd(nDirection) {
if (bLevelEnded || (bGameOver)) {
return(undefined);
}
var _local4;
var _local5;
var _local6;
var _local7;
var _local3 = playerTank.getIJ();
gamePole.tryToMoveField(nDirection);
_local5 = false;
if (gamePole.isBonusTile(_local3.i, _local3.j)) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.PICK_UP_BONUS);
addScoresForItem();
_local6 = gamePole.getTileBonusClip(_local3.i, _local3.j);
var _local2 = 0;
while (_local2 < aBonuses.length) {
if ((aBonuses[_local2].i == _local3.i) && (aBonuses[_local2].j == _local3.j)) {
aBonuses.splice(_local2, 1);
break;
}
_local2++;
}
switch (_local6._currentframe) {
case factories.bonuses.BonusFactory.BOMB :
_local2 = 0;
while (_local2 < aEnemyTanks.length) {
_local4 = aEnemyTanks[_local2].bombHit();
if (_local4) {
addScoresForItem(aEnemyTanks[_local2].getType());
gamePole.makeBoom(aEnemyTanks[_local2]._x, aEnemyTanks[_local2]._y);
if (aEnemyTanks[_local2].getBonusFlag()) {
createBonus();
}
aEnemyTanks[_local2].destroyVehicle(gamePole);
aEnemyTanks.splice(_local2--, 1);
} else {
gamePole.makeRocketBoom(aEnemyTanks[_local2]._x, aEnemyTanks[_local2]._y);
}
_local2++;
}
break;
case factories.bonuses.BonusFactory.BULLETS :
_local5 = true;
playerTank.setFastReloadBonus(true);
break;
case factories.bonuses.BonusFactory.LOCK :
_local5 = true;
bEnemyWeaponsBlocked = true;
break;
case factories.bonuses.BonusFactory.CLOCK :
_local5 = true;
bEnemyTankMovingBlocked = true;
break;
case factories.bonuses.BonusFactory.SHIELD :
_local5 = true;
playerTank.setInvincible(true);
break;
case factories.bonuses.BonusFactory.STAR :
playerTank.addStar();
break;
case factories.bonuses.BonusFactory.MEDIKIT :
playerTank.recoverHealth();
break;
case factories.bonuses.BonusFactory.SPADE :
_local5 = true;
gamePole.buildHeadquartersProtect();
break;
case factories.bonuses.BonusFactory.MINE :
}
if (_local5) {
addBonusElement(_local6._currentframe);
}
gamePole.setBonusOnTile(_local3.i, _local3.j, false);
}
}
}
Symbol 962 MovieClip [__Packages.gameField.GameField] Frame 0
class gameField.GameField extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var mcWaterTiles, createEmptyMovieClip, getNextHighestDepth, mcGameFieldTiles, mcGameBonuses, mcGameFieldElements, mcEnemyTankField, mcPlayerTankField, mcBulletField, mcGameFieldBorders, mcGameFieldDecoration, curLevel, nPoleHeight, nPoleWidth, aBonuses, aBricks, aBrickTiles, aRespawn, aHeadquartersBricks, aTrackTraces, _y, _x, nUpBorder, nBottomBorder, bMoving, pntStart, pntEnd, mover, aTiles, mcHeadquarters, aDecorTiles, objHeadquarters, mcPause;
function GameField (Void) {
super();
mcWaterTiles = createEmptyMovieClip("mcWater", getNextHighestDepth());
mcGameFieldTiles = createEmptyMovieClip("mcTiles", getNextHighestDepth());
mcGameBonuses = createEmptyMovieClip("mcBonuses", getNextHighestDepth());
mcGameFieldElements = createEmptyMovieClip("mcElements", getNextHighestDepth());
mcEnemyTankField = createEmptyMovieClip("mcEnemyField", getNextHighestDepth());
mcPlayerTankField = createEmptyMovieClip("mcPlayerField", getNextHighestDepth());
mcBulletField = createEmptyMovieClip("mcBulletField", getNextHighestDepth());
mcGameFieldBorders = createEmptyMovieClip("mcBottomBorders", getNextHighestDepth());
mcGameFieldDecoration = createEmptyMovieClip("mcDecors", getNextHighestDepth());
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = gameField.GameField(mcParent.attachMovie("GameField", "GameFieldInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function createLevel(nLevelNumber) {
curLevel = gameLevels.LevelsMap.getInstance().getCurrentLevel(nLevelNumber);
var _local4 = curLevel.getLevelMap();
var _local5 = curLevel.getTilesMap();
var _local6 = curLevel.getDecors();
nPoleHeight = _local4.length / 2;
nPoleWidth = _local4[0].length / 2;
aBonuses = new Array();
aBricks = new Array();
aBrickTiles = new Array(nPoleHeight);
var _local3 = 0;
while (_local3 < nPoleHeight) {
aBrickTiles[_local3] = new Array(nPoleWidth);
_local3++;
}
aRespawn = new Array();
aHeadquartersBricks = new Array();
aTrackTraces = new Array();
createTiles(_local5);
createDecors(_local6);
scanLevelMap(_local4);
buildHeadquarters();
buildRespawn();
revertMap(_local4);
_local3 = 0;
while (_local3 < aBrickTiles.length) {
var _local2 = aBrickTiles[_local3].length - 1;
while (_local2 >= 0) {
aBrickTiles[_local3][_local2].swapDepths(mcGameFieldElements.getNextHighestDepth());
_local2--;
}
_local3++;
}
_y = -((nTileWidth * (nPoleHeight + 0.25)) - helpers.World.nScreenHeight);
_x = (helpers.World.nScreenWidth / 2) - ((nPoleWidth * nTileWidth) / 2);
nUpBorder = nTileWidth / 2;
nBottomBorder = _y;
bMoving = false;
}
function showLevelNumber(nLevelNumber, nIter) {
var _local5 = _root.attachMovie("levelNumber", "mcLevelNumber", _root.getNextHighestDepth(), {_x:helpers.World.nScreenWidth / 2, _y:50});
var _local3 = "Level " + nLevelNumber;
var _local2 = 0;
while (_local2 < nIter) {
_local3 = _local3 + "*";
_local2++;
}
_local5.sText = _local3;
}
function tryToMoveField(nDirection) {
var _local5 = vehicles.tanks.player.Player.getInstance();
var _local6 = helpers.World.nScreenWidth / 2;
var _local4 = helpers.World.nScreenHeight / 2;
var _local2;
var _local3 = {x:_local5._x, y:_local5._y};
mcPlayerTankField.localToGlobal(_local3);
if (bMoving) {
return(undefined);
}
switch (nDirection) {
case vehicles.tanks.AbstractTank.DIRECTION_DOWN :
if ((_local3.y > _local4) && (_y > nBottomBorder)) {
if ((_y - nBottomBorder) >= nTileWidth) {
_local2 = nTileWidth;
} else {
_local2 = _y - nBottomBorder;
}
pntStart = new gdp.utils.math.helpers.Point(_x, _y);
pntEnd = new gdp.utils.math.helpers.Point(_x, _y - _local2);
mover = new gdp.ui.effects.tween.Tween(this, pntStart, pntEnd, 4);
mover.run();
}
break;
case vehicles.tanks.AbstractTank.DIRECTION_UP :
if (!((_local3.y < _local4) && (_y < nUpBorder))) {
break;
}
if (Math.abs(nUpBorder - _y) >= nTileWidth) {
_local2 = nTileWidth;
} else {
_local2 = Math.abs(nUpBorder - _y);
}
pntStart = new gdp.utils.math.helpers.Point(_x, _y);
pntEnd = new gdp.utils.math.helpers.Point(_x, _y + _local2);
mover = new gdp.ui.effects.tween.Tween(this, pntStart, pntEnd, 4);
mover.run();
}
}
function resetFieldLocation(Void) {
_y = nBottomBorder;
}
function buildHeadquartersProtect(Void) {
var _local2 = curLevel.getHeadquertersBlocksCoors();
var _local3 = null;
var _local7;
var _local6;
var _local4;
_local4 = 0;
while (_local4 < _local2.length) {
_local6 = aTiles[_local2[_local4].i + nPoleAdd][_local2[_local4].j + nPoleAdd].getOccupied();
if (_local6 == gameField.tiles.Tile.FREE_TILE) {
_local7 = {_x:_local2[_local4].j * nTileWidth, _y:_local2[_local4].i * nTileWidth};
_local3 = gameField.elements.blocks.Block(mcGameFieldElements.attachMovie("mcBlock", (("mcBlock" + _local2[_local4].i) + "") + _local2[_local4].j, mcGameFieldElements.getNextHighestDepth(), _local7));
_local3.setIJ({i:_local2[_local4].i, j:_local2[_local4].j});
setOccupationType(_local2[_local4].i, _local2[_local4].j, gameField.tiles.Tile.WANTED_BRICK_OCCUPIED);
aHeadquartersBricks.push(_local3);
aBricks.push(_local3);
aBrickTiles[_local2[_local4].i][_local2[_local4].j] = _local3;
engine.GamePlayEngine.getInstance().addBlock(_local3);
} else if ((_local6 == gameField.tiles.Tile.WANTED_BRICK_OCCUPIED) || (_local6 == gameField.tiles.Tile.BRICK_OCCUPIED)) {
setOccupationType(_local2[_local4].i, _local2[_local4].j, gameField.tiles.Tile.WANTED_BRICK_OCCUPIED);
var _local5 = 0;
while (_local5 < aHeadquartersBricks.length) {
_local3 = aHeadquartersBricks[_local5];
if ((_local3.getIJ().i == _local2[_local4].i) && (_local3.getIJ().j == _local2[_local4].j)) {
_local3.swapDepths(mcGameFieldElements.getNextHighestDepth());
break;
}
_local5++;
}
}
_local4++;
}
mcHeadquarters.swapDepths(mcGameFieldElements.getNextHighestDepth());
_local4 = 0;
while (_local4 < aHeadquartersBricks.length) {
_local3 = aHeadquartersBricks[_local4];
_local3.rebuildBlock();
_local3.setType(gameField.elements.blocks.Block.UNBREAKABLE_BLOCK);
_local4++;
}
}
function removeHeadquartersProtect(Void) {
var _local2 = 0;
while (_local2 < aHeadquartersBricks.length) {
var _local3 = aHeadquartersBricks[_local2];
_local3.setType(gameField.elements.blocks.Block.SIMPLE_BLOCK);
_local2++;
}
}
function makeTrackTrace(nI, nJ, nDirection, nPrevDirection) {
var _local5 = {_x:nJ * nTileWidth, _y:nI * nTileWidth};
var _local2 = mcGameFieldTiles.attachMovie("mcTrackTrace", (("mcTrackTrace" + nI) + nJ) + Math.random(), mcGameFieldTiles.getNextHighestDepth(), _local5);
if ((nDirection == vehicles.tanks.AbstractTank.DIRECTION_DOWN) || (nDirection == vehicles.tanks.AbstractTank.DIRECTION_UP)) {
if ((nPrevDirection == vehicles.tanks.AbstractTank.DIRECTION_LEFT) || (nPrevDirection == vehicles.tanks.AbstractTank.DIRECTION_RIGHT)) {
_local2.mcTrack.gotoAndStop(3);
} else {
_local2.mcTrack.gotoAndStop(1);
}
}
if ((nDirection == vehicles.tanks.AbstractTank.DIRECTION_LEFT) || (nDirection == vehicles.tanks.AbstractTank.DIRECTION_RIGHT)) {
if ((nPrevDirection == vehicles.tanks.AbstractTank.DIRECTION_UP) || (nPrevDirection == vehicles.tanks.AbstractTank.DIRECTION_DOWN)) {
_local2.mcTrack.gotoAndStop(3);
} else {
_local2.mcTrack.gotoAndStop(2);
}
}
}
function makeBoom(nX, nY) {
var _local2 = mcEnemyTankField.attachMovie("boom", "boom" + (helpers.World.boomID++), mcEnemyTankField.getNextHighestDepth());
_local2._x = nX;
_local2._y = nY;
_local2.gotoAndPlay(1);
}
function makeRocketTrail(nX, nY) {
var _local2 = mcGameFieldDecoration.attachMovie("rocketTrail", "trail" + (helpers.World.boomID++), mcGameFieldDecoration.getNextHighestDepth());
_local2._x = nX;
_local2._y = nY;
_local2.gotoAndPlay(1);
}
function makeRocketBoom(nX, nY) {
var _local2 = mcEnemyTankField.attachMovie("boomRocket", "boom" + (helpers.World.boomID++), mcEnemyTankField.getNextHighestDepth());
_local2._x = nX;
_local2._y = nY;
_local2.gotoAndPlay(1);
}
function createTiles(aMapTiles) {
aTiles = new Array(aMapTiles.length);
var _local8 = curLevel.getHeadquartersCoors();
var _local10 = new Array();
var _local9 = 0;
while (_local9 <= (aMapTiles.length - 1)) {
aTiles[_local9] = new Array(aMapTiles[_local9].length);
var _local4 = aMapTiles[_local9].length - 1;
while (_local4 >= 0) {
var _local2 = aMapTiles[_local9][_local4];
var _local6 = _local9 - 2;
var _local5 = _local4 - 2;
var _local3 = null;
if ((((_local4 <= 1) && (_local2 != 3)) || ((_local9 == (aMapTiles.length - 2)) && (_local2 != 3))) || ((_local6 == (_local8.i + 1)) && (((_local5 == (_local8.j - 1)) || (_local5 == _local8.j)) || (_local5 == (_local8.j + 1))))) {
_local3 = gameField.tiles.Tile(mcGameFieldBorders.attachMovie("mcSimpleTile", (("mcSimpleTile" + _local9) + "") + _local4, mcGameFieldBorders.getNextHighestDepth()));
} else if (_local2 == 3) {
_local3 = gameField.tiles.Tile(mcWaterTiles.attachMovie("mcSimpleTile", (("mcSimpleTile" + _local9) + "") + _local4, mcWaterTiles.getNextHighestDepth()));
} else if ((((_local2 == 16) || (_local2 == 39)) || (_local2 == 62)) || (((((_local4 >= 2) && (_local4 <= (aMapTiles[_local9].length - 3))) && (_local9 >= 2)) && (_local9 <= (aMapTiles.length - 3))) && (((_local2 >= 26) && (_local2 <= 33)) || ((_local2 >= 52) && (_local2 <= 60))))) {
_local3 = gameField.tiles.Tile(mcGameFieldElements.attachMovie("mcSimpleTile", (("mcSimpleTile" + _local9) + "") + _local4, mcGameFieldElements.getNextHighestDepth()));
aBrickTiles[_local6][_local5] = _local3;
} else {
_local3 = gameField.tiles.Tile(mcGameFieldTiles.attachMovie("mcSimpleTile", (("mcSimpleTile" + _local9) + "") + _local4, mcGameFieldTiles.getNextHighestDepth()));
}
_local3.gotoAndStop(_local2);
_local3._x = (_local5 * nTileWidth) + (nTileWidth / 2);
_local3._y = (_local6 * nTileWidth) + (nTileWidth / 2);
switch (_local2) {
case 2 :
case 3 :
case 17 :
case 60 :
_local3.setOccupied(gameField.tiles.Tile.PASS_OBST_OCCUPIED);
break;
case 34 :
case 35 :
_local10.push(_local3);
break;
default :
if (!(((((_local2 == 16) || (_local2 == 62)) || ((_local2 >= 18) && (_local2 <= 33))) || ((_local2 >= 36) && (_local2 <= 39))) || ((_local2 >= 52) && (_local2 <= 59)))) {
break;
}
_local3.setOccupied(gameField.tiles.Tile.NOT_PASS_OBST_OCCUPIED);
if (!((((_local6 >= -1) && (_local5 >= -1)) && (_local6 <= nPoleHeight)) && (_local5 <= nPoleWidth))) {
break;
}
engine.GamePlayEngine.getInstance().addObstacle(_local3);
}
aTiles[_local9][_local4] = _local3;
_local4--;
}
_local9++;
}
_local9 = 0;
while (_local9 < _local10.length) {
_local10[_local9].swapDepths(mcGameFieldTiles.getNextHighestDepth());
_local9++;
}
}
function createDecors(aMap) {
aDecorTiles = new Array();
var _local3 = 0;
while (_local3 < aMap.length) {
var _local4 = aMap[_local3].type;
var _local7 = aMap[_local3].i;
var _local6 = aMap[_local3].j;
var _local2 = null;
_local2 = mcGameFieldDecoration.attachMovie("mcDecor", "mcDecor" + _local3, mcGameFieldDecoration.getNextHighestDepth());
_local2.gotoAndStop(_local4);
_local2._x = (_local6 * nTileWidth) + (nTileWidth / 2);
_local2._y = (_local7 * nTileWidth) + (nTileWidth / 2);
if ((_local4 == 1) || (_local4 == 2)) {
setOccupationType(_local7, _local6, gameField.tiles.Tile.NOT_PASS_OBST_OCCUPIED);
engine.GamePlayEngine.getInstance().addObstacle(_local2);
}
aDecorTiles.push(_local2);
_local3++;
}
}
function scanLevelMap(aMap) {
var _local3 = 0;
while (_local3 < aMap.length) {
var _local2 = aMap[_local3].length - 1;
while (_local2 >= 0) {
if ((aMap[_local3][_local2] != gameLevels.LevelsMap.EMPTY_TILE) && (aMap[_local3][_local2] != gameLevels.LevelsMap.CHECKED_TILE)) {
checkTile(_local3, _local2, aMap);
}
_local2--;
}
_local3++;
}
}
function checkTile(i, j, aMap) {
var _local5 = aMap[i][j];
if ((((aMap[i][j] > 0) && (aMap[i + 1][j] > 0)) && (aMap[i + 1][j - 1] > 0)) && (aMap[i][j - 1] > 0)) {
if (((_local5 >= gameLevels.LevelsMap.SIMPLE_BLOCK_TILE) && (_local5 <= gameLevels.LevelsMap.TREE_HIT_WANTED_TILE)) || (_local5 == gameLevels.LevelsMap.UNBREAKABLE_TILE)) {
buildBlock(i, j, aMap);
}
}
}
function buildBlock(i, j, aMap) {
var _local6 = i / 2;
var _local5 = (j - 1) / 2;
var _local12 = {_x:_local5 * nTileWidth, _y:_local6 * nTileWidth};
var _local3 = curLevel.getHeadquertersBlocksCoors();
var _local4 = mcGameFieldElements.attachMovie("mcBlock", (("mcBlock" + i) + "") + j, mcGameFieldElements.getNextHighestDepth(), _local12);
var _local11 = aMap[i][j];
var _local10;
var _local2;
_local4.setIJ({i:_local6, j:_local5});
if ((_local11 >= gameLevels.LevelsMap.WANTED_TILE) && (_local11 <= gameLevels.LevelsMap.TREE_HIT_WANTED_TILE)) {
setOccupationType(_local6, _local5, gameField.tiles.Tile.WANTED_BRICK_OCCUPIED);
_local10 = 4;
} else {
setOccupationType(_local6, _local5, gameField.tiles.Tile.BRICK_OCCUPIED);
_local10 = 0;
}
if (_local11 == gameLevels.LevelsMap.UNBREAKABLE_TILE) {
_local4.setType(gameField.elements.blocks.Block.UNBREAKABLE_BLOCK);
} else {
_local4.setHitsForBrick(gameField.elements.blocks.Block.UP_LEFT_BRICK, aMap[i][j - 1] - _local10);
_local4.setHitsForBrick(gameField.elements.blocks.Block.DOWN_LEFT_BRICK, aMap[i + 1][j - 1] - _local10);
_local4.setHitsForBrick(gameField.elements.blocks.Block.UP_RIGHT_BRICK, aMap[i][j] - _local10);
_local4.setHitsForBrick(gameField.elements.blocks.Block.DOWN_RIGHT_BRICK, aMap[i + 1][j] - _local10);
}
aMap[i][j] = aMap[i][j] * -1;
aMap[i][j - 1] = aMap[i][j - 1] * -1;
aMap[i + 1][j] = aMap[i + 1][j] * -1;
aMap[i + 1][j - 1] = aMap[i + 1][j - 1] * -1;
_local2 = 0;
while (_local2 < _local3.length) {
if ((_local6 == _local3[_local2].i) && (_local5 == _local3[_local2].j)) {
aHeadquartersBricks.push(_local4);
break;
}
_local2++;
}
aBricks.push(_local4);
aBrickTiles[_local6][_local5] = _local4;
engine.GamePlayEngine.getInstance().addBlock(_local4);
}
function buildHeadquarters(Void) {
var _local2 = curLevel.getHeadquartersCoors();
if (_local2 == null) {
mcHeadquarters = null;
return(undefined);
}
var _local3 = {_x:(_local2.j * nTileWidth) + (nTileWidth / 2), _y:(_local2.i * nTileWidth) + (nTileWidth / 2)};
mcHeadquarters = gameField.elements.headquarters.Headquarters(mcGameFieldElements.attachMovie("mcHeadquarters", "mcHQ", mcGameFieldElements.getNextHighestDepth(), _local3));
mcHeadquarters.setIJ({i:_local2.i, j:_local2.j});
objHeadquarters = {i:_local2.i, j:_local2.j};
setOccupationType(_local2.i, _local2.j, gameField.tiles.Tile.HEADQUARTERS_OCCUPIED);
aBrickTiles[_local2.i][_local2.j] = mcHeadquarters;
engine.GamePlayEngine.getInstance().addHeadquarters(mcHeadquarters);
}
function buildRespawn(Void) {
var _local4;
var _local6;
var _local2;
var _local3;
var _local5 = curLevel.getRespawnCoors();
_local4 = 0;
while (_local4 < _local5.length) {
_local2 = _local5[_local4];
_local3 = mcGameFieldElements.attachMovie("mcRespawn", ("mcRespawn" + _local2.i) + _local2.j, mcGameFieldElements.getNextHighestDepth());
_local3._x = (_local2.j * nTileWidth) + (nTileWidth / 2);
_local3._y = (_local2.i * nTileWidth) - (nTileWidth / 2);
aRespawn.push(_local3);
aBrickTiles[_local2.i][_local2.j] = _local3;
_local4++;
}
}
function revertMap(aMap) {
var _local2;
var _local1;
_local2 = 0;
while (_local2 < aMap.length) {
_local1 = 0;
while (_local1 < aMap[_local2].length) {
if (aMap[_local2][_local1] < 0) {
aMap[_local2][_local1] = aMap[_local2][_local1] * -1;
}
_local1++;
}
_local2++;
}
}
function getGameFieldForEnemyTanks(Void) {
return(mcEnemyTankField);
}
function getGameFieldForPlayerTanks(Void) {
return(mcPlayerTankField);
}
function getGameFieldForBonuses(Void) {
return(mcGameBonuses);
}
function getFieldForBullet(Void) {
return(mcBulletField);
}
function getEnemiesToCreate(Void) {
return(curLevel.getEnemyTanks());
}
function getRespawnCoors(Void) {
return(curLevel.getRespawnCoors());
}
function getPlayerRespawnCoors(Void) {
return(curLevel.getPlayerRespawnCoors());
}
function getPoleWidth(Void) {
return(nPoleWidth);
}
function getPoleHeight(Void) {
return(nPoleHeight);
}
function getTileCoors(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
return({x:aTiles[nI][nJ]._x, y:aTiles[nI][nJ]._y});
}
function getOccupationType(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
var _local2 = aTiles[nI][nJ].getOccupied();
return(_local2);
}
function addTankToTile(nI, nJ, tank) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
aTiles[nI][nJ].addTank(tank);
}
function removeTankFromTile(nI, nJ, tank) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
aTiles[nI][nJ].removeTank(tank);
}
function isTileFree(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
return(aTiles[nI][nJ].isTileFree());
}
function setOccupationType(nI, nJ, nOccupationType) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
aTiles[nI][nJ].setOccupied(nOccupationType);
}
function getHeadquartersCoors() {
return(objHeadquarters);
}
function isFreeForEnemyTank(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
var _local2 = aTiles[nI][nJ].getOccupied();
if ((_local2 == gameField.tiles.Tile.FREE_TILE) || (_local2 == gameField.tiles.Tile.ENEMY_TANK_OCCUPIED)) {
return("free");
}
if (_local2 == gameField.tiles.Tile.WANTED_BRICK_OCCUPIED) {
return("wanted");
}
if (_local2 == gameField.tiles.Tile.HEADQUARTERS_OCCUPIED) {
return("hq");
}
return("occupied");
}
function isFreeForPlayerTank(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
var _local2 = aTiles[nI][nJ].getOccupied();
if (_local2 == gameField.tiles.Tile.FREE_TILE) {
return(true);
}
return(false);
}
function isFreeForBonus(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
var _local5 = aTiles[nI][nJ].getOccupied();
var _local4 = aTiles[nI][nJ].getBonusHere();
if ((_local5 == gameField.tiles.Tile.FREE_TILE) && (!_local4)) {
return(true);
}
return(false);
}
function setBonusOnTile(nI, nJ, bBonus, mcBonusClip) {
if (bBonus) {
mcBonusClip._x = nJ * nTileWidth;
mcBonusClip._y = nI * nTileWidth;
mcBonusClip._visible = true;
aBonuses.push(mcBonusClip);
}
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
aTiles[nI][nJ].setBonusHere(bBonus, mcBonusClip);
}
function isBonusTile(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
return(aTiles[nI][nJ].getBonusHere());
}
function getTileBonusClip(nI, nJ) {
nI = nI + nPoleAdd;
nJ = nJ + nPoleAdd;
return(aTiles[nI][nJ].getBonusClip());
}
function checkForWantedBlock(nIStart, nJStart, nDirection) {
nIStart = nIStart + nPoleAdd;
nJStart = nJStart + nPoleAdd;
var _local8 = vehicles.tanks.AbstractTank.aDirectionsArray[nDirection].i;
var _local9 = vehicles.tanks.AbstractTank.aDirectionsArray[nDirection].j;
var _local5 = 0;
while (_local5 < 10) {
nIStart = nIStart + _local8;
nJStart = nJStart + _local9;
var _local2 = aTiles[nIStart][nJStart].getOccupied();
if ((((_local2 != gameField.tiles.Tile.WANTED_BRICK_OCCUPIED) && (_local2 != gameField.tiles.Tile.FREE_TILE)) && (_local2 != gameField.tiles.Tile.PASS_OBST_OCCUPIED)) || (aTiles[nIStart][nJStart] == null)) {
return(null);
}
if (_local2 == gameField.tiles.Tile.WANTED_BRICK_OCCUPIED) {
return({x:aTiles[nIStart][nJStart]._x, y:aTiles[nIStart][nJStart]._y});
}
_local5++;
}
}
function checkForPlayerTankOrHeadquarters(nIStart, nJStart, nDirection) {
nIStart = nIStart + nPoleAdd;
nJStart = nJStart + nPoleAdd;
var _local8 = vehicles.tanks.AbstractTank.aDirectionsArray[nDirection].i;
var _local9 = vehicles.tanks.AbstractTank.aDirectionsArray[nDirection].j;
var _local5 = 0;
while (_local5 < 10) {
nIStart = nIStart + _local8;
nJStart = nJStart + _local9;
var _local2 = aTiles[nIStart][nJStart].getOccupied();
if (((((_local2 != gameField.tiles.Tile.PLAYER_TANK_OCCUPIED) && (_local2 != gameField.tiles.Tile.HEADQUARTERS_OCCUPIED)) && (_local2 != gameField.tiles.Tile.FREE_TILE)) && (_local2 != gameField.tiles.Tile.PASS_OBST_OCCUPIED)) || (aTiles[nIStart][nJStart] == null)) {
return(null);
}
if ((_local2 == gameField.tiles.Tile.PLAYER_TANK_OCCUPIED) || (_local2 == gameField.tiles.Tile.HEADQUARTERS_OCCUPIED)) {
return({x:aTiles[nIStart][nJStart]._x, y:aTiles[nIStart][nJStart]._y});
}
_local5++;
}
return(null);
}
function clearPole(Void) {
var _local2;
var _local3;
_x = 0;
_y = 0;
_local2 = 0;
while (_local2 < aBricks.length) {
aBricks[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aRespawn.length) {
aRespawn[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aBonuses.length) {
aBonuses[_local2].removeMovieClip();
_local2++;
}
_local2 = 0;
while (_local2 < aTiles.length) {
_local3 = 0;
while (_local3 < aTiles[_local2].length) {
aTiles[_local2][_local3].removeTile();
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < aDecorTiles.length) {
aDecorTiles[_local2].removeMovieClip();
_local2++;
}
}
function updatePauseState() {
if (engine.GamePlayEngine.getInstance().isPaused && (mcPause == null)) {
mcPause = _root.attachMovie("pause", "mcPause", _root.getNextHighestDepth());
mcPause.mcBlock.useHandCursor = false;
mcPause.mcBlock.onPress = gdp.utils.Delegate.create(this, unPause);
_root.stop();
} else if ((!engine.GamePlayEngine.getInstance().isPaused) && (mcPause != null)) {
unPause();
}
}
function unPause() {
mcPause.removeMovieClip();
mcPause = null;
vehicles.tanks.player.Player.getInstance().resetShootTime();
_root.play();
engine.GamePlayEngine.getInstance().isPaused = false;
}
var nTileWidth = 36;
var nPoleAdd = 2;
}
Symbol 963 MovieClip [__Packages.gdp.utils.math.helpers.Point] Frame 0
class gdp.utils.math.helpers.Point extends gdp.core.base.BaseClass
{
var nX, nY;
function Point (nX, nY) {
super();
this.nX = nX;
this.nY = nY;
}
function clone() {
return(new gdp.utils.math.helpers.Point(nX, nY));
}
function isEqual(other) {
return((nX == other.nX) && (nY == other.nY));
}
function description() {
return(((("Point (nX:" + nX) + ", nY:") + nY) + ")");
}
static function sum(point1, point2) {
return(new gdp.utils.math.helpers.Point(point2.nX + point1.nX, point2.nY + point1.nY));
}
static function subtract(point1, point2) {
return(new gdp.utils.math.helpers.Point(point2.nX - point1.nX, point2.nY - point1.nY));
}
static var ZeroPoint = new gdp.utils.math.helpers.Point(0, 0);
}
Symbol 964 MovieClip [__Packages.gdp.ui.effects.tween.Tween] Frame 0
class gdp.ui.effects.tween.Tween extends gdp.core.base.BaseClass
{
var nA, dispatchEvent;
function Tween (mcObject, pntStart, pntEnd, nSpeed, nAcc) {
super();
this.mcObject = mcObject;
this.pntStart = pntStart;
this.pntEnd = pntEnd;
this.nSpeed = nSpeed;
this.nAcc = (((nAcc == null) || (nAcc == 0)) ? 1 : (nAcc));
pntLocation = pntStart.clone();
init();
}
function init(Void) {
var _local2 = pntEnd.nX - pntStart.nX;
var _local4 = pntEnd.nY - pntStart.nY;
var _local3 = Math.sqrt((_local2 * _local2) + (_local4 * _local4));
var _local6 = _local3 / Math.floor(_local3 / nSpeed);
var _local5 = (_local2 / _local3) * _local6;
var _local7 = (_local4 / _local3) * _local6;
nCount = _local2 / _local5;
pntVelocity = new gdp.utils.math.helpers.Point(_local5, _local7);
nA = 0;
}
function psTween(Void) {
nA++;
if (mcObject == null) {
return(0);
}
if (mcObject._name == undefined) {
return(0);
}
if ((Math.abs(pntLocation.nX - pntEnd.nX) <= Math.abs(pntVelocity.nX)) && (Math.abs(pntLocation.nY - pntEnd.nY) <= Math.abs(pntVelocity.nY))) {
return(end());
}
pntLocation = gdp.utils.math.helpers.Point.sum(pntLocation, pntVelocity);
mcObject._x = pntLocation.nX;
mcObject._y = pntLocation.nY;
dispatchEvent(new gdp.ui.effects.EffectEvent(gdp.ui.effects.EffectEvent.MOVE, null, null, mcObject));
pntVelocity.nX = pntVelocity.nX * nAcc;
pntVelocity.nY = pntVelocity.nY * nAcc;
}
function end(Void) {
bRun = false;
mcObject._x = pntEnd.nX;
mcObject._y = pntEnd.nY;
dispatchEvent(new gdp.ui.effects.EffectEvent(gdp.ui.effects.EffectEvent.END, null, null, mcObject));
onEnd();
return(0);
}
function run(Void) {
if (bRun) {
return(undefined);
}
bRun = true;
mcObject._x = pntStart.nX;
mcObject._y = pntStart.nY;
process = new gdp.core.process.Process(gdp.utils.Delegate.create(this, psTween));
gdp.core.process.ProcessManager.getInstance().addProcess(process);
}
function stop(Void) {
gdp.core.process.ProcessManager.getInstance().removeProcess(process);
dispatchEvent(new gdp.ui.effects.EffectEvent(gdp.ui.effects.EffectEvent.STOP, null, null, mcObject));
bRun = false;
}
var mcObject = null;
var pntStart = null;
var pntEnd = null;
var pntVelocity = null;
var pntLocation = null;
var nSpeed = null;
var nAcc = null;
var process = null;
var bRun = false;
var onEnd = null;
var nCount = null;
}
Symbol 965 MovieClip [__Packages.gdp.ui.effects.EffectEvent] Frame 0
class gdp.ui.effects.EffectEvent extends gdp.env.events.Event
{
function EffectEvent (sType, bBubbles, bCancelable, mcObject) {
super(sType, bBubbles, bCancelable);
this.mcObject = mcObject;
}
function getMovieClip(Void) {
return(mcObject);
}
static var END = "effect_end";
static var STOP = "effect_stop";
static var MOVE = "effect_move";
var mcObject = null;
}
Symbol 966 MovieClip [__Packages.gameField.elements.base.FieldElementInterface] Frame 0
interface gameField.elements.base.FieldElementInterface
{
}
Symbol 967 MovieClip [__Packages.gameField.elements.base.AbstractFieldElement] Frame 0
class gameField.elements.base.AbstractFieldElement extends gdp.core.base.BaseMovieClip implements gameField.elements.base.FieldElementInterface
{
function AbstractFieldElement () {
super();
}
function onHit(Void) {
}
function setIJ(objCoors) {
}
function onDestroy(Void) {
}
function getIJ(Void) {
return(null);
}
}
Symbol 968 MovieClip [__Packages.gameField.elements.headquarters.Headquarters] Frame 0
class gameField.elements.headquarters.Headquarters extends gameField.elements.base.AbstractFieldElement
{
var nLife, nArmour, bDestoryed, mcLifeLine, nI, nJ, mcHit, prcShowLineLife, nActiveTime;
function Headquarters (Void) {
super();
nLife = 100;
nArmour = 1;
bDestoryed = false;
mcLifeLine._visible = false;
}
function setIJ(objCoors) {
nI = objCoors.i;
nJ = objCoors.j;
}
function onHit(mcShell) {
var _local2 = mcShell.getHitZone();
var _local3;
if (mcHit.hitTest(_local2)) {
_local3 = mcShell.getShellPower() / nArmour;
nLife = nLife - (_local3 / nArmour);
if (nLife <= 0) {
onDestroy();
} else {
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
nActiveTime = gdp.core.time.FrameTimer.getInstance().getTime();
gdp.core.process.ProcessManager.getInstance().addProcess(prcShowLineLife);
mcLifeLine.gotoAndStop(100 - nLife);
mcLifeLine._visible = true;
}
return(true);
}
return(false);
}
function onDestroy(Void) {
bDestoryed = true;
}
function isDestroyed(Void) {
return(bDestoryed);
}
function showLifeLine(Void) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nActiveTime) >= nShowLifeLineTime) {
mcLifeLine._visible = false;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
}
}
var nShowLifeLineTime = 3000;
}
Symbol 969 MovieClip [__Packages.elements.Shell] Frame 0
class elements.Shell extends gdp.core.base.BaseMovieClip
{
var path, nVx, nVy, nPower, _x, _y, mcHitZone;
function Shell (Void) {
super();
path = 0;
}
function setShellSpeed(objSpeed) {
nVx = objSpeed.x;
nVy = objSpeed.y;
}
function setShellPower(nToSet) {
nPower = nToSet;
}
function getShellPower(Void) {
return(nPower);
}
function moveShell(Void) {
if (isRocket) {
if ((trailID % 5) == 0) {
gameField.GameField.getInstance().makeRocketTrail(_x, _y);
}
trailID++;
}
_x = _x + nVx;
_y = _y + nVy;
path = path + Math.sqrt((nVx * nVx) + (nVy * nVy));
}
function getPath() {
return(path);
}
function getHitZone(Void) {
return(mcHitZone);
}
static var SIMPLE_SHELL_SPEED = 10;
static var ROCKET_SHELL_SPEED = 7;
var isRocket = false;
var trailID = 0;
}
Symbol 970 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 971 MovieClip [__Packages.gameLevels.ILevel] Frame 0
interface gameLevels.ILevel
{
}
Symbol 972 MovieClip [__Packages.gameLevels.LevelsMap] Frame 0
class gameLevels.LevelsMap
{
static var nLevelsCount, instance;
var aAllLevels;
function LevelsMap (Void) {
aAllLevels = new Array();
aAllLevels.push(gameLevels.levels.Level1.getInstance());
aAllLevels.push(gameLevels.levels.Level2.getInstance());
aAllLevels.push(gameLevels.levels.Level3.getInstance());
aAllLevels.push(gameLevels.levels.Level4.getInstance());
aAllLevels.push(gameLevels.levels.Level5.getInstance());
aAllLevels.push(gameLevels.levels.Level6.getInstance());
aAllLevels.push(gameLevels.levels.Level7.getInstance());
aAllLevels.push(gameLevels.levels.Level8.getInstance());
aAllLevels.push(gameLevels.levels.Level9.getInstance());
aAllLevels.push(gameLevels.levels.Level10.getInstance());
aAllLevels.push(gameLevels.levels.Level11.getInstance());
aAllLevels.push(gameLevels.levels.Level12.getInstance());
aAllLevels.push(gameLevels.levels.Level13.getInstance());
aAllLevels.push(gameLevels.levels.Level14.getInstance());
aAllLevels.push(gameLevels.levels.Level15.getInstance());
nLevelsCount = aAllLevels.length;
}
static function getInstance(Void) {
if (instance == null) {
instance = new gameLevels.LevelsMap();
}
return(instance);
}
function getCurrentLevel(nLevelNumber) {
return(aAllLevels[nLevelNumber - 1]);
}
static var CHECKED_TILE = -1;
static var EMPTY_TILE = 0;
static var SIMPLE_BLOCK_TILE = 1;
static var ONE_HIT_BLOCK_TILE = 2;
static var TWO_HIT_BLOCK_TILE = 3;
static var TREE_HIT_BLOCK_TILE = 4;
static var WANTED_TILE = 5;
static var ONE_HIT_WANTED_TILE = 6;
static var TWO_HIT_WANTED_TILE = 7;
static var TREE_HIT_WANTED_TILE = 8;
static var UNBREAKABLE_TILE = 9;
}
Symbol 973 MovieClip [__Packages.gameLevels.levels.Level1] Frame 0
class gameLevels.levels.Level1 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level1 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:9, type:13});
aDecors.push({i:9, j:7, type:13});
aDecors.push({i:9, j:10, type:4});
aDecors.push({i:9, j:1, type:4});
aDecors.push({i:3, j:-1, type:13});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:9});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:4});
aRespawnCoors.push({i:0, j:8});
objPlayerRespawnCoors = {i:8, j:3};
objHeadquartersCoors = {i:8, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.5});
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.5});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:7, j:6});
aHeadquartersBlocks.push({i:7, j:5});
aHeadquartersBlocks.push({i:7, j:4});
aHeadquartersBlocks.push({i:8, j:4});
aHeadquartersBlocks.push({i:8, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level1();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 9, 9, 1, 1, 9, 9, 5, 5, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 9, 9, 1, 1, 9, 9, 5, 5, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 1, 1, 0, 0, 0, 0]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2], [2, 28, 1, 69, 67, 1, 1, 1, 1, 1, 69, 67, 1, 31, 26], [2, 28, 1, 69, 63, 68, 68, 68, 68, 68, 64, 67, 1, 24, 20], [2, 28, 1, 73, 70, 70, 70, 70, 70, 65, 75, 67, 1, 23, 2], [2, 28, 1, 1, 1, 74, 71, 1, 1, 69, 75, 67, 1, 23, 2], [26, 32, 1, 1, 1, 73, 72, 74, 68, 64, 75, 63, 71, 19, 18], [20, 20, 21, 1, 1, 1, 1, 73, 70, 70, 65, 75, 67, 30, 33], [18, 18, 25, 1, 1, 1, 1, 1, 1, 1, 73, 70, 72, 27, 2], [33, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 974 MovieClip [__Packages.vehicles.VehicleInterface] Frame 0
interface vehicles.VehicleInterface
{
}
Symbol 975 MovieClip [__Packages.vehicles.tanks.TankInterface] Frame 0
interface vehicles.tanks.TankInterface extends vehicles.VehicleInterface
{
}
Symbol 976 MovieClip [__Packages.vehicles.tanks.AbstractTank] Frame 0
class vehicles.tanks.AbstractTank extends gdp.core.base.BaseMovieClip implements vehicles.tanks.TankInterface
{
function AbstractTank () {
super();
}
function shoot(Void) {
}
function moveVehicle(nX, nY) {
}
function destroyVehicle(Void) {
}
function hit(Void) {
}
static var DIRECTION_DOWN = 1;
static var DIRECTION_UP = 2;
static var DIRECTION_LEFT = 3;
static var DIRECTION_RIGHT = 4;
static var MOVING_SPEED = 3;
static var EASY_SPEED = 3;
static var NORMAL_SPEED = 2.5;
static var HARD_SPEED = 2;
static var HUNTER_TANK = 0;
static var CRUSHER_TANK = 1;
static var HUNTER_CRUSHER_TANK = 2;
static var EASY_TANK = 0;
static var NORMAL_TANK = 1;
static var HARD_TANK = 2;
static var EASY_TANK_HUNTER = 3;
static var EASY_TANK_CRUSHER = 4;
static var NORMAL_TANK_HUNTER = 5;
static var NORMAL_TANK_CRUSHER = 6;
static var HARD_TANK_HUNTER = 7;
static var HARD_TANK_CRUSHER = 8;
static var EASY_TANK_HUNTER_CRUSHER = 9;
static var NORMAL_TANK_HUNTER_CRUSHER = 10;
static var HARD_TANK_HUNTER_CRUSHER = 11;
var nShowLifeLineTime = 1000;
static var aDirectionsArray = [null, {i:1, j:0}, {i:-1, j:0}, {i:0, j:-1}, {i:0, j:1}];
static var aAnglesArray = [null, 90, 270, 180, 0];
}
Symbol 977 MovieClip [__Packages.factories.bonuses.BonusFactory] Frame 0
class factories.bonuses.BonusFactory
{
static var mcParent, instance;
var aBonuses;
function BonusFactory (Void) {
}
static function getInstance(parent) {
if (parent != null) {
mcParent = parent;
}
if (instance == null) {
instance = new factories.bonuses.BonusFactory();
}
return(instance);
}
function initLevelParams(Void) {
var _local3 = core.Game.getInstance().getCurLevel();
var _local2 = gameLevels.LevelsMap.getInstance().getCurrentLevel(_local3);
aBonuses = new Array();
aBonuses = _local2.getBonusTypes();
}
function createBonus(Void) {
var _local2;
var _local3;
var _local4;
var _local6;
var _local5 = Math.random();
_local3 = 0;
_local2 = 0;
while (_local2 < aBonuses.length) {
_local3 = _local3 + aBonuses[_local2].nPercent;
if (_local5 <= _local3) {
_local4 = aBonuses[_local2];
break;
}
_local2++;
}
_local6 = mcParent.attachMovie("bonus", "bonus", mcParent.getNextHighestDepth());
_local6.gotoAndStop(_local4.nId);
_local6._visible = false;
return(_local6);
}
function isBonuses(Void) {
return(aBonuses.length != 0);
}
static var BONUS_TIME = 10;
static var SCORE_BONUS = 10;
static var BOMB = 1;
static var BULLETS = 2;
static var SPADE = 3;
static var SHIELD = 4;
static var CLOCK = 5;
static var LOCK = 6;
static var STAR = 7;
static var MINE = 8;
static var MEDIKIT = 9;
static var BOX = 10;
static var BOMB_DAMAGE = 20;
}
Symbol 978 MovieClip [__Packages.gameLevels.levels.Level2] Frame 0
class gameLevels.levels.Level2 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level2 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:6, type:4});
aDecors.push({i:-1, j:8, type:13});
aDecors.push({i:1, j:11, type:4});
aDecors.push({i:6, j:11, type:13});
aDecors.push({i:13, j:10, type:4});
aDecors.push({i:13, j:7, type:13});
aDecors.push({i:9, j:-1, type:13});
aDecors.push({i:2, j:-1, type:13});
aDecors.push({i:2, j:5, type:1});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:2});
aRespawnCoors.push({i:0, j:7});
aRespawnCoors.push({i:0, j:9});
objPlayerRespawnCoors = {i:12, j:3};
objHeadquartersCoors = {i:12, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.4});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:11, j:6});
aHeadquartersBlocks.push({i:11, j:5});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:12, j:4});
aHeadquartersBlocks.push({i:12, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level2();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [5, 5, 0, 0, 1, 1, 1, 1, 5, 5, 0, 0, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0], [5, 5, 0, 0, 1, 1, 1, 1, 5, 5, 0, 0, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0]];
var aTilesMap = [[2, 2, 2, 2, 2, 26, 26, 26, 26, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 32, 24, 21, 31, 26, 26, 26, 26, 26, 2], [2, 28, 1, 1, 1, 1, 19, 25, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 74, 68, 71, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 69, 75, 67, 1, 24, 21, 1, 27, 2], [2, 28, 12, 5, 14, 1, 73, 70, 72, 1, 19, 25, 1, 27, 2], [2, 28, 8, 3, 7, 1, 1, 1, 1, 1, 1, 74, 68, 27, 2], [2, 28, 13, 10, 15, 1, 1, 1, 1, 1, 1, 69, 75, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 70, 27, 2], [2, 28, 74, 71, 1, 1, 1, 1, 1, 74, 68, 71, 1, 27, 2], [2, 28, 69, 67, 1, 1, 1, 1, 1, 69, 75, 67, 1, 27, 2], [2, 28, 73, 72, 1, 1, 1, 1, 1, 69, 75, 67, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 73, 70, 72, 1, 27, 2], [33, 33, 33, 29, 24, 21, 30, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 28, 23, 22, 27, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 979 MovieClip [__Packages.gameLevels.levels.Level3] Frame 0
class gameLevels.levels.Level3 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level3 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:4, type:13});
aDecors.push({i:6, j:11, type:4});
aDecors.push({i:12, j:10, type:13});
aDecors.push({i:12, j:4, type:4});
aDecors.push({i:12, j:1, type:13});
aDecors.push({i:9, j:-1, type:4});
aDecors.push({i:2, j:8, type:14});
aDecors.push({i:2, j:8, type:13});
aDecors.push({i:10, j:5, type:1});
aDecors.push({i:8, j:6, type:13});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:2});
aRespawnCoors.push({i:0, j:7});
aRespawnCoors.push({i:0, j:9});
objPlayerRespawnCoors = {i:11, j:4};
objHeadquartersCoors = {i:7, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.5});
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.5});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:6, j:6});
aHeadquartersBlocks.push({i:6, j:5});
aHeadquartersBlocks.push({i:6, j:4});
aHeadquartersBlocks.push({i:7, j:4});
aHeadquartersBlocks.push({i:7, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level3();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 5, 5, 1, 1, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 5, 5, 1, 1, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 5, 5, 9, 9, 9, 9, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 5, 5, 0, 0], [0, 0, 5, 5, 9, 9, 9, 9, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 5, 5, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0], [1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 1, 1], [1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 1, 1], [0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0], [0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0], [0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 2, 26, 26, 26, 26, 26, 26, 26, 2], [2, 28, 1, 1, 1, 1, 31, 32, 1, 1, 1, 1, 1, 27, 2], [2, 28, 68, 68, 68, 71, 1, 1, 1, 30, 29, 1, 1, 27, 2], [2, 28, 70, 65, 75, 67, 1, 1, 1, 31, 32, 1, 1, 27, 2], [2, 28, 1, 69, 75, 67, 1, 1, 1, 1, 1, 1, 1, 31, 26], [2, 28, 1, 73, 70, 72, 1, 1, 1, 1, 1, 1, 1, 24, 20], [2, 28, 1, 1, 1, 74, 68, 68, 68, 71, 1, 1, 74, 19, 18], [2, 28, 1, 1, 1, 69, 75, 75, 75, 67, 1, 1, 69, 30, 33], [2, 28, 74, 71, 1, 69, 75, 75, 75, 67, 1, 1, 73, 27, 2], [2, 28, 69, 67, 1, 69, 36, 37, 38, 67, 1, 1, 1, 27, 2], [2, 28, 73, 72, 1, 73, 70, 70, 70, 72, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 980 MovieClip [__Packages.gameLevels.levels.Level4] Frame 0
class gameLevels.levels.Level4 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level4 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:10, type:4});
aDecors.push({i:1, j:11, type:13});
aDecors.push({i:3, j:11, type:4});
aDecors.push({i:7, j:11, type:4});
aDecors.push({i:9, j:11, type:13});
aDecors.push({i:14, j:8, type:13});
aDecors.push({i:14, j:5, type:4});
aDecors.push({i:0, j:-1, type:13});
aDecors.push({i:4, j:4, type:1});
aDecors.push({i:5, j:5, type:1});
aDecors.push({i:6, j:9, type:1});
aDecors.push({i:8, j:4, type:1});
aDecors.push({i:6, j:7, type:2});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:5});
aRespawnCoors.push({i:0, j:9});
objPlayerRespawnCoors = {i:13, j:3};
objHeadquartersCoors = {i:13, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.4});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:12, j:6});
aHeadquartersBlocks.push({i:12, j:5});
aHeadquartersBlocks.push({i:12, j:4});
aHeadquartersBlocks.push({i:13, j:4});
aHeadquartersBlocks.push({i:13, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level4();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2], [0, 0, 1, 1, 6, 6, 6, 6, 5, 5, 1, 1, 1, 1, 0, 0, 1, 1, 2, 2, 0, 0], [0, 0, 1, 1, 6, 6, 6, 6, 5, 5, 1, 1, 1, 1, 0, 0, 1, 1, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5], [0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 6, 6, 6, 6, 1, 1, 5, 5], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 6, 6, 6, 6, 1, 1, 5, 5], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1], [0, 0, 0, 0, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1], [0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0], [1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 6, 6, 0, 0, 0, 0], [1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 6, 6, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 1, 1, 0, 0, 1, 1]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 74, 71, 1, 1, 1, 1, 74, 71, 1, 1, 1, 27, 2], [2, 28, 73, 72, 1, 1, 1, 1, 73, 72, 1, 1, 1, 27, 2], [2, 28, 1, 74, 71, 1, 12, 5, 5, 5, 5, 5, 14, 27, 2], [2, 28, 1, 73, 72, 1, 8, 3, 3, 3, 3, 3, 7, 27, 2], [2, 28, 1, 1, 1, 1, 13, 10, 10, 10, 11, 3, 7, 27, 2], [2, 28, 29, 1, 1, 1, 1, 1, 1, 1, 13, 10, 15, 27, 2], [2, 28, 28, 12, 5, 5, 14, 1, 1, 1, 1, 1, 74, 27, 2], [2, 28, 32, 8, 3, 3, 7, 74, 68, 68, 71, 1, 69, 27, 2], [2, 28, 1, 13, 10, 10, 15, 69, 75, 75, 63, 68, 64, 27, 2], [2, 28, 71, 74, 71, 1, 1, 73, 70, 65, 75, 66, 70, 27, 2], [2, 28, 67, 73, 72, 1, 1, 1, 1, 73, 70, 72, 74, 27, 2], [2, 28, 67, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 27, 2], [2, 28, 63, 71, 1, 1, 1, 1, 1, 1, 1, 1, 69, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 981 MovieClip [__Packages.gameLevels.levels.Level5] Frame 0
class gameLevels.levels.Level5 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level5 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:3, type:13});
aDecors.push({i:0, j:11, type:4});
aDecors.push({i:3, j:11, type:7});
aDecors.push({i:8, j:11, type:4});
aDecors.push({i:12, j:10, type:4});
aDecors.push({i:12, j:1, type:13});
aDecors.push({i:5, j:-1, type:13});
aDecors.push({i:2, j:6, type:13});
aDecors.push({i:2, j:8, type:14});
aDecors.push({i:7, j:6, type:1});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:6});
aRespawnCoors.push({i:0, j:9});
aRespawnCoors.push({i:4, j:7});
objPlayerRespawnCoors = {i:11, j:2};
objHeadquartersCoors = {i:11, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.5});
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.5});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:10, j:6});
aHeadquartersBlocks.push({i:10, j:5});
aHeadquartersBlocks.push({i:10, j:4});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:11, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level5();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 7, 7, 6, 6, 7, 7, 6, 6, 7, 7, 6, 6, 7, 7, 0, 0, 1, 1], [1, 1, 0, 0, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0, 0, 1, 1], [1, 1, 0, 0, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 0, 0, 0, 0], [1, 1, 0, 0, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 6, 6, 5, 5, 0, 0, 5, 5, 6, 6, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 6, 6, 5, 5, 0, 0, 5, 5, 6, 6, 0, 0, 0, 0, 1, 1]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2], [26, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [24, 20, 21, 74, 68, 68, 71, 1, 30, 33, 29, 1, 1, 27, 2], [19, 18, 25, 73, 70, 70, 72, 1, 27, 2, 28, 1, 1, 27, 2], [33, 29, 12, 5, 5, 5, 5, 14, 31, 26, 32, 1, 1, 27, 2], [2, 28, 8, 3, 34, 3, 3, 4, 5, 5, 5, 5, 14, 31, 26], [2, 28, 8, 3, 9, 11, 3, 3, 3, 3, 3, 3, 7, 24, 20], [2, 28, 8, 3, 4, 6, 3, 9, 10, 10, 10, 10, 15, 19, 18], [2, 28, 8, 3, 3, 34, 3, 7, 1, 1, 1, 1, 1, 30, 33], [2, 28, 13, 10, 10, 10, 10, 15, 74, 68, 68, 71, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 69, 75, 75, 67, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 74, 64, 75, 75, 67, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 73, 70, 70, 70, 72, 1, 27, 2], [33, 33, 33, 33, 33, 29, 24, 20, 21, 30, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 28, 23, 2, 22, 27, 2, 2, 2, 2, 2]];
}
Symbol 982 MovieClip [__Packages.gameLevels.levels.Level6] Frame 0
class gameLevels.levels.Level6 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level6 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:2, type:12});
aDecors.push({i:-1, j:6, type:3});
aDecors.push({i:0, j:10, type:1});
aDecors.push({i:6, j:11, type:1});
aDecors.push({i:8, j:11, type:12});
aDecors.push({i:13, j:4, type:12});
aDecors.push({i:8, j:-1, type:6});
aDecors.push({i:5, j:-1, type:12});
aDecors.push({i:7, j:-1, type:15});
aDecors.push({i:0, j:-1, type:6});
aDecors.push({i:6, j:2, type:12});
aDecors.push({i:9, j:8, type:2});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:60});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:60});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:60});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:60});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:1, j:4});
aRespawnCoors.push({i:1, j:6});
objPlayerRespawnCoors = {i:12, j:3};
objHeadquartersCoors = {i:12, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.BOMB, nPercent:0.4});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:11, j:6});
aHeadquartersBlocks.push({i:11, j:5});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:12, j:4});
aHeadquartersBlocks.push({i:12, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level6();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 5, 5, 1, 1, 0, 0, 1, 1, 5, 5, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 5, 5, 1, 1, 0, 0, 1, 1, 5, 5, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 5, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 5, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0]];
var aTilesMap = [[60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 54, 44, 3, 3], [60, 52, 52, 52, 52, 60, 60, 60, 60, 60, 60, 54, 44, 3, 3], [60, 54, 61, 61, 61, 57, 52, 52, 52, 52, 52, 58, 44, 3, 3], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 44, 3, 3], [60, 54, 61, 84, 61, 61, 61, 61, 61, 61, 61, 61, 44, 3, 3], [60, 54, 61, 76, 61, 61, 61, 87, 77, 77, 77, 84, 44, 3, 3], [60, 54, 61, 85, 61, 61, 61, 78, 88, 88, 88, 76, 44, 3, 3], [60, 54, 61, 61, 61, 61, 61, 86, 79, 79, 79, 85, 44, 3, 3], [60, 54, 61, 61, 62, 61, 61, 61, 61, 61, 61, 61, 49, 46, 46], [60, 54, 61, 61, 62, 61, 61, 61, 61, 61, 61, 61, 61, 56, 59], [60, 54, 61, 61, 62, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 87, 77, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 78, 88, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 86, 79, 53, 60], [59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59], [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]];
}
Symbol 983 MovieClip [__Packages.gameLevels.levels.Level7] Frame 0
class gameLevels.levels.Level7 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level7 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:3, type:5});
aDecors.push({i:-1, j:6, type:6});
aDecors.push({i:3, j:11, type:12});
aDecors.push({i:6, j:11, type:6});
aDecors.push({i:7, j:11, type:3});
aDecors.push({i:12, j:10, type:11});
aDecors.push({i:12, j:4, type:12});
aDecors.push({i:12, j:1, type:11});
aDecors.push({i:9, j:-1, type:1});
aDecors.push({i:5, j:-1, type:12});
aDecors.push({i:0, j:-1, type:11});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:4});
aRespawnCoors.push({i:0, j:8});
objPlayerRespawnCoors = {i:11, j:5};
objHeadquartersCoors = null;
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.BOMB, nPercent:1});
aHeadquartersBlocks = new Array();
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level7();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 1, 1, 0, 0, 9, 9, 1, 1], [0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 1, 1, 0, 0, 9, 9, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 9, 9, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 9, 9, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 1, 1, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 1, 1, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 9, 9, 1, 1, 0, 0, 9, 9, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 9, 9, 1, 1, 0, 0, 9, 9, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9, 9, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9, 9, 1, 1, 0, 0], [0, 0, 9, 9, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 9, 9, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 1, 1, 0, 0]];
var aTilesMap = [[60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], [60, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 55, 61, 61, 87, 77, 84, 61, 61, 61, 61, 61, 53, 60], [60, 54, 58, 61, 61, 78, 88, 76, 61, 87, 77, 84, 61, 53, 60], [60, 54, 61, 61, 61, 86, 79, 85, 61, 78, 88, 76, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 86, 79, 85, 61, 53, 60], [60, 54, 61, 61, 87, 77, 84, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 78, 88, 76, 61, 87, 77, 84, 61, 61, 53, 60], [60, 54, 61, 61, 86, 79, 85, 61, 78, 88, 76, 61, 61, 53, 60], [52, 58, 61, 61, 61, 61, 61, 61, 86, 79, 85, 61, 61, 53, 60], [61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [59, 55, 61, 61, 61, 61, 87, 77, 84, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 78, 88, 76, 61, 61, 61, 61, 53, 60], [59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59], [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]];
}
Symbol 984 MovieClip [__Packages.gameLevels.levels.Level8] Frame 0
class gameLevels.levels.Level8 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level8 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:3, type:6});
aDecors.push({i:-1, j:9, type:12});
aDecors.push({i:5, j:11, type:12});
aDecors.push({i:12, j:6, type:6});
aDecors.push({i:8, j:-1, type:12});
aDecors.push({i:3, j:2, type:2});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:60});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:5});
aRespawnCoors.push({i:0, j:8});
objPlayerRespawnCoors = {i:11, j:3};
objHeadquartersCoors = {i:11, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.BOMB, nPercent:1});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:10, j:6});
aHeadquartersBlocks.push({i:10, j:5});
aHeadquartersBlocks.push({i:10, j:4});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:11, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level8();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 2, 2, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 2, 2, 2, 2, 0, 0], [0, 0, 1, 1, 2, 2, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 2, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 2, 2, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 2, 2, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 2, 2, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 1, 1], [0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 1, 1], [0, 0, 5, 5, 2, 2, 6, 6, 5, 5, 0, 0, 5, 5, 5, 5, 1, 1, 0, 0, 0, 0], [0, 0, 5, 5, 2, 2, 6, 6, 5, 5, 0, 0, 5, 5, 5, 5, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 1, 1, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 0, 0]];
var aTilesMap = [[60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], [60, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 60], [60, 54, 61, 61, 61, 87, 77, 77, 77, 84, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 78, 88, 88, 88, 76, 61, 61, 61, 53, 60], [60, 54, 61, 87, 77, 81, 88, 88, 88, 76, 61, 61, 61, 53, 60], [60, 54, 61, 78, 88, 88, 88, 88, 88, 76, 61, 61, 56, 60, 60], [60, 54, 61, 86, 79, 82, 88, 88, 88, 76, 61, 61, 57, 60, 60], [60, 54, 61, 61, 61, 78, 88, 88, 88, 76, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 86, 79, 79, 79, 85, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59], [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]];
}
Symbol 985 MovieClip [__Packages.gameLevels.levels.Level9] Frame 0
class gameLevels.levels.Level9 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level9 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:2, type:12});
aDecors.push({i:-1, j:6, type:11});
aDecors.push({i:-1, j:11, type:11});
aDecors.push({i:2, j:11, type:6});
aDecors.push({i:6, j:11, type:1});
aDecors.push({i:8, j:11, type:1});
aDecors.push({i:10, j:11, type:12});
aDecors.push({i:13, j:4, type:12});
aDecors.push({i:13, j:1, type:1});
aDecors.push({i:9, j:0, type:1});
aDecors.push({i:6, j:-1, type:1});
aDecors.push({i:4, j:-1, type:11});
aDecors.push({i:0, j:-1, type:6});
aDecors.push({i:3, j:1, type:2});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:26});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:4});
aRespawnCoors.push({i:0, j:7});
aRespawnCoors.push({i:0, j:9});
objPlayerRespawnCoors = {i:12, j:3};
objHeadquartersCoors = {i:12, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.BOMB, nPercent:0.4});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:11, j:6});
aHeadquartersBlocks.push({i:11, j:5});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:12, j:4});
aHeadquartersBlocks.push({i:12, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level9();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 6, 6, 0, 0, 5, 5, 1, 1, 5, 5, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 6, 6, 0, 0, 5, 5, 1, 1, 5, 5, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [6, 6, 5, 5, 1, 1, 1, 1, 5, 5, 5, 5, 1, 1, 1, 1, 5, 5, 5, 5, 2, 2], [6, 6, 5, 5, 1, 1, 1, 1, 5, 5, 5, 5, 1, 1, 1, 1, 5, 5, 5, 5, 2, 2], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 5, 5, 2, 2, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 1, 1, 0, 0, 1, 1], [0, 0, 5, 5, 2, 2, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0], [0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0]];
var aTilesMap = [[60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], [60, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 53, 60], [60, 54, 87, 77, 84, 61, 87, 77, 84, 61, 87, 77, 84, 53, 60], [60, 54, 78, 88, 76, 61, 78, 88, 76, 61, 78, 88, 76, 53, 60], [60, 54, 86, 79, 85, 61, 86, 79, 85, 61, 86, 79, 85, 53, 60], [52, 58, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 57, 52], [41, 41, 50, 61, 61, 87, 77, 84, 61, 87, 77, 84, 48, 41, 41], [3, 3, 43, 61, 61, 78, 88, 76, 61, 78, 88, 76, 44, 3, 3], [3, 3, 43, 61, 61, 86, 79, 85, 61, 86, 79, 85, 49, 46, 46], [3, 3, 43, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 56, 59], [3, 3, 43, 61, 61, 61, 61, 61, 61, 61, 61, 87, 77, 53, 60], [3, 3, 43, 61, 61, 61, 61, 61, 61, 61, 61, 78, 88, 53, 60], [3, 3, 40, 50, 61, 61, 61, 61, 61, 61, 61, 86, 79, 53, 60], [3, 3, 3, 43, 56, 59, 59, 59, 59, 59, 59, 59, 59, 59, 60], [3, 3, 3, 43, 53, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]];
}
Symbol 986 MovieClip [__Packages.gameLevels.levels.Level10] Frame 0
class gameLevels.levels.Level10 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level10 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:0, type:12});
aDecors.push({i:-1, j:5, type:11});
aDecors.push({i:0, j:11, type:1});
aDecors.push({i:2, j:11, type:1});
aDecors.push({i:5, j:11, type:7});
aDecors.push({i:9, j:11, type:12});
aDecors.push({i:12, j:7, type:12});
aDecors.push({i:12, j:4, type:11});
aDecors.push({i:12, j:1, type:6});
aDecors.push({i:8, j:-1, type:11});
aDecors.push({i:6, j:-1, type:1});
aDecors.push({i:4, j:-1, type:1});
aDecors.push({i:2, j:-1, type:5});
aDecors.push({i:2, j:5, type:2});
aDecors.push({i:7, j:9, type:5});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_HUNTER, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:2});
aRespawnCoors.push({i:0, j:7});
aRespawnCoors.push({i:0, j:10});
objPlayerRespawnCoors = {i:11, j:3};
objHeadquartersCoors = {i:11, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.SHIELD, nPercent:0.25});
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.25});
aBonuses.push({nId:factories.bonuses.BonusFactory.BOMB, nPercent:0.5});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:10, j:6});
aHeadquartersBlocks.push({i:10, j:5});
aHeadquartersBlocks.push({i:10, j:4});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:11, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level10();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 9, 9, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 9, 9, 0, 0, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 9, 9, 0, 0, 0, 0]];
var aTilesMap = [[60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60], [60, 52, 52, 52, 52, 52, 60, 60, 52, 52, 52, 52, 52, 52, 52], [60, 54, 61, 61, 61, 61, 57, 58, 48, 41, 41, 41, 41, 41, 41], [60, 54, 61, 61, 61, 61, 61, 61, 44, 3, 3, 34, 3, 3, 3], [60, 54, 61, 61, 61, 61, 61, 61, 44, 35, 45, 46, 46, 46, 46], [52, 58, 61, 48, 41, 41, 41, 41, 42, 3, 43, 87, 84, 56, 59], [41, 41, 41, 42, 3, 3, 3, 34, 3, 3, 43, 78, 76, 53, 60], [3, 3, 3, 34, 3, 45, 46, 46, 46, 46, 51, 86, 85, 53, 60], [46, 46, 46, 46, 46, 51, 61, 61, 61, 61, 61, 61, 61, 53, 60], [59, 55, 61, 61, 61, 61, 61, 61, 61, 61, 56, 55, 61, 53, 60], [60, 54, 61, 61, 61, 61, 61, 61, 61, 61, 57, 58, 61, 53, 60], [60, 54, 61, 61, 61, 87, 77, 77, 77, 84, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 78, 88, 88, 88, 76, 61, 61, 61, 53, 60], [60, 54, 61, 61, 61, 78, 88, 88, 88, 76, 61, 61, 61, 53, 60], [59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59], [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]];
}
Symbol 987 MovieClip [__Packages.gameLevels.levels.Level11] Frame 0
class gameLevels.levels.Level11 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level11 (Void) {
aDecors = new Array();
aDecors.push({i:0, j:-1, type:7});
aDecors.push({i:-1, j:1, type:9});
aDecors.push({i:0, j:6, type:8});
aDecors.push({i:1, j:12, type:9});
aDecors.push({i:2, j:11, type:1});
aDecors.push({i:4, j:11, type:1});
aDecors.push({i:2, j:9, type:1});
aDecors.push({i:7, j:11, type:9});
aDecors.push({i:12, j:10, type:9});
aDecors.push({i:12, j:1, type:7});
aDecors.push({i:8, j:-1, type:9});
aDecors.push({i:6, j:-1, type:1});
aDecors.push({i:2, j:-1, type:1});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:60});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:4});
aRespawnCoors.push({i:1, j:7});
objPlayerRespawnCoors = {i:11, j:3};
objHeadquartersCoors = {i:11, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.5});
aBonuses.push({nId:factories.bonuses.BonusFactory.SPADE, nPercent:0.5});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:10, j:6});
aHeadquartersBlocks.push({i:10, j:5});
aHeadquartersBlocks.push({i:10, j:4});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:11, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level11();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 1, 1, 5, 5, 1, 1], [1, 1, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 5, 5, 1, 1, 5, 5, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 9, 9, 6, 6, 9, 9, 6, 6, 9, 9, 6, 6, 9, 9, 0, 0, 1, 1], [1, 1, 0, 0, 9, 9, 6, 6, 9, 9, 6, 6, 9, 9, 6, 6, 9, 9, 0, 0, 1, 1], [0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0], [0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 6, 6, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 6, 6, 0, 0, 1, 1], [0, 0, 0, 0, 6, 6, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 6, 6, 0, 0, 1, 1]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 2, 2, 26, 26, 26, 26, 2], [2, 28, 1, 69, 75, 75, 75, 67, 31, 26, 32, 69, 75, 27, 2], [26, 32, 1, 69, 75, 66, 70, 72, 1, 1, 1, 73, 70, 31, 26], [5, 5, 14, 73, 70, 72, 12, 5, 5, 5, 5, 5, 5, 5, 5], [3, 3, 4, 5, 5, 5, 6, 3, 3, 3, 34, 3, 3, 3, 3], [3, 3, 3, 3, 3, 34, 3, 3, 3, 9, 10, 10, 10, 10, 10], [3, 3, 9, 10, 10, 10, 10, 10, 10, 15, 1, 1, 1, 30, 33], [10, 10, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [33, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 988 MovieClip [__Packages.gameLevels.levels.Level12] Frame 0
class gameLevels.levels.Level12 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level12 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:0, type:7});
aDecors.push({i:-1, j:3, type:7});
aDecors.push({i:-1, j:6, type:8});
aDecors.push({i:3, j:11, type:7});
aDecors.push({i:11, j:9, type:10});
aDecors.push({i:12, j:8, type:8});
aDecors.push({i:12, j:-1, type:10});
aDecors.push({i:8, j:-1, type:9});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:6});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:9});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:9});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:3});
aRespawnCoors.push({i:0, j:7});
aRespawnCoors.push({i:0, j:9});
objPlayerRespawnCoors = {i:11, j:3};
objHeadquartersCoors = {i:11, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.5});
aBonuses.push({nId:factories.bonuses.BonusFactory.SPADE, nPercent:0.5});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:10, j:6});
aHeadquartersBlocks.push({i:10, j:5});
aHeadquartersBlocks.push({i:10, j:4});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:11, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level12();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 5, 5, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 5, 5, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 5, 5, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 5, 5, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 1, 1]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 74, 68, 71, 74, 71, 1, 74, 68, 71, 1, 27, 2], [2, 28, 1, 69, 75, 67, 69, 67, 1, 69, 75, 67, 1, 27, 2], [2, 28, 1, 73, 70, 72, 69, 63, 71, 73, 70, 72, 1, 27, 2], [2, 28, 68, 71, 74, 68, 64, 75, 63, 68, 71, 74, 68, 27, 2], [2, 28, 75, 67, 69, 75, 75, 75, 75, 66, 72, 69, 75, 27, 2], [2, 28, 70, 72, 73, 70, 65, 75, 75, 67, 1, 73, 70, 27, 2], [2, 28, 1, 1, 1, 1, 69, 75, 66, 72, 1, 1, 1, 27, 2], [2, 28, 1, 74, 68, 71, 73, 65, 67, 74, 68, 71, 1, 27, 2], [2, 28, 68, 64, 75, 67, 1, 69, 67, 69, 75, 63, 68, 27, 2], [2, 28, 75, 66, 70, 72, 1, 73, 72, 73, 70, 65, 75, 27, 2], [2, 28, 75, 67, 1, 1, 1, 1, 1, 1, 30, 29, 75, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 989 MovieClip [__Packages.gameLevels.levels.Level13] Frame 0
class gameLevels.levels.Level13 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level13 (Void) {
aDecors = new Array();
aDecors.push({i:-1, j:0, type:7});
aDecors.push({i:-1, j:3, type:8});
aDecors.push({i:-1, j:6, type:7});
aDecors.push({i:3, j:11, type:7});
aDecors.push({i:8, j:11, type:1});
aDecors.push({i:12, j:9, type:1});
aDecors.push({i:12, j:6, type:8});
aDecors.push({i:12, j:-1, type:10});
aDecors.push({i:8, j:-1, type:9});
aDecors.push({i:6, j:-1, type:1});
aDecors.push({i:4, j:-1, type:1});
aDecors.push({i:2, j:-1, type:8});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:1});
aRespawnCoors.push({i:0, j:3});
aRespawnCoors.push({i:0, j:7});
aRespawnCoors.push({i:0, j:9});
objPlayerRespawnCoors = {i:11, j:3};
objHeadquartersCoors = {i:11, j:5};
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.BULLETS, nPercent:1});
aHeadquartersBlocks = new Array();
aHeadquartersBlocks.push({i:10, j:6});
aHeadquartersBlocks.push({i:10, j:5});
aHeadquartersBlocks.push({i:10, j:4});
aHeadquartersBlocks.push({i:11, j:4});
aHeadquartersBlocks.push({i:11, j:6});
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level13();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 9, 9, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 9, 9, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 9, 9, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 9, 9, 0, 0, 1, 1, 5, 5, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 9, 9, 0, 0, 0, 0], [0, 0, 0, 0, 9, 9, 0, 0, 5, 5, 0, 0, 5, 5, 0, 0, 9, 9, 0, 0, 0, 0]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 12, 5, 5, 5, 14, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 8, 3, 3, 3, 7, 1, 74, 68, 68, 68, 27, 2], [26, 32, 1, 8, 3, 9, 10, 15, 1, 69, 75, 75, 75, 27, 2], [5, 5, 5, 6, 3, 7, 74, 68, 71, 69, 75, 75, 75, 27, 2], [3, 3, 3, 34, 3, 7, 69, 66, 72, 73, 70, 70, 70, 27, 2], [10, 10, 10, 10, 10, 15, 69, 67, 1, 12, 5, 14, 74, 27, 2], [33, 29, 74, 68, 68, 71, 69, 67, 1, 8, 3, 7, 73, 31, 26], [2, 28, 69, 75, 75, 67, 69, 67, 1, 8, 3, 4, 5, 5, 5], [2, 28, 69, 75, 75, 67, 69, 67, 1, 8, 3, 34, 3, 3, 3], [2, 28, 73, 70, 70, 72, 73, 72, 1, 13, 10, 10, 11, 3, 3], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 6, 3, 3], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 29, 8, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 28, 8, 3, 3, 3]];
}
Symbol 990 MovieClip [__Packages.gameLevels.levels.Level14] Frame 0
class gameLevels.levels.Level14 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level14 (Void) {
aDecors = new Array();
aDecors.push({i:0, j:-1, type:9});
aDecors.push({i:0, j:7, type:7});
aDecors.push({i:14, j:8, type:9});
aDecors.push({i:10, j:4, type:10});
aDecors.push({i:10, j:9, type:10});
aDecors.push({i:9, j:2, type:9});
aDecors.push({i:8, j:3, type:7});
aDecors.push({i:9, j:8, type:8});
aDecors.push({i:12, j:3, type:2});
aDecors.push({i:12, j:7, type:2});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK_HUNTER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:20});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:3});
aRespawnCoors.push({i:0, j:9});
aRespawnCoors.push({i:11, j:2});
aRespawnCoors.push({i:11, j:8});
objPlayerRespawnCoors = {i:12, j:6};
objHeadquartersCoors = null;
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.BULLETS, nPercent:0.4});
aHeadquartersBlocks = new Array();
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level14();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 2, 2, 26, 26, 26, 26, 2], [2, 28, 67, 1, 1, 1, 1, 1, 31, 32, 1, 1, 1, 27, 2], [2, 28, 72, 1, 12, 5, 5, 5, 5, 5, 14, 1, 1, 27, 2], [2, 28, 1, 1, 8, 3, 3, 34, 3, 3, 7, 1, 1, 27, 2], [2, 28, 1, 1, 8, 3, 9, 10, 11, 3, 7, 1, 1, 27, 2], [2, 28, 1, 1, 13, 10, 15, 1, 13, 10, 15, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 68, 71, 1, 1, 74, 68, 71, 1, 1, 1, 1, 27, 2], [2, 28, 75, 67, 1, 1, 69, 75, 67, 1, 1, 1, 1, 27, 2], [2, 28, 70, 72, 30, 29, 73, 70, 72, 30, 29, 1, 1, 27, 2], [2, 28, 1, 30, 33, 33, 29, 1, 30, 33, 33, 29, 1, 27, 2], [2, 28, 1, 31, 26, 26, 32, 1, 31, 26, 26, 32, 1, 27, 2], [2, 28, 1, 1, 74, 68, 71, 1, 74, 68, 71, 1, 1, 27, 2], [2, 28, 1, 1, 69, 75, 67, 1, 69, 75, 67, 1, 1, 27, 2], [2, 28, 1, 1, 73, 70, 72, 1, 73, 70, 72, 1, 1, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 991 MovieClip [__Packages.gameLevels.levels.Level15] Frame 0
class gameLevels.levels.Level15 implements gameLevels.ILevel
{
static var instance;
var aDecors, aEnemyTanks, aRespawnCoors, objPlayerRespawnCoors, objHeadquartersCoors, aBonuses, aHeadquartersBlocks;
function Level15 (Void) {
aDecors = new Array();
aDecors.push({i:0, j:-1, type:9});
aDecors.push({i:-1, j:6, type:9});
aDecors.push({i:1, j:11, type:7});
aEnemyTanks = new Array();
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:40});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.HARD_TANK_HUNTER_CRUSHER, delay:0});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.NORMAL_TANK, delay:3});
aEnemyTanks.push({type:vehicles.tanks.AbstractTank.EASY_TANK, delay:0});
aRespawnCoors = new Array();
aRespawnCoors.push({i:0, j:2});
aRespawnCoors.push({i:0, j:8});
objPlayerRespawnCoors = {i:12, j:4};
objHeadquartersCoors = null;
aBonuses = new Array();
aBonuses.push({nId:factories.bonuses.BonusFactory.STAR, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.MEDIKIT, nPercent:0.3});
aBonuses.push({nId:factories.bonuses.BonusFactory.BULLETS, nPercent:0.4});
aHeadquartersBlocks = new Array();
}
static function getInstance() {
if (instance == null) {
instance = new gameLevels.levels.Level15();
}
return(instance);
}
function getLevelMap(Void) {
return(aLevelMap);
}
function getTilesMap(Void) {
return(aTilesMap);
}
function getDecors(Void) {
return(aDecors);
}
function getRespawnCoors(Void) {
return(aRespawnCoors);
}
function getEnemyTanks(Void) {
return(aEnemyTanks);
}
function getPlayerRespawnCoors(Void) {
return(objPlayerRespawnCoors);
}
function getHeadquartersCoors() {
return(objHeadquartersCoors);
}
function getBonusTypes() {
return(aBonuses);
}
function getHeadquertersBlocksCoors() {
return(aHeadquartersBlocks);
}
var aLevelMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0], [0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0], [0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0], [0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0], [0, 0, 9, 9, 1, 1, 9, 9, 1, 1, 0, 0, 1, 1, 9, 9, 1, 1, 9, 9, 0, 0], [0, 0, 9, 9, 1, 1, 9, 9, 1, 1, 0, 0, 1, 1, 9, 9, 1, 1, 9, 9, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 9, 9, 1, 1, 9, 9, 0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 9, 9, 1, 1, 9, 9, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 9, 9, 1, 1, 9, 9, 1, 1, 0, 0, 1, 1, 9, 9, 1, 1, 9, 9, 0, 0], [0, 0, 9, 9, 1, 1, 9, 9, 1, 1, 0, 0, 1, 1, 9, 9, 1, 1, 9, 9, 0, 0], [0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0], [0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0], [0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0], [0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 1, 1, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0]];
var aTilesMap = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 2], [2, 28, 67, 74, 68, 71, 73, 70, 70, 72, 1, 1, 74, 27, 2], [2, 28, 67, 69, 75, 63, 68, 68, 68, 68, 68, 68, 64, 27, 2], [2, 28, 72, 73, 70, 70, 70, 70, 70, 70, 65, 66, 70, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 69, 67, 74, 27, 2], [2, 28, 74, 71, 1, 1, 1, 1, 1, 1, 73, 72, 69, 27, 2], [2, 28, 69, 67, 1, 1, 1, 1, 1, 1, 1, 1, 69, 27, 2], [2, 28, 69, 67, 1, 1, 1, 1, 1, 1, 1, 1, 69, 27, 2], [2, 28, 73, 72, 1, 1, 1, 1, 1, 1, 1, 74, 64, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 66, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 69, 67, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 72, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [2, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 2], [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]];
}
Symbol 992 MovieClip [__Packages.helpers.World] Frame 0
class helpers.World
{
function World () {
}
static var nScreenWidth = 480;
static var nScreenHeight = 360;
static var nBonusX = 10;
static var nBonusY = 180;
static var sTarget = "_blank";
static var sDownloadURL = "http://www.enkord.com/games/armadatanks/download/?from=webversion";
static var sBuyURL = "http://www.enkord.com/games/armadatanks/order/?from=webversion";
static var sMoreGamesURL = "http://www.enkord.com/";
static var boomID = 1;
}
Symbol 993 MovieClip [__Packages.vehicles.tanks.player.Player] Frame 0
class vehicles.tanks.player.Player extends vehicles.tanks.AbstractTank
{
var objBurrel, objMGun, objRocket, nWeapon, nStars, nShootingPower, nReloadTime, nAddHealthValue, aUpgrades, aBuyedWeapons, objShooter, prcShooting, prcShowLineLife, prcTurretRotation, prcStar, _visible, mcTurret, mcLifeLine, bMoving, bDestroyed, bPressed, bFastReload, bInvincible, nLife, nLastShotTime, nActiveDirection, gotoAndStop, mcArmor, mcReload, mcDamage, mcSpeed, mcProjSpeed, nI, nJ, _x, _y, mcTankDefence, attachMovie, getNextHighestDepth, nStarTime, _xmouse, _ymouse, nRadianTurretAngle, nTurretAngle, mcHitZone, nActiveTime, nShowLifeLineTime;
function Player (Void) {
super();
objBurrel = {reload:750, power:20, weapon:BURREL};
objMGun = {reload:250, power:15, weapon:MACHINEGUN};
objRocket = {reload:560, power:8, weapon:ROCKET};
nWeapon = BURREL;
nStars = 0;
nShootingPower = objBurrel.power;
nReloadTime = objBurrel.reload;
nAddHealthValue = 5;
aUpgrades = [0, 0, 0, 0, 0];
aBuyedWeapons = new Array();
aBuyedWeapons.push(BURREL);
objShooter = new Object();
objShooter.onMouseUp = gdp.utils.Delegate.create(this, setMousePressedFlag, [false]);
objShooter.onMouseDown = gdp.utils.Delegate.create(this, setMousePressedFlag, [true]);
core.Game.getInstance().mcBorder.onDragOut = gdp.utils.Delegate.create(this, setMousePressedFlag, [false]);
prcShooting = new gdp.core.process.Process(gdp.utils.Delegate.create(this, shoot));
prcShowLineLife = new gdp.core.process.Process(gdp.utils.Delegate.create(this, hideLineLife));
prcTurretRotation = new gdp.core.process.Process(gdp.utils.Delegate.create(this, aiming));
prcStar = new gdp.core.process.Process(gdp.utils.Delegate.create(this, starProcess));
setUpgradesVisible();
_visible = false;
}
static function getInstance(mcParent) {
if (mcParent != null) {
if (instance == null) {
instance = vehicles.tanks.player.Player(mcParent.attachMovie("mcPlayerTank", "mcPlayerTank" + mcParent.getNextHighestDepth(), mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function resetTank() {
aBuyedWeapons = new Array();
aBuyedWeapons.push(BURREL);
aUpgrades = [0, 0, 0, 0, 0];
nWeapon = BURREL;
nStars = 0;
mcTurret.gotoAndStop(1);
nShootingPower = objBurrel.power;
nReloadTime = objBurrel.reload;
setUpgradesVisible();
}
function initTankBeforeLevel(Void) {
mcLifeLine._visible = false;
bMoving = false;
bDestroyed = false;
bPressed = false;
bFastReload = false;
bInvincible = false;
nLife = 100;
nStars = 0;
nLastShotTime = gdp.core.time.FrameTimer.getInstance().getTime();
nActiveDirection = vehicles.tanks.AbstractTank.DIRECTION_UP;
gotoAndStop(nActiveDirection);
Mouse.addListener(objShooter);
gdp.core.process.ProcessManager.getInstance().addProcess(prcTurretRotation);
gdp.core.process.ProcessManager.getInstance().addProcess(prcShooting);
gdp.core.process.ProcessManager.getInstance().addProcess(prcStar);
_visible = true;
}
function setUpgradesVisible(Void) {
mcArmor._visible = aUpgrades[ARMOUR_UPGRADE] != 0;
mcReload._visible = aUpgrades[RELOAD_SPEED_UPGRADE] != 0;
mcDamage._visible = aUpgrades[SHOOTING_POWER_UPGRADE] != 0;
mcSpeed._visible = aUpgrades[PLAYER_SPEED_UPGRADE] != 0;
mcProjSpeed._visible = aUpgrades[SHELL_SPEED_UPGRADE] != 0;
}
function moveVehicle(nX, nY, nDirection, gamePole) {
var _local5;
var _local4;
var _local3;
var _local6 = aUpgrades[PLAYER_SPEED_UPGRADE];
if (bMoving) {
return(undefined);
}
bMoving = true;
gamePole.makeTrackTrace(nI, nJ, nDirection, nActiveDirection);
if (nDirection != nActiveDirection) {
gotoAndStop(nDirection);
mcSpeed.gotoAndStop(nDirection);
mcProjSpeed.gotoAndStop(nDirection);
nActiveDirection = nDirection;
}
_local5 = new gdp.utils.math.helpers.Point(_x, _y);
_local4 = new gdp.utils.math.helpers.Point(nX, nY);
_local3 = new gdp.ui.effects.tween.Tween(this, _local5, _local4, vehicles.tanks.AbstractTank.MOVING_SPEED * (1 + ((_local6 * nSpeedUpgrade) / 100)));
_local3.onEnd = gdp.utils.Delegate.create(this, onEndMoving);
_local3.run();
}
function isMoving() {
return(bMoving);
}
function isDestroyed(Void) {
return(bDestroyed);
}
function setIJ(i, j) {
nI = i;
nJ = j;
}
function getIJ(Void) {
return({i:nI, j:nJ});
}
function getAllUpgrades(Void) {
return(aUpgrades);
}
function setNewUpgradeLevel(nUpgradeNumber, nUpgradeValue) {
aUpgrades[nUpgradeNumber] = nUpgradeValue;
setUpgradesVisible();
}
function getAllWeapons(Void) {
return(aBuyedWeapons);
}
function addNewWeapon(nNewWeapon) {
aBuyedWeapons.push(nNewWeapon);
}
function getActiveWeapon(Void) {
return(nWeapon);
}
function getWeaponInfo(nWeapon) {
var _local2 = new Object();
if (nWeapon == BURREL) {
for (var _local3 in objBurrel) {
_local2[_local3] = objBurrel[_local3];
}
} else if (nWeapon == MACHINEGUN) {
for (var _local3 in objMGun) {
_local2[_local3] = objMGun[_local3];
}
} else if (nWeapon == ROCKET) {
for (var _local3 in objRocket) {
_local2[_local3] = objRocket[_local3];
}
}
return(_local2);
}
function setActiveWeapon(nNewWeapon) {
nWeapon = nNewWeapon;
if (nWeapon == BURREL) {
mcTurret.gotoAndStop(1);
nReloadTime = objBurrel.reload;
nShootingPower = objBurrel.power;
} else if (nWeapon == MACHINEGUN) {
mcTurret.gotoAndStop(2);
nReloadTime = objMGun.reload;
nShootingPower = objMGun.power;
} else if (nWeapon == ROCKET) {
mcTurret.gotoAndStop(3);
nReloadTime = objRocket.reload;
nShootingPower = objRocket.power * 3;
}
}
function setFastReloadBonus(bBonusFlag) {
if (bBonusFlag && (!bFastReload)) {
bFastReload = true;
nReloadTime = nReloadTime / 2;
} else if ((!bBonusFlag) && (bFastReload)) {
bFastReload = false;
nReloadTime = nReloadTime * 2;
}
}
function setInvincible(bBonusFlag) {
bInvincible = bBonusFlag;
if (bInvincible && (mcTankDefence == null)) {
mcTankDefence = attachMovie("mcTankDef", "TankDef", getNextHighestDepth());
mcTankDefence._x = -29;
mcTankDefence._y = -29;
} else if ((!bInvincible) && (mcTankDefence != null)) {
mcTankDefence.removeMovieClip();
mcTankDefence = null;
}
}
function addStar() {
if (nStars < 3) {
nStars++;
}
nStarTime = gdp.core.time.FrameTimer.getInstance().getTime();
addHealth(nStars * nAddHealthValue);
elements.Stars.getInstance().setStars(nStars);
}
function starProcess() {
if ((nStars == 0) || (nLife >= 100)) {
return(undefined);
}
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nStarTime) >= 5000) {
nStarTime = gdp.core.time.FrameTimer.getInstance().getTime();
addHealth(nStars * nAddHealthValue);
}
}
function addHealth(life) {
nLife = nLife + life;
if (nLife > 100) {
nLife = 100;
}
showLife();
var _local2 = gameField.GameField.getInstance().getFieldForBullet();
_local2.attachMovie("healthUpAnim", "healthUp" + (helpers.World.boomID++), _local2.getNextHighestDepth(), {_x:_x, _y:_y});
}
function recoverHealth() {
nLife = 100;
showLife();
}
function onEndMoving(Void) {
nI = nI + vehicles.tanks.AbstractTank.aDirectionsArray[nActiveDirection].i;
nJ = nJ + vehicles.tanks.AbstractTank.aDirectionsArray[nActiveDirection].j;
engine.GamePlayEngine.getInstance().playerMovingEnd(nActiveDirection);
bMoving = false;
}
function getNextIJ(Void) {
return({i:nI + vehicles.tanks.AbstractTank.aDirectionsArray[nActiveDirection].i, j:nJ + vehicles.tanks.AbstractTank.aDirectionsArray[nActiveDirection].j});
}
function aiming(Void) {
if (engine.GamePlayEngine.getInstance().isPaused) {
return(undefined);
}
var _local4 = _xmouse - mcTurret._x;
var _local3 = _ymouse - mcTurret._y;
var _local2;
_local2 = Math.atan2(_local3, _local4);
nRadianTurretAngle = _local2;
_local2 = (_local2 / Math.PI) * 180;
if (_local2 < 0) {
_local2 = 180 + (180 - Math.abs(_local2));
}
_local2 = Math.round(_local2);
nTurretAngle = _local2;
if ((_local2 >= 0) && (_local2 < 11)) {
setWeaponFrame(1);
} else if ((_local2 >= 11) && (_local2 <= 34)) {
setWeaponFrame(2);
} else if ((_local2 > 34) && (_local2 < 56)) {
setWeaponFrame(3);
} else if ((_local2 >= 56) && (_local2 <= 79)) {
setWeaponFrame(4);
} else if ((_local2 > 79) && (_local2 < 101)) {
setWeaponFrame(5);
} else if ((_local2 >= 101) && (_local2 <= 124)) {
setWeaponFrame(6);
} else if ((_local2 > 124) && (_local2 < 146)) {
setWeaponFrame(7);
} else if ((_local2 >= 146) && (_local2 <= 169)) {
setWeaponFrame(8);
} else if ((_local2 > 169) && (_local2 < 191)) {
setWeaponFrame(9);
} else if ((_local2 >= 191) && (_local2 <= 214)) {
setWeaponFrame(10);
} else if ((_local2 > 214) && (_local2 < 236)) {
setWeaponFrame(11);
} else if ((_local2 >= 236) && (_local2 <= 259)) {
setWeaponFrame(12);
} else if ((_local2 > 259) && (_local2 < 281)) {
setWeaponFrame(13);
} else if ((_local2 >= 281) && (_local2 <= 304)) {
setWeaponFrame(14);
} else if ((_local2 > 304) && (_local2 < 326)) {
setWeaponFrame(15);
} else if ((_local2 >= 326) && (_local2 <= 349)) {
setWeaponFrame(16);
} else if ((_local2 > 349) && (_local2 <= 360)) {
setWeaponFrame(1);
}
}
function setWeaponFrame(nFrame) {
mcTurret.mcWeapon.gotoAndStop(nFrame);
mcReload.gotoAndStop(nFrame);
mcDamage.gotoAndStop(nFrame);
mcArmor.gotoAndStop(nFrame);
}
function shoot(Void) {
var _local2;
var _local14;
var _local13;
var _local3;
var _local10;
var _local8 = aUpgrades[RELOAD_SPEED_UPGRADE];
var _local7 = aUpgrades[SHOOTING_POWER_UPGRADE];
var _local9 = nReloadTime * (1 - ((_local8 * nReloadUpgrade) / 100));
if (((gdp.core.time.FrameTimer.getInstance().getTime() - nLastShotTime) >= _local9) && (bPressed)) {
helpers.soundEngine.CSound.getInstance().playSound(((nWeapon == ROCKET) ? (helpers.soundEngine.CSound.ROCKET_SHOT) : (helpers.soundEngine.CSound.SIMPLE_SHOT)));
_local3 = {x:mcTurret.mcWeapon.mcBarrel._x, y:mcTurret.mcWeapon.mcBarrel._y};
_local10 = computeSpeed();
mcTurret.mcWeapon.mcBarrel.localToGlobal(_local3);
var _local4 = gameField.GameField.getInstance().getFieldForBullet();
_local4.globalToLocal(_local3);
var _local6 = ((nWeapon == ROCKET) ? "mcRocketShell" : "mcSimpleShell");
_local2 = elements.Shell(_local4.attachMovie(_local6, "mcShell" + (helpers.World.boomID++), _local4.getNextHighestDepth()));
_local2.isRocket = nWeapon == ROCKET;
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2.setShellSpeed(_local10);
_local2._rotation = nTurretAngle;
_local2.setShellPower(nShootingPower * (1 + ((_local7 * nShootPowerUpgrade) / 100)));
if (nWeapon != ROCKET) {
var _local5 = _local4.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local4.getNextHighestDepth());
_local5._x = _local3.x;
_local5._y = _local3.y;
}
engine.GamePlayEngine.getInstance().addShell(_local2, true);
resetShootTime();
}
}
function resetShootTime() {
nLastShotTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
function hit(mcCollidedShell) {
var _local3 = mcCollidedShell.getHitZone();
var _local4;
var _local2 = aUpgrades[ARMOUR_UPGRADE];
if (mcHitZone.hitTest(_local3)) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
if (!bInvincible) {
_local4 = mcCollidedShell.getShellPower() * (1 - ((_local2 * nArmorUpgrade) / 100));
nLife = nLife - _local4;
nStarTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
if (nLife <= 0) {
bDestroyed = true;
} else {
showLife();
}
return(true);
}
return(false);
}
function destroyVehicle(Void) {
disable();
_visible = false;
}
function disable() {
Mouse.removeListener(objShooter);
delete core.Game.getInstance().mcBorder.onDragOut;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcTurretRotation);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShooting);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcStar);
setInvincible(false);
setFastReloadBonus(false);
mcLifeLine._visible = false;
}
function setMousePressedFlag(bFlag) {
bPressed = bFlag;
}
function showLife() {
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
nActiveTime = gdp.core.time.FrameTimer.getInstance().getTime();
gdp.core.process.ProcessManager.getInstance().addProcess(prcShowLineLife);
var _local2 = Math.round(100 - nLife);
if (_local2 <= 0) {
_local2 = 1;
} else if (_local2 > 100) {
_local2 = 100;
}
mcLifeLine.gotoAndStop(_local2);
mcLifeLine._visible = true;
}
function hideLineLife(Void) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nActiveTime) >= nShowLifeLineTime) {
mcLifeLine._visible = false;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
}
}
function computeSpeed(Void) {
var _local5 = 0;
var _local4 = 0;
var _local8;
var _local7;
var _local6;
var _local3;
var _local9 = aUpgrades[SHELL_SPEED_UPGRADE];
var _local2 = ((nWeapon == ROCKET) ? (elements.Shell.ROCKET_SHELL_SPEED) : (elements.Shell.SIMPLE_SHELL_SPEED)) * (1 + ((_local9 * nShellSpeedUpgrade) / 100));
if (nTurretAngle == 0) {
return({x:_local2, y:0});
}
if (nTurretAngle == 90) {
return({x:0, y:_local2});
}
if (nTurretAngle == 180) {
return({x:-_local2, y:0});
}
if (nTurretAngle == 270) {
return({x:0, y:-_local2});
}
if (nTurretAngle == 360) {
return({x:_local2, y:0});
}
if ((nTurretAngle > 0) & (nTurretAngle < 90)) {
_local6 = nTurretAngle;
_local5 = 1;
_local4 = 1;
} else if ((nTurretAngle > 90) && (nTurretAngle < 180)) {
_local6 = nTurretAngle - 90;
_local5 = -1;
_local4 = 1;
} else if ((nTurretAngle > 180) && (nTurretAngle < 270)) {
_local6 = nTurretAngle - 180;
_local5 = -1;
_local4 = -1;
} else if ((nTurretAngle > 270) && (nTurretAngle < 360)) {
_local6 = nTurretAngle - 270;
_local5 = 1;
_local4 = -1;
}
_local6 = (_local6 * Math.PI) / 180;
_local3 = computeSpeedAbsoluteValues(_local6);
if ((nTurretAngle > 0) & (nTurretAngle < 90)) {
_local7 = (_local3.sin * _local2) * _local4;
_local8 = (_local3.cos * _local2) * _local5;
} else if ((nTurretAngle > 90) && (nTurretAngle < 180)) {
_local8 = (_local3.sin * _local2) * _local5;
_local7 = (_local3.cos * _local2) * _local4;
} else if ((nTurretAngle > 180) && (nTurretAngle < 270)) {
_local7 = (_local3.sin * _local2) * _local4;
_local8 = (_local3.cos * _local2) * _local5;
} else if ((nTurretAngle > 270) && (nTurretAngle < 360)) {
_local8 = (_local3.sin * _local2) * _local5;
_local7 = (_local3.cos * _local2) * _local4;
}
return({x:_local8, y:_local7});
}
function computeSpeedAbsoluteValues(nRoundedAngle) {
var _local2 = Math.cos(nRoundedAngle);
var _local1 = Math.sin(nRoundedAngle);
return({sin:_local1, cos:_local2});
}
static var instance = null;
static var BURREL = 0;
static var MACHINEGUN = 1;
static var ROCKET = 2;
static var ARMOUR_UPGRADE = 0;
static var PLAYER_SPEED_UPGRADE = 1;
static var RELOAD_SPEED_UPGRADE = 2;
static var SHELL_SPEED_UPGRADE = 3;
static var SHOOTING_POWER_UPGRADE = 4;
static var nSpeedUpgrade = 20;
static var nReloadUpgrade = 10;
static var nArmorUpgrade = 10;
static var nShellSpeedUpgrade = 20;
static var nShootPowerUpgrade = 20;
}
Symbol 994 MovieClip [__Packages.elements.Stars] Frame 0
class elements.Stars extends gdp.core.base.BaseMovieClip
{
static var instance;
var _x, _y, _visible, gotoAndStop, removeMovieClip;
function Stars (Void) {
super();
_x = 90;
_y = 5;
}
static function getInstance() {
if (instance == null) {
instance = core.Game.getInstance().attachMovie("mcStars", "StarsInstance", core.Game.getInstance().getNextHighestDepth());
}
return(instance);
}
function setStars(num) {
if (num <= 0) {
_visible = false;
return(undefined);
}
_visible = true;
gotoAndStop(num);
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 995 MovieClip [__Packages.gameField.elements.blocks.Block] Frame 0
class gameField.elements.blocks.Block extends gameField.elements.base.AbstractFieldElement
{
var bDestroyed, nType, gotoAndStop, mcUpLeftBrick, mcUpRightBrick, mcDownLeftBrick, mcDownRightBrick, mcBlockHit, nI, nJ;
function Block (Void) {
super();
bDestroyed = false;
nType = SIMPLE_BLOCK;
}
function setType(nNewType) {
nType = nNewType;
if (nType == UNBREAKABLE_BLOCK) {
gotoAndStop(2);
} else if (nType == SIMPLE_BLOCK) {
gotoAndStop(1);
}
}
function getType(Void) {
return(nType);
}
function rebuildBlock() {
if (nType != UNBREAKABLE_BLOCK) {
mcUpLeftBrick.gotoAndStop(1);
mcUpLeftBrick.isDestroyed = false;
mcUpRightBrick.gotoAndStop(1);
mcUpRightBrick.isDestroyed = false;
mcDownLeftBrick.gotoAndStop(1);
mcDownLeftBrick.isDestroyed = false;
mcDownRightBrick.gotoAndStop(1);
mcDownRightBrick.isDestroyed = false;
}
}
function setHitsForBrick(nBrickID, nHit) {
switch (nBrickID) {
case UP_LEFT_BRICK :
mcUpLeftBrick.gotoAndStop(nHit);
break;
case UP_RIGHT_BRICK :
mcUpRightBrick.gotoAndStop(nHit);
break;
case DOWN_LEFT_BRICK :
mcDownLeftBrick.gotoAndStop(nHit);
break;
case DOWN_RIGHT_BRICK :
mcDownRightBrick.gotoAndStop(nHit);
}
}
function getHitZone() {
return(mcBlockHit);
}
function onHit(mcCollidedClip) {
var _local6 = mcCollidedClip.getHitZone();
if (nType == UNBREAKABLE_BLOCK) {
if (_local6.hitTest(mcBlockHit)) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.BRICK_DESTROY);
return(true);
}
} else {
var _local4 = new Array();
var _local2 = mcCollidedClip._rotation;
while (_local2 < 0) {
_local2 = _local2 + 360;
}
if (((_local2 > 332.5) && (_local2 <= 360)) || ((_local2 >= 0) && (_local2 <= 22.5))) {
_local4 = [mcUpLeftBrick, mcDownLeftBrick, mcUpRightBrick, mcDownRightBrick];
} else if ((_local2 > 22.5) && (_local2 <= 67.5)) {
_local4 = [mcUpLeftBrick, mcDownLeftBrick, mcUpRightBrick, mcDownRightBrick];
} else if ((_local2 > 67.5) && (_local2 <= 112.5)) {
_local4 = [mcUpLeftBrick, mcUpRightBrick, mcDownLeftBrick, mcDownRightBrick];
} else if ((_local2 > 112.5) && (_local2 <= 157.5)) {
_local4 = [mcUpRightBrick, mcUpLeftBrick, mcDownRightBrick, mcDownLeftBrick];
} else if ((_local2 > 157.5) && (_local2 <= 202.5)) {
_local4 = [mcUpRightBrick, mcDownRightBrick, mcUpLeftBrick, mcDownLeftBrick];
} else if ((_local2 > 202.5) && (_local2 <= 247.5)) {
_local4 = [mcDownRightBrick, mcUpRightBrick, mcDownLeftBrick, mcUpLeftBrick];
} else if ((_local2 > 247.5) && (_local2 <= 292.5)) {
_local4 = [mcDownRightBrick, mcDownLeftBrick, mcUpRightBrick, mcUpLeftBrick];
} else if ((_local2 > 292.5) && (_local2 <= 332.5)) {
_local4 = [mcDownLeftBrick, mcUpLeftBrick, mcDownRightBrick, mcUpRightBrick];
}
var _local3 = 0;
while (_local3 < _local4.length) {
if (testSideHit(_local4[_local3], mcCollidedClip)) {
return(true);
}
_local3++;
}
return(false);
}
}
function hitRocketTest(mcCollidedRocket) {
var _local5 = mcCollidedRocket.getHitZone();
if (nType == UNBREAKABLE_BLOCK) {
if (_local5.hitTest(mcBlockHit)) {
return(true);
}
} else {
var _local3 = [mcDownLeftBrick, mcUpLeftBrick, mcDownRightBrick, mcUpRightBrick];
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].getHitZone().hitTest(mcCollidedRocket.getHitZone())) {
return(true);
}
_local2++;
}
return(false);
}
}
function onRocketHit(mcCollidedRocket) {
var _local6 = mcCollidedRocket.getHitZone();
if (nType == UNBREAKABLE_BLOCK) {
if (_local6.hitTest(mcBlockHit)) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.BRICK_DESTROY);
return(true);
}
} else {
var _local3 = [mcDownLeftBrick, mcUpLeftBrick, mcDownRightBrick, mcUpRightBrick];
var _local4 = false;
var _local2 = 0;
while (_local2 < _local3.length) {
if (testSideHit(_local3[_local2], mcCollidedRocket)) {
_local4 = true;
}
_local2++;
}
return(_local4);
}
}
function setIJ(obj) {
nI = obj.i;
nJ = obj.j;
}
function getIJ(Void) {
return({i:nI, j:nJ});
}
function onDestroy(Void) {
gameField.GameField.getInstance().setOccupationType(nI, nJ, gameField.tiles.Tile.FREE_TILE);
bDestroyed = true;
}
function isDestroyed(Void) {
return(bDestroyed);
}
function testSideHit(mcSide, mcCollidedClip) {
var _local2;
var _local3 = mcCollidedClip.getHitZone();
_local2 = mcSide.isHit(_local3);
if ((_local2 == gameField.elements.blocks.Brick.HIT) || (_local2 == gameField.elements.blocks.Brick.DESTROYED)) {
if (_local2 == gameField.elements.blocks.Brick.DESTROYED) {
if (testAllSides()) {
onDestroy();
}
}
return(true);
}
return(false);
}
function testAllSides(Void) {
if (((mcUpLeftBrick.isDestroyed && (mcUpRightBrick.isDestroyed)) && (mcDownLeftBrick.isDestroyed)) && (mcDownRightBrick.isDestroyed)) {
return(true);
}
return(false);
}
static var SIMPLE_BLOCK = 0;
static var UNBREAKABLE_BLOCK = 1;
static var WANTED_BLOCK = 2;
static var UP_LEFT_BRICK = 0;
static var UP_RIGHT_BRICK = 1;
static var DOWN_LEFT_BRICK = 2;
static var DOWN_RIGHT_BRICK = 3;
static var HALF_SIDE = 22.5;
}
Symbol 996 MovieClip [__Packages.gameField.elements.blocks.Brick] Frame 0
class gameField.elements.blocks.Brick extends MovieClip
{
var isDestroyed, _currentframe, mcHitZone, nextFrame;
function Brick (Void) {
super();
isDestroyed = false;
}
function isHit(mcCollidedClip) {
if (_currentframe == 5) {
return(MISSED);
}
if (mcCollidedClip.hitTest(mcHitZone)) {
nextFrame();
if (_currentframe < 5) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.BRICK_DESTROY);
return(HIT);
}
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.WALL_DESTROY);
isDestroyed = true;
return(DESTROYED);
}
return(MISSED);
}
function getHitZone() {
return(mcHitZone);
}
static var HIT = 0;
static var DESTROYED = 1;
static var MISSED = 2;
}
Symbol 997 MovieClip [__Packages.gameField.tiles.Tile] Frame 0
class gameField.tiles.Tile extends gdp.core.base.BaseMovieClip
{
var nOccupied, bIsBonusHere, occupiedBy, nType, mcBonusClip, mcHitRegion, removeMovieClip;
function Tile (Void) {
super();
nOccupied = FREE_TILE;
bIsBonusHere = false;
occupiedBy = new Array();
}
function setType(nNewType) {
nType = nNewType;
}
function getType(Void) {
return(nType);
}
function addTank(tank) {
if (isIn(tank) == null) {
occupiedBy.push(tank);
}
}
function removeTank(tank) {
var _local2 = isIn(tank);
if (_local2 != null) {
occupiedBy.splice(_local2, 1);
}
}
function isTileFree() {
return(occupiedBy.length == 0);
}
function isIn(elem) {
var _local2 = 0;
while (_local2 < occupiedBy.length) {
if (occupiedBy[_local2] == elem) {
return(_local2);
}
_local2++;
}
return(null);
}
function setOccupied(nOccupiedNew) {
nOccupied = nOccupiedNew;
}
function getOccupied(Void) {
return(nOccupied);
}
function setBonusHere(bBonus, mcBonus) {
bIsBonusHere = bBonus;
if (bIsBonusHere) {
mcBonusClip = mcBonus;
} else {
mcBonusClip.removeMovieClip();
}
}
function getBonusHere(Void) {
return(bIsBonusHere);
}
function getBonusClip(Void) {
return(mcBonusClip);
}
function getHitMC(Void) {
return(mcHitRegion);
}
function removeTile(Void) {
mcBonusClip.removeMovieClip();
removeMovieClip();
}
static var FREE_TILE = 0;
static var ENEMY_TANK_OCCUPIED = 1;
static var PLAYER_TANK_OCCUPIED = 2;
static var BRICK_OCCUPIED = 3;
static var WANTED_BRICK_OCCUPIED = 4;
static var HEADQUARTERS_OCCUPIED = 5;
static var PASS_OBST_OCCUPIED = 6;
static var NOT_PASS_OBST_OCCUPIED = 7;
}
Symbol 998 MovieClip [__Packages.elements.Sight] Frame 0
class elements.Sight extends gdp.core.base.BaseMovieClip
{
var _x, _y, removeMovieClip;
function Sight (Void) {
super();
Mouse.hide();
}
function onMouseMove(Void) {
_x = _root._xmouse;
_y = _root._ymouse;
}
function onMouseUp(Void) {
Mouse.hide();
}
function removeSight(Void) {
Mouse.show();
removeMovieClip();
}
}
Symbol 999 MovieClip [__Packages.factories.tanks.TankFactory] Frame 0
class factories.tanks.TankFactory
{
static var instance;
var mcEnemyParent, mcPlayerParent;
function TankFactory (Void) {
}
static function getInstance() {
if (instance == null) {
instance = new factories.tanks.TankFactory();
}
return(instance);
}
function setEnemyParent(parent) {
mcEnemyParent = parent;
}
function setPlayerParent(parent) {
mcPlayerParent = parent;
}
function createEnemyTank(nType, nId) {
var _local3;
var _local4;
var _local7 = Math.random();
var _local6;
switch (nType) {
case vehicles.tanks.AbstractTank.EASY_TANK :
case vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER :
case vehicles.tanks.AbstractTank.EASY_TANK_HUNTER :
case vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER :
_local4 = "mcLightTank";
_local6 = vehicles.tanks.AbstractTank.EASY_TANK;
break;
case vehicles.tanks.AbstractTank.NORMAL_TANK :
case vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER :
case vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER :
case vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER :
_local4 = "mcNormalTank";
_local6 = vehicles.tanks.AbstractTank.NORMAL_TANK;
break;
case vehicles.tanks.AbstractTank.HARD_TANK :
case vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER :
case vehicles.tanks.AbstractTank.HARD_TANK_HUNTER :
case vehicles.tanks.AbstractTank.HARD_TANK_HUNTER_CRUSHER :
_local4 = "mcHardTank";
_local6 = vehicles.tanks.AbstractTank.HARD_TANK;
}
var _local5 = null;
if (((nType == vehicles.tanks.AbstractTank.EASY_TANK_CRUSHER) || (nType == vehicles.tanks.AbstractTank.NORMAL_TANK_CRUSHER)) || (nType == vehicles.tanks.AbstractTank.HARD_TANK_CRUSHER)) {
_local5 = vehicles.tanks.AbstractTank.CRUSHER_TANK;
} else if (((nType == vehicles.tanks.AbstractTank.EASY_TANK_HUNTER) || (nType == vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER)) || (nType == vehicles.tanks.AbstractTank.HARD_TANK_HUNTER)) {
_local5 = vehicles.tanks.AbstractTank.HUNTER_TANK;
} else if (((nType == vehicles.tanks.AbstractTank.EASY_TANK_HUNTER_CRUSHER) || (nType == vehicles.tanks.AbstractTank.NORMAL_TANK_HUNTER_CRUSHER)) || (nType == vehicles.tanks.AbstractTank.HARD_TANK_HUNTER_CRUSHER)) {
_local5 = vehicles.tanks.AbstractTank.HUNTER_CRUSHER_TANK;
}
_local3 = vehicles.tanks.enemies.EnemyTank(mcEnemyParent.attachMovie(_local4, _local4 + (tankId++), mcEnemyParent.getNextHighestDepth()));
_local3.setType(_local6);
_local3.setBehavior(_local5);
_local3._xscale = 85;
_local3._yscale = 85;
if (factories.bonuses.BonusFactory.getInstance().isBonuses()) {
if (_local7 >= 0.7) {
_local3.setBonusFlag(true);
}
}
return(_local3);
}
function createPlayerTank(Void) {
var _local2;
_local2 = vehicles.tanks.player.Player.getInstance(mcPlayerParent);
_local2._xscale = 90;
_local2._yscale = 90;
return(_local2);
}
static var tankId = 0;
}
Symbol 1000 MovieClip [__Packages.vehicles.tanks.enemies.EnemyTank] Frame 0
class vehicles.tanks.enemies.EnemyTank extends vehicles.tanks.AbstractTank
{
var cacheAsBitmap, mcLifeLine, mcBonus, bBonusTank, bMoving, bCanShoot, bDestroyed, nReloadTime, nLife, nActiveDirection, nLastShotTime, prcShowLineLife, nI, nJ, nBehavior, gotoAndStop, nPrevI, nPrevJ, nType, _x, _y, movingTween, waitTime, prcWait, removeMovieClip, _parent, _height, _width, nShootingPower, mcHitZone, nActiveTime, nMaxLife, nShowLifeLineTime;
function EnemyTank (Void) {
super();
cacheAsBitmap = true;
mcLifeLine._visible = false;
mcBonus._visible = false;
bBonusTank = false;
bMoving = false;
bCanShoot = false;
bDestroyed = false;
nReloadTime = 750;
nLife = 50;
nActiveDirection = vehicles.tanks.AbstractTank.DIRECTION_DOWN;
nLastShotTime = gdp.core.time.FrameTimer.getInstance().getTime();
prcShowLineLife = new gdp.core.process.Process(gdp.utils.Delegate.create(this, hideLifeLine));
}
function moveVehicle(gamePole) {
if (bMoving) {
return(undefined);
}
var _local19;
var _local18;
var _local2 = [null, 0, 0, 0, 0];
var _local13;
var _local6;
var _local14;
var _local20;
var _local21;
var _local15;
var _local16;
var _local23 = gamePole.getPoleWidth();
var _local22 = gamePole.getPoleHeight();
var _local5;
var _local7;
var _local12;
bMoving = true;
bCanShoot = false;
var _local9 = gamePole.isFreeForEnemyTank(nI + 1, nJ);
var _local10 = gamePole.isFreeForEnemyTank(nI - 1, nJ);
var _local11 = gamePole.isFreeForEnemyTank(nI, nJ + 1);
var _local8 = gamePole.isFreeForEnemyTank(nI, nJ - 1);
if (((_local9 != "free") && (_local9 != "wanted")) && (_local9 != "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] = _local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] - 1000;
}
if (((_local10 != "free") && (_local10 != "wanted")) && (_local10 != "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_UP] = _local2[vehicles.tanks.AbstractTank.DIRECTION_UP] - 1000;
}
if (((_local11 != "free") && (_local11 != "wanted")) && (_local11 != "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] - 1000;
}
if (((_local8 != "free") && (_local8 != "wanted")) && (_local8 != "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] - 1000;
}
if ((_local9 == "wanted") || (_local9 == "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] = _local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] - (random(2) ? 400 : 0);
}
if ((_local10 == "wanted") || (_local10 == "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_UP] = _local2[vehicles.tanks.AbstractTank.DIRECTION_UP] - (random(2) ? 400 : 0);
}
if ((_local11 == "wanted") || (_local11 == "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] - (random(2) ? 400 : 0);
}
if ((_local8 == "wanted") || (_local8 == "hq")) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] - (random(2) ? 400 : 0);
}
_local2[nActiveDirection] = _local2[nActiveDirection] + 2;
if (nActiveDirection == vehicles.tanks.AbstractTank.DIRECTION_DOWN) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_UP] = _local2[vehicles.tanks.AbstractTank.DIRECTION_UP] - 7;
}
if (nActiveDirection == vehicles.tanks.AbstractTank.DIRECTION_UP) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] = _local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] - 7;
}
if (nActiveDirection == vehicles.tanks.AbstractTank.DIRECTION_LEFT) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] - 7;
}
if (nActiveDirection == vehicles.tanks.AbstractTank.DIRECTION_RIGHT) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] - 7;
}
if ((nBehavior == vehicles.tanks.AbstractTank.CRUSHER_TANK) || (nBehavior == vehicles.tanks.AbstractTank.HUNTER_CRUSHER_TANK)) {
_local15 = 90;
} else {
_local15 = 30;
}
_local12 = Math.random() * 100;
if (_local12 <= _local15) {
_local6 = gamePole.checkForWantedBlock(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_DOWN);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] = _local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] + 100;
}
_local6 = gamePole.checkForWantedBlock(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_UP);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_UP] = _local2[vehicles.tanks.AbstractTank.DIRECTION_UP] + 100;
}
_local6 = gamePole.checkForWantedBlock(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_RIGHT);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] + 100;
}
_local6 = gamePole.checkForWantedBlock(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_LEFT);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] + 100;
}
}
if ((nBehavior == vehicles.tanks.AbstractTank.HUNTER_TANK) || (nBehavior == vehicles.tanks.AbstractTank.HUNTER_CRUSHER_TANK)) {
_local16 = 50;
} else {
_local16 = 20;
}
_local12 = Math.random() * 100;
if (_local12 <= _local16) {
_local6 = gamePole.checkForPlayerTankOrHeadquarters(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_DOWN);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] = _local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] + 100;
}
_local6 = gamePole.checkForPlayerTankOrHeadquarters(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_UP);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_UP] = _local2[vehicles.tanks.AbstractTank.DIRECTION_UP] + 100;
}
_local6 = gamePole.checkForPlayerTankOrHeadquarters(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_RIGHT);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] + 100;
}
_local6 = gamePole.checkForPlayerTankOrHeadquarters(nI, nJ, vehicles.tanks.AbstractTank.DIRECTION_LEFT);
if (_local6 != null) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] + 100;
}
}
_local14 = gamePole.getHeadquartersCoors();
_local20 = _local14.i - nI;
_local21 = _local14.j - nJ;
if (_local20 > 0) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] = _local2[vehicles.tanks.AbstractTank.DIRECTION_DOWN] + 5;
} else {
_local2[vehicles.tanks.AbstractTank.DIRECTION_UP] = _local2[vehicles.tanks.AbstractTank.DIRECTION_UP] + 5;
}
if (_local21 > 0) {
_local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_RIGHT] + 5;
} else {
_local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] = _local2[vehicles.tanks.AbstractTank.DIRECTION_LEFT] + 5;
}
_local7 = -1000;
var _local3 = 1;
while (_local3 < _local2.length) {
if (_local2[_local3] > _local7) {
_local5 = _local3;
_local7 = _local2[_local3];
}
_local3++;
}
if (gamePole.isFreeForEnemyTank(nI + vehicles.tanks.AbstractTank.aDirectionsArray[_local5].i, nJ + vehicles.tanks.AbstractTank.aDirectionsArray[_local5].j) == "free") {
gamePole.makeTrackTrace(nI, nJ, _local5, nActiveDirection);
if (_local5 != nActiveDirection) {
gotoAndStop(_local5);
nActiveDirection = _local5;
}
nPrevI = nI;
nPrevJ = nJ;
nI = nI + vehicles.tanks.AbstractTank.aDirectionsArray[_local5].i;
nJ = nJ + vehicles.tanks.AbstractTank.aDirectionsArray[_local5].j;
_local13 = gamePole.getTileCoors(nI, nJ);
gamePole.setOccupationType(nI, nJ, gameField.tiles.Tile.ENEMY_TANK_OCCUPIED);
gamePole.addTankToTile(nI, nJ, this);
var _local17 = ((nType == vehicles.tanks.AbstractTank.EASY_TANK) ? (vehicles.tanks.AbstractTank.EASY_SPEED) : (((nType == vehicles.tanks.AbstractTank.NORMAL_TANK) ? (vehicles.tanks.AbstractTank.NORMAL_SPEED) : (vehicles.tanks.AbstractTank.HARD_SPEED))));
_local19 = new gdp.utils.math.helpers.Point(_x, _y);
_local18 = new gdp.utils.math.helpers.Point(_local13.x, _local13.y);
movingTween = new gdp.ui.effects.tween.Tween(this, _local19, _local18, _local17);
movingTween.onEnd = gdp.utils.Delegate.create(this, onEndMoving, [gamePole]);
movingTween.run();
} else {
if (_local5 != nActiveDirection) {
gamePole.makeTrackTrace(nI, nJ, _local5, nActiveDirection);
gotoAndStop(_local5);
nActiveDirection = _local5;
}
waitTime = gdp.core.time.FrameTimer.getInstance().getTime();
prcWait = new gdp.core.process.Process(gdp.utils.Delegate.create(this, wait));
gdp.core.process.ProcessManager.getInstance().addProcess(prcWait);
bCanShoot = true;
}
}
function wait(Void) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - waitTime) >= 500) {
bMoving = false;
bCanShoot = true;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcWait);
return(0);
}
}
function onEndMoving(gamePole) {
gamePole.removeTankFromTile(nPrevI, nPrevJ, this);
if (gamePole.isTileFree(nPrevI, nPrevJ)) {
gamePole.setOccupationType(nPrevI, nPrevJ, gameField.tiles.Tile.FREE_TILE);
}
nPrevI = null;
nPrevJ = null;
bMoving = false;
bCanShoot = true;
}
function destroyVehicle(gamePole) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_DESTROY);
movingTween.stop();
gamePole.removeTankFromTile(nI, nJ, this);
if (gamePole.isTileFree(nI, nJ)) {
gamePole.setOccupationType(nI, nJ, gameField.tiles.Tile.FREE_TILE);
}
gamePole.removeTankFromTile(nPrevI, nPrevJ, this);
if (gamePole.isTileFree(nPrevI, nPrevJ)) {
gamePole.setOccupationType(nPrevI, nPrevJ, gameField.tiles.Tile.FREE_TILE);
}
mcLifeLine._visible = false;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcWait);
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
delete movingTween;
removeMovieClip();
}
function shoot(gamePole) {
var _local3;
var _local8;
var _local7;
var _local9;
var _local10;
var _local11;
var _local2;
var _local5;
var _local4 = false;
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nLastShotTime) >= nReloadTime) {
_local9 = Math.random() * 100;
if ((nBehavior == vehicles.tanks.AbstractTank.CRUSHER_TANK) || (nBehavior == vehicles.tanks.AbstractTank.HUNTER_CRUSHER_TANK)) {
_local10 = 90;
} else {
_local10 = 30;
}
if ((_local9 <= _local10) && (!_local4)) {
_local5 = gamePole.checkForWantedBlock(nI, nJ, nActiveDirection);
if (_local5 != null) {
_local4 = true;
}
}
_local9 = Math.random() * 100;
if ((nBehavior == vehicles.tanks.AbstractTank.HUNTER_TANK) || (nBehavior == vehicles.tanks.AbstractTank.HUNTER_CRUSHER_TANK)) {
_local11 = 95;
} else {
_local11 = 40;
}
if ((_local9 <= _local11) && (!_local4)) {
_local5 = gamePole.checkForPlayerTankOrHeadquarters(nI, nJ, nActiveDirection);
if (_local5 != null) {
_local4 = true;
}
}
if (_local4) {
_parent._parent.localToGlobal(_local5);
switch (nActiveDirection) {
case vehicles.tanks.AbstractTank.DIRECTION_UP :
_local2 = {x:_x, y:_y - (_height / 2)};
_local8 = 0;
_local7 = -elements.Shell.SIMPLE_SHELL_SPEED;
break;
case vehicles.tanks.AbstractTank.DIRECTION_DOWN :
_local2 = {x:_x, y:_y + (_height / 2)};
_local8 = 0;
_local7 = elements.Shell.SIMPLE_SHELL_SPEED;
break;
case vehicles.tanks.AbstractTank.DIRECTION_LEFT :
_local2 = {x:_x - (_width / 2), y:_y};
_local8 = -elements.Shell.SIMPLE_SHELL_SPEED;
_local7 = 0;
break;
case vehicles.tanks.AbstractTank.DIRECTION_RIGHT :
_local2 = {x:_x + (_width / 2), y:_y};
_local8 = elements.Shell.SIMPLE_SHELL_SPEED;
_local7 = 0;
}
var _local6 = gameField.GameField.getInstance().getFieldForBullet();
_local3 = elements.Shell(_local6.attachMovie("mcSimpleShell", "mcShell" + (helpers.World.boomID++), _local6.getNextHighestDepth()));
_local3._x = _local2.x;
_local3._y = _local2.y;
_local3._rotation = vehicles.tanks.AbstractTank.aAnglesArray[nActiveDirection];
_local3.setShellSpeed({x:_local8, y:_local7});
_local3.setShellPower(nShootingPower);
_local6.attachMovie("shotFire", "shotFire" + (helpers.World.boomID++), _local6.getNextHighestDepth(), {_x:_local2.x, _y:_local2.y});
engine.GamePlayEngine.getInstance().addShell(_local3, false);
nLastShotTime = gdp.core.time.FrameTimer.getInstance().getTime();
}
}
}
function hit(mcCollidedShell, playSound) {
var _local2 = mcCollidedShell.getHitZone();
var _local3;
if (playSound == null) {
playSound = true;
}
if (mcHitZone.hitTest(_local2)) {
if (playSound) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TANK_HIT);
}
_local3 = mcCollidedShell.getShellPower();
nLife = nLife - _local3;
if (nLife <= 0) {
bDestroyed = true;
} else {
showLife();
}
return(true);
}
return(false);
}
function bombHit(Void) {
var _local2 = factories.bonuses.BonusFactory.BOMB_DAMAGE;
nLife = nLife - _local2;
if (nLife <= 0) {
bDestroyed = true;
return(true);
}
showLife();
return(false);
}
function isMoving(Void) {
return(bMoving);
}
function isCanShoot() {
return(bCanShoot);
}
function isDestroyed(Void) {
return(bDestroyed);
}
function showLife() {
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
nActiveTime = gdp.core.time.FrameTimer.getInstance().getTime();
gdp.core.process.ProcessManager.getInstance().addProcess(prcShowLineLife);
var _local2 = Math.round(100 * (1 - (nLife / nMaxLife)));
if (_local2 <= 0) {
_local2 = 1;
} else if (_local2 > 100) {
_local2 = 100;
}
mcLifeLine.gotoAndStop(_local2);
mcLifeLine._visible = true;
}
function hideLifeLine(Void) {
if ((gdp.core.time.FrameTimer.getInstance().getTime() - nActiveTime) >= nShowLifeLineTime) {
mcLifeLine._visible = false;
gdp.core.process.ProcessManager.getInstance().removeProcessByProcess(prcShowLineLife);
}
}
function getType(Void) {
return(nType);
}
function setType(nToSet) {
nType = nToSet;
switch (nType) {
case vehicles.tanks.AbstractTank.EASY_TANK :
nMaxLife = (nLife = 20 * core.Game.getInstance().getIterationNumber());
nShootingPower = 10 + (5 * core.Game.getInstance().getIterationNumber());
nReloadTime = 1000;
break;
case vehicles.tanks.AbstractTank.NORMAL_TANK :
nMaxLife = (nLife = 30 * core.Game.getInstance().getIterationNumber());
nShootingPower = 15 + (5 * core.Game.getInstance().getIterationNumber());
nReloadTime = 2000;
break;
case vehicles.tanks.AbstractTank.HARD_TANK :
nMaxLife = (nLife = 50 * core.Game.getInstance().getIterationNumber());
nShootingPower = 20 + (5 * core.Game.getInstance().getIterationNumber());
nReloadTime = 3000;
}
}
function setIJ(i, j) {
nI = i;
nJ = j;
}
function getIJ(Void) {
return({i:nI, j:nJ});
}
function getHitZone() {
return(mcHitZone);
}
function setBehavior(nToSet) {
nBehavior = nToSet;
}
function getBehavior(Void) {
return(nBehavior);
}
function setBonusFlag(bFlag) {
bBonusTank = bFlag;
if (bBonusTank) {
mcBonus._visible = true;
} else {
mcBonus._visible = false;
}
}
function getBonusFlag(Void) {
return(bBonusTank);
}
function getActiveDirection(Void) {
return(nActiveDirection);
}
}
Symbol 1001 MovieClip [__Packages.elements.ScoreDigits] Frame 0
class elements.ScoreDigits extends gdp.core.base.BaseMovieClip
{
static var instance;
var _x, _y, removeMovieClip;
function ScoreDigits (Void) {
super();
_x = 315;
_y = 0;
setNumber(0);
}
static function getInstance() {
if (instance == null) {
instance = core.Game.getInstance().attachMovie("mcScoreDigits", "ScoreDigitsInstance", core.Game.getInstance().getNextHighestDepth());
}
return(instance);
}
function setNumber(num) {
var _local2 = 1;
while (_local2 <= 8) {
this["d" + _local2].gotoAndStop(1);
_local2++;
}
var _local3 = String(num);
var _local4 = 1;
_local2 = _local3.length - 1;
while (_local2 >= 0) {
this["d" + _local4].gotoAndStop(Number(_local3.charAt(_local2)) + 1);
_local4++;
_local2--;
}
}
function setTanks(num) {
var _local2 = 1;
while (_local2 <= 2) {
this["t" + _local2].gotoAndStop(1);
_local2++;
}
var _local3 = String(num);
var _local4 = 1;
_local2 = _local3.length - 1;
while (_local2 >= 0) {
this["t" + _local4].gotoAndStop(Number(_local3.charAt(_local2)) + 1);
_local4++;
_local2--;
}
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 1002 MovieClip [__Packages.elements.Lifes] Frame 0
class elements.Lifes extends gdp.core.base.BaseMovieClip
{
static var instance;
var _x, _y, gotoAndStop, removeMovieClip;
function Lifes (Void) {
super();
_x = 5;
_y = 5;
}
static function getInstance() {
if (instance == null) {
instance = core.Game.getInstance().attachMovie("mcLifes", "LifesInstance", core.Game.getInstance().getNextHighestDepth());
}
return(instance);
}
function setLifes(num) {
if (num <= 0) {
removeInstance();
return(undefined);
}
gotoAndStop(num);
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 1003 MovieClip [__Packages.gdp.core.executor.Executor] Frame 0
class gdp.core.executor.Executor extends gdp.core.base.BaseClass
{
static var currentExecutor;
var bRun, parentExecutor, dispatchEvent, nClassId;
function Executor (bSyn, bInverse) {
super();
this.bSyn = bSyn;
this.bInverse = bInverse;
aTasks = new Array();
}
function ps_wait(nStDelay, nDelayLength, nId) {
if (gdp.core.time.FrameTimer.getInstance().getTime() > (nStDelay + nDelayLength)) {
execute();
return(0);
}
}
function addTask() {
if (arguments[0] instanceof gdp.core.executor.ExecutorTask) {
addTaskByExecutorTast.apply(this, arguments);
} else {
addTaskByFunction.apply(this, arguments);
}
}
function addTaskByFunction(fTask, bWaitCallback, sEvent, aArgsEventEqual) {
var _local2 = new gdp.core.executor.ExecutorTask(fTask, bWaitCallback, sEvent, aArgsEventEqual);
addTaskByExecutorTast(_local2);
}
function addTaskByExecutorTast(exTask) {
if (bInverse) {
aTasks.unshift(exTask);
} else {
aTasks.push(exTask);
}
}
function addDelay(nMs) {
if (nMs > 0) {
addTaskByFunction(gdp.utils.Delegate.create(this, wait, [nMs]), true);
}
}
function wait(nMs) {
var _local2 = gdp.core.time.FrameTimer.getInstance().getTime();
var _local3 = new gdp.core.process.Process(gdp.utils.Delegate.create(this, ps_wait, [_local2, nMs, nWaitCount++]));
gdp.core.process.ProcessManager.getInstance().addProcess(_local3);
}
function run() {
bRun = true;
if (aTasks.length == 0) {
endExecutor();
return(undefined);
}
execute();
}
function execute(Void) {
if (parentExecutor == undefined) {
parentExecutor = currentExecutor;
}
currentExecutor = this;
if (bSyn) {
executeSynchronously();
} else {
executeStepByStep();
}
}
function executeSynchronously(Void) {
while (aTasks.length > 0) {
var _local2 = aTasks.splice(0, 1)[0];
if ((_local2.getEvent() != null) && (_local2.getTarget() != null)) {
setEventListener(_local2);
}
var _local3 = _local2.invoke();
switch (_local3) {
case BREAK :
breaking();
return(undefined);
case SKIP_NEXT :
aTasks.splice(0, 1);
break;
case REPEAT :
aTasks.unshift(_local2);
}
nTasksCount++;
if ((!_local2.getWaitCallback()) && (_local2.getEvent() == null)) {
taskCallback();
}
}
}
function executeStepByStep(Void) {
var _local2 = aTasks.splice(0, 1)[0];
if ((_local2.getEvent() != null) && (_local2.getTarget() != null)) {
setEventListener(_local2);
}
var _local3 = _local2.getFunction()();
switch (_local3) {
case BREAK :
breaking();
return(undefined);
case SKIP_NEXT :
aTasks.splice(0, 1);
break;
case REPEAT :
aTasks.unshift(_local2);
}
if ((!_local2.getWaitCallback()) && (_local2.getEvent() == null)) {
taskCallback();
}
}
function setEventListener(executorTask) {
executorTask.getTarget().addEventListener(executorTask.getEvent(), gdp.utils.Delegate.create(this, onListenEvent, [executorTask]));
}
function onListenEvent(event, executorTask) {
executorTask.getTarget().removeEventListener(executorTask.getEvent(), gdp.utils.Delegate.create(this, onListenEvent, [executorTask]));
taskCallback();
}
function breaking() {
aTasks = new Array();
nTasksCount = 0;
dispatchEvent(new gdp.core.executor.ExecutorEvent(gdp.core.executor.ExecutorEvent.BREAK));
onBreak();
}
function taskCallback() {
if (nTasksCount < 0) {
return(undefined);
}
if (bSyn) {
nTasksCount--;
if (nTasksCount == 0) {
return(endExecutor());
}
} else {
if (aTasks.length == 0) {
return(endExecutor());
}
execute();
}
}
function endExecutor() {
bRun = false;
currentExecutor = parentExecutor;
dispatchEvent(new gdp.core.executor.ExecutorEvent(gdp.core.executor.ExecutorEvent.COMPLETE));
return(onComplete());
}
function description() {
return(("[Executor " + nClassId) + "]");
}
function isRun(Void) {
return(bRun);
}
function removeAllTasks(Void) {
aTasks = new Array();
bRun = false;
}
static var BREAK = 100;
static var SKIP_NEXT = 101;
static var REPEAT = 102;
var aTasks = null;
var nTasksCount = 0;
var nWaitCount = 0;
var bInverse = false;
var bSyn = false;
var onComplete = null;
var onBreak = null;
}
Symbol 1004 MovieClip [__Packages.gdp.core.executor.ExecutorTask] Frame 0
class gdp.core.executor.ExecutorTask extends gdp.core.base.SimpleClass
{
function ExecutorTask (fFunction, bWaitCallback, sEvent, aEventArgs) {
super();
this.fFunction = fFunction;
this.bWaitCallback = bWaitCallback;
this.sEvent = sEvent;
this.aEventArgs = aEventArgs;
}
function clone(Void) {
return(new gdp.core.executor.ExecutorTask(fFunction, bWaitCallback, sEvent, aEventArgs));
}
function setFunction(fFunction) {
this.fFunction = fFunction;
}
function getFunction(Void) {
return(fFunction);
}
function getTarget(Void) {
return(fFunction.target);
}
function setWaitCallback(bWaitCallback) {
this.bWaitCallback = bWaitCallback;
}
function getWaitCallback(Void) {
return(bWaitCallback);
}
function setEvent(sEvent) {
this.sEvent = sEvent;
}
function getEvent(Void) {
return(sEvent);
}
function setEventArguments(aEventArgs) {
this.aEventArgs = aEventArgs;
}
function getEventArguments(Void) {
return(aEventArgs);
}
function invoke(Void) {
return(Number(fFunction()));
}
var fFunction = null;
var bWaitCallback = null;
var sEvent = null;
var aEventArgs = null;
}
Symbol 1005 MovieClip [__Packages.gdp.core.executor.ExecutorEvent] Frame 0
class gdp.core.executor.ExecutorEvent extends gdp.env.events.Event
{
function ExecutorEvent (sType, bBubbles, bCancelable) {
super(sType, bBubbles, bCancelable);
}
static var BREAK = "break";
static var COMPLETE = "complete";
}
Symbol 1006 MovieClip [__Packages.elements.BonusElement] Frame 0
class elements.BonusElement extends gdp.core.base.BaseMovieClip
{
var nType, gotoAndStop, mcBonusTime;
function BonusElement (Void) {
super();
}
function setType(nNewType) {
nType = nNewType;
gotoAndStop(nType);
}
function getType(Void) {
return(nType);
}
function restartTime(Void) {
mcBonusTime.gotoAndStop(1);
}
function decreaseTime(Void) {
mcBonusTime.nextFrame();
}
function timeRemaining(Void) {
var _local2 = gdp.core.time.FrameTimer.getInstance().getFps();
return((_local2 * factories.bonuses.BonusFactory.BONUS_TIME) - mcBonusTime._currentframe);
}
}
Symbol 1007 MovieClip [__Packages.screens.PreGame] Frame 0
class screens.PreGame extends gdp.core.base.BaseMovieClip
{
static var instance, parentMc;
var mcSound, mcMusic, btnPlay, btnMoreGames, greatgames_btn, greatgames, enkCom, btnDownload, removeMovieClip, getURL;
function PreGame (Void) {
super();
instance = this;
helpers.soundEngine.CSound.getInstance().playMenuMusic();
initSoundButtons();
mcSound.onRelease = gdp.utils.Delegate.create(this, changeSound);
mcMusic.onRelease = gdp.utils.Delegate.create(this, changeMusic);
btnPlay.onRelease = gdp.utils.Delegate.create(this, startGame);
greatgames_btn.onRelease = (btnMoreGames.onRelease = gdp.utils.Delegate.create(this, moreGames));
greatgames_btn.onRollOver = gdp.utils.Delegate.create(this, function () {
this.greatgames.gotoAndPlay("zoom");
});
if (_root.downloadURL != undefined) {
greatgames_btn._visible = (greatgames._visible = false);
btnMoreGames._visible = false;
enkCom._visible = false;
}
btnDownload.onRelease = gdp.utils.Delegate.create(this, downloadFullGame);
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.PreGame(mcParent.attachMovie("PreGame", "PreGameInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function initSoundButtons(Void) {
var _local2 = helpers.soundEngine.CSound.getInstance().getSound();
var _local3 = helpers.soundEngine.CSound.getInstance().getMusic();
mcSound.mc._visible = !_local2;
mcMusic.mc._visible = !_local3;
}
function startGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
engine.GamePlayEngine.getInstance(parentMc).initLevel(parentMc.getCurLevel());
parentMc.showBetweenLevelsScreen();
removeInstance();
}
function changeSound(Void) {
var _local2 = helpers.soundEngine.CSound.getInstance().getSound();
_local2 = !_local2;
mcSound.mc._visible = !_local2;
helpers.soundEngine.CSound.getInstance().setSound(_local2);
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
}
function changeMusic(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
var _local2 = helpers.soundEngine.CSound.getInstance().getMusic();
_local2 = !_local2;
mcMusic.mc._visible = !_local2;
helpers.soundEngine.CSound.getInstance().setMusic(_local2);
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
function downloadFullGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sDownloadURL, helpers.World.sTarget);
}
function moreGames(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sMoreGamesURL, helpers.World.sTarget);
}
}
Symbol 1008 MovieClip [__Packages.screens.Loose] Frame 0
class screens.Loose extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var btnAgain, btnDownload, btnBuy, btnSubmit, txtScore, mcOver, getURL, removeMovieClip, itName;
function Loose (Void) {
super();
btnAgain.onRelease = gdp.utils.Delegate.create(this, mainMenu);
btnDownload.onRelease = gdp.utils.Delegate.create(this, downloadFullGame);
btnBuy.onRelease = gdp.utils.Delegate.create(this, buyGame);
btnSubmit.onRelease = gdp.utils.Delegate.create(this, submitScores);
txtScore.text = "Score:\r" + _root.score;
if (core.Game.getInstance().useHS) {
mcOver._visible = false;
} else {
mcOver.onPress = null;
mcOver.useHandCursor = false;
}
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.Loose(mcParent.attachMovie("Loose", "LooseInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function mainMenu(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
parentMc.resetAll();
engine.GamePlayEngine.getInstance(parentMc).initLevel(parentMc.getCurLevel());
parentMc.showBetweenLevelsScreen();
removeInstance();
}
function buyGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sBuyURL, helpers.World.sTarget);
}
function downloadFullGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sDownloadURL, helpers.World.sTarget);
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
function getEncodedValue(v, key) {
var _local2 = (v ^ key).toString();
var _local5 = new Array();
var _local3 = new Array();
var _local1;
_local5.push(key);
_local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2.charCodeAt(_local1) ^ key);
_local1++;
}
_local5.push(_local3.length ^ key);
_local5 = _local5.concat(_local3);
return(_local5.join(","));
}
function getScoreEncoded(Void) {
var _local6 = random(16777215);
var _local5 = random(16777215);
while (_local5 == _local6) {
_local5 = random(16777215);
}
var _local4 = random(16777215);
while ((_local4 == _local6) || (_local4 == _local5)) {
_local4 = random(16777215);
}
var _local3 = random(16777215);
while (((_local3 == _local6) || (_local3 == _local5)) || (_local3 == _local4)) {
_local3 = random(16777215);
}
var _local7 = _root.numberOfLevel + (_root.levelsNumber * _root.numberOfGame);
return(new Array(getEncodedValue(_root.score, _local6), getEncodedValue(_local7, _local5), getEncodedValue(_root.score, _local4), getEncodedValue(_local7, _local3)));
}
function submitScores(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
_root.playername = itName.text;
_root.hs_clip.removeMovieClip();
_root.createEmptyMovieClip("hs_clip", _root.getNextHighestDepth());
_root._r = getScoreEncoded();
_root.hs_clip.name = _root.playername;
_root.hs_clip.d1 = _root._r[0].toString();
_root.hs_clip.d2 = _root._r[1].toString();
_root.hs_clip.d3 = _root._r[2].toString();
_root.hs_clip.d4 = _root._r[3].toString();
_root.hs_clip.getURL(_root.hiscoreURL, "_blank", "POST");
}
}
Symbol 1009 MovieClip [__Packages.screens.GameWin] Frame 0
class screens.GameWin extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var btnAgain, btnDownload, btnBuy, btnSubmit, txtScore, mcOver, removeMovieClip, getURL, itName;
function GameWin (Void) {
super();
btnAgain.onRelease = gdp.utils.Delegate.create(this, playLevelsAgain);
btnDownload.onRelease = gdp.utils.Delegate.create(this, downloadFullGame);
btnBuy.onRelease = gdp.utils.Delegate.create(this, buyGame);
btnSubmit.onRelease = gdp.utils.Delegate.create(this, submitScores);
txtScore.text = "Score:\r" + _root.score;
if (core.Game.getInstance().useHS) {
mcOver._visible = false;
} else {
mcOver.onPress = null;
mcOver.useHandCursor = false;
}
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.GameWin(mcParent.attachMovie("GameWin", "GameWinInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function playLevelsAgain(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
parentMc.increaseIteration();
parentMc.setCurLevel(1);
engine.GamePlayEngine.getInstance().initLevel(parentMc.getCurLevel());
parentMc.showBetweenLevelsScreen();
removeInstance();
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
function buyGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sBuyURL, helpers.World.sTarget);
}
function downloadFullGame(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sDownloadURL, helpers.World.sTarget);
}
function getEncodedValue(v, key) {
var _local2 = (v ^ key).toString();
var _local5 = new Array();
var _local3 = new Array();
var _local1;
_local5.push(key);
_local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2.charCodeAt(_local1) ^ key);
_local1++;
}
_local5.push(_local3.length ^ key);
_local5 = _local5.concat(_local3);
return(_local5.join(","));
}
function getScoreEncoded(Void) {
var _local6 = random(16777215);
var _local5 = random(16777215);
while (_local5 == _local6) {
_local5 = random(16777215);
}
var _local4 = random(16777215);
while ((_local4 == _local6) || (_local4 == _local5)) {
_local4 = random(16777215);
}
var _local3 = random(16777215);
while (((_local3 == _local6) || (_local3 == _local5)) || (_local3 == _local4)) {
_local3 = random(16777215);
}
var _local7 = _root.numberOfLevel + (_root.levelsNumber * _root.numberOfGame);
return(new Array(getEncodedValue(_root.score, _local6), getEncodedValue(_local7, _local5), getEncodedValue(_root.score, _local4), getEncodedValue(_local7, _local3)));
}
function submitScores(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
_root.playername = itName.text;
_root.hs_clip.removeMovieClip();
_root.createEmptyMovieClip("hs_clip", _root.getNextHighestDepth());
_root._r = getScoreEncoded();
_root.hs_clip.name = _root.playername;
_root.hs_clip.d1 = _root._r[0].toString();
_root.hs_clip.d2 = _root._r[1].toString();
_root.hs_clip.d3 = _root._r[2].toString();
_root.hs_clip.d4 = _root._r[3].toString();
_root.hs_clip.getURL(_root.hiscoreURL, "_blank", "POST");
}
}
Symbol 1010 MovieClip [__Packages.screens.BetweenLevels] Frame 0
class screens.BetweenLevels extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var txtInfo, btnStart, btnWorkshop, removeMovieClip;
function BetweenLevels (Void) {
super();
var _local5 = gameLevels.LevelsMap.getInstance().getCurrentLevel(parentMc.getCurLevel());
var _local3 = "Destroy all enemies\r";
var _local4 = _local5.getHeadquartersCoors();
if (_local4 != null) {
_local3 = _local3 + "Protect your HQ\r";
}
txtInfo.text = _local3;
btnStart.onRelease = gdp.utils.Delegate.create(this, startLevel);
btnWorkshop.onRelease = gdp.utils.Delegate.create(this, gotoWorkshop);
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.BetweenLevels(mcParent.attachMovie("BetweenLevels", "BetweenLevelsInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function gotoWorkshop(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
parentMc.showWorkShop();
removeInstance();
}
function startLevel(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
var _local2 = vehicles.tanks.player.Player.getInstance().getAllWeapons();
if ((parentMc.getCurLevel() == 1) && (parentMc.bShowHelp)) {
parentMc.showHelp();
} else if ((parentMc.getCurLevel() == 2) && (!gdp.utils.ArrayUtil.contains(_local2, vehicles.tanks.player.Player.MACHINEGUN))) {
parentMc.showMGMessage();
} else {
engine.GamePlayEngine.getInstance().startLevel();
}
removeInstance();
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 1011 MovieClip [__Packages.screens.WorkshopScreen] Frame 0
class screens.WorkshopScreen extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var playerTank, aUpgradeElements, aWeaponCost, aUpgradeCost, nActiveWeapon, mcWeaponPointer, attachMovie, getNextHighestDepth, mcBurrel, mcMachinegun, mcRocket, mcElectro, mcFlamethrower, mcShootPowerUpgrade, mcShellSpeedUpgrade, mcPlayerArmourUpgrade, mcPlayerSpeedUpgrade, mcReloadSpeedUpgrade, btnContinue, txtMoney, txtSpeed, txtArmor, txtDamage, txtReload, txtWCannon, txtWMinigun, txtWMinigunNEM, txtWRocket, txtWRocketNEM, txtWLightning, txtWFlame, objUpgradeTF, txtUpgrArmorNEM, txtUpgrSpeedNEM, txtUpgrReloadNEM, txtUpgrProjSpeedNEM, txtUpgrDamageNEM, txtUpgrArmor, txtUpgrSpeed, txtUpgrReload, txtUpgrProjSpeed, txtUpgrDamage, mcDialog, mcAlphaPopUp, getURL, removeMovieClip;
function WorkshopScreen (Void) {
super();
playerTank = vehicles.tanks.player.Player.getInstance();
aUpgradeElements = new Array();
aWeaponCost = [0, 100, 500];
aUpgradeCost = [200, 300, 400, 500, 600];
nActiveWeapon = playerTank.getActiveWeapon();
mcWeaponPointer = attachMovie("mcActiveWeaponPointer", "mcPointer", getNextHighestDepth());
mcBurrel = elements.WeaponElement(attachMovie("mcElement", "mcBurrel", getNextHighestDepth(), {_x:331, _y:86}));
mcMachinegun = elements.WeaponElement(attachMovie("mcElement", "mcMachinegun", getNextHighestDepth(), {_x:332, _y:125}));
mcRocket = elements.WeaponElement(attachMovie("mcElement", "mcRocket", getNextHighestDepth(), {_x:332, _y:163}));
mcElectro = elements.WeaponElement(attachMovie("mcElement", "mcElectro", getNextHighestDepth(), {_x:332, _y:203}));
mcFlamethrower = elements.WeaponElement(attachMovie("mcElement", "mcFlamethrower", getNextHighestDepth(), {_x:331, _y:241}));
mcShootPowerUpgrade = elements.WeaponElement(attachMovie("mcElement", "mcShootPowerUpgrade", getNextHighestDepth(), {_x:17, _y:282}));
mcShellSpeedUpgrade = elements.WeaponElement(attachMovie("mcElement", "mcShellSpeedUpgrade", getNextHighestDepth(), {_x:17, _y:230}));
mcPlayerArmourUpgrade = elements.WeaponElement(attachMovie("mcElement", "mcPlayerArmourUpgrade", getNextHighestDepth(), {_x:16, _y:74}));
mcPlayerSpeedUpgrade = elements.WeaponElement(attachMovie("mcElement", "mcPlayerSpeedUpgrade", getNextHighestDepth(), {_x:17, _y:125}));
mcReloadSpeedUpgrade = elements.WeaponElement(attachMovie("mcElement", "mcReloadSpeedUpgrade", getNextHighestDepth(), {_x:17, _y:178}));
btnContinue.onRelease = gdp.utils.Delegate.create(this, startLevel);
txtMoney.text = parentMc.getPlyerMoney().toString();
initWeapons();
setActiveWeapon();
initUpgrades();
updateTankInfo();
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = mcParent.attachMovie("mcWorkshopScreen", "WorkshopInstance", mcParent.getNextHighestDepth());
}
}
return(instance);
}
function updateTankInfo(Void) {
var _local2 = playerTank.getAllUpgrades();
var _local4 = playerTank.getWeaponInfo(nActiveWeapon);
txtSpeed.text = (83 * (1 + ((_local2[vehicles.tanks.player.Player.PLAYER_SPEED_UPGRADE] * vehicles.tanks.player.Player.nSpeedUpgrade) / 100))) + " mph";
txtArmor.text = (_local2[vehicles.tanks.player.Player.ARMOUR_UPGRADE] * vehicles.tanks.player.Player.nArmorUpgrade) + " %";
txtDamage.text = String(Math.round(_local4.power * (1 + ((_local2[vehicles.tanks.player.Player.SHOOTING_POWER_UPGRADE] * vehicles.tanks.player.Player.nShootPowerUpgrade) / 100))));
var _local3 = _local4.reload * (1 - ((_local2[vehicles.tanks.player.Player.RELOAD_SPEED_UPGRADE] * vehicles.tanks.player.Player.nReloadUpgrade) / 100));
_local3 = Math.round(_local3 / 10);
txtReload.text = ("0." + _local3) + " sec";
}
function initWeapons(Void) {
var _local2;
var _local3;
playerTank = vehicles.tanks.player.Player.getInstance();
_local2 = playerTank.getAllWeapons();
txtWCannon.text = "Cannon\rPrice: -";
mcBurrel.setBuyFlag(true);
mcBurrel.onRelease = gdp.utils.Delegate.create(this, changeActiveWeapon, [vehicles.tanks.player.Player.BURREL]);
txtWMinigun.text = "Minigun\rPrice: ";
if (gdp.utils.ArrayUtil.contains(_local2, vehicles.tanks.player.Player.MACHINEGUN)) {
txtWMinigun.text = txtWMinigun.text + "-";
mcMachinegun.setBuyFlag(true);
mcMachinegun.onRelease = gdp.utils.Delegate.create(this, changeActiveWeapon, [vehicles.tanks.player.Player.MACHINEGUN]);
txtWMinigunNEM._visible = false;
} else {
txtWMinigun.text = txtWMinigun.text + ("" + aWeaponCost[vehicles.tanks.player.Player.MACHINEGUN]);
mcMachinegun.onRelease = gdp.utils.Delegate.create(this, tryToBuyWeapon, [vehicles.tanks.player.Player.MACHINEGUN, "Minigun"]);
if (parentMc.getPlyerMoney() >= aWeaponCost[vehicles.tanks.player.Player.MACHINEGUN]) {
txtWMinigunNEM._visible = false;
}
}
txtWRocket.text = "Rocket\rPrice: ";
if (gdp.utils.ArrayUtil.contains(_local2, vehicles.tanks.player.Player.ROCKET)) {
txtWRocket.text = txtWRocket.text + "-";
mcRocket.setBuyFlag(true);
mcRocket.onRelease = gdp.utils.Delegate.create(this, changeActiveWeapon, [vehicles.tanks.player.Player.ROCKET, "Rocket"]);
txtWRocketNEM._visible = false;
} else {
txtWRocket.text = txtWRocket.text + ("" + aWeaponCost[vehicles.tanks.player.Player.ROCKET]);
mcRocket.onRelease = gdp.utils.Delegate.create(this, tryToBuyWeapon, [vehicles.tanks.player.Player.ROCKET]);
if (parentMc.getPlyerMoney() >= aWeaponCost[vehicles.tanks.player.Player.ROCKET]) {
txtWRocketNEM._visible = false;
}
}
txtWLightning.text = "Lightning\rPrice: -";
mcElectro.onRelease = gdp.utils.Delegate.create(this, downloadFullVersion);
mcElectro.onRollOver = gdp.utils.Delegate.create(this, showPopUp, [mcElectro, "This feature is not available in online version. Click to download FULL version for free."]);
mcElectro.onRollOut = gdp.utils.Delegate.create(this, removePopUp);
txtWFlame.text = "Flamethrower\rPrice: -";
mcFlamethrower.onRelease = gdp.utils.Delegate.create(this, downloadFullVersion);
mcFlamethrower.onRollOver = gdp.utils.Delegate.create(this, showPopUp, [mcFlamethrower, "This feature is not available in online version. Click to download FULL version for free."]);
mcFlamethrower.onRollOut = gdp.utils.Delegate.create(this, removePopUp);
}
function initUpgrades(Void) {
var _local2;
var _local3 = playerTank.getAllUpgrades();
var _local4 = new Array();
objUpgradeTF = new Object();
aUpgradeElements.push(mcPlayerArmourUpgrade);
objUpgradeTF[mcPlayerArmourUpgrade._name] = txtUpgrArmorNEM;
_local4.push("Armor");
aUpgradeElements.push(mcPlayerSpeedUpgrade);
objUpgradeTF[mcPlayerSpeedUpgrade._name] = txtUpgrSpeedNEM;
_local4.push("Movement Speed");
aUpgradeElements.push(mcReloadSpeedUpgrade);
objUpgradeTF[mcReloadSpeedUpgrade._name] = txtUpgrReloadNEM;
_local4.push("Reload Time");
aUpgradeElements.push(mcShellSpeedUpgrade);
objUpgradeTF[mcShellSpeedUpgrade._name] = txtUpgrProjSpeedNEM;
_local4.push("Projectile Speed");
aUpgradeElements.push(mcShootPowerUpgrade);
objUpgradeTF[mcShootPowerUpgrade._name] = txtUpgrDamageNEM;
_local4.push("Damage");
txtUpgrArmor.text = "Armor\rPrice: " + ((_local3[vehicles.tanks.player.Player.ARMOUR_UPGRADE] == 0) ? (aUpgradeCost[vehicles.tanks.player.Player.ARMOUR_UPGRADE]) : "-");
txtUpgrSpeed.text = "Movement speed\rPrice: " + ((_local3[vehicles.tanks.player.Player.PLAYER_SPEED_UPGRADE] == 0) ? (aUpgradeCost[vehicles.tanks.player.Player.PLAYER_SPEED_UPGRADE]) : "-");
txtUpgrReload.text = "Reload time\rPrice: " + ((_local3[vehicles.tanks.player.Player.RELOAD_SPEED_UPGRADE] == 0) ? (aUpgradeCost[vehicles.tanks.player.Player.RELOAD_SPEED_UPGRADE]) : "-");
txtUpgrProjSpeed.text = "Projectile speed\rPrice: " + ((_local3[vehicles.tanks.player.Player.SHELL_SPEED_UPGRADE] == 0) ? (aUpgradeCost[vehicles.tanks.player.Player.SHELL_SPEED_UPGRADE]) : "-");
txtUpgrDamage.text = "Damage\rPrice: " + ((_local3[vehicles.tanks.player.Player.SHOOTING_POWER_UPGRADE] == 0) ? (aUpgradeCost[vehicles.tanks.player.Player.SHOOTING_POWER_UPGRADE]) : "-");
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == 0) {
aUpgradeElements[_local2].onRelease = gdp.utils.Delegate.create(this, tryToBuyUpgrade, [_local2, _local4[_local2]]);
if (parentMc.getPlyerMoney() >= aUpgradeCost[_local2]) {
objUpgradeTF[aUpgradeElements[_local2]._name]._visible = false;
}
} else {
aUpgradeElements[_local2].setBuyFlag(true);
objUpgradeTF[aUpgradeElements[_local2]._name]._visible = false;
}
_local2++;
}
}
function setActiveWeapon(Void) {
var _local2;
if (nActiveWeapon == vehicles.tanks.player.Player.BURREL) {
_local2 = mcBurrel;
} else if (nActiveWeapon == vehicles.tanks.player.Player.MACHINEGUN) {
_local2 = mcMachinegun;
} else if (nActiveWeapon == vehicles.tanks.player.Player.ROCKET) {
_local2 = mcRocket;
}
mcWeaponPointer._y = _local2._y;
mcWeaponPointer._x = _local2._x + 80;
updateTankInfo();
}
function changeActiveWeapon(nWeapon) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
playerTank.setActiveWeapon(nWeapon);
nActiveWeapon = nWeapon;
setActiveWeapon();
}
function tryToBuyUpgrade(nUpgradeNumber, name) {
if (parentMc.getPlyerMoney() >= aUpgradeCost[nUpgradeNumber]) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
mcDialog = attachMovie("mcQuestion", "mcPrompt", getNextHighestDepth());
mcDialog.txtMessage.text = ((("Are you sure want to buy " + name) + " for ") + aUpgradeCost[nUpgradeNumber]) + "?";
mcDialog.btnYes.onRelease = gdp.utils.Delegate.create(this, buyUpgrade, [nUpgradeNumber]);
mcDialog.btnNo.onRelease = gdp.utils.Delegate.create(this, removeDialog);
} else {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
mcDialog = attachMovie("mcQuestion2", "mcPrompt", getNextHighestDepth());
mcDialog.txtMessage.text = "Not enough money!";
mcDialog.btnYes.onRelease = gdp.utils.Delegate.create(this, removeDialog);
}
}
function buyUpgrade(nUpgradeNumber) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
mcDialog.removeMovieClip();
aUpgradeElements[nUpgradeNumber].setBuyFlag(true);
aUpgradeElements[nUpgradeNumber].onRelease = null;
aUpgradeElements[nUpgradeNumber].useHandCursor = false;
objUpgradeTF[aUpgradeElements[nUpgradeNumber]._name]._visible = false;
parentMc.substractPlayerMoney(aUpgradeCost[nUpgradeNumber]);
txtMoney.text = parentMc.getPlyerMoney().toString();
playerTank.setNewUpgradeLevel(nUpgradeNumber, 1);
updateTankInfo();
}
function tryToBuyWeapon(nWeapon, name) {
if (parentMc.getPlyerMoney() >= aWeaponCost[nWeapon]) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
mcDialog = attachMovie("mcQuestion", "mcPrompt", getNextHighestDepth());
mcDialog.txtMessage.text = ((("Are you sure want to buy " + name) + " for ") + aWeaponCost[nWeapon]) + "?";
mcDialog.btnYes.onRelease = gdp.utils.Delegate.create(this, buyWeapon, [nWeapon]);
mcDialog.btnNo.onRelease = gdp.utils.Delegate.create(this, removeDialog);
} else {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
mcDialog = attachMovie("mcQuestion2", "mcPrompt", getNextHighestDepth());
mcDialog.txtMessage.text = "Not enough money!";
mcDialog.btnYes.onRelease = gdp.utils.Delegate.create(this, removeDialog);
}
}
function buyWeapon(nWeapon) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
var _local3;
mcDialog.removeMovieClip();
if (nWeapon == vehicles.tanks.player.Player.BURREL) {
_local3 = mcBurrel;
} else if (nWeapon == vehicles.tanks.player.Player.MACHINEGUN) {
_local3 = mcMachinegun;
} else if (nWeapon == vehicles.tanks.player.Player.ROCKET) {
_local3 = mcRocket;
}
_local3.setBuyFlag(true);
_local3.onRelease = gdp.utils.Delegate.create(this, changeActiveWeapon, [nWeapon]);
parentMc.substractPlayerMoney(aWeaponCost[nWeapon]);
txtMoney.text = parentMc.getPlyerMoney().toString();
playerTank.addNewWeapon(nWeapon);
changeActiveWeapon(nWeapon);
}
function removeDialog(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
mcDialog.removeMovieClip();
}
function showPopUp(mcElement, info) {
var _local2 = {_x:mcElement._x, _y:mcElement._y};
mcAlphaPopUp.removeMovieClip();
mcAlphaPopUp = attachMovie("mcAlphaPopUp", "PopUpScreen", getNextHighestDepth(), _local2);
mcAlphaPopUp.infoText = info;
}
function removePopUp(Void) {
mcAlphaPopUp.removeMovieClip();
}
function downloadFullVersion(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
getURL(helpers.World.sDownloadURL, helpers.World.sTarget);
}
function startLevel(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
var _local2 = vehicles.tanks.player.Player.getInstance().getAllWeapons();
if ((parentMc.getCurLevel() == 1) && (parentMc.bShowHelp)) {
parentMc.showHelp();
} else if ((parentMc.getCurLevel() == 2) && (!gdp.utils.ArrayUtil.contains(_local2, vehicles.tanks.player.Player.MACHINEGUN))) {
parentMc.showMGMessage();
} else {
engine.GamePlayEngine.getInstance().startLevel();
}
removeInstance();
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 1012 MovieClip [__Packages.elements.WeaponElement] Frame 0
class elements.WeaponElement extends gdp.core.base.BaseMovieClip
{
var stop, bBuyed, gotoAndStop, useHandCursor;
function WeaponElement (Void) {
super();
stop();
}
function setBuyFlag(bFlag) {
bBuyed = bFlag;
if (bBuyed) {
gotoAndStop(2);
useHandCursor = false;
} else {
gotoAndStop(1);
}
}
}
Symbol 1013 MovieClip [__Packages.screens.AfterLevel] Frame 0
class screens.AfterLevel extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var btnContinue, nextType, txtInfo, removeMovieClip;
function AfterLevel (Void) {
super();
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.TRUBA);
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.SALUTE);
btnContinue.onRelease = gdp.utils.Delegate.create(this, next);
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.AfterLevel(mcParent.attachMovie("mcAfterLevel", "AfterLevelInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function next(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
if (nextType == "GameWinScreen") {
engine.GamePlayEngine.getInstance().removeGraphics();
core.Game.getInstance().showGameWinScreen();
} else if (nextType == "WinScreen") {
engine.GamePlayEngine.getInstance().removeGraphics();
core.Game.getInstance().showWinScreen();
} else {
return(undefined);
}
removeInstance();
}
function setData(obj) {
nextType = obj.nextType;
var _local2 = "";
_local2 = _local2 + "Score for\r";
_local2 = _local2 + (("destroying tanks " + obj.tankScore) + newline);
if (obj.bonusScore != 0) {
_local2 = _local2 + (("catching bonuses " + obj.bonusScore) + newline);
}
_local2 = _local2 + newline;
_local2 = _local2 + ("Total: " + core.Game.getInstance().getPlayerScore());
txtInfo.text = _local2;
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 1014 MovieClip [__Packages.screens.Help] Frame 0
class screens.Help extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var btnOk, removeMovieClip;
function Help (Void) {
super();
core.Game.getInstance().bShowHelp = false;
btnOk.onRelease = gdp.utils.Delegate.create(this, startLevel);
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.Help(mcParent.attachMovie("Help", "HelpInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function startLevel(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
engine.GamePlayEngine.getInstance().startLevel();
removeInstance();
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 1015 MovieClip [__Packages.screens.Message] Frame 0
class screens.Message extends gdp.core.base.BaseMovieClip
{
static var parentMc, instance;
var btnOk, removeMovieClip;
function Message (Void) {
super();
vehicles.tanks.player.Player.getInstance().addNewWeapon(vehicles.tanks.player.Player.MACHINEGUN);
vehicles.tanks.player.Player.getInstance().setActiveWeapon(vehicles.tanks.player.Player.MACHINEGUN);
btnOk.onRelease = gdp.utils.Delegate.create(this, startLevel);
}
static function getInstance(mcParent) {
if (mcParent != null) {
parentMc = mcParent;
if (instance == null) {
instance = screens.Message(mcParent.attachMovie("Message", "MessageInstance", mcParent.getNextHighestDepth()));
}
}
return(instance);
}
function startLevel(Void) {
helpers.soundEngine.CSound.getInstance().playSound(helpers.soundEngine.CSound.CLICK);
engine.GamePlayEngine.getInstance().startLevel();
removeInstance();
}
function removeInstance(Void) {
instance = null;
removeMovieClip();
}
}
Symbol 16 MovieClip [healthUpAnim] Frame 16
this.removeMovieClip();
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 310
stop();
Symbol 151 MovieClip [mcBonusElement] Frame 1
#initclip 155
Object.registerClass("mcBonusElement", elements.BonusElement);
#endinitclip
stop();
Symbol 152 MovieClip [Game] Frame 1
#initclip 128
Object.registerClass("Game", core.Game);
#endinitclip
Symbol 154 MovieClip Frame 1
this.useHandCursor = false;
this.onPress = function () {
};
Symbol 180 MovieClip [boom] Frame 29
this.removeMovieClip();
Symbol 199 MovieClip [boomRocket] Frame 19
this.removeMovieClip();
Symbol 201 MovieClip [levelNumber] Frame 90
this.removeMovieClip();
Symbol 214 MovieClip [mcBrick] Frame 1
#initclip 129
Object.registerClass("mcBrick", gameField.elements.blocks.Brick);
#endinitclip
stop();
Symbol 246 MovieClip [mcDecor] Frame 1
#initclip 130
Object.registerClass("mcDecor", gameField.tiles.Tile);
#endinitclip
stop();
Symbol 248 MovieClip Frame 1
stop();
Symbol 251 MovieClip [mcHeadquarters] Frame 1
#initclip 131
Object.registerClass("mcHeadquarters", gameField.elements.headquarters.Headquarters);
#endinitclip
Symbol 256 MovieClip [mcBlock] Frame 1
#initclip 132
Object.registerClass("mcBlock", gameField.elements.blocks.Block);
#endinitclip
stop();
Symbol 418 MovieClip [mcSimpleTile] Frame 1
#initclip 133
Object.registerClass("mcSimpleTile", gameField.tiles.Tile);
#endinitclip
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 426 MovieClip [mcTrackTrace] Frame 60
this.removeMovieClip();
Symbol 441 MovieClip [rocketTrail] Frame 13
this.removeMovieClip();
Symbol 444 MovieClip [shotFire] Frame 5
this.removeMovieClip();
Symbol 454 MovieClip [mcElement] Frame 1
#initclip 134
Object.registerClass("mcElement", elements.WeaponElement);
#endinitclip
Symbol 459 MovieClip [mcLifes] Frame 1
#initclip 135
Object.registerClass("mcLifes", elements.Lifes);
#endinitclip
stop();
Symbol 470 MovieClip [mcAfterLevel] Frame 1
#initclip 136
Object.registerClass("mcAfterLevel", screens.AfterLevel);
#endinitclip
Symbol 494 MovieClip [GameWin] Frame 1
#initclip 137
Object.registerClass("GameWin", screens.GameWin);
#endinitclip
Symbol 498 MovieClip [mcAlphaPopUp] Frame 31
stop();
Symbol 503 MovieClip [BetweenLevels] Frame 1
#initclip 138
Object.registerClass("BetweenLevels", screens.BetweenLevels);
#endinitclip
Symbol 504 MovieClip [mcBorder] Frame 1
this.useHandCursor = false;
this.onPress = function () {
};
Symbol 508 MovieClip [Loose] Frame 1
#initclip 139
Object.registerClass("Loose", screens.Loose);
#endinitclip
Symbol 514 MovieClip [Help] Frame 1
#initclip 140
Object.registerClass("Help", screens.Help);
#endinitclip
Symbol 524 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 2
play();
Symbol 526 Button
on (rollOver) {
greatgames.gotoAndPlay("zoom");
_root.playSound("mouseover");
}
on (release) {
getURL (_root.moreGamesURL, "_blank");
}
Symbol 533 MovieClip Frame 1
mc._visible = false;
Symbol 543 MovieClip [PreGame] Frame 1
#initclip 141
Object.registerClass("PreGame", screens.PreGame);
#endinitclip
Symbol 562 MovieClip [mcScoreDigits] Frame 1
#initclip 142
Object.registerClass("mcScoreDigits", elements.ScoreDigits);
#endinitclip
Symbol 578 MovieClip [Win] Frame 1
#initclip 143
Object.registerClass("Win", screens.Win);
#endinitclip
stop();
Symbol 611 MovieClip [mcWorkshopScreen] Frame 1
#initclip 144
Object.registerClass("mcWorkshopScreen", screens.WorkshopScreen);
#endinitclip
Symbol 616 MovieClip [Message] Frame 1
#initclip 145
Object.registerClass("Message", screens.Message);
#endinitclip
Symbol 621 MovieClip [mcStars] Frame 1
#initclip 146
Object.registerClass("mcStars", elements.Stars);
#endinitclip
stop();
Symbol 624 MovieClip [mcSight] Frame 1
#initclip 147
Object.registerClass("mcSight", elements.Sight);
#endinitclip
Symbol 633 MovieClip Frame 1
stop();
Symbol 642 MovieClip [mcHardTank] Frame 1
#initclip 148
Object.registerClass("mcHardTank", vehicles.tanks.enemies.EnemyTank);
#endinitclip
stop();
Symbol 651 MovieClip [mcLightTank] Frame 1
#initclip 149
Object.registerClass("mcLightTank", vehicles.tanks.enemies.EnemyTank);
#endinitclip
stop();
Symbol 660 MovieClip [mcNormalTank] Frame 1
#initclip 150
Object.registerClass("mcNormalTank", vehicles.tanks.enemies.EnemyTank);
#endinitclip
stop();
Symbol 710 MovieClip Frame 1
stop();
Symbol 743 MovieClip Frame 1
stop();
Symbol 761 MovieClip Frame 1
stop();
Symbol 762 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 1
stop();
Symbol 828 MovieClip Frame 1
stop();
Symbol 861 MovieClip Frame 1
stop();
Symbol 868 MovieClip [mcPlayerTank] Frame 1
#initclip 151
Object.registerClass("mcPlayerTank", vehicles.tanks.player.Player);
#endinitclip
stop();
Symbol 870 MovieClip [mcRocketShell] Frame 1
#initclip 152
Object.registerClass("mcRocketShell", elements.Shell);
#endinitclip
Symbol 873 MovieClip [mcSimpleShell] Frame 1
#initclip 153
Object.registerClass("mcSimpleShell", elements.Shell);
#endinitclip
Symbol 874 MovieClip [GameField] Frame 1
#initclip 154
Object.registerClass("GameField", gameField.GameField);
#endinitclip
Symbol 875 MovieClip Frame 1
stop();
Symbol 888 MovieClip Frame 1
stop();