Section 1
//as3_shared_objects (classesAS3.as3_shared_objects)
package classesAS3 {
import flash.display.*;
import flash.net.*;
import flash.text.*;
public class as3_shared_objects extends Sprite {
var shared:SharedObject;
public function as3_shared_objects(){
super();
shared = SharedObject.getLocal("MDcookie");
if (shared.data.visits == undefined){
shared.data.visits = 1;
shared.data.levelNumber = 1;
shared.data.score = 0;
};
shared.close();
}
public function show_text(str){
var shared_text:TextField;
var format:TextFormat;
shared_text = new TextField();
format = new TextFormat();
format.font = "Lucida Console";
format.color = 0xFFFF00;
shared_text.width = 300;
shared_text.defaultTextFormat = format;
shared_text.x = 25;
shared_text.y = 15;
addChild(shared_text);
shared_text.appendText((("You visited this page " + str) + " times"));
}
public function saveGameCookie(score, level, money, waveSpeed){
shared = SharedObject.getLocal("MDcookie");
shared.data.levelNumber = level;
shared.data.score = score;
shared.data.money = money;
shared.data.waveSpeed = waveSpeed;
shared.close();
}
public function newGame(){
var levelData:Object;
shared = SharedObject.getLocal("MDcookie");
shared.data.visits++;
shared.data.levelNumber = 1;
shared.data.score = 0;
levelData = new Object();
levelData.visits = shared.data.visits;
levelData.levelNumber = shared.data.levelNumber;
levelData.score = shared.data.score;
levelData.money = shared.data.money;
levelData.waveSpeed = shared.data.waveSpeed;
shared.close();
return (levelData);
}
public function loadOldGame(){
var levelData:Object;
shared = SharedObject.getLocal("MDcookie");
levelData = new Object();
if (shared.data.visits != undefined){
levelData.visits = shared.data.visits;
levelData.levelNumber = shared.data.levelNumber;
levelData.score = shared.data.score;
levelData.money = shared.data.money;
levelData.waveSpeed = shared.data.waveSpeed;
} else {
levelData.visits++;
levelData.levelNumber = 1;
levelData.score = 0;
levelData.money = 0;
levelData.waveSpeed = 100;
};
shared.close();
return (levelData);
}
}
}//package classesAS3
Section 2
//BinaryHeap (classesAS3.BinaryHeap)
package classesAS3 {
public class BinaryHeap {
private var __list:Array;
public function BinaryHeap(){
super();
__list = new Array();
__list.push(null);
}
public function init():void{
__list.splice(0);
__list.push(null);
}
public function addElement(elem:Object):void{
var toCheck:*;
var cElemI:Number;
var cToCheckI:Number;
elem.i = __list.length;
__list.push(elem);
while (elem.i > 1) {
toCheck = __list[Math.floor((elem.i / 2))];
if (elem.F < toCheck.F){
cElemI = elem.i;
cToCheckI = toCheck.i;
__list[cElemI] = toCheck;
__list[cToCheckI] = elem;
elem.i = cToCheckI;
toCheck.i = cElemI;
} else {
break;
};
};
}
public function removeElement():Object{
var ob:Object;
var lastElem:Object;
var child1:Object;
var child2:Object;
var toSwitch:Object;
var cLastElemI:Number;
var cToSwitchI:Number;
ob = __list.splice(1, 1)[0];
if (__list.length > 1){
lastElem = __list.pop();
__list.splice(1, 0, lastElem);
lastElem.i = 1;
while (((!((__list[(lastElem.i * 2)] == undefined))) && (!((__list[((lastElem.i * 2) + 1)] == undefined))))) {
child1 = __list[(lastElem.i * 2)];
child2 = __list[((lastElem.i * 2) + 1)];
if ((((lastElem.F < child1.F)) && ((lastElem.F < child2.F)))){
break;
} else {
toSwitch = ((child1.F)<child2.F) ? child1 : child2;
cLastElemI = lastElem.i;
cToSwitchI = toSwitch.i;
__list[cLastElemI] = toSwitch;
__list[cToSwitchI] = lastElem;
lastElem.i = cToSwitchI;
toSwitch.i = cLastElemI;
};
};
};
return (ob);
}
public function getLength():Number{
return (__list.length);
}
}
}//package classesAS3
Section 3
//GameAlienWalker (classesAS3.GameAlienWalker)
package classesAS3 {
import flash.display.*;
public class GameAlienWalker extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameAlienWalker(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 4
//GameArcher1 (classesAS3.GameArcher1)
package classesAS3 {
import flash.display.*;
public class GameArcher1 extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameArcher1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myParent.removeChild(this);
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -250){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 5
//GameBadArcher1 (classesAS3.GameBadArcher1)
package classesAS3 {
import flash.display.*;
public class GameBadArcher1 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameBadArcher1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 6
//GameBadArcher2 (classesAS3.GameBadArcher2)
package classesAS3 {
import flash.display.*;
public class GameBadArcher2 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameBadArcher2(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 7
//GameBadGuy (classesAS3.GameBadGuy)
package classesAS3 {
import flash.display.*;
import flash.media.*;
import classesAS3.*;
import flash.filters.*;
class GameBadGuy {
var justAppeared:Boolean;
var xVel:Number;// = 0
var myDamageDelay:Number;
var hitVel;
var yPos:Number;// = 0
var cArraylength:Number;
public var ImGood:Boolean;// = false
var inToGround:Number;
var myOldAnimationState:Number;
var numberOfMissiles;// = 0
public var soldierState:int;
var myDamage:Number;
var myArmour:Number;
var range:Number;
var energyMc:MovieClip;
var rt:Object;
var speed:Number;// = 0
var gravity:Number;
var delayToMove:Number;
var collisionArray:Array;
var myName:String;
var shortestPathC:Array;
var projectileMc:Object;
var speedOld:Number;
var energyBarMc:GameEnergyBar;
var dead:Boolean;
var glowFilter:GlowFilter;
public var dirChanged:Boolean;
var yVel:Number;// = 0
var distanceArray:Array;
var myParent:Object;
var mC:Object;
var energy:Number;// = 0
var flying:Boolean;
var moveIndex:Number;
var spiderDelaySp:Number;// = 100
public var frozen:Boolean;// = false
var myFireDelay:Number;
var energyBarOn:Number;
public var dirChanged2:Boolean;
var myProjectile:String;
var Useful:GameUseful;
var shadowFilter:DropShadowFilter;
var energyStart:Number;// = 0
var xPos:Number;// = 0
var headHitBlock:Object;
var xOrigin:Number;// = 0
public var currentMapIndexX:Number;
var myScoreValue:Number;
var missileName:String;
var delayToFireMissile:Number;// = 1
public var currentMapIndexY:Number;
var shortestPath:Array;
var targetX:Number;
var targetY:Number;
public var myCurrentSound:SoundChannel;
var filterDelay:Number;
var myRange:Number;
var xDir:Number;
var collisionCheck:Number;
var yOrigin:Number;// = 0
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_FALLING:int = 4;
public static const SOLDIER_E_MOVE:int = 5;
public static const SOLDIER_STATE_RETREAT:int = 3;
public static const SOLDIER_E_STAND:int = 0;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_E_BUILD:int = 2;
public static const SOLDIER_STATE_MOVE:int = 5;
public static const SOLDIER_STATE_FIGHTING:int = 2;
function GameBadGuy(myN, rt2, xStart, yStart, mcc, uu, sp, myScore, dM, myP){
var rangeVary:Number;
var color:Number;
var angle:Number;
var alpha:Number;
var blurX:Number;
var blurY:Number;
var distance:Number;
var strength:Number;
var inner:Boolean;
var knockout:Boolean;
var quality:Number;
var mapXYObject:Object;
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
speed = 0;
energyStart = 0;
energy = 0;
delayToFireMissile = 1;
numberOfMissiles = 0;
frozen = false;
ImGood = false;
spiderDelaySp = 100;
super();
mC = mcc;
mC.myObject = this;
rt = rt2;
myProjectile = myP;
cArraylength = 4;
myDamage = dM;
myArmour = 1;
if (mC.myType == "badArcher1"){
myFireDelay = uu.RandomNumber(30, 60);
myRange = 50;
myArmour = 5;
} else {
if (mC.myType == "badKnight1"){
myFireDelay = uu.RandomNumber(30, 40);
myRange = 60;
myArmour = 12;
} else {
if (mC.myType == "badKnight2"){
myFireDelay = uu.RandomNumber(80, 120);
myRange = 50;
myArmour = 1.5;
} else {
if (mC.myType == "badKnight3"){
myFireDelay = uu.RandomNumber(80, 120);
myRange = 60;
myArmour = 3;
} else {
if (mC.myType == "viking1"){
myFireDelay = uu.RandomNumber(60, 80);
myRange = 60;
myArmour = 15;
} else {
if (mC.myType == "badArcher2"){
myFireDelay = uu.RandomNumber(10, 30);
myRange = 150;
myArmour = 5;
} else {
if (mC.myType == "ram"){
myFireDelay = 300;
myRange = 50;
myArmour = 7;
} else {
if (mC.myType == "dragon"){
myFireDelay = 150;
myRange = 250;
myArmour = 13;
} else {
if (mC.myType == "demon"){
myFireDelay = 150;
myRange = 70;
myArmour = 14;
} else {
if (mC.myType == "evilWizard"){
myFireDelay = 150;
myRange = 350;
myArmour = 4;
} else {
if (mC.myType == "witch"){
myFireDelay = 150;
myRange = 200;
myArmour = 3;
} else {
if (mC.myType == "bird"){
myFireDelay = uu.RandomNumber(60, 90);
myRange = 70;
myArmour = 13;
} else {
if (mC.myType == "banshee"){
myFireDelay = uu.RandomNumber(60, 90);
myRange = 180;
myArmour = 2;
} else {
if (mC.myType == "spider"){
myFireDelay = uu.RandomNumber(60, 90);
myRange = 60;
myArmour = 8;
} else {
myFireDelay = uu.RandomNumber(80, 120);
myRange = 50;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
Useful = uu;
myScoreValue = myScore;
rangeVary = Useful.RandomNumber(1, 10);
rangeVary = (rangeVary - 10);
collisionArray = new Array();
shortestPath = new Array();
shortestPathC = new Array();
moveIndex = 0;
dirChanged = false;
dirChanged2 = false;
dead = false;
inToGround = 0;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
myParent = mC.myParent;
hitVel = 0;
energyBarOn = 0;
gravity = 0.1;
rangeVary = Useful.RandomNumber(1, 10);
rangeVary = (rangeVary / 120);
sp = (sp + rangeVary);
speed = sp;
speedOld = sp;
xDir = -1;
mC.scaleX = 1;
distanceArray = new Array();
glowFilter = new GlowFilter(0xFFFFFF, 1, 3, 3, 3, 1);
color = 0;
angle = 45;
alpha = 0.8;
blurX = 3;
blurY = 3;
distance = 5;
strength = 0.65;
inner = false;
knockout = false;
quality = BitmapFilterQuality.MEDIUM;
shadowFilter = new DropShadowFilter(distance, angle, color, alpha, blurX, blurY, strength, quality, inner, knockout);
mC.filters = [shadowFilter];
numberOfMissiles = 0;
myDamageDelay = 8;
energyStart = 100;
energy = energyStart;
soldierState = SOLDIER_STATE_ATTACK;
filterDelay = 1;
myName = myN;
collisionCheck = 0;
delayToMove = 0;
mC.dir.gotoAndStop("run");
targetX = mC.x;
myOldAnimationState = mC.currentFrame;
mapXYObject = getCurrentMapIndex2(xStart, yStart);
currentMapIndexX = mapXYObject.indexX;
currentMapIndexY = mapXYObject.indexY;
rt.pathFinder.findPath(rt.grid[mapXYObject.indexY][mapXYObject.indexX], rt.endCell);
rt.copyShortestPath(rt.pathFinder.shortestPath, shortestPath);
flying = true;
if (mC.myType == "banshee"){
updatePosition_flying();
} else {
if (mC.myType == "badArcher2"){
updatePosition_flying();
} else {
if (mC.myType == "witch"){
updatePosition_flying();
} else {
if (mC.myType == "dragon"){
updatePosition_flying();
} else {
flying = false;
updatePosition();
};
};
};
};
}
function checkForPoison(){
var i2:int;
i2 = 0;
while (i2 < rt.poisonGroundArray.length) {
if (mC.hitTestObject(rt.poisonGroundArray[i2])){
myDamageDelay = 1;
decreaseEnergy(0.2);
};
i2++;
};
}
function updatePosition(){
var sp2:Number;
var xx:*;
var yy:*;
var mapXYObject:Object;
var newTile:Boolean;
var spriteData:Object;
var moveIndex2:Number;
var spriteData2:Object;
if (frozen == false){
sp2 = speed;
if (ImGood == true){
sp2 = 0.5;
};
if (rt.slowTimeUpg == true){
sp2 = 0.1;
};
if (dirChanged == false){
spriteData = Useful.pointTowards(shortestPath[(moveIndex + 1)].c, shortestPath[(moveIndex + 1)].r, shortestPath[moveIndex].c, shortestPath[moveIndex].r);
moveIndex2 = (moveIndex + 2);
if (moveIndex2 >= shortestPath.length){
moveIndex2 = (shortestPath.length - 1);
};
spriteData2 = Useful.pointTowards((shortestPath[moveIndex2].c * rt.blockSize), (shortestPath[moveIndex2].r * rt.blockSize), mC.x, mC.y);
if (soldierState != SOLDIER_STATE_FIGHTING){
mC.dir.rotation = (spriteData2.spriteRotation - 90);
};
xVel = (spriteData.vx * sp2);
yVel = (spriteData.vy * sp2);
};
xPos = (xPos + xVel);
yPos = (yPos + yVel);
xx = (xOrigin + xPos);
yy = (yOrigin + yPos);
mapXYObject = getCurrentMapIndex2(xx, yy);
newTile = false;
if (xVel < 0){
mapXYObject.indexX++;
};
if (yVel < 0){
mapXYObject.indexY++;
};
if (currentMapIndexX == mapXYObject.indexX){
if (currentMapIndexY == mapXYObject.indexY){
newTile = true;
};
};
if (newTile == true){
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
} else {
if (dirChanged2 == true){
dirChanged2 = false;
dirChanged = false;
moveIndex = -1;
};
moveIndex++;
if (moveIndex >= shortestPath.length){
moveIndex = (shortestPath.length - 1);
};
currentMapIndexX = shortestPath[moveIndex].c;
currentMapIndexY = shortestPath[moveIndex].r;
xOrigin = 0;
yOrigin = 0;
xPos = (currentMapIndexX * rt.blockSize);
yPos = (currentMapIndexY * rt.blockSize);
};
if (mC.x < -50){
remove();
};
};
}
function checkIfInRange(){
findEnemy(mC.x, mC.y);
if (distanceArray.length != 0){
if (distanceArray[0].distSprite.myObject.myProjectile == "no_fire"){
if (distanceArray[0].dist < rt.blockSize){
soldierState = SOLDIER_STATE_FIGHTING;
checkForFire();
} else {
soldierState = SOLDIER_STATE_ATTACK;
if (mC.dir.currentFrame != 2){
mC.dir.gotoAndStop("run");
};
};
} else {
if (distanceArray[0].dist < myRange){
if (soldierState != SOLDIER_STATE_FIGHTING){
mC.dir.gotoAndStop("attack");
};
soldierState = SOLDIER_STATE_FIGHTING;
} else {
soldierState = SOLDIER_STATE_ATTACK;
if (mC.dir.currentFrame != 2){
if (mC.dir.currentFrame < 4){
mC.dir.gotoAndStop("run");
};
};
};
};
} else {
soldierState = SOLDIER_STATE_ATTACK;
if (mC.dir.currentFrame != 2){
mC.dir.gotoAndStop("run");
};
};
}
function getCurrentMapIndex2(xx, yy):Object{
var mapXYIndex:Object;
var sprX:Number;
var sprY:Number;
mapXYIndex = new Object();
sprX = int((xx / rt.blockSize));
mapXYIndex.indexX = sprX;
sprX = (sprX * rt.blockSize);
mapXYIndex.xPos = sprX;
sprY = int((yy / rt.blockSizeY));
mapXYIndex.indexY = sprY;
sprY = (sprY * rt.blockSizeY);
mapXYIndex.yPos = sprY;
return (mapXYIndex);
}
function applyGravity(){
yVel = (yVel + gravity);
}
function getCurrentMapIndex(spriteObject):Object{
var mapXYIndex:Object;
var sprX:Number;
var sprY:Number;
mapXYIndex = new Object();
sprX = int((spriteObject.x / rt.blockSize));
mapXYIndex.indexX = sprX;
sprX = (sprX * rt.blockSize);
mapXYIndex.xPos = sprX;
sprY = int((spriteObject.y / rt.blockSizeY));
mapXYIndex.indexY = sprY;
sprY = (sprY * rt.blockSizeY);
mapXYIndex.yPos = sprY;
return (mapXYIndex);
}
function updatePosition_flying(){
var sp2:Number;
var targetObj:Object;
var xx:*;
var yy:*;
var mapXYObject:Object;
var newTile:Boolean;
var spriteData:Object;
if (frozen == false){
sp2 = speed;
if (rt.slowTimeUpg == true){
sp2 = 0.1;
};
targetObj = rt.Player.mC;
if (dirChanged == false){
dirChanged = true;
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, mC.x, mC.y);
if (soldierState != SOLDIER_STATE_FIGHTING){
mC.dir.rotation = (spriteData.spriteRotation - 90);
};
xVel = (spriteData.vx * sp2);
yVel = (spriteData.vy * sp2);
};
xPos = (xPos + xVel);
yPos = (yPos + yVel);
xx = (xOrigin + xPos);
yy = (yOrigin + yPos);
mapXYObject = getCurrentMapIndex2(xx, yy);
newTile = false;
if (xVel < 0){
mapXYObject.indexX++;
};
if (yVel < 0){
mapXYObject.indexY++;
};
if (currentMapIndexX == mapXYObject.indexX){
if (currentMapIndexY == mapXYObject.indexY){
newTile = true;
};
};
if (newTile == true){
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
} else {
dirChanged = false;
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
};
if (mC.x < -50){
remove();
};
};
}
function updatePosition2(){
var oldX:*;
var oldY:*;
xPos = (xPos + xVel);
yPos = (yPos + yVel);
oldX = mC.x;
oldY = mC.y;
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
}
function findEnemy(xx, yy){
var distanceGoodKing:Object;
var collisionMc:*;
var i2:int;
var distanceObject:Object;
var sprite1:MovieClip;
var noCheck:*;
distanceArray = new Array();
distanceGoodKing = new Object();
if (ImGood == true){
i2 = 0;
while (i2 < rt.badGuysArray.length) {
if (rt.badGuysArray[i2] != this){
distanceObject = new Object();
sprite1 = rt.badGuysArray[i2].mC;
distanceObject.distSprite = sprite1;
distanceObject.dist = Useful.getDistance(mC.x, mC.y, distanceObject.distSprite.x, distanceObject.distSprite.y);
distanceArray.push(distanceObject);
};
i2++;
};
} else {
i2 = 0;
while (i2 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[i2].mC.myType != "kingGood"){
if (rt.goodGuysArray[i2].myProjectile != "no_fire"){
if (rt.goodGuysArray[i2].dead == false){
noCheck = false;
if (rt.goodGuysArray[i2].mC.myType == "knight"){
noCheck = true;
} else {
if (rt.goodGuysArray[i2].mC.myType == "barbedWire"){
noCheck = true;
} else {
if (rt.goodGuysArray[i2].mC.myType == "brickWall"){
noCheck = true;
};
};
};
if (noCheck == false){
distanceObject = new Object();
sprite1 = rt.goodGuysArray[i2].mC;
distanceObject.distSprite = sprite1;
distanceObject.dist = Useful.getDistance(mC.x, mC.y, distanceObject.distSprite.x, distanceObject.distSprite.y);
distanceArray.push(distanceObject);
};
};
};
};
i2++;
};
};
if (distanceArray.length == 0){
if (flying == false){
distanceObject = new Object();
distanceObject.distSprite = rt.Player.mC;
distanceObject.dist = Useful.getDistance(mC.x, mC.y, distanceObject.distSprite.x, distanceObject.distSprite.y);
distanceArray.push(distanceObject);
};
};
distanceArray.sortOn("dist", Array.NUMERIC);
}
function checkForFire(){
var myFireDelay2:*;
myFireDelay2 = myFireDelay;
delayToFireMissile = myFireDelay2;
mC.dir.gotoAndStop("attack");
}
function checkForOrb(){
if (mC.hitTestObject(rt.Player.mC.orbCollMc)){
myDamageDelay = 1;
decreaseEnergy(600);
if (ImGood == false){
rt.decreaseEnergy(5);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, false, currentMapIndexY));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 40, true, false, false, 8, 0, false, currentMapIndexY));
};
};
}
public function remove(){
var i2:int;
var arrayIndex:Number;
var i1:*;
if (myCurrentSound != null){
myCurrentSound.stop();
};
if (ImGood == true){
if (mC.numChildren > 0){
mC.removeChildAt(0);
};
};
i2 = 0;
while (i2 < mC.myParent.numChildren) {
if (mC.myParent.getChildAt(i2) == mC){
mC.myParent.removeChild(mC);
mC.stop();
};
i2++;
};
arrayIndex = -1;
i1 = 0;
while (i1 < rt.badGuysArray.length) {
if (this == rt.badGuysArray[i1]){
arrayIndex = i1;
};
i1++;
};
if (arrayIndex >= 0){
rt.badGuysArray.splice(arrayIndex, 1);
};
}
public function groundAttack(){
var targetObj:Object;
var spriteData:Object;
var myFireDelay2:*;
if (distanceArray.length > 0){
targetObj = distanceArray[0].distSprite;
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, mC.x, mC.y);
mC.dir.rotation = (spriteData.spriteRotation - 90);
myFireDelay2 = myFireDelay;
targetObj.myObject.myDamageDelay = 1;
if (ImGood == true){
targetObj.myObject.decreaseEnergy(myDamage);
} else {
targetObj.myObject.decreaseEnergy(myDamage, mC);
};
if (rt.upgrade1 == true){
myFireDelay2 = int((myFireDelay / 2));
};
delayToFireMissile = myFireDelay2;
};
}
public function fireProjectile(){
var targetObj:Object;
var spriteData:Object;
var yStart:Number;
var newXY:Object;
if (distanceArray.length > 0){
targetObj = distanceArray[0].distSprite;
yStart = 0;
if (myName == "badKnight3"){
projectileMc = new GameAlienGrenade();
} else {
if (myName == "badArcher1"){
rt.Sounds.playSoundFx("laserCannonFx", 0.5, 0, 1);
projectileMc = new GameLaserBig();
} else {
if (myName == "badKnight1"){
projectileMc = new GameLightTankMissile();
} else {
if (myName == "viking1"){
projectileMc = new GameHeavyTankMissile();
} else {
if (myName == "ram"){
projectileMc = new GameFreezeBullet();
} else {
if (myName == "banshee"){
projectileMc = new bansheeMissile();
} else {
if (myName == "badArcher2"){
projectileMc = new GameLaserSaucer();
} else {
if (myName == "bird"){
projectileMc = new GameLaserBig();
} else {
if (myName == "dragon"){
projectileMc = new GameLargeFireball();
} else {
if (myName == "witch"){
projectileMc = new GameLaserSaucer();
} else {
if (myName == "evilWizard"){
projectileMc = new GameSmallFireball();
} else {
rt.Sounds.playSoundFx("zapFx", 0.5, 0, 1);
yStart = 20;
projectileMc = new GameArrow();
};
};
};
};
};
};
};
};
};
};
};
rt.inGameMissilesMc.addChild(projectileMc);
newXY = rt.Useful.localToGlobalXY(mC.dir.mReleaseMc);
if (myProjectile == "grenade"){
spriteData = Useful.getArcVelocity(1, 20, newXY.newX, newXY.newY, targetObj.x, (targetObj.y - 10));
} else {
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, newXY.newX, newXY.newY);
};
mC.dir.rotation = (spriteData.spriteRotation - 90);
rt.missilesArray.push(new GameMissile(projectileMc, rt, newXY.newX, newXY.newY, myProjectile, Useful, spriteData, 16, this, myDamage, currentMapIndexY));
};
}
function decreaseEnergy(damage){
var damage2:*;
var e:Number;
var risingScoreMc:*;
damage2 = damage;
if (mC.myType == "badArcher1"){
};
myDamageDelay--;
if (myDamageDelay == 0){
myDamageDelay = 1;
if (energy > 0){
damage = (damage / myArmour);
energy = (energy - damage);
if (energyBarOn == 0){
energyBarOn = 1;
energyBarMc = new GameEnergyBar(this);
mC.addChild(energyBarMc);
};
energyBarMc.x = 0;
energyBarMc.y = -15;
e = (energy / 10);
energyBarMc.bar.bar.y = int((10 - e));
if (energyBarMc.bar.bar.y > 10){
energyBarMc.bar.bar.y = 10;
};
if (energy <= 0){
if (damage2 != 101){
if (damage2 != 600){
rt.increaseScore(myScoreValue);
rt.increaseMoney(myScoreValue);
risingScoreMc = new GameRisingScore(rt, rt.inGameScoreMc, myScoreValue);
rt.inGameScoreMc.addChild(risingScoreMc);
risingScoreMc.x = mC.x;
risingScoreMc.y = (mC.y - 10);
};
};
inToGround = 0;
dead = true;
myCurrentSound = rt.Sounds.playSoundFx("die_v1_Fx", 0.4, 0, 1);
mC.dir.gotoAndStop("die");
rt.aliensLeft--;
if (rt.aliensLeft < 0){
rt.aliensLeft = 0;
};
return (true);
} else {
if (mC.dir.currentFrame != 3){
if (mC.dir.currentFrame != 4){
mC.dir.gotoAndStop(4);
};
if (damage2 != 0.2){
if (myName == "badKnight3"){
myCurrentSound = rt.Sounds.playSoundFx("hitEnemyFx", 0.4, 0, 1);
} else {
if (myName == "badArcher1"){
myCurrentSound = rt.Sounds.playSoundFx("die_v2_Fx", 0.4, 0, 1);
} else {
if (myName == "badKnight1"){
myCurrentSound = rt.Sounds.playSoundFx("die_v2_Fx", 0.4, 0, 1);
} else {
if (myName == "viking1"){
myCurrentSound = rt.Sounds.playSoundFx("die_v2_Fx", 0.4, 0, 1);
} else {
if (myName == "ram"){
myCurrentSound = rt.Sounds.playSoundFx("hitEnemyFx", 0.4, 0, 1);
} else {
if (myName == "badArcher2"){
myCurrentSound = rt.Sounds.playSoundFx("die_v2_Fx", 0.4, 0, 1);
} else {
if (myName == "bird"){
myCurrentSound = rt.Sounds.playSoundFx("die_v2_Fx", 0.4, 0, 1);
} else {
if (myName == "dragon"){
myCurrentSound = rt.Sounds.playSoundFx("die_v2_Fx", 0.4, 0, 1);
} else {
myCurrentSound = rt.Sounds.playSoundFx("hitEnemyFx", 0.4, 0, 1);
};
};
};
};
};
};
};
};
};
};
};
};
};
return (false);
}
function mainLoop(){
var sp:Number;
if (dead == true){
if (mC.currentFrame != 5){
};
} else {
if (filterDelay > 1){
filterDelay--;
if (filterDelay == 1){
mC.filters = [];
};
};
if (delayToMove > 0){
delayToMove--;
} else {
checkIfInRange();
if (frozen == false){
if (mC.myType == "banshee"){
updatePosition_flying();
} else {
if (mC.myType == "badArcher2"){
updatePosition_flying();
} else {
if (mC.myType == "witch"){
updatePosition_flying();
} else {
if (mC.myType == "dragon"){
updatePosition_flying();
} else {
if (mC.myType == "spider"){
spiderDelaySp--;
if (spiderDelaySp == 0){
spiderDelaySp = rt.Useful.RandomNumber(50, 100);
sp = rt.Useful.RandomNumber(8, 10);
speed = (sp / 10);
};
};
updatePosition();
};
};
};
};
checkForOrb();
checkForPoison();
};
};
};
}
}
}//package classesAS3
Section 8
//GameBadKnight1 (classesAS3.GameBadKnight1)
package classesAS3 {
import flash.display.*;
public class GameBadKnight1 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameBadKnight1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 9
//GameBadKnight2 (classesAS3.GameBadKnight2)
package classesAS3 {
import flash.display.*;
public class GameBadKnight2 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameBadKnight2(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 10
//GameBadKnight3 (classesAS3.GameBadKnight3)
package classesAS3 {
import flash.display.*;
public class GameBadKnight3 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameBadKnight3(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 11
//GameBanshee (classesAS3.GameBanshee)
package classesAS3 {
import flash.display.*;
public class GameBanshee extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameBanshee(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
}
}//package classesAS3
Section 12
//GameBlankTile (classesAS3.GameBlankTile)
package classesAS3 {
import flash.display.*;
public class GameBlankTile extends MovieClip {
private var __row:Number;
private var __grid:Array;
public var rt:Object;
public var __pathFinder:Path;
private var __col:Number;
public var dirAngleX:Number;
public var dirAngleY:Number;
public function GameBlankTile(grid:Array, pf:Path, row:Number, col:Number, canClick:Boolean, rt2){
super();
rt = rt2;
__grid = grid;
__pathFinder = pf;
__row = row;
__col = col;
}
}
}//package classesAS3
Section 13
//GameBox2d (classesAS3.GameBox2d)
package classesAS3 {
public class GameBox2d {
public var rt:Object;
public var real_y_mouse:Number;
public var m_iterations:int;// = 10
public var m_timeStep:Number;// = 0.0333333333333333
public var worldGravityVx:Number;
public var BxScalingFactor:Number;
public var pixels_in_a_meter;// = 30
public var currentIconIndex:Number;
public var bodyGrabbed;
public var Useful:GameUseful;
public var real_x_mouse:Number;
public var worldGravityVy:Number;
public static const BAD_FLAG:Boolean = true;
public static const GOOD_FLAG:Boolean = false;
public function GameBox2d(rt2, UseF, bx){
m_iterations = 10;
m_timeStep = (1 / 30);
pixels_in_a_meter = 30;
super();
rt = rt2;
Useful = UseF;
BxScalingFactor = bx;
worldGravityVx = 0;
worldGravityVy = 20;
}
function getScaledPos2(){
}
public function setupBox2d(){
}
public function setupGrabbedItem(itemType, dens, fric, rest, grab, xx, yy, startFrame){
var skipSetup:Boolean;
var mousePosX:Number;
var mousePosY:Number;
var newBody:Object;
skipSetup = false;
if (grab == "position"){
mousePosX = xx;
mousePosY = yy;
} else {
mousePosX = (rt.stage.mouseX - rt.spritesMc.x);
mousePosY = rt.stage.mouseY;
};
if (itemType == "rocketTower"){
newBody = new GameRocketTower(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "gunTower"){
newBody = new GameGunTower(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "badKnight2"){
newBody = new GameBadKnight2(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "badArcher2"){
newBody = new GameBadArcher2(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameSkyMc.addChild(newBody);
} else {
if (itemType == "badArcher1"){
newBody = new GameBadArcher1(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "badKnight3"){
newBody = new GameBadKnight3(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "badKnight1"){
newBody = new GameBadKnight1(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "viking1"){
newBody = new GameViking1(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "bird"){
newBody = new GameAlienWalker(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "dragon"){
newBody = new GameDragon(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameSkyMc.addChild(newBody);
} else {
if (itemType == "banshee"){
newBody = new GameBanshee(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameSkyMc.addChild(newBody);
} else {
if (itemType == "witch"){
newBody = new GameWitch(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameSkyMc.addChild(newBody);
} else {
if (itemType == "evilWizard"){
newBody = new GameEvilWizard(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "demon"){
newBody = new GameDemon(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "spider"){
newBody = new GameSpider(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "ram"){
newBody = new GameRam1(this, null, null, itemType, rt.inGameEnemyMc, BAD_FLAG);
rt.inGameEnemyMc.addChild(newBody);
} else {
if (itemType == "kingGood"){
newBody = new GameKingGood(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.soldier.gotoAndStop(1);
rt.inGameGoodGuysMc.addChild(newBody);
newBody.x = xx;
newBody.y = yy;
rt.goodGuysArray.push(new GameGoodGuy(rt, xx, yy, newBody, rt.Useful, 200, 1, 10, "", 1, 10, 1, false));
rt.Player = rt.goodGuysArray[(rt.goodGuysArray.length - 1)];
} else {
if (itemType == "archer"){
newBody = new GameArcher1(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "wizard"){
newBody = new GameWizard1(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "sorcerer"){
newBody = new GameSorcerer(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "warlock"){
newBody = new GameWarlock(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "knight2"){
newBody = new GameKnight2(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "mining"){
newBody = new GameMining(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "knight"){
newBody = new GameKnight1(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "knight4"){
newBody = new GameKnight4(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "knight3"){
newBody = new GameKnight3(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "mine"){
newBody = new GameMine(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "barbedWire"){
newBody = new GameWire(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
} else {
if (itemType == "brickWall"){
newBody = new GameWall(this, null, null, itemType, rt.inGameGoodGuysMc, GOOD_FLAG);
newBody.gotoAndStop(1);
rt.inGameGoodGuysMc.addChildAt(newBody, rt.getTopDepth());
bodyGrabbed = newBody;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
return (newBody);
}
public function runBox2d(){
var sprX:Number;
var mapIndexX:Number;
var sprY:Number;
var mapIndexY:Number;
if (bodyGrabbed != null){
sprX = int((rt.stage.mouseX / rt.blockSize));
mapIndexX = sprX;
sprX = (sprX * rt.blockSize);
bodyGrabbed.x = sprX;
sprY = int((rt.stage.mouseY / rt.blockSizeY));
mapIndexY = sprY;
sprY = (sprY * rt.blockSizeY);
bodyGrabbed.y = sprY;
rt.rangeMc.x = bodyGrabbed.x;
rt.rangeMc.y = bodyGrabbed.y;
if (mapIndexY < rt.levelHeightBlocks){
if (mapIndexX < rt.levelWidthBlocks){
if (mapIndexY >= 0){
if (mapIndexX >= 0){
if (bodyGrabbed.myType == "baseRepair"){
if (mapIndexX == 0){
rt.freezeMc(bodyGrabbed, 6627073, 0);
} else {
rt.freezeMc(bodyGrabbed, 6627073, 0.7);
};
} else {
if (mapIndexX == 0){
};
};
};
};
};
};
};
}
function getScaledPosX(){
}
function getScaledPosY(){
}
}
}//package classesAS3
Section 14
//GameCars2 (classesAS3.GameCars2)
package classesAS3 {
import flash.display.*;
public class GameCars2 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameCars2(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
}
}//package classesAS3
Section 15
//GameDemon (classesAS3.GameDemon)
package classesAS3 {
import flash.display.*;
public class GameDemon extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameDemon(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
}
}//package classesAS3
Section 16
//GameDragon (classesAS3.GameDragon)
package classesAS3 {
import flash.display.*;
public class GameDragon extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameDragon(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
}
}//package classesAS3
Section 17
//GameEnemyIcons (classesAS3.GameEnemyIcons)
package classesAS3 {
import flash.display.*;
import flash.events.*;
public class GameEnemyIcons extends MovieClip {
public var monsterBtn:SimpleButton;
public var iconWaveMc:MovieClip;
public var myName:String;// = null
public var rt:Object;
public var waveNumber:Number;// = 0
public function GameEnemyIcons(rt2){
waveNumber = 0;
myName = null;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15);
rt = rt2;
}
function frame10(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame14(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame12(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame6(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame7(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame1(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame3(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
public function setupM(e:MouseEvent):void{
rt.monsterRollOver(this);
}
function frame13(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame4(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame5(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame8(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame15(){
stop();
}
function frame9(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame11(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
function frame2(){
monsterBtn.addEventListener(MouseEvent.MOUSE_OVER, setupM, false);
monsterBtn.addEventListener(MouseEvent.MOUSE_OUT, setupM2, false);
stop();
}
public function setupM2(e:MouseEvent):void{
rt.monsterRollOut(this);
}
}
}//package classesAS3
Section 18
//GameEnergyBar (classesAS3.GameEnergyBar)
package classesAS3 {
import flash.display.*;
public class GameEnergyBar extends MovieClip {
public var bar:energyBar;
public var enemy:Object;
public function GameEnergyBar(enemySprite){
super();
addFrameScript(22, frame23);
enemy = enemySprite;
}
function frame23(){
MovieClip(this).enemy.energyBarOn = 0;
MovieClip(this.parent).removeChild(this);
stop();
}
}
}//package classesAS3
Section 19
//GameEvilWizard (classesAS3.GameEvilWizard)
package classesAS3 {
import flash.display.*;
public class GameEvilWizard extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameEvilWizard(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
}
}//package classesAS3
Section 20
//GameExplosion (classesAS3.GameExplosion)
package classesAS3 {
import classesAS3.*;
class GameExplosion {
var xVel:Number;// = 0
var explodeFrame:Number;
var numberOfParticles:Number;
var yPos:Number;// = 0
var myRow:Number;
var numberOfLoops:Number;
var Useful:GameUseful;
var myDamage:Number;
var xPos:Number;// = 0
var xOrigin:Number;// = 0
var rt:Object;
var mType:Number;
var artillary:Number;
var mC:Object;
var gravity:Number;
var myParentGB:Boolean;
var speed:Number;
var yVel:Number;// = 0
var fullRange:Boolean;
var Count:Number;
var arrayIndex:Number;
var explodeDistance:Number;
var yOrigin:Number;// = 0
function GameExplosion(rt2, xStart, yStart, type, useF, numberOfP, numberOfL, dist, gravityS, artillaryS, fullR, sp, myD, myGB, myR){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
rt = rt2;
Useful = useF;
myDamage = myD;
myParentGB = myGB;
myRow = myR;
fullRange = fullR;
numberOfParticles = numberOfP;
numberOfLoops = numberOfL;
explodeDistance = dist;
gravity = gravityS;
artillary = artillaryS;
speed = sp;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
Count = 0;
mType = type;
}
function remove(){
var arrayIndex:Number;
var i1:*;
arrayIndex = 0;
i1 = 0;
while (i1 < rt.explosionsArray.length) {
if (this == rt.explosionsArray[i1]){
arrayIndex = i1;
};
i1++;
};
rt.explosionsArray.splice(arrayIndex, 1);
}
function mainLoop(){
var z:int;
var rot:Number;
var vectors:Object;
var newMc:GameParticle;
z = 0;
while (z < numberOfParticles) {
if (fullRange == false){
rot = Useful.RandomNumber(1, 180);
rot = (rot + 180);
if (rot > 359){
rot = (rot - 359);
};
} else {
rot = Useful.RandomNumber(1, 360);
};
vectors = Useful.getVectorFromAngle(rot);
newMc = new GameParticle(rt, Useful, xOrigin, yOrigin, mType, vectors.vx, vectors.vy, ((vectors.vx * explodeDistance) + xOrigin), ((vectors.vy * explodeDistance) + yOrigin), artillary, gravity, explodeDistance, speed, myDamage, myParentGB, myRow);
rt.inGameExplosionsMc.addChild(newMc);
rt.particlesArray.push(newMc);
newMc.rotation = rot;
z++;
};
Count++;
if (Count > numberOfLoops){
remove();
};
}
}
}//package classesAS3
Section 21
//GameExplosionAnim (classesAS3.GameExplosionAnim)
package classesAS3 {
import flash.display.*;
public class GameExplosionAnim extends MovieClip {
public var myParent:Object;
public var rt:Object;
public var myIndex:Number;
public function GameExplosionAnim(){
super();
addFrameScript(18, frame19);
}
public function removeMe(){
}
function frame19(){
this.removeMe();
stop();
}
}
}//package classesAS3
Section 22
//GameFloor (classesAS3.GameFloor)
package classesAS3 {
import flash.display.*;
public class GameFloor extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var noRotation:Boolean;// = false
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameFloor(rt2, bD, sD, mT, myP, myE, gB){
noRotation = false;
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
goodBad = gB;
energy = myE;
}
public function removeMe(){
myParent.removeChild(this);
}
}
}//package classesAS3
Section 23
//GameGame (classesAS3.GameGame)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import fl.motion.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
public class GameGame extends MovieClip {
var depthCheck:Number;
var left:Number;
var currentMonster:Number;// = 0
var StartTimer:Number;
var GameLevels:GameGameLevels;
var badGuysArray:Array;
var selectionArray:Array;
var backObjectsArray:Array;
var bf:BlurFilter;
var sec:Number;
var playerMc:MovieClip;
var inGameColourMc:Sprite;
public var monsterBonus:Boolean;// = false
public var monsterIconMc:GameMonsterIcon;
var bf2:BlurFilter;
var levelTime:Number;
var movieWidth:Number;
var movieHeight:Number;
var inGamePickupsMc:Sprite;
var shift:Matrix;
var inGameEnemyMc:Sprite;
var baseGunType:String;
var spritesMc:Sprite;
var moneyMax:Number;
public var rollOverCostMc;// = null
var inGameMissilesMc:Sprite;
var filterAlienDelay:Number;
var moneyDelay:Number;
var levelWidth:Number;
var oldScore:Number;
var aliensLeft:Number;
var itemsToUpgradeMc:Sprite;
var clickloc:Point;
var pathFinder:Path;
var zombiesLeft:Array;
var wallCost:Number;
var money:Number;
var levelWidthBlocks:Number;
var gameOverMsgMc:GameOverMsgAnim;
var pauseSwitch:Boolean;
public var waveSpeed:Number;// = 100
var oldUpgrade2:Boolean;
var oldUpgrade3:Boolean;
var inGameCliffMc:Sprite;
var oldUpgrade5:Boolean;
var oldUpgrade6:Boolean;
var oldUpgrade1:Boolean;
var minutes:Number;
public var poisonGroundArray:Array;
var filterDelay:Number;
var oldUpgrade7:Boolean;
var endCell:Object;
var oldUpgrade4:Boolean;
var inGameRangeMc:Sprite;
var oldUpgrade8:Boolean;
var oldUpgrade9:Boolean;
var lives:Number;
var inGameScoreMc:Sprite;
var groundArray:Array;
var explosionsArray:Array;
var planeMc:GamePlane;
var energyAlien:Number;
public var raiseDeadUpg:Boolean;// = false
var freezeDelay:Number;
var itemsToBuyMc:Sprite;
public var upgrade10:Boolean;
var cmf:ColorMatrixFilter;
var timeBonus:Number;
var top:Number;
var oldMouseY:Number;
var currentPickup:String;
public var Box2d:GameBox2d;
var oldMouseX:Number;
var Sounds:GameSounds;
var aliensLeftArray:Array;
var levelCompleteMsg:GameLevelComplete;
public var soldiersIconsArray:Array;
var inGameGoodGuysMc:Sprite;
var maxScrollSpeed:Number;
var bmd:BitmapData;
var badGuyStartLevels:Array;
public var upgrade1:Boolean;
public var upgrade2:Boolean;
var gameExplosions:GameMultipleExplosion;
var soundsSwitch:Boolean;// = true
var radarArrowMc:MovieClip;
public var upgrade6:Boolean;
public var upgrade8:Boolean;
var inGameCWords:Sprite;
public var upgrade3:Boolean;
public var upgrade4:Boolean;
public var upgrade5:Boolean;
public var upgrade7:Boolean;
public var upgrade9:Boolean;
var mineDamage:Number;
var enemyIconsMc:MovieClip;
var scrollScreen:String;
public var slowTimeDelay:Number;// = 300
var musicSwitch:Boolean;// = true
var marchingAntsMc:Sprite;
var baseType:String;
var releaseloc:Point;
var levelHeight:Number;
public var slowTimeUpg:Boolean;// = false
var enemyCastles:Array;
var fulltime:Number;
var panelItemsData:Array;
public var startGameMsgMc:GameStartMsg;
var badGuyData10:Array;
var backSkyMc:backgroundSkyMc;
var badGuyData12:Array;
var badGuyData14:Array;
var badGuyData11:Array;
var badGuyData13:Array;
var badGuysLevels:Array;
public var gridOverlaySwitch:Boolean;// = false
var MAX_BADGUYS:Number;// = 80
var orbLevelPositions;
var waveDelay:Number;
var badGuyData15:Array;
var spring:Number;
var zombiesLeftC:Number;
var minDisplay:String;
var clockDelay:Number;
var inGameSkyMc:Sprite;
var right:Number;
var zoomScreen:String;// = ""
var flagMc:halfWayFlag;
var bottom:Number;
var pauseMc:MovieClip;
public var blockSize:Number;
var inGameActionMc:Sprite;
public var rt:Object;
public var goodGuyCurrent:Array;
var missilesArray:Array;
public var scrollvx:Number;
var presentationMc:Sprite;
var upgradesCost:Array;
var inGameZoomMc:Sprite;
var badGuyData1:Array;
var inGameCatapultBtnMc:Sprite;
var badGuyData5:Array;
var badGuyData6:Array;
var badGuyData0:Array;
var badGuyData8:Array;
var badGuyData3:Array;
var badGuyData4:Array;
var badGuyData7:Array;
var badGuyData2:Array;
var goodGuysArray:Array;
var itemsArray:Array;
public var startWave:Boolean;// = false
public var numRows:int;// = 19
var badGuyData9:Array;
var energy:Number;
public var statsMc:GameWeaponsPanel;
public var score:Number;
var inGameExplosionsMc:Sprite;
public var selectionBoxMc:MovieClip;
public var seeDistanceUpg:Boolean;// = false
var inGameMc:Sprite;
var firstEnemy:Boolean;
var Useful:GameUseful;
var upgradesArray:Array;
var mineCost:Number;
var floorMc:GameFloor;
public var miningSpeedUp:Number;
var marquee_mc:MovieClip;
var oldUpgrade10:Boolean;
var oldMoney:Number;
var backMcWidth:Number;
var wave:Number;
var inGameBuildingsMc:Sprite;
var Player:Object;
var currentMoneyDelay:Number;
var friction:Number;
var bestScore:Number;
var scrollxPos:Number;
var movedOverHalf:Boolean;
var pickupsArray:Array;
var tilesObject;
var bObjectsArray:Array;
var backgroundLevelMc:Sprite;
var levelHeightBlocks:Number;
var radarArrowMcLayer:Sprite;
public var levelStart:Number;
var secDisplay:String;
var grid:Array;
var levelMax:Number;
var springLength:Number;
public var Tiles:GameTiles;
var delayToWave;
var waveDelayD:Number;
var glowFilter:GlowFilter;
var monsterTotal:Number;// = 0
var inGameGraphicsMc:Sprite;
public var frozenArray:Array;
var oldEnergy:Number;
public var numCols:int;// = 27
var particlesArray:Array;
var numberOfStartItems:Number;
var enemyArray:Array;
var rangeMc:MovieClip;
var itemsCost:Array;
public var basesArray:Array;
var inGameBackgroundMc:Sprite;
public var destroyedArray:Array;
var enemyIconsMcY:Number;
var radioIconMc:radioSmallIcon;
var waveTotal:Number;// = 0
public var goodGuyRanges:Array;
var inGameBackgroundMc2:Sprite;
var currentTimeBonus:Number;
var timerStartY:Number;
var pickupType:String;
var inGameStatsMc:Sprite;
var inGameMsgsMc:Sprite;
var numBases:Number;
var pickupAdded:Boolean;
var timerStartY2:Number;
public var miningArray:Array;
public var blockSizeY:Number;
public var levelNumber:Number;
var startIcons:Number;// = 0
var obstacles:Array;
var badKingMc:Object;
public var maxLevels:Number;
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_RETREAT:int = 3;
public static const SOLDIER_E_MOVE:int = 5;
public static const SOLDIER_STATE_CRYSTAL:int = 2;
public static const BAD_FLAG:Boolean = true;
public static const SOLDIER_E_STAND:int = 0;
public static const GOOD_FLAG:Boolean = false;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_STATE_MOVE:int = 5;
public static const SOLDIER_E_BUILD:int = 2;
public static const STATE_SYSTEM_END_MSG:int = 12;
public static const SOLDIER_STATE_FALLING:int = 4;
public function GameGame(rt2, stageWidth, stageHeight, levelW, levelH, startLives, uu, maxL, bx){
var badGuyStart1:Array;
var badGuyStart2:Array;
var badGuyStart3:Array;
var badGuyStart4:Array;
var badGuyStart5:Array;
var badGuyStart6:Array;
var badGuyStart7:Array;
var badGuyStart8:Array;
var badGuyStart9:Array;
var badGuyStart10:Array;
var badGuyStart11:Array;
var badGuyStart12:Array;
var badGuyStart13:Array;
var badGuyStart14:Array;
var badGuyStart15:Array;
var badGuyStart16:Array;
var badGuyStart17:Array;
var badGuyStart18:Array;
var badGuyStart19:Array;
var badGuyStart20:Array;
var badGuyStart21:Array;
var badGuyStart22:Array;
var badGuyStart23:Array;
var badGuyStart24:Array;
var badGuyStart25:Array;
var badGuyStart26:Array;
var badGuyGroup0:Array;
var badGuyGroup1:Array;
var badGuyGroup2:Array;
var badGuyGroup3:Array;
var badGuyGroup4:Array;
var badGuyGroup4b:Array;
var badGuyGroup5:Array;
var badGuyGroup6:Array;
var spiderGroup1:Array;
var spiderGroup1b:Array;
var spiderGroup2:Array;
var badGuyGroup8:Array;
var badGuyGroup9:Array;
var badGuyGroup10:Array;
var badGuyGroup10b:Array;
var badGuyGroup12:Array;
var badGuyGroup13:Array;
var badGuyGroup11:Array;
var dwarfGroup1:Array;
var dwarfGroup2:Array;
var dwarfGroup3:Array;
var dwarfGroup4:Array;
var dwarfGroup5:Array;
var dwarfGroup6:Array;
var badGuyGroup14:Array;
var ogreGroup1:Array;
var ogreGroup2:Array;
var ogreGroup3:Array;
var ogreGroup4:Array;
var lizardmanGroup1:Array;
var lizardmanGroup2:Array;
var lizardmanGroup3:Array;
var lizardmanGroup4:Array;
var lizardmanGroup5:Array;
var serpentGroup1:Array;
var bansheeGroup1:Array;
var bansheeGroup2:Array;
var badGuyGroup15:Array;
var badGuysLevel1:Array;
var badGuysLevel2:Array;
var badGuysLevel3:Array;
var badGuysLevel4:Array;
var badGuysLevel5:Array;
var badGuysLevel6:Array;
var badGuysLevel7:Array;
var badGuysLevel8:Array;
var badGuysLevel9:Array;
var badGuysLevel10:Array;
var badGuysLevel11:Array;
var badGuysLevel12:Array;
var badGuysLevel13:Array;
var badGuysLevel14:Array;
var badGuysLevel15:Array;
var badGuysLevel16:Array;
var badGuysLevel17:Array;
var badGuysLevel18:Array;
var badGuysLevel19:Array;
var badGuysLevel20:Array;
var badGuysLevel21:Array;
var badGuysLevel23:Array;
var badGuysLevel22:Array;
var badGuysLevel24:Array;
var badGuysLevel25:Array;
var badGuysLevel26:Array;
soundsSwitch = true;
musicSwitch = true;
zoomScreen = "";
startWave = false;
rollOverCostMc = null;
waveTotal = 0;
monsterTotal = 0;
currentMonster = 0;
MAX_BADGUYS = 80;
numRows = 19;
numCols = 27;
seeDistanceUpg = false;
slowTimeUpg = false;
slowTimeDelay = 300;
gridOverlaySwitch = false;
startIcons = 0;
waveSpeed = 100;
monsterBonus = false;
raiseDeadUpg = false;
super();
rt = rt2;
Useful = uu;
Box2d = new GameBox2d(this, Useful, bx);
upgrade1 = false;
upgrade2 = false;
upgrade3 = false;
upgrade4 = false;
upgrade5 = false;
movieWidth = stageWidth;
movieHeight = stageHeight;
backMcWidth = 1240;
maxLevels = maxL;
mineDamage = 20;
blockSize = 24;
blockSizeY = 24;
miningSpeedUp = 15;
Sounds = new GameSounds(this);
levelWidthBlocks = levelW;
levelHeightBlocks = levelH;
levelWidth = (levelWidthBlocks * blockSize);
levelHeight = (levelHeightBlocks * blockSizeY);
inGameMc = new Sprite();
addChild(inGameMc);
presentationMc = new Sprite();
addChild(presentationMc);
inGameActionMc = new Sprite();
inGameMc.addChild(inGameActionMc);
inGameStatsMc = new Sprite();
inGameMc.addChild(inGameStatsMc);
inGameZoomMc = new Sprite();
inGameActionMc.addChild(inGameZoomMc);
inGameGraphicsMc = new Sprite();
inGameZoomMc.addChild(inGameGraphicsMc);
inGameMsgsMc = new Sprite();
inGameMc.addChild(inGameMsgsMc);
inGameBackgroundMc = new Sprite();
inGameGraphicsMc.addChild(inGameBackgroundMc);
spritesMc = new Sprite();
inGameGraphicsMc.addChild(spritesMc);
backgroundLevelMc = new Sprite();
spritesMc.addChild(backgroundLevelMc);
inGameCliffMc = new Sprite();
spritesMc.addChild(inGameCliffMc);
inGameBuildingsMc = new Sprite();
spritesMc.addChild(inGameBuildingsMc);
playerMc = new MovieClip();
spritesMc.addChild(playerMc);
inGameEnemyMc = new Sprite();
spritesMc.addChild(inGameEnemyMc);
inGameRangeMc = new Sprite();
spritesMc.addChild(inGameRangeMc);
inGameGoodGuysMc = new Sprite();
spritesMc.addChild(inGameGoodGuysMc);
inGameSkyMc = new Sprite();
spritesMc.addChild(inGameSkyMc);
inGameColourMc = new Sprite();
spritesMc.addChild(inGameColourMc);
inGamePickupsMc = new Sprite();
inGameColourMc.addChild(inGamePickupsMc);
inGameMissilesMc = new Sprite();
inGameColourMc.addChild(inGameMissilesMc);
inGameExplosionsMc = new Sprite();
inGameColourMc.addChild(inGameExplosionsMc);
inGameScoreMc = new Sprite();
inGameColourMc.addChild(inGameScoreMc);
radarArrowMcLayer = new Sprite();
inGameColourMc.addChild(radarArrowMcLayer);
bf = new BlurFilter(2, 2, BitmapFilterQuality.LOW);
bf2 = new BlurFilter(5, 5, BitmapFilterQuality.LOW);
cmf = new ColorMatrixFilter([1.3, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 14, 20, 0, 0, 0, 0, 1, 0]);
radioIconMc = null;
missilesArray = new Array();
enemyArray = new Array();
goodGuysArray = new Array();
missilesArray = new Array();
badGuysArray = new Array();
poisonGroundArray = new Array();
explosionsArray = new Array();
particlesArray = new Array();
pickupsArray = new Array();
backObjectsArray = new Array();
groundArray = new Array();
itemsArray = new Array();
selectionArray = new Array();
soldiersIconsArray = new Array();
frozenArray = new Array();
basesArray = new Array();
miningArray = new Array();
panelItemsData = new Array("swordsman", 5, "10 Gold. Soldier with machine gun. + 1 range, low attack, moderate armour", "knight", 40, "25 Gold. Grenadier. + 2 range, moderate attack, low armour", "archer", 70, "35 Gold. Bazooker. + 3 range, mderate attack, low armour", "crossbowman", 100, "45 Gold. Mortar. +3 range, moderate attack, moderate armour", "archer", 50, "60 Gold. Machine gun nest. +3 range, moderate attack, good armour", "ranger", 65, "75 Gold. Artillery. + 4 range, good attack, low armour", "crossbowman", 75, "80 Gold. Gun tower. + 3 range, good attack, good armour", "catapult", 150, "100 Gold. Rocket tower. + 4 range, good attack, moderate armour", "Druid", 70, "40 Gold. Mine. + 1 range, good attack", "wizard", 100, "10 Gold. Mining. You need these to increase your gold reserves", "Sorcerer", 150, "40 Gold. Repair base. Use this to repair a destroyed base.", "Warlock", 230, "12 Gold. Barbed Wire. Simple obstacle to slow down the aliens", "brick wall", 200, "25 Gold. Brick Wall. Strong defense against aliens.", "Freeze potion", 300, "70 Gold. Faster firing. ", "restore", 90, "90 Gold. Increase range. Allows soldiers to detect enemy over greater range.", "swordsman", 100, "100 Gold. Increase armour. Increases armour for all soldiers and buildings.", "swordsman", 120, "120 Gold. Mine faster. Mining operations collect resources quicker", "swordsman", 140, "140 Gold. Radio. Return soldiers to barracks and clears squre. Half the Gold is refunded.", "swordsman", 0, "Radar. Tells you where aliens are about to attack.", "swordsman", 0, "Medical packs. Soldiers slowly heal themselves if hurt", "swordsman", 0, "AirStrikes. Player may drop one airstrike per level", "swordsman", 0, "Auto save. Automatically saves game at current level.", "swordsman", 0, "Discount Pack. Get all 4 upgrades for an 800 coins discount!");
goodGuyRanges = new Array(4, 40, 40, 140, 120, 200, 130, 100, 100, 100, 100, 100, 100, 100, 100, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40);
itemsCost = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
upgradesCost = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10);
badGuyStart1 = new Array(0, 0, 1, 0, 0, 1);
badGuyStart2 = new Array(10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0);
badGuyStart3 = new Array(25, 0, 26, 0, 24, 0);
badGuyStart4 = new Array(0, 10, 0, 9, 0, 11);
badGuyStart5 = new Array(26, 9, 26, 10, 26, 8);
badGuyStart6 = new Array(0, 0, 1, 0, 0, 1);
badGuyStart7 = new Array(26, 18, 26, 17, 25, 18, 26, 18, 26, 17, 25, 18, 0, 0);
badGuyStart8 = new Array(26, 9, 26, 10, 26, 8);
badGuyStart9 = new Array(0, 18, 1, 18, 0, 17);
badGuyStart10 = new Array(0, 0, 1, 0, 0, 1, 26, 18, 26, 17, 25, 18);
badGuyStart11 = new Array(26, 9, 26, 10, 26, 8, 0, 9, 0, 10, 0, 8);
badGuyStart12 = new Array(10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 26, 0);
badGuyStart13 = new Array(26, 18, 26, 17, 25, 18, 26, 18, 26, 17, 25, 18, 0, 1, 0, 0);
badGuyStart14 = new Array(0, 2, 0, 3, 0, 4, 0, 5, 26, 18, 26, 17);
badGuyStart15 = new Array(26, 7, 26, 8, 0, 9, 0, 10, 0, 8, 0, 7, 0, 12);
badGuyStart16 = new Array(0, 16, 1, 18, 0, 15, 26, 9, 26, 10, 26, 8);
badGuyStart17 = new Array(0, 10, 0, 9, 0, 11);
badGuyStart18 = new Array(26, 18, 26, 17, 25, 18);
badGuyStart19 = new Array(25, 0, 26, 0, 24, 0, 0, 5, 0, 6, 0, 7, 0, 8);
badGuyStart20 = new Array(26, 18, 26, 17, 25, 18, 5, 0, 6, 0, 7, 0, 8, 0);
badGuyStart21 = new Array(0, 16, 1, 18, 0, 15, 26, 10, 26, 9, 26, 8);
badGuyStart22 = new Array(10, 0, 11, 0, 12, 0, 13, 0, 14, 18, 15, 18, 16, 0);
badGuyStart23 = new Array(0, 9, 0, 10, 0, 11, 26, 9, 26, 10, 26, 11, 15, 0, 14, 0, 16, 0);
badGuyStart24 = new Array(0, 9, 0, 10, 0, 11, 26, 9, 26, 10, 26, 11, 13, 0, 14, 0, 12, 0, 13, 18, 14, 18, 12, 18);
badGuyStart25 = new Array(0, 9, 0, 10, 0, 11, 26, 9, 26, 10, 26, 11, 13, 0, 14, 0, 12, 0, 13, 18, 14, 18, 12, 18);
badGuyStart26 = new Array(0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 26, 1, 26, 2, 26, 3, 26, 4, 26, 5, 26, 6, 26, 7, 26, 8, 26, 9, 26, 10, 26, 11, 26, 12, 26, 13, 26, 14, 26, 15, 26, 16, 26, 17, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 0, 18, 1, 18, 2, 18, 3, 18, 4, 18, 5, 18, 6, 18, 7, 18, 8, 18, 9, 18, 10, 18, 11, 18, 12, 18, 13, 18, 14, 18, 15, 18, 16, 18, 17, 18, 18, 18, 19, 18, 20, 18, 21, 18, 22, 18, 23, 18, 24, 18, 25, 18, 26, 18);
badGuyStartLevels = new Array(badGuyStart1, badGuyStart2, badGuyStart3, badGuyStart4, badGuyStart5, badGuyStart6, badGuyStart7, badGuyStart8, badGuyStart9, badGuyStart10, badGuyStart11, badGuyStart12, badGuyStart13, badGuyStart14, badGuyStart15, badGuyStart16, badGuyStart17, badGuyStart18, badGuyStart19, badGuyStart20, badGuyStart21, badGuyStart22, badGuyStart23, badGuyStart24, badGuyStart25, badGuyStart26);
badGuyData0 = new Array("blank", 405, 0.5, 0, "position", 760, 150, 1, 2, 10, 10, "bullet", 15);
badGuyData1 = new Array("badKnight2", 405, 0.5, 0, "position", 760, 150, 1, 0.5, 20, 10, "bullet", 1, "Orc");
badGuyData2 = new Array("badKnight3", 405, 0.5, 0, "position", 760, 350, 1, 0.3, 23, 12, "bullet", 2, "Troll");
badGuyData3 = new Array("badArcher1", 405, 0.5, 0, "position", 760, 350, 1, 0.9, 25, 10, "bullet", 3, "Goblin");
badGuyData4 = new Array("badKnight1", 405, 0.5, 0, "position", 760, 350, 1, 0.6, 45, 20, "bullet", 4, "Lizardman");
badGuyData5 = new Array("viking1", 405, 0.5, 0, "position", 760, 350, 1, 0.3, 50, 30, "bullet", 5, "Ogre");
badGuyData6 = new Array("ram", 405, 0.5, 0, "position", 760, 350, 1, 0.9, 45, 30, "bullet", 6, "Evil Dwarf");
badGuyData7 = new Array("badArcher2", 405, 0.5, 0, "position", 760, 350, 1, 0.7, 50, 15, "bullet", 7, "Flying serpent");
badGuyData8 = new Array("bird", 405, 0.5, 0, "position", 760, 150, 1, 0.2, 80, 35, "bullet", 8, "Giant");
badGuyData9 = new Array("spider", 405, 0.5, 0, "position", 760, 150, 1, 0.9, 40, 25, "bullet", 10, "Spider");
badGuyData10 = new Array("banshee", 405, 0.5, 0, "position", 760, 150, 1, 0.7, 30, 10, "bullet", 9, "Banshee");
badGuyData11 = new Array("witch", 405, 0.5, 0, "position", 760, 150, 1, 0.8, 60, 25, "bullet", 11, "Witch");
badGuyData12 = new Array("evilWizard", 405, 0.5, 0, "position", 760, 150, 1, 0.4, 60, 30, "bullet", 12, "Evil Wizard");
badGuyData13 = new Array("demon", 405, 0.5, 0, "position", 760, 150, 1, 0.5, 80, 35, "bullet", 13, "Demon");
badGuyData14 = new Array("dragon", 405, 0.5, 0, "position", 760, 150, 1, 0.5, 100, 40, "bullet", 14, "Dragon");
badGuyGroup0 = new Array(badGuyData0);
badGuyGroup1 = new Array(badGuyData0, badGuyData1, badGuyData1, badGuyData1, badGuyData1, badGuyData1);
badGuyGroup2 = new Array(badGuyData0, badGuyData2, badGuyData2, badGuyData2, badGuyData2, badGuyData2);
badGuyGroup3 = new Array(badGuyData0, badGuyData3, badGuyData3, badGuyData3, badGuyData3, badGuyData3);
badGuyGroup4 = new Array(badGuyData0, badGuyData3, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
badGuyGroup4b = new Array(badGuyData0, badGuyData3, badGuyData3, badGuyData10, badGuyData10, badGuyData10);
badGuyGroup5 = new Array(badGuyData0, badGuyData5, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
badGuyGroup6 = new Array(badGuyData0, badGuyData6, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
spiderGroup1 = new Array(badGuyData0, badGuyData9, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
spiderGroup1b = new Array(badGuyData0, badGuyData9, badGuyData3, badGuyData3, badGuyData3, badGuyData10);
spiderGroup2 = new Array(badGuyData0, badGuyData9, badGuyData9, badGuyData9, badGuyData9, badGuyData9);
badGuyGroup8 = new Array(badGuyData0, badGuyData8, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
badGuyGroup9 = new Array(badGuyData0, badGuyData11, badGuyData11, badGuyData11, badGuyData11, badGuyData11);
badGuyGroup10 = new Array(badGuyData0, badGuyData11, badGuyData1, badGuyData1, badGuyData1, badGuyData11);
badGuyGroup10b = new Array(badGuyData0, badGuyData11, badGuyData3, badGuyData3, badGuyData3, badGuyData11);
badGuyGroup12 = new Array(badGuyData0, badGuyData11, badGuyData11, badGuyData11, badGuyData10, badGuyData10);
badGuyGroup13 = new Array(badGuyData0, badGuyData11, badGuyData11, badGuyData1, badGuyData1, badGuyData5);
badGuyGroup11 = new Array(badGuyData0, badGuyData5, badGuyData3, badGuyData3, badGuyData3, badGuyData10);
dwarfGroup1 = new Array(badGuyData0, badGuyData6, badGuyData6, badGuyData6, badGuyData6, badGuyData6);
dwarfGroup2 = new Array(badGuyData0, badGuyData6, badGuyData6, badGuyData6, badGuyData6, badGuyData12);
dwarfGroup3 = new Array(badGuyData0, badGuyData6, badGuyData6, badGuyData6, badGuyData6, badGuyData13);
dwarfGroup4 = new Array(badGuyData0, badGuyData12, badGuyData13, badGuyData13, badGuyData13, badGuyData13);
dwarfGroup5 = new Array(badGuyData0, badGuyData6, badGuyData6, badGuyData6, badGuyData6, badGuyData14);
dwarfGroup6 = new Array(badGuyData0, badGuyData6, badGuyData6, badGuyData6, badGuyData4, badGuyData14);
badGuyGroup14 = new Array(badGuyData0, badGuyData11, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
ogreGroup1 = new Array(badGuyData0, badGuyData1, badGuyData1, badGuyData5, badGuyData5, badGuyData5);
ogreGroup2 = new Array(badGuyData0, badGuyData5, badGuyData5, badGuyData5, badGuyData5, badGuyData5);
ogreGroup3 = new Array(badGuyData0, badGuyData9, badGuyData10, badGuyData9, badGuyData10, badGuyData5);
ogreGroup4 = new Array(badGuyData0, badGuyData9, badGuyData9, badGuyData9, badGuyData5, badGuyData5);
lizardmanGroup1 = new Array(badGuyData0, badGuyData1, badGuyData1, badGuyData3, badGuyData3, badGuyData4);
lizardmanGroup2 = new Array(badGuyData0, badGuyData4, badGuyData4, badGuyData4, badGuyData4, badGuyData4);
lizardmanGroup3 = new Array(badGuyData0, badGuyData7, badGuyData4, badGuyData4, badGuyData4, badGuyData7);
lizardmanGroup4 = new Array(badGuyData0, badGuyData7, badGuyData4, badGuyData4, badGuyData4, badGuyData8);
lizardmanGroup5 = new Array(badGuyData0, badGuyData8, badGuyData8, badGuyData4, badGuyData4, badGuyData4);
serpentGroup1 = new Array(badGuyData0, badGuyData7, badGuyData7, badGuyData7, badGuyData7, badGuyData7);
bansheeGroup1 = new Array(badGuyData0, badGuyData1, badGuyData10, badGuyData10, badGuyData10, badGuyData10);
bansheeGroup2 = new Array(badGuyData0, badGuyData10, badGuyData10, badGuyData10, badGuyData10, badGuyData10);
badGuyGroup15 = new Array(badGuyData0, badGuyData1, badGuyData1, badGuyData1, badGuyData1, badGuyData10);
badGuysLevel1 = new Array(badGuyGroup1);
badGuysLevel2 = new Array(badGuyGroup1, badGuyGroup2);
badGuysLevel3 = new Array(badGuyGroup1, badGuyGroup2, badGuyGroup3, badGuyGroup3);
badGuysLevel4 = new Array(badGuyGroup4);
badGuysLevel5 = new Array(badGuyGroup3, badGuyGroup3, badGuyGroup4, bansheeGroup2);
badGuysLevel6 = new Array(badGuyGroup1, bansheeGroup1, bansheeGroup2, badGuyGroup3, badGuyGroup3);
badGuysLevel7 = new Array(spiderGroup1);
badGuysLevel8 = new Array(badGuyGroup2, badGuyGroup3, spiderGroup2, badGuyGroup10);
badGuysLevel9 = new Array(spiderGroup1, badGuyGroup9, spiderGroup2, badGuyGroup2);
badGuysLevel10 = new Array(spiderGroup2, badGuyGroup3, badGuyGroup12, spiderGroup2, spiderGroup2, spiderGroup2);
badGuysLevel11 = new Array(badGuyGroup3, badGuyGroup3, badGuyGroup11, ogreGroup1);
badGuysLevel12 = new Array(badGuyGroup12, ogreGroup2, ogreGroup2, badGuyGroup3, badGuyGroup2);
badGuysLevel13 = new Array(badGuyGroup13, ogreGroup1, badGuyGroup2, badGuyGroup3);
badGuysLevel14 = new Array(ogreGroup1, badGuyGroup14, ogreGroup1, ogreGroup2, ogreGroup3);
badGuysLevel15 = new Array(lizardmanGroup1, lizardmanGroup1, lizardmanGroup2, lizardmanGroup2, bansheeGroup1);
badGuysLevel16 = new Array(lizardmanGroup2, lizardmanGroup2, badGuyGroup14, lizardmanGroup3);
badGuysLevel17 = new Array(lizardmanGroup3, lizardmanGroup3, badGuyGroup3, badGuyGroup3, lizardmanGroup4);
badGuysLevel18 = new Array(lizardmanGroup3, lizardmanGroup4, lizardmanGroup4);
badGuysLevel19 = new Array(serpentGroup1, lizardmanGroup4, lizardmanGroup4, lizardmanGroup4);
badGuysLevel20 = new Array(lizardmanGroup2, lizardmanGroup5, serpentGroup1, serpentGroup1, lizardmanGroup5);
badGuysLevel21 = new Array(badGuyGroup3, dwarfGroup1, dwarfGroup2, dwarfGroup2);
badGuysLevel23 = new Array(dwarfGroup1, badGuyGroup14, dwarfGroup2, dwarfGroup3, dwarfGroup2, dwarfGroup3, dwarfGroup4);
badGuysLevel22 = new Array(dwarfGroup1, dwarfGroup2, dwarfGroup2, dwarfGroup2, dwarfGroup2, dwarfGroup1, dwarfGroup3);
badGuysLevel24 = new Array(badGuyGroup3, badGuyGroup3, dwarfGroup1, dwarfGroup1, dwarfGroup1, dwarfGroup5, dwarfGroup4, dwarfGroup4, dwarfGroup4);
badGuysLevel25 = new Array(dwarfGroup4, dwarfGroup4, dwarfGroup4, dwarfGroup5, dwarfGroup5, dwarfGroup6, badGuyGroup3);
badGuysLevel26 = new Array(badGuyGroup1, badGuyGroup1, badGuyGroup1, badGuyGroup1, badGuyGroup1, badGuyGroup2, badGuyGroup2, badGuyGroup2, badGuyGroup2, badGuyGroup2, badGuyGroup3, badGuyGroup3, badGuyGroup3, badGuyGroup3, badGuyGroup3, badGuyGroup4b, badGuyGroup4b, badGuyGroup4b, badGuyGroup4b, badGuyGroup4b, spiderGroup1b, spiderGroup1b, spiderGroup1b, spiderGroup1b, spiderGroup1b, spiderGroup2, spiderGroup2, spiderGroup2, spiderGroup2, spiderGroup2, badGuyGroup10b, badGuyGroup10b, badGuyGroup10b, badGuyGroup10b, badGuyGroup10b, badGuyGroup11, badGuyGroup11, badGuyGroup11, badGuyGroup11, badGuyGroup11, ogreGroup4, ogreGroup4, ogreGroup4, ogreGroup4, ogreGroup4, ogreGroup1, ogreGroup1, ogreGroup1, ogreGroup1, ogreGroup1, lizardmanGroup1, lizardmanGroup1, lizardmanGroup1, lizardmanGroup1, lizardmanGroup1, lizardmanGroup2, lizardmanGroup2, lizardmanGroup2, lizardmanGroup2, lizardmanGroup2, lizardmanGroup3, lizardmanGroup3, lizardmanGroup3, lizardmanGroup3, lizardmanGroup3, lizardmanGroup4, lizardmanGroup4, lizardmanGroup4, lizardmanGroup4, lizardmanGroup4, lizardmanGroup5, lizardmanGroup5, lizardmanGroup5, lizardmanGroup5, lizardmanGroup5, dwarfGroup1, dwarfGroup1, dwarfGroup1, dwarfGroup1, dwarfGroup1, dwarfGroup2, dwarfGroup2, dwarfGroup2, dwarfGroup2, dwarfGroup2, dwarfGroup3, dwarfGroup3, dwarfGroup3, dwarfGroup3, dwarfGroup3, dwarfGroup4, dwarfGroup4, dwarfGroup4, dwarfGroup4, dwarfGroup4, dwarfGroup5, dwarfGroup5, dwarfGroup5, dwarfGroup6, dwarfGroup6);
badGuysLevels = new Array(badGuysLevel1, badGuysLevel2, badGuysLevel3, badGuysLevel4, badGuysLevel5, badGuysLevel6, badGuysLevel7, badGuysLevel8, badGuysLevel9, badGuysLevel10, badGuysLevel11, badGuysLevel12, badGuysLevel13, badGuysLevel14, badGuysLevel15, badGuysLevel16, badGuysLevel17, badGuysLevel18, badGuysLevel19, badGuysLevel20, badGuysLevel21, badGuysLevel22, badGuysLevel23, badGuysLevel24, badGuysLevel25, badGuysLevel26);
orbLevelPositions = new Array(20, 10, 10, 14, 9, 14, 21, 9, 8, 11, 19, 10, 5, 5, 10, 10, 16, 5, 14, 9, 14, 8, 10, 10, 20, 10, 13, 6, 20, 10, 10, 10, 20, 10, 12, 15, 12, 10, 10, 10, 20, 10, 10, 10, 10, 10, 16, 10, 12, 10, 14, 8);
aliensLeftArray = new Array(15, 20, 30, 35, 35, 40, 40, 40, 45, 45, 50, 50, 50, 60, 60, 65, 65, 65, 70, 70, 65, 65, 70, 70, 70, 500);
glowFilter = new GlowFilter(6750054, 1, 8, 8, 3, 1);
scrollvx = 0;
score = 0;
bestScore = 0;
lives = startLives;
energy = 100;
money = 0;
energyAlien = 100;
currentMoneyDelay = 80;
moneyDelay = currentMoneyDelay;
moneyMax = 100;
spring = 0.01;
friction = 0.8;
springLength = 10;
left = -20;
right = (movieWidth - 20);
top = 0;
bottom = movieHeight;
levelStart = 1;
levelNumber = levelStart;
levelMax = 25;
wave = 0;
delayToWave = 100;
maxScrollSpeed = 24;
scrollxPos = 0;
secDisplay = "00";
minDisplay = "00";
StartTimer = 1;
clockDelay = 10;
minutes = StartTimer;
sec = 0;
fulltime = 0;
numberOfStartItems = 3;
pauseSwitch = false;
filterDelay = 1;
filterAlienDelay = 1;
scrollScreen = "";
mineCost = 10;
wallCost = 20;
setupBasesArray();
GameLevels = new GameGameLevels(this);
initGrid();
pathFinder = new Path(grid);
}
public function gameOver(gameOverType){
var i2:*;
if (Box2d.bodyGrabbed != null){
deleteGrabbed();
};
i2 = 0;
while (i2 < badGuysArray.length) {
badGuysArray[i2].dead = true;
badGuysArray[i2].mC.gotoAndStop("die");
i2++;
};
if (gameOverType == "game_over"){
setupBasesArray();
rt.gameState = 5;
Sounds.playSoundFx("gameOverFx", 1, 0, 1);
increaseScore(money);
gameOverMsgMc = new GameOverMsgAnim(this);
inGameMsgsMc.addChild(gameOverMsgMc);
gameOverMsgMc.play();
gameOverMsgMc.x = (movieWidth / 2);
gameOverMsgMc.y = (movieHeight / 2);
} else {
Sounds.playSoundFx("levelCompleteFx", 1, 0, 1);
increaseScore(money);
rt.gameState = 5;
levelCompleteMsg = new GameLevelComplete(this);
inGameMsgsMc.addChild(levelCompleteMsg);
levelCompleteMsg.x = (movieWidth / 2);
levelCompleteMsg.y = ((movieHeight / 2) - 60);
};
}
function endLevelStuff(){
rt.gameState = 6;
killAllExplosions();
levelNumber++;
inGameMsgsMc.removeChild(levelCompleteMsg);
levelCompleteMsg = null;
inGameBackgroundMc.removeChild(backSkyMc);
backSkyMc.stop();
backSkyMc = null;
spritesMc.x = 0;
newLevelStuff();
destroyEverything();
rt.setupMapScreen();
}
public function setupGame(){
energy = 100;
startIcons = 0;
slowTimeUpg = false;
raiseDeadUpg = false;
monsterIconMc = null;
if (rt.gameMode == "quest"){
seeDistanceUpg = false;
startWave = false;
} else {
startWave = true;
levelNumber = 26;
};
newArrays();
depthCheck = 50;
oldEnergy = energy;
oldScore = score;
oldUpgrade1 = upgrade1;
oldUpgrade2 = upgrade2;
oldUpgrade3 = upgrade3;
oldUpgrade4 = upgrade4;
oldUpgrade5 = upgrade5;
levelTime = 0;
waveDelayD = 1;
waveTotal = 0;
monsterTotal = 0;
wave = 0;
currentMonster = 0;
freezeDelay = 2;
aliensLeft = aliensLeftArray[(levelNumber - 1)];
waveDelay = 700;
if (waveDelay < 100){
waveDelay = 100;
};
delayToWave = 100;
money = (money + 300);
currentMoneyDelay = 80;
moneyDelay = currentMoneyDelay;
moneyMax = (400 + ((levelNumber - 1) * 20));
if (rt.gameMode != "quest"){
money = 1000;
};
setupPanel();
setupRightPanel();
setupBackground();
soundFxBtn2();
musicBtn2();
setScore();
setLevel();
setMoney();
setEnergy();
setupLevelBases();
setupStartGameMsg();
checkForAfford();
setNextMonster();
rt.stage.focus = rt;
}
function copyArray(arrayA, arrayB){
var i:int;
var j:int;
i = 0;
while (i < arrayA.length) {
j = 0;
while (j < arrayA[i].length) {
arrayB[i][j].t = arrayA[i][j].t;
j++;
};
i++;
};
}
function runWave(){
var badGuys:Array;
var badGuysGroup:Array;
var waveSpeedUp:Number;
var iconsYSpeed:*;
if (startWave == true){
if (badGuysArray.length < MAX_BADGUYS){
delayToWave--;
if (delayToWave == 0){
setupWave();
currentMonster++;
badGuys = badGuysLevels[(levelNumber - 1)];
badGuysGroup = badGuys[wave];
if (currentMonster >= badGuysGroup.length){
currentMonster = 0;
wave++;
waveTotal++;
badGuys = badGuysLevels[(levelNumber - 1)];
if (wave >= badGuys.length){
wave = 0;
};
};
waveDelayD--;
if (waveDelayD == 0){
waveDelayD = 1;
waveSpeedUp = (levelNumber * 4);
if (waveSpeedUp > 20){
waveSpeedUp = 20;
};
waveDelay = (waveDelay - 400);
if (waveDelay < waveSpeed){
waveDelay = waveSpeed;
};
};
delayToWave = waveDelay;
};
if (firstEnemy == true){
iconsYSpeed = (32 / waveDelay);
enemyIconsMcY = (enemyIconsMcY - iconsYSpeed);
enemyIconsMc.y = enemyIconsMcY;
};
};
};
}
function setupBadSoldier(badGuyData, xx, yy){
var badGuyName:String;
var badGuyDens:Number;
var badGuyFric:Number;
var badGuyRest:Number;
var badGuyX:Number;
var badGuyY:Number;
var speed:Number;
var badGuyScore:Number;
var badGuyDamage:Number;
var badGuyP:String;
var bodyMc:*;
badGuyName = badGuyData[0];
badGuyDens = badGuyData[1];
badGuyFric = badGuyData[2];
badGuyRest = badGuyData[3];
badGuyX = xx;
badGuyY = yy;
speed = badGuyData[8];
badGuyScore = badGuyData[9];
badGuyDamage = badGuyData[10];
badGuyP = badGuyData[11];
bodyMc = Box2d.setupGrabbedItem(badGuyName, badGuyDens, badGuyFric, badGuyRest, "position", badGuyX, badGuyY, 1);
badGuysArray.push(new GameBadGuy(badGuyName, this, bodyMc.x, bodyMc.y, bodyMc, Useful, speed, badGuyScore, badGuyDamage, badGuyP));
}
function setupSoldier(soldier, xx, yy, ind, onTower){
var soldierType:*;
soldierType = soldier.myType;
if (soldierType == "knight"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 40, 1, 5, "bullet", 5, itemsCost[0], ind, 0));
} else {
if (soldierType == "knight2"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 40, 1, 8, "bullet", 2, itemsCost[1], ind, 0));
} else {
if (soldierType == "archer"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 50, 0, 8, "bullet", 1.5, itemsCost[2], ind, 0));
} else {
if (soldierType == "wizard"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 150, 0, 10, "bullet", 1, itemsCost[3], ind, onTower));
} else {
if (soldierType == "knight3"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 60, 2, 10, "bullet", 4, itemsCost[4], ind, 0));
} else {
if (soldierType == "knight4"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 200, 1, 20, "bullet", 1, itemsCost[5], ind, onTower));
} else {
if (soldierType == "gunTower"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 100, 1, 30, "bullet", 2, itemsCost[6], ind, onTower));
} else {
if (soldierType == "rocketTower"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 260, 1, 30, "bullet", 1, itemsCost[7], ind, onTower));
} else {
if (soldierType == "mining"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 230, 1, 5, "bullet", 1, itemsCost[9], ind, onTower));
} else {
if (soldierType == "mine"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 230, 1, 10, "bullet", 1, itemsCost[8], ind, onTower));
} else {
if (soldierType == "sorcerer"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 230, 1, 20, "bullet", 1, itemsCost[10], ind, onTower));
} else {
if (soldierType == "warlock"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 230, 1, 30, "bullet", 3, itemsCost[11], ind, onTower));
} else {
if (soldierType == "brickWall"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 230, 1, 5, "no_fire", 5, itemsCost[12], ind, 0));
} else {
if (soldierType == "barbedWire"){
goodGuysArray.push(new GameGoodGuy(this, xx, yy, soldier, Useful, 230, 1, 5, "no_fire", 6, itemsCost[13], ind, 0));
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function getTopDepth(){
return ((inGameGoodGuysMc.numChildren - 1));
}
function soundFxBtn(){
if (statsMc.soundFxMc.currentFrame == 1){
statsMc.soundFxMc.gotoAndStop("off");
soundsSwitch = false;
} else {
statsMc.soundFxMc.gotoAndStop("on");
soundsSwitch = true;
};
}
public function checkForAfford(){
var i:*;
i = 0;
while (i < 13) {
if (panelItemsData[((i * 3) + 1)] > money){
if (itemsArray[i].currentFrame != 2){
itemsArray[i].gotoAndStop("notBuy");
};
} else {
if (itemsArray[i].currentFrame != 1){
if (soldiersIconsArray[i] != true){
itemsArray[i].gotoAndStop(1);
};
};
};
i++;
};
}
function setLevel(){
statsMc.levelTxt.text = String(levelNumber);
}
public function monsterRollOut(iconMc){
if (monsterIconMc != null){
inGameMsgsMc.removeChild(monsterIconMc);
};
}
function setupPanelUpgrades(){
if (statsMc.infoPanel.infoClose != null){
if (statsMc.infoPanel.infoClose.energyTxt != null){
statsMc.infoPanel.infoClose.energyTxt.text = String(int(selectionBoxMc.itemSprite.energy));
};
};
if (selectionBoxMc.itemSprite.mC.myType == "knight2"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.battleAxeUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.plateMailUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "archer"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.swordUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.improvedSightUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "knight3"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.advShieldUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.weaponExpUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "wizard"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.steelTArrowUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.improvedSightUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.fasterFiringUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "knight4"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.steelTArrowUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.plateMailUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.weaponExpUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "gunTower"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.advShieldUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.improvedSightUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.weaponExpUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "rocketTower"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.fasterFiringUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.catapultFireUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.weaponExpUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "mine"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.healthUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.evilToGoodUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "mining"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.poisonGroundUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (seeDistanceUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.valkyrieUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "sorcerer"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.slowTimeUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.magicShieldUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.iceBoltsUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.unicornUpg == false){
if (statsMc.infoPanel.upgradeBtn4 != null){
statsMc.infoPanel.upgradeBtn4.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn4 != null){
statsMc.infoPanel.upgradeBtn4.gotoAndStop(3);
};
};
} else {
if (selectionBoxMc.itemSprite.mC.myType == "warlock"){
statsMc.infoPanel.gotoAndStop(selectionBoxMc.itemNum);
if (selectionBoxMc.itemSprite.fireballsUpg == false){
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn1 != null){
statsMc.infoPanel.upgradeBtn1.gotoAndStop(3);
};
};
if (raiseDeadUpg == false){
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn2 != null){
statsMc.infoPanel.upgradeBtn2.gotoAndStop(3);
};
};
if (selectionBoxMc.itemSprite.pheonixUpg == false){
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(2);
};
} else {
if (statsMc.infoPanel.upgradeBtn3 != null){
statsMc.infoPanel.upgradeBtn3.gotoAndStop(3);
};
};
};
};
};
};
};
};
};
};
};
};
};
}
function initGrid(){
var i:int;
var j:int;
grid = new Array(numRows);
i = 0;
while (i < numRows) {
grid[i] = new Array(numCols);
j = 0;
while (j < numCols) {
grid[i][j] = {t:1};
j++;
};
i++;
};
}
function doMoneyIncrease(){
if (startWave == true){
moneyDelay--;
if (rt.gameMode != "quest"){
moneyDelay--;
};
if (moneyDelay <= 0){
moneyDelay = 50;
if (moneyDelay < 10){
moneyDelay = 10;
};
money++;
if (money > 99999){
money = 99999;
};
};
};
setMoney();
checkForAfford();
}
function doGridOverlay(){
if (gridOverlaySwitch == true){
backSkyMc.gridOverlay.gotoAndStop("on");
statsMc.gridOnOff.gotoAndStop("on");
} else {
backSkyMc.gridOverlay.gotoAndStop("off");
statsMc.gridOnOff.gotoAndStop("off");
};
}
function switchGrid(){
if (gridOverlaySwitch == false){
gridOverlaySwitch = true;
} else {
gridOverlaySwitch = false;
};
doGridOverlay();
}
function decreaseScore(decrease){
score = int((score - decrease));
if (score >= 0){
setScore();
} else {
score = 0;
setScore();
};
}
function runStartChat(){
Box2d.runBox2d();
finishSetup();
}
function findRandomBase():Number{
var i2:Number;
var tempBaseIndex:Array;
var i:*;
var iii:Number;
var ii:Number;
i2 = 0;
tempBaseIndex = new Array();
i = 0;
while (i < basesArray.length) {
if (basesArray[i] == true){
tempBaseIndex.push(i);
};
i++;
};
iii = Useful.RandomNumber(1, tempBaseIndex.length);
ii = tempBaseIndex[(iii - 1)];
return ((ii + 1));
}
function setupRange(spriteIndex){
var spritesRange:*;
spritesRange = goodGuyRanges[spriteIndex];
rangeMc = new rangeSquares();
inGameRangeMc.x = (blockSize / 2);
inGameRangeMc.y = (blockSize / 2);
inGameRangeMc.addChild(rangeMc);
rangeMc.gotoAndStop((spriteIndex + 1));
}
function checkForEnemyOverlap(){
var i2:*;
i2 = 0;
while (i2 < badGuysArray.length) {
if (badGuysArray[i2].mC.hitTestObject(Box2d.bodyGrabbed)){
return (false);
};
i2++;
};
if (goodGuysArray[0].mC.orbCollMc.hitTestObject(Box2d.bodyGrabbed)){
return (false);
};
return (true);
}
public function monsterRollOver(iconMc){
var gg:*;
var ggy:*;
monsterIconMc = new GameMonsterIcon(this, iconMc.myName);
inGameMsgsMc.addChild(monsterIconMc);
gg = iconMc.x;
ggy = iconMc.y;
monsterIconMc.x = Useful.localToGlobalXY(iconMc).newX;
monsterIconMc.y = Useful.localToGlobalXY(iconMc).newY;
}
public function closeInfoSelected2(){
if (selectionBoxMc != null){
inGamePickupsMc.removeChild(selectionBoxMc);
selectionBoxMc = null;
statsMc.infoPanel.gotoAndStop(1);
statsMc.infoPanel.infoClose.gotoAndStop(1);
};
}
function decreaseEnergy(dec:Number){
var risingScoreMc:*;
risingScoreMc = new GameRisingScore(rt, inGameScoreMc, dec);
inGameScoreMc.addChild(risingScoreMc);
if (Player != null){
risingScoreMc.x = Player.mC.x;
risingScoreMc.y = Player.mC.y;
};
energy = (energy - dec);
if (energy < 0){
energy = 0;
};
if (energy < 30){
if (Player != null){
Player.mC.soldier.gotoAndStop("hurt");
};
};
setEnergy();
}
function musicBtn2(){
if (musicSwitch == false){
statsMc.musicMc.gotoAndStop("off");
} else {
statsMc.musicMc.gotoAndStop("on");
};
}
function loadBasesArray(oldArray){
var i:*;
i = 0;
while (i < oldArray.length) {
basesArray[i] = oldArray[i];
i++;
};
}
function setupLevelBases(){
var i2:Number;
var i:*;
var yy:*;
var xx:*;
i2 = 1;
numBases = 0;
i = 0;
while (i < basesArray.length) {
if (basesArray[i] == true){
numBases++;
yy = (orbLevelPositions[(((levelNumber - 1) * 2) + 1)] * blockSize);
xx = (orbLevelPositions[((levelNumber - 1) * 2)] * blockSize);
Box2d.setupGrabbedItem("kingGood", 405, 0.5, 0, "position", xx, yy, 1);
endCell = grid[orbLevelPositions[(((levelNumber - 1) * 2) + 1)]][orbLevelPositions[((levelNumber - 1) * 2)]];
};
i2++;
i++;
};
i2 = 0;
while (i2 < goodGuysArray.length) {
goodGuysArray[i2].mainLoop();
i2++;
};
}
function checkPath(xx, yy){
var i2:*;
var noPath:Boolean;
var tower:Boolean;
var xx2:*;
var yy2:*;
i2 = 0;
noPath = false;
grid[yy][xx].t = 2;
grid[yy][xx].sp = Box2d.bodyGrabbed;
tower = false;
if (Box2d.bodyGrabbed.myType == "brickWall"){
tower = true;
} else {
if (Box2d.bodyGrabbed.myType == "barbedWire"){
tower = true;
};
};
if (tower == true){
grid[yy][(xx + 1)].t = 2;
grid[(yy + 1)][xx].t = 2;
grid[(yy + 1)][(xx + 1)].t = 2;
grid[yy][(xx + 1)].sp = Box2d.bodyGrabbed;
grid[(yy + 1)][xx].sp = Box2d.bodyGrabbed;
grid[(yy + 1)][(xx + 1)].sp = Box2d.bodyGrabbed;
i2 = 0;
while (i2 < badGuysArray.length) {
if (badGuysArray[i2].dirChanged == true){
xx2 = badGuysArray[i2].shortestPath[badGuysArray[i2].moveIndex].c;
yy2 = badGuysArray[i2].shortestPath[badGuysArray[i2].moveIndex].r;
} else {
xx2 = badGuysArray[i2].shortestPath[(badGuysArray[i2].moveIndex + 1)].c;
yy2 = badGuysArray[i2].shortestPath[(badGuysArray[i2].moveIndex + 1)].r;
};
if (pathFinder.findPath(grid[yy2][xx2], endCell) == false){
noPath = true;
break;
} else {
copyShortestPath(pathFinder.shortestPath, badGuysArray[i2].shortestPathC);
};
i2++;
};
if (noPath == false){
i2 = 0;
while (i2 < badGuysArray.length) {
badGuysArray[i2].shortestPath = new Array();
copyShortestPath(badGuysArray[i2].shortestPathC, badGuysArray[i2].shortestPath);
badGuysArray[i2].dirChanged = true;
badGuysArray[i2].dirChanged2 = true;
badGuysArray[i2].moveIndex = 0;
i2++;
};
return (true);
} else {
grid[yy][xx].t = 1;
grid[yy][(xx + 1)].t = 1;
grid[(yy + 1)][xx].t = 1;
grid[(yy + 1)][(xx + 1)].t = 1;
return (false);
};
//unresolved jump
};
i2 = 0;
while (i2 < badGuysArray.length) {
if (badGuysArray[i2].dirChanged == true){
xx2 = badGuysArray[i2].shortestPath[badGuysArray[i2].moveIndex].c;
yy2 = badGuysArray[i2].shortestPath[badGuysArray[i2].moveIndex].r;
} else {
xx2 = badGuysArray[i2].shortestPath[(badGuysArray[i2].moveIndex + 1)].c;
yy2 = badGuysArray[i2].shortestPath[(badGuysArray[i2].moveIndex + 1)].r;
};
if (pathFinder.findPath(grid[yy2][xx2], endCell) == false){
noPath = true;
break;
} else {
copyShortestPath(pathFinder.shortestPath, badGuysArray[i2].shortestPathC);
};
i2++;
};
if (noPath == false){
i2 = 0;
while (i2 < badGuysArray.length) {
badGuysArray[i2].shortestPath = new Array();
copyShortestPath(badGuysArray[i2].shortestPathC, badGuysArray[i2].shortestPath);
badGuysArray[i2].dirChanged = true;
badGuysArray[i2].dirChanged2 = true;
badGuysArray[i2].moveIndex = 0;
i2++;
};
return (true);
//unresolved jump
};
grid[yy][xx].t = 1;
return (false);
}
function setMoney(){
statsMc.money.text = String(int(money));
}
function increaseScore(increase){
score = int((score + increase));
if (score > 0){
setScore();
};
}
public function nextMonster(clip){
monsterBonus = false;
if (waveSpeed == 100){
waveSpeed = 40;
clip.speedMc.gotoAndStop("fast");
} else {
waveSpeed = 100;
clip.speedMc.gotoAndStop("slow");
};
}
function clone(source:Object){
var myBA:ByteArray;
myBA = new ByteArray();
myBA.writeObject(source);
myBA.position = 0;
return (myBA.readObject());
}
public function setupPanel():void{
statsMc = new GameWeaponsPanel(this);
inGameStatsMc.addChild(statsMc);
statsMc.y = (movieHeight - 94);
setupPanelItems();
}
function setEnergy(){
statsMc.energy.text = (String(energy) + "%");
}
function killAllGoodGuys(){
var i2:int;
i2 = 0;
while (i2 < goodGuysArray.length) {
goodGuysArray[i2].remove();
i2++;
};
}
function checkForGameOver(){
if (aliensLeft == 0){
gameOver("level_Complete");
};
if (energy == 0){
gameOver("game_over");
};
}
function finishSetup(){
rt.finishSetup();
rt.stage.focus = rt;
}
public function setMyBase(yy){
yy = int((yy / blockSizeY));
basesArray[(yy - 1)] = true;
}
public function findMyBase(yy){
yy = int((yy / blockSizeY));
basesArray[(yy - 1)] = false;
}
function setLives(){
var addd:MovieClip;
addd = inGameStatsMc["ingamestatsmc"];
addd = addd["wg"];
addd = addd["stats"];
addd.lives.text = lives;
}
function killAllExplosions(){
var i2:*;
i2 = (explosionsArray.length - 1);
while (i2 >= 0) {
explosionsArray[i2].remove();
i2--;
};
i2 = (particlesArray.length - 1);
while (i2 >= 0) {
particlesArray[i2].remove();
i2--;
};
}
public function infoSelectionBoxOff(){
if (selectionBoxMc != null){
inGamePickupsMc.removeChild(selectionBoxMc);
selectionBoxMc = null;
statsMc.infoPanel.gotoAndStop(1);
};
}
function checkPanel(){
var rollOverS:Boolean;
var i2:*;
if (selectionBoxMc == null){
rollOverS = false;
i2 = 0;
while (i2 < itemsArray.length) {
if (itemsArray[i2].hitTestPoint(stage.mouseX, stage.mouseY, true)){
statsMc.infoPanel.gotoAndStop((i2 + 1));
rollOverS = true;
};
i2++;
};
} else {
setupPanelUpgrades();
};
}
function musicBtn(){
if (statsMc.musicMc.currentFrame == 1){
statsMc.musicMc.gotoAndStop("off");
rt.titleMusicChannel.stop();
musicSwitch = false;
} else {
statsMc.musicMc.gotoAndStop("on");
musicSwitch = true;
rt.titleMusicChannel = rt.titleMusic.play(0, 10000);
Sounds.setVolume(rt.titleMusicChannel, 0.3);
};
}
public function setupGoodGuy(myMc, ind, onTower):void{
var xx:*;
var yy:*;
if (myMc.myObject == null){
xx = stage.mouseX;
yy = stage.mouseY;
setupSoldier(myMc, xx, yy, ind, onTower);
};
}
function setupBasesArray(){
var i:*;
i = 0;
while (i < 1) {
basesArray[i] = true;
i++;
};
}
public function checkForCost(cost){
var moneyLeft:Number;
moneyLeft = (money - cost);
if (moneyLeft >= 0){
decreaseMoney(cost);
return (true);
};
return (false);
}
function deleteRange(){
inGameRangeMc.removeChild(rangeMc);
}
function canIAfford(cost){
var moneyLeft:Number;
moneyLeft = (money - cost);
if (moneyLeft >= 0){
return (true);
};
return (false);
}
public function on_mouse_down(){
var bought:Boolean;
var xx:*;
var yy:*;
var onTower:Boolean;
var onTower2:Number;
var okForTower:Boolean;
var tower:Boolean;
var blockage:Boolean;
var badGuyStart:Array;
var found:Boolean;
var i3:*;
var badGuyY:*;
var badGuyX:*;
var i2:*;
var selectedS:Boolean;
bought = false;
if (Box2d.bodyGrabbed != null){
xx = int((rt.stage.mouseX / blockSize));
yy = int((rt.stage.mouseY / blockSize));
if (xx < grid[0].length){
if (yy < grid.length){
onTower = false;
onTower2 = 0;
okForTower = true;
if (grid[yy][xx].t == 2){
if (Box2d.bodyGrabbed.myType == "knight"){
okForTower = false;
onTower = true;
} else {
if (Box2d.bodyGrabbed.myType == "knight2"){
okForTower = false;
onTower = true;
} else {
if (Box2d.bodyGrabbed.myType == "knight3"){
okForTower = false;
onTower = true;
} else {
if (Box2d.bodyGrabbed.myType == "archer"){
okForTower = false;
onTower = true;
} else {
if (Box2d.bodyGrabbed.myType == "barbedWire"){
okForTower = false;
onTower = true;
} else {
if (Box2d.bodyGrabbed.myType == "brickWall"){
okForTower = false;
onTower = true;
};
};
};
};
};
};
if (okForTower == true){
i2 = 0;
while (i2 < goodGuysArray.length) {
if (goodGuysArray[i2].mC.myType == "brickWall"){
if (goodGuysArray[i2].onTower == 0){
if (goodGuysArray[i2].mC.hitTestObject(Box2d.bodyGrabbed)){
onTower2 = 1;
Box2d.bodyGrabbed.x = (goodGuysArray[i2].mC.x + 12);
Box2d.bodyGrabbed.y = (goodGuysArray[i2].mC.y + 12);
goodGuysArray[i2].onTower = 1;
break;
};
};
} else {
if (goodGuysArray[i2].mC.myType == "barbedWire"){
if (goodGuysArray[i2].onTower == 0){
if (goodGuysArray[i2].mC.hitTestObject(Box2d.bodyGrabbed)){
onTower2 = 2;
Box2d.bodyGrabbed.x = (goodGuysArray[i2].mC.x + 12);
Box2d.bodyGrabbed.y = (goodGuysArray[i2].mC.y + 12);
goodGuysArray[i2].onTower = 2;
break;
};
};
};
};
i2++;
};
if (onTower2 == 0){
onTower = true;
};
};
};
if (onTower == false){
tower = false;
if (Box2d.bodyGrabbed.myType == "brickWall"){
tower = true;
} else {
if (Box2d.bodyGrabbed.myType == "barbedWire"){
tower = true;
};
};
blockage = false;
if (tower == true){
if (grid[yy][(xx + 1)].t == 2){
blockage = true;
} else {
if (grid[(yy + 1)][xx].t == 2){
blockage = true;
} else {
if (grid[(yy + 1)][(xx + 1)].t == 2){
blockage = true;
};
};
};
};
if (blockage == false){
badGuyStart = badGuyStartLevels[(levelNumber - 1)];
found = false;
i3 = 0;
while (i3 < (badGuyStart.length / 2)) {
badGuyY = badGuyStart[((i3 * 2) + 1)];
badGuyX = badGuyStart[(i3 * 2)];
if (badGuyX == xx){
if (badGuyY == yy){
found = true;
break;
};
};
i3++;
};
if (found == false){
if (checkForEnemyOverlap()){
if (Box2d.bodyGrabbed.myType == "knight"){
if (canIAfford(itemsCost[0])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 1, 0, 1);
decreaseMoney(itemsCost[0]);
setupGoodGuy(Box2d.bodyGrabbed, 0, onTower2);
setPanelInfo(0, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("knight", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "knight2"){
if (canIAfford(itemsCost[1])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 1, 0, 1);
decreaseMoney(itemsCost[1]);
setupGoodGuy(Box2d.bodyGrabbed, 1, onTower2);
setPanelInfo(1, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("knight2", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "archer"){
if (canIAfford(itemsCost[2])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[2]);
setupGoodGuy(Box2d.bodyGrabbed, 2, onTower2);
setPanelInfo(2, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("archer", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "wizard"){
if (canIAfford(itemsCost[4])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[4]);
setupGoodGuy(Box2d.bodyGrabbed, 4, onTower2);
setPanelInfo(4, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("wizard", 405, 0.5, 0, "position", 0, 0, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "woodTower"){
if (canIAfford(itemsCost[13])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[13]);
setupGoodGuy(Box2d.bodyGrabbed, 13, onTower2);
setPanelInfo(13, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("woodTower", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "stoneTower"){
if (canIAfford(itemsCost[14])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[14]);
setupGoodGuy(Box2d.bodyGrabbed, 14, onTower2);
setPanelInfo(14, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("stoneTower", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "knight3"){
if (canIAfford(itemsCost[3])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[3]);
setupGoodGuy(Box2d.bodyGrabbed, 3, onTower2);
setPanelInfo(3, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("knight3", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "knight4"){
if (canIAfford(itemsCost[5])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[5]);
setupGoodGuy(Box2d.bodyGrabbed, 5, onTower2);
setPanelInfo(5, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("knight4", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "mining"){
if (canIAfford(itemsCost[9])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.3, 0, 1);
decreaseMoney(itemsCost[9]);
setupGoodGuy(Box2d.bodyGrabbed, 9, onTower2);
setPanelInfo(9, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("mining", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "gunTower"){
if (canIAfford(itemsCost[6])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[6]);
setupGoodGuy(Box2d.bodyGrabbed, 6, onTower2);
setPanelInfo(6, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("gunTower", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "rocketTower"){
if (canIAfford(itemsCost[7])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[7]);
setupGoodGuy(Box2d.bodyGrabbed, 7, onTower2);
setPanelInfo(7, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("rocketTower", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "mine"){
if (canIAfford(itemsCost[8])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 0.5, 0, 1);
decreaseMoney(itemsCost[8]);
setupGoodGuy(Box2d.bodyGrabbed, 8, onTower2);
setPanelInfo(8, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("mine", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "warlock"){
if (canIAfford(itemsCost[11])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 1, 0, 1);
decreaseMoney(itemsCost[11]);
setupGoodGuy(Box2d.bodyGrabbed, 11, onTower2);
setPanelInfo(11, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("warlock", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "sorcerer"){
if (canIAfford(itemsCost[10])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 1, 0, 1);
decreaseMoney(itemsCost[10]);
setupGoodGuy(Box2d.bodyGrabbed, 10, onTower2);
setPanelInfo(10, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("sorcerer", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "brickWall"){
if (canIAfford(itemsCost[12])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 1, 0, 1);
decreaseMoney(itemsCost[12]);
setupGoodGuy(Box2d.bodyGrabbed, 12, onTower2);
setPanelInfo(12, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("brickWall", 405, 0.5, 0, "position", 120, 370, 1);
};
};
} else {
if (Box2d.bodyGrabbed.myType == "barbedWire"){
if (canIAfford(itemsCost[13])){
if (checkPath(xx, yy)){
Sounds.playSoundFx("placeFx", 1, 0, 1);
decreaseMoney(itemsCost[13]);
setupGoodGuy(Box2d.bodyGrabbed, 13, onTower2);
setPanelInfo(13, (goodGuysArray.length - 1), Box2d.bodyGrabbed.myObject);
Box2d.bodyGrabbed = null;
Box2d.setupGrabbedItem("barbedWire", 405, 0.5, 0, "position", 120, 370, 1);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
} else {
i2 = 0;
while (i2 < goodGuysArray.length) {
if (goodGuysArray[i2].mC.myType != "barbedWire"){
if (goodGuysArray[i2].mC.myType != "brickWall"){
if (goodGuysArray[i2].mC.myType != "kingGood"){
if (goodGuysArray[i2].mC.coll.hitTestObject(Box2d.bodyGrabbed.coll)){
setPanelInfo(goodGuysArray[i2].myPanelIndex, i2, goodGuysArray[i2]);
deleteGrabbed();
break;
};
};
};
};
i2++;
};
};
};
};
} else {
selectedS = false;
i2 = 1;
while (i2 < goodGuysArray.length) {
if (goodGuysArray[i2].mC.myType != "barbedWire"){
if (goodGuysArray[i2].mC.myType != "brickWall"){
if (goodGuysArray[i2].mC.hitTestPoint(rt.mouseX, rt.mouseY, true)){
setPanelInfo(goodGuysArray[i2].myPanelIndex, i2, goodGuysArray[i2]);
selectedS = true;
break;
};
};
};
i2++;
};
if (selectedS == false){
closeInfoSelected2();
};
};
}
function pauseOn(){
pauseSwitch = true;
}
public function destroyEverything(){
var i2:Number;
var numChild:Number;
infoSelectionBoxOff();
killAllBadGuys();
killAllGoodGuys();
goodGuysArray.splice(0);
badGuysArray.splice(0);
explosionsArray.splice(0);
particlesArray.splice(0);
missilesArray.splice(0);
newArrays();
i2 = 0;
numChild = inGameEnemyMc.numChildren;
i2 = 0;
while (i2 < numChild) {
inGameEnemyMc.removeChildAt(0);
i2++;
};
numChild = inGameSkyMc.numChildren;
i2 = 0;
while (i2 < numChild) {
inGameSkyMc.removeChildAt(0);
i2++;
};
numChild = inGameGoodGuysMc.numChildren;
i2 = 0;
while (i2 < numChild) {
inGameGoodGuysMc.removeChildAt(0);
i2++;
};
numChild = inGameMissilesMc.numChildren;
i2 = 0;
while (i2 < numChild) {
inGameMissilesMc.removeChildAt(0);
i2++;
};
numChild = inGameExplosionsMc.numChildren;
i2 = 0;
while (i2 < numChild) {
inGameExplosionsMc.removeChildAt(0);
i2++;
};
inGameStatsMc.removeChild(statsMc);
statsMc = null;
}
public function getMapIndex(spriteObject):Object{
var mapXYIndex:Object;
var sprX:Number;
var sprY:Number;
mapXYIndex = new Object();
sprX = int((spriteObject.x / blockSize));
mapXYIndex.indexX = sprX;
sprX = (sprX * blockSize);
mapXYIndex.xPos = sprX;
sprY = int((spriteObject.y / blockSizeY));
mapXYIndex.indexY = sprY;
sprY = (sprY * blockSizeY);
mapXYIndex.yPos = sprY;
return (mapXYIndex);
}
function setupStartGameMsg(){
if (levelNumber == 1){
startGameMsgMc = new GameStartMsg(this);
inGameMsgsMc.addChild(startGameMsgMc);
startGameMsgMc.x = 200;
startGameMsgMc.y = 150;
} else {
rt.startChat();
startGameMsgMc = null;
};
}
function freezeMc(mcToFreeze, colourV, colourM){
var c:Color;
c = new Color();
c.setTint(colourV, colourM);
mcToFreeze.transform.colorTransform = c;
}
function setPanelInfo(itemNum, spriteIndex, itemSprite){
if (selectionBoxMc == null){
selectionBoxMc = new selectionBox();
inGamePickupsMc.addChild(selectionBoxMc);
selectionBoxMc.x = itemSprite.mC.x;
selectionBoxMc.y = itemSprite.mC.y;
selectionBoxMc.itemSprite = itemSprite;
selectionBoxMc.itemNum = (itemNum + 1);
statsMc.infoPanel.gotoAndStop((itemNum + 1));
} else {
selectionBoxMc.itemNum = (itemNum + 1);
selectionBoxMc.x = itemSprite.mC.x;
selectionBoxMc.y = itemSprite.mC.y;
selectionBoxMc.itemSprite = itemSprite;
selectionBoxMc.itemNum = (itemNum + 1);
statsMc.infoPanel.gotoAndStop((itemNum + 1));
};
if (selectionBoxMc.itemSprite.mC.myType == "brickWall"){
selectionBoxMc.gotoAndStop(2);
} else {
if (selectionBoxMc.itemSprite.mC.myType == "barbedWire"){
selectionBoxMc.gotoAndStop(2);
} else {
selectionBoxMc.gotoAndStop(1);
};
};
statsMc.infoPanel.infoClose.gotoAndStop(2);
if (selectionBoxMc != null){
if (selectionBoxMc.itemSprite != null){
if (selectionBoxMc.itemSprite.energy != null){
if (statsMc.infoPanel != null){
if (statsMc.infoPanel.infoClose != null){
if (statsMc.infoPanel.infoClose.energyTxt != null){
statsMc.infoPanel.infoClose.energyTxt.text = String(selectionBoxMc.itemSprite.energy);
};
};
};
};
};
};
}
function setupPanelItems(){
var x1:Number;
var x2:Number;
var i:*;
var lockedBought:Number;
var itemMc:*;
itemsToBuyMc = new Sprite();
statsMc.addChild(itemsToBuyMc);
itemsToBuyMc.x = 8;
itemsToBuyMc.y = -4;
itemsArray = new Array();
x1 = 0;
x2 = 0;
i = 0;
while (i < 14) {
itemMc = new GamePanelBuyMc(this, i);
itemsToBuyMc.addChild(itemMc);
if (panelItemsData[((i * 3) + 1)] > money){
itemMc.gotoAndStop("notBuy");
};
itemsCost[i] = panelItemsData[((i * 3) + 1)];
soldiersIconsArray[i] = false;
itemMc.itemsMc.gotoAndStop((i + 1));
if (i == 4){
x1 = 5;
} else {
if (i == 8){
x1 = 10;
};
};
itemMc.x = (i * 38);
itemMc.x = (itemMc.x + x1);
itemMc.x = (itemMc.x + x2);
itemsArray.push(itemMc);
i++;
};
itemsToUpgradeMc = new Sprite();
statsMc.addChild(itemsToUpgradeMc);
upgradesArray = new Array();
itemsToUpgradeMc.x = 20;
itemsToUpgradeMc.y = 54;
x1 = 0;
x2 = 0;
lockedBought = 0;
}
function killAllMissiles(){
var i2:*;
i2 = (missilesArray.length - 1);
while (i2 >= 0) {
missilesArray[i2].remove();
i2--;
};
}
function clearTile(xx, yy){
xx = int((xx / blockSize));
yy = int((yy / blockSize));
grid[yy][xx].t = 1;
}
function newLevelStuff(){
wave = 0;
}
function deleteGrabbed(){
itemsArray[Box2d.currentIconIndex].gotoAndStop(1);
soldiersIconsArray[Box2d.currentIconIndex] = false;
inGameGoodGuysMc.removeChild(Box2d.bodyGrabbed);
Box2d.bodyGrabbed = null;
deleteRange();
}
public function restartLevel(){
if (gameOverMsgMc != null){
inGameMsgsMc.removeChild(gameOverMsgMc);
};
gameOverMsgMc = null;
energy = oldEnergy;
score = oldScore;
rt.gameState = 6;
if (levelCompleteMsg != null){
inGameMsgsMc.removeChild(levelCompleteMsg);
levelCompleteMsg = null;
};
inGameBackgroundMc.removeChild(backSkyMc);
backSkyMc.stop();
backSkyMc = null;
spritesMc.x = 0;
newLevelStuff();
destroyEverything();
rt.setupMapScreen();
}
function drawGrid(grid:Array, mc:MovieClip, linkage:String, w:Number, h:Number):void{
var i:Number;
var j:Number;
var cell:*;
var tileType:Number;
i = 0;
while (i < grid.length) {
j = 0;
while (j < grid[i].length) {
if (grid[i][j].t == 1){
cell = new GameBlankTile(grid, pathFinder, i, j, true, this);
} else {
if (rt.gameMode == "quest"){
cell = new Tile(grid, pathFinder, i, j, false, this);
} else {
grid[i][j].t = 1;
cell = new GameBlankTile(grid, pathFinder, i, j, true, this);
};
};
cell.x = (j * w);
cell.y = (i * h);
cell.name = ((("cell_" + i) + "_") + j);
if (grid[i][j].t == 2){
cell.gotoAndStop((grid[i][j].t + (levelNumber - 1)));
tileType = Useful.RandomNumber(1, 3);
cell.tileType = tileType;
} else {
cell.gotoAndStop(grid[i][j].t);
};
backSkyMc.addChild(cell);
j++;
};
i++;
};
}
public function on_mouse_up(){
scrollScreen = "";
}
function decreaseMoney(dec:Number){
money = (money - dec);
if (money < 0){
money = 0;
};
setMoney();
}
public function quitGame(){
destroyEverything();
rt.gameState = 1;
levelNumber = 1;
if (gameOverMsgMc != null){
inGameMsgsMc.removeChild(gameOverMsgMc);
};
gameOverMsgMc = null;
upgrade1 = false;
upgrade2 = false;
upgrade3 = false;
upgrade4 = false;
upgrade5 = false;
inGameBackgroundMc.removeChild(backSkyMc);
backSkyMc.stop();
backSkyMc = null;
Player = null;
energy = 100;
energyAlien = 100;
money = 0;
score = 0;
currentMoneyDelay = 80;
moneyDelay = currentMoneyDelay;
moneyMax = 100;
spritesMc.x = 0;
setupBasesArray();
rt.setupTitleScreen();
}
function copyShortestPath(arrayA, arrayB){
var i:int;
var tileData:Object;
i = 0;
while (i < arrayA.length) {
tileData = new Object();
tileData.r = arrayA[i].r;
tileData.c = arrayA[i].c;
arrayB[i] = tileData;
i++;
};
}
function doFrozen(){
var i2:*;
freezeDelay--;
if (freezeDelay == 0){
freezeDelay = 2;
i2 = 0;
while (i2 < frozenArray.length) {
freezeMc(frozenArray[i2].mC, frozenArray[i2].colourValue, frozenArray[i2].colourMult);
if (frozenArray[i2].defrost == false){
frozenArray[i2].colourMult = (frozenArray[i2].colourMult + 0.1);
if (frozenArray[i2].colourMult >= 0.8){
frozenArray[i2].colourMult = 0.93;
if (frozenArray[i2].toDefrost == 0){
frozenArray[i2].toDefrost = 20;
} else {
frozenArray[i2].toDefrost--;
if (frozenArray[i2].toDefrost == 0){
frozenArray[i2].defrost = true;
};
};
};
} else {
frozenArray[i2].colourMult = (frozenArray[i2].colourMult - 0.1);
if (frozenArray[i2].colourMult < 0){
frozenArray[i2].colourMult = 0;
if (frozenArray[i2].mC.myObject != null){
frozenArray[i2].mC.myObject.frozen = false;
};
frozenArray.splice(i2, 1);
};
};
i2++;
};
};
}
function findBlank(){
var blankTile:Object;
var i:int;
var j:int;
blankTile = new Object();
blankTile.i = -1;
blankTile.j = -1;
i = 0;
while (i < numRows) {
j = 0;
while (j < numCols) {
if (grid[i][j].t == 1){
blankTile.i = i;
blankTile.j = j;
break;
};
j++;
};
i++;
};
return (blankTile);
}
function newArrays(){
missilesArray = new Array();
enemyArray = new Array();
goodGuysArray = new Array();
missilesArray = new Array();
poisonGroundArray = new Array();
badGuysArray = new Array();
explosionsArray = new Array();
particlesArray = new Array();
pickupsArray = new Array();
soldiersIconsArray = new Array();
frozenArray = new Array();
backObjectsArray = new Array();
destroyedArray = new Array();
miningArray = new Array();
itemsArray = new Array();
selectionArray = new Array();
}
function setupWave(){
var badGuys:Array;
var badGuysGroup:Array;
var badGuyData:Array;
var badGuyName:String;
var badGuyDens:Number;
var badGuyFric:Number;
var badGuyRest:Number;
var badGuyX:Number;
var badGuyY:Number;
var speed:Number;
var badGuyStart:Array;
var badGuyStartI:Number;
var rangeVary:*;
var gg:*;
var badGuyScore:Number;
var badGuyDamage:Number;
var badGuyP:String;
var bodyMc:MovieClip;
var itemMc:*;
var cm:*;
var ww:*;
badGuys = badGuysLevels[(levelNumber - 1)];
badGuysGroup = badGuys[wave];
badGuyData = badGuysGroup[currentMonster];
badGuyName = badGuyData[0];
if (monsterTotal < aliensLeftArray[(levelNumber - 1)]){
if (badGuyName != "blank"){
badGuyDens = badGuyData[1];
badGuyFric = badGuyData[2];
badGuyRest = badGuyData[3];
badGuyX = badGuyData[5];
badGuyY = badGuyData[6];
speed = badGuyData[8];
badGuyStart = badGuyStartLevels[(levelNumber - 1)];
badGuyStartI = int((Useful.RandomNumber(1, (badGuyStart.length / 2)) - 1));
badGuyY = badGuyStart[((badGuyStartI * 2) + 1)];
badGuyX = badGuyStart[(badGuyStartI * 2)];
badGuyY = (badGuyY * blockSize);
badGuyX = (badGuyX * blockSize);
rangeVary = (levelNumber / 240);
if (rangeVary > 1){
rangeVary = 1;
};
gg = 18;
if (gg < 0){
gg = 1;
};
rangeVary = (rangeVary + (wave / 14));
if (rangeVary > 1.3){
rangeVary = 1.3;
};
speed = (speed + rangeVary);
badGuyScore = badGuyData[9];
badGuyDamage = badGuyData[10];
badGuyP = badGuyData[11];
bodyMc = Box2d.setupGrabbedItem(badGuyName, badGuyDens, badGuyFric, badGuyRest, "position", badGuyX, badGuyY, 1);
badGuysArray.push(new GameBadGuy(badGuyName, this, badGuyX, badGuyY, bodyMc, Useful, speed, badGuyScore, badGuyDamage, badGuyP));
monsterTotal++;
};
if (firstEnemy == true){
enemyIconsMc.removeChildAt(0);
if (startIcons < aliensLeftArray[(levelNumber - 1)]){
itemMc = new GameEnemyIcons(this);
enemyIconsMc.addChild(itemMc);
cm = (currentMonster + 12);
ww = wave;
badGuys = badGuysLevels[(levelNumber - 1)];
badGuysGroup = badGuys[ww];
while (cm >= badGuysGroup.length) {
cm = (cm - badGuysGroup.length);
ww++;
badGuys = badGuysLevels[(levelNumber - 1)];
if (ww >= badGuys.length){
ww = 0;
};
badGuysGroup = badGuys[ww];
};
badGuys = badGuysLevels[(levelNumber - 1)];
badGuysGroup = badGuys[ww];
badGuyData = badGuysGroup[cm];
itemMc.gotoAndStop(badGuyData[12]);
itemMc.myName = badGuyData[13];
itemMc.y = Math.abs(enemyIconsMc.y);
itemMc.y = (itemMc.y + (32 * 12));
badGuyName = badGuyData[0];
if (badGuyName == "blank"){
itemMc.waveNumber = (waveTotal + 1);
} else {
startIcons++;
};
};
};
firstEnemy = true;
};
}
public function gameComplete(){
if (levelCompleteMsg != null){
inGameMsgsMc.removeChild(levelCompleteMsg);
levelCompleteMsg = null;
};
rt.gameState = 5;
Sounds.playSoundFx("gameOverFx", 1, 0, 1);
gameOverMsgMc = new GameOverMsgAnim(this);
inGameMsgsMc.addChild(gameOverMsgMc);
gameOverMsgMc.m.gotoAndPlay("gameOver");
gameOverMsgMc.play();
gameOverMsgMc.x = (movieWidth / 2);
gameOverMsgMc.y = (movieHeight / 2);
}
function setScore(){
statsMc.aliensLeftTxt.text = String(aliensLeft);
if (score > 999999){
score = 999999;
};
if (score < 10){
statsMc.score.text = ("00000" + String(score));
} else {
if (score < 100){
statsMc.score.text = ("0000" + String(score));
} else {
if (score < 1000){
statsMc.score.text = ("000" + String(score));
} else {
if (score < 10000){
statsMc.score.text = ("00" + String(score));
} else {
if (score < 100000){
statsMc.score.text = ("0" + String(score));
} else {
statsMc.score.text = String(score);
};
};
};
};
};
}
function soundFxBtn2(){
if (soundsSwitch == false){
statsMc.soundFxMc.gotoAndStop("off");
} else {
statsMc.soundFxMc.gotoAndStop("on");
};
}
function endGame(){
aliensLeft = 0;
}
public function findMining(myMine):Number{
var i2:*;
i2 = 0;
i2 = 0;
while (i2 < miningArray.length) {
if (miningArray[i2] == myMine){
break;
};
i2++;
};
return (i2);
}
function increaseEnergy(dec:Number){
energy = (energy + dec);
if (energy > 10000){
energy = 10000;
};
setEnergy();
}
public function closeInfoSelected(deadSprite){
if (selectionBoxMc != null){
if (selectionBoxMc.itemSprite == deadSprite){
inGamePickupsMc.removeChild(selectionBoxMc);
selectionBoxMc = null;
statsMc.infoPanel.gotoAndStop(1);
};
};
}
function killAllBadGuys(){
var i2:int;
i2 = 0;
while (i2 < badGuysArray.length) {
badGuysArray[i2].remove();
i2++;
};
}
function checkForPanelClick(){
var i2:*;
var cost:Number;
if (Box2d.bodyGrabbed != null){
deleteGrabbed();
};
i2 = 0;
while (i2 < itemsArray.length) {
if (itemsArray[i2].hitTestPoint(stage.mouseX, stage.mouseY, true)){
cost = (money - itemsCost[i2]);
if (cost >= 0){
if (itemsArray[i2].back.currentFrame == 1){
filterDelay = 1;
soldiersIconsArray[i2] = true;
itemsArray[i2].gotoAndStop("notBuy");
Box2d.currentIconIndex = i2;
setupRange(i2);
if (i2 == 6){
Box2d.setupGrabbedItem("gunTower", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 7){
Box2d.setupGrabbedItem("rocketTower", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 8){
Box2d.setupGrabbedItem("mine", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 0){
Box2d.setupGrabbedItem("knight", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 1){
Box2d.setupGrabbedItem("knight2", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 4){
Box2d.setupGrabbedItem("wizard", 405, 0.5, 0, "position", 0, 0, 1);
} else {
if (i2 == 5){
Box2d.setupGrabbedItem("knight4", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 2){
Box2d.setupGrabbedItem("archer", 405, 0.5, 0, "position", 0, 0, 1);
} else {
if (i2 == 3){
Box2d.setupGrabbedItem("knight3", 405, 0.5, 0, "position", 120, 370, 1);
} else {
if (i2 == 7){
Box2d.setupGrabbedItem("gunTower", 805, 0.5, 0, "position", 48, 200, 1);
} else {
if (i2 == 8){
Box2d.setupGrabbedItem("rocketTower", 805, 0.5, 0, "position", 48, 200, 1);
} else {
if (i2 == 9){
Box2d.setupGrabbedItem("mining", 805, 0.5, 0, "position", 48, 200, 1);
} else {
if (i2 == 10){
Box2d.setupGrabbedItem("sorcerer", 405, 0.5, 0, "position", 48, 200, 1);
} else {
if (i2 == 11){
Box2d.setupGrabbedItem("warlock", 405, 0.5, 0, "position", 48, 200, 1);
} else {
if (i2 == 12){
Box2d.setupGrabbedItem("brickWall", 405, 0.5, 0, "position", 48, 200, 1);
} else {
if (i2 == 13){
Box2d.setupGrabbedItem("barbedWire", 405, 0.5, 0, "position", 48, 200, 1);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
i2++;
};
}
function setupBackground(){
backSkyMc = new backgroundSkyMc();
backSkyMc.gotoAndStop(levelNumber);
doGridOverlay();
inGameBackgroundMc.addChild(backSkyMc);
copyArray(GameLevels.levelGrids[(levelNumber - 1)], grid);
drawGrid(grid, this, "n", blockSize, blockSize);
spritesMc.x = 0;
backSkyMc.x = 0;
inGameBackgroundMc.x = 0;
scrollxPos = spritesMc.x;
}
function pauseOff(){
pauseSwitch = false;
rt.gameState = "play";
}
public function gameOverLoop(){
}
function increaseMoney(dec:Number){
money = (money + dec);
if (money > 10000){
money = 10000;
};
setMoney();
checkForAfford();
}
function setupRightPanel(){
var i2:*;
var i3:*;
var i:*;
var itemMc:*;
var badGuys:Array;
var badGuysGroup:Array;
var badGuyData:Array;
var badGuyName:String;
firstEnemy = false;
enemyIconsMc = new MovieClip();
statsMc.rightMc.enemyIconsS.addChild(enemyIconsMc);
enemyIconsMc.x = 8;
enemyIconsMc.y = 0;
enemyIconsMcY = 0;
i2 = 0;
i3 = 0;
i = 0;
while (i < 13) {
itemMc = new GameEnemyIcons(this);
enemyIconsMc.addChild(itemMc);
badGuys = badGuysLevels[(levelNumber - 1)];
badGuysGroup = badGuys[i3];
badGuyData = badGuysGroup[i2];
badGuyName = badGuyData[0];
if (badGuyName != "blank"){
startIcons++;
};
itemMc.gotoAndStop(badGuyData[12]);
itemMc.myName = badGuyData[13];
i2++;
if (i2 >= badGuysGroup.length){
i2 = 0;
i3++;
waveTotal++;
if (i3 >= badGuys.length){
i3 = 0;
};
};
itemMc.y = (i * 32);
itemMc.waveNumber = (waveTotal + 1);
i++;
};
}
public function checkPathForAll(){
var i2:*;
var xx2:*;
var yy2:*;
i2 = 0;
while (i2 < badGuysArray.length) {
if (badGuysArray[i2].dirChanged == true){
xx2 = badGuysArray[i2].shortestPath[badGuysArray[i2].moveIndex].c;
yy2 = badGuysArray[i2].shortestPath[badGuysArray[i2].moveIndex].r;
} else {
xx2 = badGuysArray[i2].shortestPath[(badGuysArray[i2].moveIndex + 1)].c;
yy2 = badGuysArray[i2].shortestPath[(badGuysArray[i2].moveIndex + 1)].r;
};
if (pathFinder.findPath(grid[yy2][xx2], endCell) == false){
break;
} else {
copyShortestPath(pathFinder.shortestPath, badGuysArray[i2].shortestPath);
badGuysArray[i2].moveIndex = 0;
badGuysArray[i2].dirChanged = true;
badGuysArray[i2].dirChanged2 = true;
};
i2++;
};
}
function setupPlayer(userData){
Player = new GamePlayer(userData, this, Useful);
}
function getBasesArray(oldArray){
var i:*;
i = 0;
while (i < oldArray.length) {
basesArray[i] = oldArray[i];
i++;
};
}
public function setNextMonster(){
monsterBonus = false;
if (waveSpeed == 100){
statsMc.rightMc.speedMc.gotoAndStop("slow");
} else {
statsMc.rightMc.speedMc.gotoAndStop("fast");
monsterBonus = true;
};
}
public function mainLoop(){
var i2:int;
var i:*;
if (slowTimeDelay > 0){
slowTimeDelay--;
if (slowTimeDelay == 0){
slowTimeUpg = false;
};
};
checkForGameOver();
Box2d.runBox2d();
doMoneyIncrease();
checkPanel();
i2 = 0;
while (i2 < badGuysArray.length) {
badGuysArray[i2].mainLoop();
i2++;
};
i2 = 0;
while (i2 < goodGuysArray.length) {
goodGuysArray[i2].mainLoop();
i2++;
};
i2 = 0;
while (i2 < missilesArray.length) {
missilesArray[i2].mainLoop();
i2++;
};
if (frozenArray.length > 0){
doFrozen();
};
i2 = (missilesArray.length - 1);
while (i2 >= 0) {
if (missilesArray[i2].dead == true){
missilesArray.splice(i2, 1);
};
i2--;
};
i2 = 0;
while (i2 < explosionsArray.length) {
explosionsArray[i2].mainLoop();
i2++;
};
i = 0;
while (i < particlesArray.length) {
particlesArray[i].mainLoop();
i++;
};
runWave();
setEnergy();
setMoney();
setScore();
}
}
}//package classesAS3
Section 24
//GameGameLevels (classesAS3.GameGameLevels)
package classesAS3 {
public dynamic class GameGameLevels {
var levelGrid2:Array;
var levelGrid3:Array;
var levelGrid4:Array;
var levelGrid5:Array;
var levelGrid6:Array;
var levelGrid7:Array;
var levelGrid11:Array;
var levelGrid13:Array;
var levelGrid8:Array;
var levelGrid1:Array;
var levelGrid17:Array;
var levelGrid10:Array;
var levelGrid12:Array;
var levelGrid15:Array;
var levelGrid9:Array;
var levelGrid20:Array;
var levelGrid24:Array;
var levelGrid26:Array;
var levelGrid14:Array;
var levelGrid21:Array;
var levelGrid16:Array;
var levelGrid23:Array;
var levelGrid18:Array;
var levelGrid19:Array;
var levelGrid22:Array;
var levelGrid25:Array;
public var rt:Object;
public var levelGrids:Array;
public function GameGameLevels(rt2){
levelGrid1 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid2 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid3 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid4 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid5 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid6 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid7 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid8 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid9 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid10 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid11 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid12 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid13 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid14 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid15 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid16 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid17 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid18 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid19 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid20 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid21 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid22 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid23 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid24 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid25 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:2}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:2}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
levelGrid26 = [[{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}], [{t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}, {t:1}]];
super();
rt = rt2;
levelGrids = new Array(levelGrid1, levelGrid2, levelGrid3, levelGrid4, levelGrid5, levelGrid6, levelGrid7, levelGrid8, levelGrid9, levelGrid10, levelGrid11, levelGrid12, levelGrid13, levelGrid14, levelGrid15, levelGrid16, levelGrid17, levelGrid18, levelGrid19, levelGrid20, levelGrid21, levelGrid22, levelGrid23, levelGrid24, levelGrid25, levelGrid26);
}
}
}//package classesAS3
Section 25
//GameGoodGuy (classesAS3.GameGoodGuy)
package classesAS3 {
import flash.display.*;
import flash.media.*;
import flash.filters.*;
public class GameGoodGuy {
public var myPanelIndex:Number;
var xVel:Number;// = 0
var myDamageDelay:Number;
public var battleAxeUpg:Boolean;// = false
var inToGround:Number;
public var soldierState:int;
var myDamage:Number;
var myArmour:Number;
var energyMc:MovieClip;
var rt:Object;
var myScore:Number;
var speed:Number;// = 0
public var valkyrieUpg:Boolean;// = false
var gravity:Number;
var delayToMove:Number;
var myName:String;
public var improvedSightUpg:Boolean;// = false
var speedOld:Number;
var witchSpellDelay:Number;// = 0
var dead:Boolean;
var onTower:Number;// = 0
var yVel:Number;// = 0
public var fireballsUpg:Boolean;// = false
var knightPower:Boolean;
var energy:Number;// = 0
var iceBoltsDelay:Number;// = 0
public var magicShieldMcInd:Number;// = 1
public var frozen:Boolean;// = false
var myFireDelay:Number;
public var seeDistanceUpg:Boolean;// = false
public var fasterFiringUpg:Boolean;// = false
var myProjectile:String;
var Useful:GameUseful;
var shadowFilter:DropShadowFilter;
var energyStart:Number;// = 0
var xPos:Number;// = 0
var headHitBlock:Object;
var currentMapIndexX:Number;
var currentMapIndexY:Number;
var missileName:String;
var shortestPath:Array;
public var myCurrentSound:SoundChannel;
var targetX:Number;
var targetY:Number;
var filterDelay:Number;
var myRange:Number;
var xDir:Number;
var collisionCheck:Number;
public var pheonixUpg:Boolean;// = false
public var electricityUpg:Boolean;// = false
var yOrigin:Number;// = 0
public var evilToGoodUpg:Boolean;// = false
var hitVel;
public var weaponExpUpg:Boolean;// = false
var yPos:Number;// = 0
var myOldAnimationState:Number;
var numberOfMissiles;// = 0
public var healthUpg:Boolean;// = false
var range:Number;
var shortestPathC:Array;
var projectileMc:Object;
public var energyBarMc:GameEnergyBar;
var distanceArray:Array;
public var dirChanged:Boolean;
public var steelTArrowUpg:Boolean;// = false
var myParent:Object;
public var iceBoltsUpg:Boolean;// = false
var mC:Object;
var moveIndex:Number;
public var unicornUpg:Boolean;// = false
var animMc:Object;
public var ground:Boolean;// = false
public var advShieldUpg:Boolean;// = false
public var myCost:Number;
var witchSpell:Boolean;// = false
var energyBarOn:Number;
var magicShieldDelay:Number;// = 0
var xOrigin:Number;// = 0
var delayToFireMissile:Number;// = 1
var dropBombDelay:Number;
public var magicShieldUpg:Boolean;// = false
public var catapultFireUpg:Boolean;// = false
public var slowTimeUpg:Boolean;// = false
public var swordUpg:Boolean;// = false
public var poisonGroundUpg:Boolean;// = false
public var plateMailUpg:Boolean;// = false
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_FALLING:int = 4;
public static const SOLDIER_E_MOVE:int = 5;
public static const SOLDIER_STATE_RETREAT:int = 3;
public static const BAD_FLAG:Boolean = true;
public static const SOLDIER_E_STAND:int = 0;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_E_BUILD:int = 2;
public static const GOOD_FLAG:Boolean = false;
public static const SOLDIER_STATE_MOVE:int = 5;
public static const SOLDIER_STATE_FIGHTING:int = 2;
public function GameGoodGuy(rt2, xStart, yStart, mcc, uu, myR, sp, myD, myP, myA, myC, ind, onT){
var rangeVary:Number;
var color:Number;
var angle:Number;
var alpha:Number;
var blurX:Number;
var blurY:Number;
var distance:Number;
var strength:Number;
var inner:Boolean;
var knockout:Boolean;
var quality:Number;
var mapXYObject:Object;
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
speed = 0;
energyStart = 0;
energy = 0;
delayToFireMissile = 1;
numberOfMissiles = 0;
frozen = false;
battleAxeUpg = false;
plateMailUpg = false;
swordUpg = false;
improvedSightUpg = false;
advShieldUpg = false;
weaponExpUpg = false;
steelTArrowUpg = false;
fasterFiringUpg = false;
catapultFireUpg = false;
evilToGoodUpg = false;
healthUpg = false;
electricityUpg = false;
poisonGroundUpg = false;
seeDistanceUpg = false;
valkyrieUpg = false;
slowTimeUpg = false;
magicShieldUpg = false;
iceBoltsUpg = false;
unicornUpg = false;
fireballsUpg = false;
pheonixUpg = false;
magicShieldDelay = 0;
magicShieldMcInd = 1;
onTower = 0;
witchSpell = false;
witchSpellDelay = 0;
iceBoltsDelay = 0;
ground = false;
super();
shortestPath = new Array();
shortestPathC = new Array();
moveIndex = 0;
dirChanged = false;
myPanelIndex = ind;
onTower = onT;
mC = mcc;
animMc = mcc.soldier;
myArmour = myA;
myCost = myC;
mC.myObject = this;
rt = rt2;
myDamage = myD;
if (mC.myType == "mining"){
myFireDelay = 30;
} else {
myFireDelay = 5;
};
myProjectile = myP;
Useful = uu;
rangeVary = Useful.RandomNumber(1, 10);
rangeVary = (rangeVary - 10);
myRange = myR;
dead = false;
inToGround = 0;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
myParent = mC.myParent;
hitVel = 0;
energyBarOn = 0;
gravity = 0.1;
rangeVary = Useful.RandomNumber(1, 10);
rangeVary = (rangeVary / 50);
speed = sp;
speedOld = sp;
xDir = 1;
distanceArray = new Array();
color = 0;
angle = 45;
alpha = 0.8;
blurX = 3;
blurY = 3;
distance = 5;
strength = 0.65;
inner = false;
knockout = false;
quality = BitmapFilterQuality.MEDIUM;
shadowFilter = new DropShadowFilter(distance, angle, color, alpha, blurX, blurY, strength, quality, inner, knockout);
mC.filters = [shadowFilter];
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
myDamageDelay = 8;
soldierState = SOLDIER_STATE_ATTACK;
filterDelay = 1;
knightPower = false;
myName = mC.myType;
collisionCheck = 0;
delayToMove = 5;
dropBombDelay = rt.Useful.RandomNumber(10, 20);
targetX = mC.x;
mapXYObject = getCurrentMapIndex(mC);
currentMapIndexX = mapXYObject.indexX;
currentMapIndexY = mapXYObject.indexY;
ground = false;
if (mC.myType == "knight2"){
ground = true;
} else {
if (mC.myType == "knight3"){
ground = true;
} else {
if (mC.myType == "archer"){
ground = true;
} else {
if (mC.myType == "valkyrie"){
ground = true;
} else {
if (mC.myType == "skeleton"){
ground = true;
};
};
};
};
};
}
function mainLoop(){
if (myProjectile != "no_fire"){
xDir = -1;
mC.scaleX = 1;
if (dead == true){
if (animMc.currentFrame != 5){
if (mC.myType != "kingGood"){
remove();
};
};
} else {
if (filterDelay > 1){
filterDelay--;
if (filterDelay == 1){
mC.filters = [];
};
};
if (delayToMove > 0){
delayToMove--;
} else {
if (frozen == false){
if (magicShieldDelay > 0){
magicShieldDelay--;
if (magicShieldDelay == 0){
magicShieldUpg = false;
mC.removeChildAt(magicShieldMcInd);
};
};
if (witchSpellDelay > 0){
witchSpellDelay--;
if (witchSpellDelay == 0){
witchSpell = false;
};
};
if (iceBoltsDelay > 0){
iceBoltsDelay--;
if (iceBoltsDelay == 0){
iceBoltsUpg = false;
};
};
if (mC.myType != "kingGood"){
if (mC.myType != "knight"){
if (mC.myType != "jet"){
if (mC.myType == "valkyrie"){
checkIfInRange();
updatePosition();
} else {
if (mC.myType == "unicorn"){
checkIfInRange();
updatePosition();
} else {
if (mC.myType == "pheonix"){
checkIfInRange();
updatePosition();
} else {
if (mC.myType == "skeleton"){
checkIfInRange();
updatePosition();
} else {
checkIfInRange();
};
};
};
};
} else {
doJet();
};
};
};
};
};
};
};
}
public function battleAxeUpgrade(){
var effect:GameUpgradeEffect;
if (rt.checkForCost(50)){
rt.Sounds.playSoundFx("weaponUpgradeFx", 0.5, 0, 1);
battleAxeUpg = true;
effect = new GameUpgradeEffect(rt, mC);
mC.addChild(effect);
};
}
function doJet(){
var mapXYObject:Object;
mC.x = (mC.x + speed);
if (mC.x > (rt.movieWidth + 60)){
remove();
} else {
dropBombDelay--;
if (dropBombDelay == 0){
dropBombDelay = rt.Useful.RandomNumber(10, 20);
mapXYObject = getCurrentMapIndex(mC);
currentMapIndexX = mapXYObject.indexX;
currentMapIndexY = mapXYObject.indexY;
dropBomb();
};
};
}
function getCurrentMapIndex2(xx, yy):Object{
var mapXYIndex:Object;
var sprX:Number;
var sprY:Number;
mapXYIndex = new Object();
sprX = int((xx / rt.blockSize));
mapXYIndex.indexX = sprX;
sprX = (sprX * rt.blockSize);
mapXYIndex.xPos = sprX;
sprY = int((yy / rt.blockSizeY));
mapXYIndex.indexY = sprY;
sprY = (sprY * rt.blockSizeY);
mapXYIndex.yPos = sprY;
return (mapXYIndex);
}
public function healthUpgrade(){
var i2:*;
var healthMc:*;
if (rt.checkForCost(80)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
i2 = 1;
while (i2 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[i2].mC.myType != "knight"){
if (rt.goodGuysArray[i2].mC.myType != "barbedWire"){
if (rt.goodGuysArray[i2].mC.myType != "brickWall"){
if (rt.goodGuysArray[i2].dead == false){
if (rt.goodGuysArray[i2].energy < 200){
rt.goodGuysArray[i2].energy = (rt.goodGuysArray[i2].energy + 30);
rt.goodGuysArray[i2].witchSpell = false;
healthMc = new bestowHealth();
rt.goodGuysArray[i2].mC.addChild(healthMc);
};
};
};
};
};
i2++;
};
};
}
function dropBomb(){
var spriteData:Object;
var newXY:Object;
projectileMc = new jetFighterBomb();
rt.inGameMissilesMc.addChild(projectileMc);
newXY = rt.Useful.localToGlobalXY(mC.mReleaseMc);
spriteData = Useful.pointTowards(mC.x, mC.y, newXY.newX, newXY.newY);
rt.missilesArray.push(new GameMissile(projectileMc, rt, newXY.newX, newXY.newY, myProjectile, Useful, spriteData, 16, this, myDamage, currentMapIndexY));
}
public function fireballsUpgrade(){
if (rt.checkForCost(80)){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
fireballsUpg = true;
};
}
public function poisonGroundUpgrade(){
if (rt.checkForCost(60)){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
poisonGroundUpg = true;
};
}
public function electricityUpgrade(){
if (rt.checkForCost(10)){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
catapultFireUpg = true;
};
}
public function unicornUpgrade(){
var soldier:*;
if (rt.checkForCost(130)){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
soldier = new GameUnicorn(rt, null, null, "unicorn", rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChild(soldier);
rt.goodGuysArray.push(new GameGoodGuy(rt, (rt.endCell.c * rt.blockSize), (rt.endCell.r * rt.blockSize), soldier, Useful, 240, 2, 40, "bullet", 4, 100, 0, false));
soldier.x = (rt.endCell.c * rt.blockSize);
soldier.y = (rt.endCell.r * rt.blockSize);
};
}
function checkForFire(){
var targetObj:Object;
var myFireDelay2:*;
var spriteData:Object;
var newXY:Object;
targetObj = distanceArray[0].distSprite;
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, mC.x, mC.y);
mC.soldier.rotation = (spriteData.spriteRotation - 90);
delayToFireMissile--;
if (delayToFireMissile == 0){
myFireDelay2 = myFireDelay;
if (rt.upgrade1 == true){
myFireDelay2 = int((myFireDelay / 2));
};
delayToFireMissile = myFireDelay2;
animMc.gotoAndStop("attack");
if (myProjectile != "grenade"){
if (mC.myType != "wizard"){
if (mC.myType != "knight4"){
if (mC.myType != "rocketTower"){
if (mC.myType != "gunTower"){
if (mC.myType != "knight"){
if (mC.myType != "mine"){
if (mC.myType != "mining"){
if (mC.myType != "sorcerer"){
if (mC.myType != "warlock"){
if (mC.myType != "unicorn"){
if (mC.myType != "pheonix"){
if (mC.myType == "knight2"){
projectileMc = new GameGrenade();
} else {
projectileMc = new GameBullet();
};
rt.inGameMissilesMc.addChild(projectileMc);
newXY = rt.Useful.localToGlobalXY(animMc.mReleaseMc);
if (myProjectile == "grenade"){
spriteData = Useful.getArcVelocity(1, 8, newXY.newX, newXY.newY, targetObj.x, (targetObj.y - 10));
} else {
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, newXY.newX, newXY.newY);
};
rt.missilesArray.push(new GameMissile(projectileMc, rt, newXY.newX, newXY.newY, myProjectile, Useful, spriteData, 16, this, myDamage, currentMapIndexY));
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function advShieldUpgrade(){
if (rt.checkForCost(60)){
rt.Sounds.playSoundFx("weaponUpgradeFx", 0.5, 0, 1);
advShieldUpg = true;
};
}
function remove(){
var i2:int;
var arrayIndex:Number;
var i1:*;
if (onTower == true){
i2 = 0;
while (i2 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[i2].mC.myType == "brickWall"){
if (rt.goodGuysArray[i2].onTower == 1){
if (rt.goodGuysArray[i2].mC.hitTestObject(mC)){
rt.goodGuysArray[i2].onTower = 0;
break;
};
};
} else {
if (rt.goodGuysArray[i2].mC.myType == "barbedWire"){
if (rt.goodGuysArray[i2].onTower == 1){
if (rt.goodGuysArray[i2].mC.hitTestObject(mC)){
rt.goodGuysArray[i2].onTower = 0;
break;
};
};
};
};
i2++;
};
};
if (myCurrentSound != null){
myCurrentSound.stop();
};
if (magicShieldUpg == true){
mC.removeChildAt(magicShieldMcInd);
};
i2 = 0;
while (i2 < rt.inGameGoodGuysMc.numChildren) {
if (rt.inGameGoodGuysMc.getChildAt(i2) == mC){
rt.inGameGoodGuysMc.removeChild(mC);
mC.stop();
};
i2++;
};
arrayIndex = 0;
i1 = 0;
while (i1 < rt.goodGuysArray.length) {
if (this == rt.goodGuysArray[i1]){
arrayIndex = i1;
};
i1++;
};
rt.goodGuysArray.splice(arrayIndex, 1);
}
function groundAttack(){
var targetObj:Object;
var spriteData:Object;
var myFireDelay2:*;
targetObj = distanceArray[0].distSprite;
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, mC.x, mC.y);
mC.soldier.rotation = (spriteData.spriteRotation - 90);
delayToFireMissile--;
if (delayToFireMissile == 0){
myFireDelay2 = myFireDelay;
targetObj.myObject.myDamageDelay = 1;
if (battleAxeUpg == true){
targetObj.myObject.decreaseEnergy((myDamage * 2));
};
if (swordUpg == true){
targetObj.myObject.decreaseEnergy((myDamage * 2.5));
} else {
targetObj.myObject.decreaseEnergy(myDamage);
};
if (rt.upgrade1 == true){
myFireDelay2 = int((myFireDelay / 2));
};
delayToFireMissile = myFireDelay2;
};
}
public function fireProjectile(){
var targetObj:Object;
var found:Boolean;
var i1:*;
var spriteData:Object;
var newXY:Object;
var targetX:*;
var targetY:*;
var xVel:*;
var yVel:*;
var magicUser:*;
if (distanceArray.length > 0){
targetObj = distanceArray[0].distSprite;
found = false;
i1 = 0;
while (i1 < rt.badGuysArray.length) {
if (targetObj.myObject == rt.badGuysArray[i1]){
found = true;
};
i1++;
};
if (found == true){
rt.Sounds.playSoundFx("fireMissileFx", 0.3, 0, 1);
if (mC.myType == "mining"){
if (poisonGroundUpg == false){
projectileMc = new GameGrenade();
} else {
projectileMc = new poisonGroundFire();
};
} else {
if (mC.myType == "archer"){
projectileMc = new GameMissileMc();
} else {
if (mC.myType == "knight3"){
projectileMc = new GameMortarShell();
} else {
if (mC.myType == "knight4"){
projectileMc = new GameBullet();
} else {
if (mC.myType == "rocketTower"){
if (catapultFireUpg == true){
projectileMc = new GameSmallFireball();
} else {
projectileMc = new GameRocket();
};
} else {
if (mC.myType == "mine"){
projectileMc = new GameMissileMc();
} else {
if (mC.myType == "sorcerer"){
if (iceBoltsUpg == true){
projectileMc = new GameIceBolt();
} else {
projectileMc = new GameMissileMc();
};
} else {
if (mC.myType == "warlock"){
if (fireballsUpg == true){
projectileMc = new GameLargeFireball();
} else {
projectileMc = new GameMissileMc();
};
} else {
if (mC.myType == "pheonix"){
projectileMc = new GameLargeFireball();
} else {
if (mC.myType == "unicorn"){
projectileMc = new GameLaserSaucer();
} else {
projectileMc = new GameBullet();
};
};
};
};
};
};
};
};
};
};
rt.inGameMissilesMc.addChild(projectileMc);
newXY = rt.Useful.localToGlobalXY(animMc.mReleaseMc);
if (myProjectile == "grenade"){
if (mC.myType == "knight4"){
spriteData = Useful.getArcVelocity(1, 16, newXY.newX, newXY.newY, targetObj.x, (targetObj.y - 10));
} else {
spriteData = Useful.getArcVelocity(1, 8, newXY.newX, newXY.newY, targetObj.x, (targetObj.y - 10));
};
} else {
targetX = targetObj.x;
targetY = targetObj.y;
if (witchSpell == true){
targetX = (targetX + Useful.RandomNumber(30, 80));
targetY = (targetY + Useful.RandomNumber(30, 80));
};
if (weaponExpUpg == true){
xVel = (targetObj.myObject.xVel * 14);
yVel = (targetObj.myObject.yVel * 14);
spriteData = Useful.pointTowards((targetX + xVel), (targetY + yVel), newXY.newX, newXY.newY);
} else {
magicUser = false;
if (mC.myType == "mining"){
magicUser = true;
} else {
if (mC.myType == "mine"){
magicUser = true;
} else {
if (mC.myType == "sorcerer"){
magicUser = true;
} else {
if (mC.myType == "warlock"){
magicUser = true;
};
};
};
};
if (magicUser == true){
xVel = (targetObj.myObject.xVel * 14);
yVel = (targetObj.myObject.yVel * 14);
spriteData = Useful.pointTowards((targetX + xVel), (targetY + yVel), newXY.newX, newXY.newY);
} else {
xVel = (targetObj.myObject.xVel * 4);
yVel = (targetObj.myObject.yVel * 4);
spriteData = Useful.pointTowards((targetX + xVel), (targetY + yVel), newXY.newX, newXY.newY);
};
};
};
if (steelTArrowUpg == true){
rt.missilesArray.push(new GameMissile(projectileMc, rt, newXY.newX, newXY.newY, myProjectile, Useful, spriteData, 20, this, (myDamage * 1.5), currentMapIndexY));
} else {
rt.missilesArray.push(new GameMissile(projectileMc, rt, newXY.newX, newXY.newY, myProjectile, Useful, spriteData, 20, this, myDamage, currentMapIndexY));
};
};
};
}
public function valkyrieUpgrade(){
var soldier:*;
if (rt.checkForCost(100)){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
soldier = new GameValkyrie(rt, null, null, "valkyrie", rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChild(soldier);
rt.goodGuysArray.push(new GameGoodGuy(rt, (rt.endCell.c * rt.blockSize), (rt.endCell.r * rt.blockSize), soldier, Useful, 40, 2, 15, "bullet", 6, 100, 0, false));
soldier.x = (rt.endCell.c * rt.blockSize);
soldier.y = (rt.endCell.r * rt.blockSize);
};
}
function decreaseEnergy(damage, missile){
var e:Number;
var myArmour2:*;
var mapXYObject:Object;
if (magicShieldUpg == false){
myDamageDelay = 1;
if (energy > 0){
if (filterDelay > 1){
damage = int((damage / 2));
};
if (plateMailUpg == true){
myArmour2 = (myArmour + 0.5);
if (onTower == 1){
myArmour2 = (myArmour2 + 10);
} else {
if (onTower == 2){
myArmour2 = (myArmour2 + 14);
};
};
damage = (damage / myArmour2);
} else {
if (advShieldUpg == true){
myArmour2 = (myArmour + 0.4);
if (onTower == 1){
myArmour2 = (myArmour2 + 10);
} else {
if (onTower == 2){
myArmour2 = (myArmour2 + 14);
};
};
damage = (damage / myArmour2);
} else {
myArmour2 = myArmour;
if (onTower == 1){
myArmour2 = (myArmour2 + 1);
} else {
if (onTower == 1){
myArmour2 = (myArmour2 + 14);
};
};
damage = (damage / myArmour2);
};
};
energy = (energy - damage);
if (energyBarOn == 0){
energyBarOn = 1;
energyBarMc = new GameEnergyBar(this);
mC.addChild(energyBarMc);
};
energyBarMc.x = 0;
energyBarMc.y = -15;
e = (energy / 10);
energyBarMc.bar.bar.y = int((10 - e));
if (energyBarMc.bar.bar.y > 10){
energyBarMc.bar.bar.y = 10;
};
if (energy <= 0){
rt.closeInfoSelected(this);
mapXYObject = rt.getMapIndex(mC);
rt.clearTile(mC.x, mC.y);
rt.checkPathForAll();
if (myProjectile == "no_fire"){
myCurrentSound = rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, mC.goodBad, currentMapIndexY));
} else {
myCurrentSound = rt.Sounds.playSoundFx("die_v1_Fx", 1, 0, 1);
};
dead = true;
if (myCurrentSound != null){
myCurrentSound.stop();
};
animMc.gotoAndStop("die");
return (true);
};
};
};
return (false);
}
function updatePosition(){
var sp2:Number;
var targetObj:Object;
var xx:*;
var yy:*;
var mapXYObject:Object;
var newTile:Boolean;
var spriteData:Object;
if (frozen == false){
sp2 = speed;
if (distanceArray.length > 0){
targetObj = distanceArray[0].distSprite;
if (dirChanged == false){
dirChanged = true;
spriteData = Useful.pointTowards(targetObj.x, targetObj.y, mC.x, mC.y);
if (soldierState != SOLDIER_STATE_FIGHTING){
mC.soldier.rotation = (spriteData.spriteRotation - 90);
};
xVel = (spriteData.vx * sp2);
yVel = (spriteData.vy * sp2);
};
xPos = (xPos + xVel);
yPos = (yPos + yVel);
xx = (xOrigin + xPos);
yy = (yOrigin + yPos);
mapXYObject = getCurrentMapIndex2(xx, yy);
newTile = false;
if (xVel < 0){
mapXYObject.indexX++;
};
if (yVel < 0){
mapXYObject.indexY++;
};
if (currentMapIndexX == mapXYObject.indexX){
if (currentMapIndexY == mapXYObject.indexY){
newTile = true;
};
};
if (newTile == true){
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
} else {
dirChanged = false;
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
};
if (mC.x < -50){
remove();
};
};
};
}
function checkIfInRange(){
var mapXYObject:Object;
var myRange2:Number;
mapXYObject = getCurrentMapIndex(mC);
currentMapIndexX = mapXYObject.indexX;
currentMapIndexY = mapXYObject.indexY;
findEnemy((mapXYObject.indexX + 1), mapXYObject.indexY);
myRange2 = myRange;
if (improvedSightUpg == true){
myRange2 = (myRange2 + rt.blockSize);
};
if (rt.seeDistanceUpg == true){
myRange2 = (myRange2 + rt.blockSize);
};
if (distanceArray.length != 0){
if (distanceArray[0].dist < myRange2){
if (ground == false){
soldierState = SOLDIER_STATE_FIGHTING;
checkForFire();
} else {
groundAttack();
if (soldierState != SOLDIER_STATE_FIGHTING){
mC.soldier.gotoAndStop("attack");
};
soldierState = SOLDIER_STATE_FIGHTING;
};
} else {
soldierState = SOLDIER_STATE_ATTACK;
};
} else {
soldierState = SOLDIER_STATE_ATTACK;
};
}
function applyGravity(){
yVel = (yVel + gravity);
}
function getCurrentMapIndex(spriteObject):Object{
var mapXYIndex:Object;
var sprX:Number;
var sprY:Number;
mapXYIndex = new Object();
sprX = int((spriteObject.x / rt.blockSize));
mapXYIndex.indexX = sprX;
sprX = (sprX * rt.blockSize);
mapXYIndex.xPos = sprX;
sprY = int((spriteObject.y / rt.blockSizeY));
mapXYIndex.indexY = sprY;
sprY = (sprY * rt.blockSizeY);
mapXYIndex.yPos = sprY;
return (mapXYIndex);
}
public function expWeaponUpgrade(){
if (rt.checkForCost(100)){
rt.Sounds.playSoundFx("weaponUpgradeFx", 0.5, 0, 1);
weaponExpUpg = true;
};
}
function findEnemy(xx, yy){
var distanceBadKing:Object;
var i2:int;
var noCheck:Boolean;
var distanceObject:Object;
var sprite1:MovieClip;
distanceArray = new Array();
distanceBadKing = new Object();
i2 = 0;
while (i2 < rt.badGuysArray.length) {
if (rt.badGuysArray[i2].ImGood == false){
noCheck = false;
if (ground == true){
if (rt.badGuysArray[i2].flying == true){
noCheck = true;
};
};
if (noCheck == false){
distanceObject = new Object();
sprite1 = rt.badGuysArray[i2].mC;
distanceObject.distSprite = sprite1;
distanceObject.dist = Useful.getDistance(mC.x, mC.y, distanceObject.distSprite.x, distanceObject.distSprite.y);
distanceArray.push(distanceObject);
};
};
i2++;
};
distanceArray.sortOn("dist", Array.NUMERIC);
}
public function swordUpgrade(){
if (rt.checkForCost(70)){
rt.Sounds.playSoundFx("weaponUpgradeFx", 0.5, 0, 1);
swordUpg = true;
};
}
public function pheonixUpgrade(){
var soldier:*;
if (rt.checkForCost(200)){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
pheonixUpg = true;
soldier = new GamePheonix(rt, null, null, "pheonix", rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChild(soldier);
rt.goodGuysArray.push(new GameGoodGuy(rt, (rt.endCell.c * rt.blockSize), (rt.endCell.r * rt.blockSize), soldier, Useful, 300, 1, 80, "bullet", 8, 100, 0, false));
soldier.x = (rt.endCell.c * rt.blockSize);
soldier.y = (rt.endCell.r * rt.blockSize);
};
}
public function plateMailUpgrade(){
if (rt.checkForCost(70)){
rt.Sounds.playSoundFx("weaponUpgradeFx", 0.5, 0, 1);
plateMailUpg = true;
};
}
function increaseEnergy(){
energy = (energy + 0.1);
if (energy > 100){
energy = 100;
};
}
public function raiseDeadUpgrade(){
var i2:*;
var soldier:*;
if (rt.raiseDeadUpg == false){
if (rt.checkForCost(150)){
rt.raiseDeadUpg = true;
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
i2 = 0;
while (i2 < 5) {
soldier = new GameSkeleton(rt, null, null, "skeleton", rt.inGameGoodGuysMc, GOOD_FLAG);
rt.inGameGoodGuysMc.addChild(soldier);
soldier.x = (Useful.RandomNumber(4, (rt.numCols - 4)) * rt.blockSize);
soldier.y = (Useful.RandomNumber(4, (rt.numRows - 4)) * rt.blockSize);
rt.goodGuysArray.push(new GameGoodGuy(rt, soldier.x, soldier.y, soldier, Useful, 50, 1, 20, "bullet", 3, 100, 0, false));
i2++;
};
};
};
}
public function seeDistanceUpgrade(){
if (rt.checkForCost(80)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
rt.seeDistanceUpg = true;
};
}
public function fasterFiringUpgrade(){
if (rt.checkForCost(80)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
fasterFiringUpg = true;
};
}
public function magicShieldUpgrade(){
var i2:*;
var healthMc:*;
if (rt.checkForCost(80)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
magicShieldUpg = true;
i2 = 1;
while (i2 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[i2].mC.myType != "knight"){
if (rt.goodGuysArray[i2].mC.myType != "barbedWire"){
if (rt.goodGuysArray[i2].mC.myType != "brickWall"){
if (rt.goodGuysArray[i2].magicShieldUpg == false){
if (rt.goodGuysArray[i2].dead == false){
healthMc = new magicalshieldspell();
rt.goodGuysArray[i2].mC.addChild(healthMc);
rt.goodGuysArray[i2].magicShieldMcInd = rt.goodGuysArray[i2].mC.getChildIndex(healthMc);
rt.goodGuysArray[i2].magicShieldUpg = true;
rt.goodGuysArray[i2].magicShieldDelay = 150;
};
};
};
};
};
i2++;
};
};
}
public function improvedSightUpgrade(){
if (rt.checkForCost(80)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
improvedSightUpg = true;
};
}
public function slowTimeUpgrade(){
if (rt.checkForCost(60)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
rt.slowTimeUpg = true;
rt.slowTimeDelay = 300;
};
}
public function catapultFireUpgrade(){
if (rt.checkForCost(90)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
catapultFireUpg = true;
};
}
public function iceBoltsUpgrade(){
if (rt.checkForCost(100)){
if (iceBoltsUpg == false){
rt.Sounds.playSoundFx("spellBigFx", 0.5, 0, 1);
iceBoltsUpg = true;
iceBoltsDelay = 450;
};
};
}
public function evilToGoodUpgrade(){
var sww:Boolean;
var i2:int;
var healthMc:*;
if (rt.checkForCost(150)){
rt.Sounds.playSoundFx("upgradeSpellFx", 0.5, 0, 1);
sww = false;
i2 = 0;
while (i2 < rt.badGuysArray.length) {
if (sww == false){
if (rt.badGuysArray[i2].dead == false){
if (rt.badGuysArray[i2].ImGood == false){
sww = true;
rt.badGuysArray[i2].ImGood = true;
healthMc = new turneviltogood();
rt.badGuysArray[i2].mC.addChild(healthMc);
};
};
} else {
sww = false;
};
i2++;
};
};
}
public function steelTUpgrade(){
if (rt.checkForCost(60)){
steelTArrowUpg = true;
rt.Sounds.playSoundFx("weaponUpgradeFx", 0.5, 0, 1);
};
}
}
}//package classesAS3
Section 26
//GameGunTower (classesAS3.GameGunTower)
package classesAS3 {
import flash.display.*;
public class GameGunTower extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameGunTower(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 27
//GameHitFloorSmoke (classesAS3.GameHitFloorSmoke)
package classesAS3 {
import flash.display.*;
public class GameHitFloorSmoke extends MovieClip {
public var myType:String;
public var myObject:Object;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public function GameHitFloorSmoke(rt2, myP, myO){
super();
myObject = myO;
rt = rt2;
myParent = myP;
myType = "smoke";
}
public function removeMe(){
if (myObject != null){
myObject.mySmoke = null;
if (this.parent != null){
myParent.removeChild(this);
};
};
}
}
}//package classesAS3
Section 28
//GameIntroAnim (classesAS3.GameIntroAnim)
package classesAS3 {
import flash.display.*;
import flash.events.*;
public class GameIntroAnim extends MovieClip {
var rt:Object;
public var link_btn3:SimpleButton;
public function GameIntroAnim(rt2){
super();
addFrameScript(0, frame1, 121, frame122);
rt = rt2;
this.play();
}
function frame1(){
}
function frame122(){
this.rt.introFinished();
stop();
}
}
}//package classesAS3
Section 29
//GameJetFighter (classesAS3.GameJetFighter)
package classesAS3 {
import flash.display.*;
public class GameJetFighter extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mReleaseMc:MovieClip;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameJetFighter(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
public function removeMe(){
myObject.remove();
this.stop();
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 30
//GameKingGood (classesAS3.GameKingGood)
package classesAS3 {
import flash.display.*;
public class GameKingGood extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
var soldierState:Number;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var orbCollMc:MovieClip;
public var myParent:Object;
public var myShapeDef:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_STATE_FIGHTING:int = 2;
public function GameKingGood(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myParent.removeChild(this);
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt.rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
public function mainLoop(){
}
}
}//package classesAS3
Section 31
//GameKnight1 (classesAS3.GameKnight1)
package classesAS3 {
import flash.display.*;
public class GameKnight1 extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameKnight1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 32
//GameKnight2 (classesAS3.GameKnight2)
package classesAS3 {
import flash.display.*;
public class GameKnight2 extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameKnight2(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 33
//GameKnight3 (classesAS3.GameKnight3)
package classesAS3 {
import flash.display.*;
public class GameKnight3 extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameKnight3(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 34
//GameKnight4 (classesAS3.GameKnight4)
package classesAS3 {
import flash.display.*;
public class GameKnight4 extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameKnight4(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 35
//GameLevelComplete (classesAS3.GameLevelComplete)
package classesAS3 {
import flash.display.*;
public class GameLevelComplete extends MovieClip {
public var rt:Object;
public var msg:MovieClip;
public var howWellDone:Number;
public var levelNumber:Number;
public function GameLevelComplete(rt2){
super();
addFrameScript(0, frame1, 14, frame15, 30, frame31, 142, frame143, 152, frame153);
rt = rt2;
howWellDone = 1;
this.play();
}
function frame143(){
if (this.rt.levelNumber == this.rt.levelMax){
stop();
msg.gotoAndStop(2);
} else {
if (this.rt.rt.gameMode != "quest"){
msg.gotoAndStop("gameComplete");
stop();
} else {
play();
};
};
}
function frame153(){
if (this.rt.levelNumber == this.rt.levelMax){
this.rt.gameComplete();
} else {
if (this.rt.rt.gameMode != "quest"){
this.rt.gameComplete();
} else {
this.rt.endLevelStuff();
};
};
stop();
}
function frame15(){
msg.scoreBonus.text = String(this.rt.money);
msg.timeBonus.text = String((10 * this.rt.energy));
if (this.rt.monsterBonus == true){
msg.speedBonus.text = 1000;
this.rt.score = (this.rt.score + 1000);
};
this.rt.score = (this.rt.score + Number(msg.timeBonus.text));
msg.totalScore.text = String(this.rt.score);
levelNumber = this.rt.levelNumber;
if (levelNumber < this.rt.levelMax){
levelNumber++;
};
if (this.rt.levelNumber == this.rt.levelMax){
msg.titleMc.gotoAndStop("gameCompleted");
} else {
if (this.rt.rt.gameMode != "quest"){
msg.titleMc.gotoAndStop("gameCompleted");
};
};
}
function frame1(){
play();
}
function frame31(){
}
}
}//package classesAS3
Section 36
//GameLoop (classesAS3.GameLoop)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import mochi.as3.*;
import flash.utils.*;
import flash.net.*;
import CPMStar.*;
import flash.text.*;
import flash.system.*;
import flash.ui.*;
public dynamic class GameLoop extends MovieClip {
public var gperc2:Number;// = 0
public var pauseScreen:pauseMc;
public var mochi_Auto_ID:String;// = "a21cca36d59cb18b"
public var mouseNumberDown:Number;
public var cookieData:Object;
public var ad:DisplayObject;
public var mapScreen2:GameMapScreen;
var fadeOutArray:Array;
public var gskip:Number;// = 0
public var mochiId:String;// = "dc88f0b8ba614a15"
public var MindJolt_Site:Boolean;// = false
public var introAnim:GameIntroAnim;
public var box2dDone:Boolean;// = false
public var CPMStarContentSpotID:String;
public var Cookie:as3_shared_objects;
public var adBox:MovieClip;
public var titleMusic:SoundMusic1;
public var percentLoaded:int;
public var gameMode:String;// = "quest"
public var Useful:GameUseful;
public var domain:String;
var FPS:TextField;
public var itemsBought:Number;// = 0
public var mochi_Medi_ID:String;// = "cb49260a2ff639f9"
public var titleScreen:GameTitleScreen;
public var GameMain:GameGame;
public var loaderStarted:Boolean;// = false
public var loadingBox:LoadingBox;
public var mochi_Radar_ID:String;// = "bb4630f54c147b79"
public var titleStarted:Boolean;// = false
public var mochiScoreId:String;// = "d1ce83c792fa105f"
var Memory:TextField;
public var Kongregate_Site:Boolean;// = false
public var userLoggedIn:Boolean;
public var mouseDownClicked:Boolean;// = false
public var mochiOn:Boolean;// = false
public var userProperties:Object;
public var mochi_Air_ID:String;// = "833440b3828dd212"
public var mainBtnsSetup;
public var titleScreenMc:Sprite;
public var ArcadeBomb_Site:Boolean;// = false
public var allowed_site:String;// = "arcadebomb.com"
public var mochi_All_ID:String;// = "5678e0e591766af6"
public var titleMusicChannel:SoundChannel;
var Instructions:TextField;
public var gperc:Number;// = 0
public var gameState:int;// = 4
public var policyLoaded:Boolean;// = false
var currentTime:int;// = 0
public var keyPressDown:Boolean;// = false
public static const STATE_SYSTEM_PLAY:int = 3;
public static const STATE_SYSTEM_INTRO:int = 9;
public static const STATE_SYSTEM_PAUSE:int = 4;
public static const STATE_SYSTEM_LOADER:int = 0;
public static const STATE_SYSTEM_SETUP_GAME:int = 8;
public static const STATE_SYSTEM_CHAT:int = 10;
public static const STATE_SYSTEM_END_MSG:int = 12;
public static const STATE_SYSTEM_MOCHI:int = 2;
public static const STATE_SYSTEM_SETUP:int = 13;
public static const STATE_SYSTEM_NEW_LEVEL:int = 7;
public static const STATE_SYSTEM_GAME_COMPLETE:int = 6;
public static const STATE_SYSTEM_START_MSG:int = 11;
public static const STATE_SYSTEM_TITLE:int = 1;
public static const STATE_SYSTEM_GAME_OVER:int = 5;
public function GameLoop():void{
policyLoaded = false;
mochiOn = false;
mochiId = "dc88f0b8ba614a15";
mochiScoreId = "d1ce83c792fa105f";
mochi_Radar_ID = "bb4630f54c147b79";
mochi_Medi_ID = "cb49260a2ff639f9";
mochi_Air_ID = "833440b3828dd212";
mochi_Auto_ID = "a21cca36d59cb18b";
mochi_All_ID = "5678e0e591766af6";
gameState = STATE_SYSTEM_PAUSE;
loaderStarted = false;
titleStarted = false;
itemsBought = 0;
gperc = 0;
gperc2 = 0;
gskip = 0;
currentTime = 0;
FPS = new TextField();
Instructions = new TextField();
Memory = new TextField();
allowed_site = "arcadebomb.com";
MindJolt_Site = false;
Kongregate_Site = false;
ArcadeBomb_Site = false;
keyPressDown = false;
mouseDownClicked = false;
box2dDone = false;
gameMode = "quest";
super();
addFrameScript(0, frame1, 1, frame2, 294, frame295, 295, frame296);
}
public function doTitleScreenStuff(){
if (titleMusicChannel == null){
if (GameMain.musicSwitch == true){
titleMusicChannel = titleMusic.play(0, 10000);
GameMain.Sounds.setVolume(titleMusicChannel, 0.5);
};
};
titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, playGame);
mainBtnsSetup = true;
titleScreen.instructionsBtn.addEventListener(MouseEvent.MOUSE_UP, doInstScreen);
titleScreen.controlsBtn.addEventListener(MouseEvent.MOUSE_UP, doControlsScreen);
titleScreen.unitsBtn.addEventListener(MouseEvent.MOUSE_UP, doUnitsScreen);
titleScreen.musicBtn.addEventListener(MouseEvent.MOUSE_UP, doSoundBtn);
}
public function showLeaderBoard2(msgMc){
var o:Object;
var boardID:String;
var msgMc = msgMc;
o = {n:[13, 1, 12, 14, 8, 3, 12, 7, 9, 2, 15, 10, 1, 0, 5, 15], f:function (i:Number, s:String):String{
if (s.length == 16){
return (s);
};
return (this.f((i + 1), (s + this.n[i].toString(16))));
}};
boardID = o.f(0, "");
MochiScores.showLeaderboard({boardID:mochiScoreId, onClose:msgMc.gotoAndStop("mainScreen")});
}
public function addedToStage(a_evt:Event=null):void{
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
launchApp();
}
public function showLeaderBoard(msgMc){
var o:Object;
var boardID:String;
var msgMc = msgMc;
o = {n:[13, 1, 12, 14, 8, 3, 12, 7, 9, 2, 15, 10, 1, 0, 5, 15], f:function (i:Number, s:String):String{
if (s.length == 16){
return (s);
};
return (this.f((i + 1), (s + this.n[i].toString(16))));
}};
boardID = o.f(0, "");
MochiScores.showLeaderboard({boardID:mochiScoreId, score:GameMain.score, onClose:msgMc.play});
}
public function doControlsScreen(event:MouseEvent):void{
titleScreen.gotoAndStop("controls");
}
public function setupTitleScreen(){
titleScreen = new GameTitleScreen(this);
titleScreen.x = 0;
titleScreenMc.addChild(titleScreen);
titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, playGame);
if (GameMain.musicSwitch == false){
titleMusic = new SoundMusic1();
titleMusicChannel = null;
} else {
if (titleMusic == null){
titleMusic = new SoundMusic1();
titleMusicChannel = null;
};
};
if (titleMusicChannel != null){
GameMain.Sounds.setVolume(titleMusicChannel, 0.5);
};
}
public function doScoresBtns(){
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.1);
};
titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastScoreScreen);
}
function frame295(){
}
public function doInstrBtns(){
GameMain.Sounds.playSoundFx("clickBtnFx", 1, 0, 1);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.1);
};
titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastInstScreen);
}
public function doMapScreenOld(event:MouseEvent):void{
cookieData = Cookie.loadOldGame();
if (cookieData.visits == -1){
GameMain.levelNumber = 1;
GameMain.levelStart = 1;
GameMain.score = 0;
GameMain.money = 0;
GameMain.waveSpeed = 100;
} else {
GameMain.levelNumber = cookieData.levelNumber;
GameMain.levelStart = cookieData.levelNumber;
GameMain.score = cookieData.score;
GameMain.money = cookieData.money;
GameMain.waveSpeed = cookieData.waveSpeed;
if (isNaN(GameMain.money)){
GameMain.money = 0;
};
if (isNaN(GameMain.waveSpeed)){
GameMain.waveSpeed = 100;
};
};
if (GameMain.levelNumber == 1){
if (GameMain.money > 0){
GameMain.money = 0;
GameMain.score = 0;
};
};
titleScreenMc.removeChild(titleScreen);
setupMapScreen();
}
public function mouseMoveHandler(ev:Event):void{
}
public function keyListener(event:KeyboardEvent):void{
keyPressDown = false;
GameMain.scrollScreen = "";
GameMain.zoomScreen = "";
if (event.keyCode == 80){
if (gameState != STATE_SYSTEM_PAUSE){
if (gameState == STATE_SYSTEM_PLAY){
gameState = STATE_SYSTEM_PAUSE;
pauseScreen = new pauseMc();
addChild(pauseScreen);
};
} else {
gameState = STATE_SYSTEM_PLAY;
removeChild(this.pauseScreen);
};
};
if (event.keyCode == 67){
if (gameState == STATE_SYSTEM_PLAY){
};
};
if (event.keyCode == 90){
if (gameState == STATE_SYSTEM_PLAY){
};
} else {
if (event.keyCode == 69){
if (gameState == STATE_SYSTEM_PLAY){
};
} else {
if (event.keyCode == 82){
if (gameState == STATE_SYSTEM_PLAY){
};
} else {
if (event.keyCode == 78){
if (gameState == STATE_SYSTEM_PLAY){
};
} else {
if (event.keyCode == 77){
if (gameState == STATE_SYSTEM_PLAY){
};
} else {
if (event.keyCode == Keyboard.UP){
keyPressDown = true;
} else {
if (event.keyCode == Keyboard.DOWN){
keyPressDown = true;
};
};
};
};
};
};
};
}
public function loggedIn(event:Object):void{
userProperties = event.userProperties;
userLoggedIn = true;
}
public function registerItem(event:Object):void{
if (event.id == mochi_Radar_ID){
GameMain.upgrade6 = true;
} else {
if (event.id == mochi_Medi_ID){
GameMain.upgrade7 = true;
} else {
if (event.id == mochi_Air_ID){
GameMain.upgrade8 = true;
} else {
if (event.id == mochi_Auto_ID){
GameMain.upgrade9 = true;
} else {
if (event.id == mochi_All_ID){
GameMain.upgrade10 = true;
GameMain.upgrade6 = true;
GameMain.upgrade7 = true;
GameMain.upgrade8 = true;
GameMain.upgrade9 = true;
};
};
};
};
};
itemsBought++;
if (itemsBought >= 4){
GameMain.upgrade10 = true;
};
}
function frame296(){
setupEverything();
stop();
}
public function doMainScreen(event:MouseEvent):void{
titleScreen.gotoAndStop("mainScreen");
}
function frame1(){
if (this.stage){
this.addedToStage();
} else {
stop();
this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
return;
};
}
function frame2(){
CPMStarContentSpotID = "2128QC18FB0F3";
ad = new AdLoader(CPMStarContentSpotID);
adBox.addChild(ad);
}
public function doPlay():void{
GameMain.mainLoop();
}
public function doSoundBtn(event:MouseEvent):void{
if (titleScreen.musicMc.currentFrame == 1){
titleScreen.musicMc.gotoAndStop("off");
GameMain.musicSwitch = false;
titleMusicChannel.stop();
} else {
titleScreen.musicMc.gotoAndStop("on");
GameMain.musicSwitch = true;
titleMusicChannel = titleMusic.play(0, 10000);
};
}
function doBackBtn2(event:MouseEvent):void{
titleScreen.gotoAndStop("mainScreen");
}
public function mouseLeftClick(ev:Event):void{
if (gameState == STATE_SYSTEM_PLAY){
if (this.mouseY < 460){
GameMain.on_mouse_down();
} else {
if (mouseDownClicked == false){
mouseDownClicked = true;
GameMain.checkForPanelClick();
};
};
} else {
if (gameState == STATE_SYSTEM_START_MSG){
if (GameMain.startGameMsgMc != null){
GameMain.startGameMsgMc.gotoAndStop("endStartMsg");
};
};
};
}
public function doMapScreen(event:MouseEvent):void{
cookieData = Cookie.newGame();
titleScreenMc.removeChild(titleScreen);
setupMapScreen();
}
public function doSave(event:MouseEvent):void{
Cookie.saveGameCookie(GameMain.score, GameMain.levelNumber, GameMain.money, GameMain.waveSpeed);
mapScreen2.savedMsgMc.gotoAndPlay(2);
}
public function loadingComplete(){
this.loadingBox.removeEventListener(Event.ENTER_FRAME, loadingUpdater, false);
if (loadingBox != null){
removeChild(loadingBox);
};
loadingBox = null;
finishPreload();
}
public function doSetup(event:MouseEvent):void{
gameMode = "quest";
removeChild(mapScreen2);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.3);
};
gameState = STATE_SYSTEM_START_MSG;
GameMain.setupGame();
}
public function showHUD():void{
FPS.text = "FPS";
FPS.textColor = 0xFFFFFF;
Memory.text = "mem";
Memory.x = 200;
stage.addChild(FPS);
stage.addChild(Memory);
}
public function openURL(pageToOpen:String){
var url:String;
var req:URLRequest;
url = pageToOpen;
req = new URLRequest(url);
navigateToURL(req, "_blank");
}
function doLastContScreen(event:MouseEvent):void{
fadeOutArray.push(GameMain.Sounds.currentChannel);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.5);
};
titleScreen.gotoAndStop("mainScreen");
}
public function startChat(){
gameState = STATE_SYSTEM_CHAT;
}
public function doContrBtns(){
GameMain.Sounds.playSoundFx("clickBtnFx", 1, 0, 1);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.1);
};
titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastContScreen);
}
public function introFinished(){
removeChild(introAnim);
gameState = STATE_SYSTEM_TITLE;
}
function setupMapScreen(){
mapScreen2 = new GameMapScreen(this);
mapScreen2.x = 0;
addChild(mapScreen2);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.5);
};
}
public function setupEverything(){
var MovieDimensionWidth:Number;
var MovieDimensionHeight:Number;
var LevelDimensionWidth:Number;
var LevelDimensionHeight:Number;
var numberOfStartLives:Number;
var maxNumberOfLevels:Number;
var Box2dScalingFactor:Number;
gameState = STATE_SYSTEM_TITLE;
userLoggedIn = false;
MochiServices.connect("2a4c2ffe663f3dcb", root);
MochiBot.track(this, "0660925a");
mouseNumberDown = 0;
mainBtnsSetup = false;
fadeOutArray = new Array();
Useful = new GameUseful(root);
Cookie = new as3_shared_objects();
MovieDimensionWidth = 700;
MovieDimensionHeight = 560;
LevelDimensionWidth = 10;
LevelDimensionHeight = 9;
numberOfStartLives = 3;
maxNumberOfLevels = 50;
Box2dScalingFactor = 30;
GameMain = new GameGame(root, MovieDimensionWidth, MovieDimensionHeight, LevelDimensionWidth, LevelDimensionHeight, numberOfStartLives, Useful, maxNumberOfLevels, Box2dScalingFactor);
titleScreenMc = new Sprite();
addChild(titleScreenMc);
addChild(GameMain);
addEventListener(Event.ENTER_FRAME, runGame, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, keyListener);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyListenerDown);
}
public function FadeOut(channel){
var transform1:SoundTransform;
var vol:Number;
var i2:*;
if (channel != null){
transform1 = channel.soundTransform;
vol = transform1.volume;
vol = (vol - 0.1);
GameMain.Sounds.setVolume(channel, vol);
if (vol <= 0){
channel.stop();
i2 = 0;
while (i2 < fadeOutArray.length) {
if (fadeOutArray[i2] == channel){
fadeOutArray.splice(i2, 1);
};
i2++;
};
};
};
}
function doNextContScreen(event:MouseEvent):void{
if (titleScreen.currentFrame < 7){
titleScreen.nextFrame();
} else {
titleScreen.gotoAndStop("mainScreen");
};
}
function doLastInstScreen(event:MouseEvent):void{
fadeOutArray.push(GameMain.Sounds.currentChannel);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.5);
};
titleScreen.gotoAndStop("mainScreen");
}
function doNextInstScreen(event:MouseEvent):void{
if (titleScreen.currentFrame < 4){
titleScreen.nextFrame();
} else {
titleScreen.gotoAndStop("mainScreen");
};
}
public function doSurvivalSetup(event:MouseEvent):void{
titleScreenMc.removeChild(titleScreen);
gameMode = "survival";
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.3);
};
gameState = STATE_SYSTEM_START_MSG;
GameMain.setupGame();
}
function pauseGame(){
if (gameState != 4){
if (gameState == 3){
gameState = 4;
pauseScreen = new pauseMc();
addChild(pauseScreen);
};
} else {
gameState = 3;
removeChild(pauseScreen);
};
}
public function runGame(e:Event):void{
var i:*;
switch (gameState){
case STATE_SYSTEM_INTRO:
break;
case STATE_SYSTEM_MOCHI:
doMochi();
break;
case STATE_SYSTEM_LOADER:
doLoadScreen();
break;
case STATE_SYSTEM_TITLE:
doTitleScreen();
break;
case STATE_SYSTEM_PLAY:
doPlay();
break;
case STATE_SYSTEM_GAME_OVER:
GameMain.gameOverLoop();
break;
case STATE_SYSTEM_GAME_COMPLETE:
GameMain.Sounds.mainLoop();
i = 0;
while (i < fadeOutArray.length) {
FadeOut(fadeOutArray[i]);
i++;
};
break;
case STATE_SYSTEM_NEW_LEVEL:
GameMain.gameOver("level_complete");
break;
case STATE_SYSTEM_CHAT:
GameMain.runStartChat();
break;
case STATE_SYSTEM_START_MSG:
GameMain.Box2d.runBox2d();
break;
case STATE_SYSTEM_END_MSG:
break;
case STATE_SYSTEM_PAUSE:
break;
case STATE_SYSTEM_SETUP:
setupEverything();
break;
};
}
public function doInstScreen(event:MouseEvent):void{
titleScreen.gotoAndStop("instructions");
}
public function doUnitsScreen(event:MouseEvent):void{
titleScreen.gotoAndStop("units");
}
public function playGame(event:MouseEvent):void{
GameMain.Sounds.playSoundFx("clickBtnFx", 1, 0, 1);
titleScreen.gotoAndStop("autoSave");
}
function doLastScoreScreen(event:MouseEvent):void{
titleScreen.gotoAndStop("mainScreen");
}
public function doMapScreenStuff(){
mapScreen2.playBtn.addEventListener(MouseEvent.MOUSE_UP, doSetup);
mapScreen2.saveBtn.addEventListener(MouseEvent.MOUSE_UP, doSave);
}
public function doUnitsBtns(){
GameMain.Sounds.playSoundFx("clickBtnFx", 1, 0, 1);
if (GameMain.musicSwitch == true){
GameMain.Sounds.setVolume(titleMusicChannel, 0.1);
};
titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastInstScreen);
}
public function launchApp():void{
play();
}
public function doTitleScreen():void{
var sparkleType:*;
var i:*;
if (((!(titleStarted)) && ((currentFrame == 296)))){
setupTitleScreen();
titleStarted = true;
} else {
if (titleScreen != null){
if (titleScreen.sparkleDelay == 0){
titleScreen.sparkleDelay = GameMain.Useful.RandomNumber(10, 50);
sparkleType = GameMain.Useful.RandomNumber(1, 4);
if (titleScreen.titleS.sp1 != null){
if (sparkleType == 1){
titleScreen.titleS.sp1.gotoAndPlay(1);
} else {
if (sparkleType == 2){
titleScreen.titleS.sp2.gotoAndPlay(2);
} else {
if (sparkleType == 3){
titleScreen.titleS.sp3.gotoAndPlay(3);
} else {
if (sparkleType == 4){
titleScreen.titleS.sp4.gotoAndPlay(4);
};
};
};
};
};
} else {
titleScreen.sparkleDelay--;
};
};
};
if (GameMain.musicSwitch == true){
i = 0;
while (i < fadeOutArray.length) {
FadeOut(fadeOutArray[i]);
i++;
};
};
}
public function keyListenerDown(event:KeyboardEvent):void{
if (gameState == STATE_SYSTEM_PLAY){
if (event.keyCode == Keyboard.SPACE){
} else {
if (event.keyCode == 187){
keyPressDown = true;
} else {
if (event.keyCode == 189){
keyPressDown = true;
} else {
if (event.keyCode == 57){
keyPressDown = true;
} else {
if (event.keyCode == 48){
keyPressDown = true;
} else {
if (event.keyCode == 65){
keyPressDown = true;
} else {
if (event.keyCode == 68){
keyPressDown = true;
} else {
if (event.keyCode == 83){
keyPressDown = true;
} else {
if (event.keyCode == Keyboard.RIGHT){
keyPressDown = true;
} else {
if (event.keyCode == Keyboard.LEFT){
keyPressDown = true;
} else {
if (event.keyCode == Keyboard.UP){
keyPressDown = true;
} else {
if (event.keyCode == Keyboard.DOWN){
keyPressDown = true;
} else {
if (event.keyCode == Keyboard.ESCAPE){
GameMain.closeInfoSelected2();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
public function updateHUD():void{
var fps:Number;
fps = (1 / ((getTimer() - currentTime) / 1000));
currentTime = getTimer();
FPS.text = ("FPS: " + Math.round(fps).toString());
Memory.text = (("Mem :" + (Math.round(((System.totalMemory / 0x100000) * 10)) / 10).toString()) + " MB");
}
public function loadingProgress(e:Event):void{
percentLoaded = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
gperc2 = int(percentLoaded);
}
public function finishSetup(){
gameState = STATE_SYSTEM_PLAY;
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseLeftClick);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseLeftUpClick);
}
public function adFinished(){
mochiOn = false;
gameState = STATE_SYSTEM_LOADER;
}
public function mouseLeftUpClick(ev:Event):void{
mouseDownClicked = false;
if (gameState == STATE_SYSTEM_PLAY){
GameMain.on_mouse_up();
} else {
mouseNumberDown++;
if (mouseNumberDown > 1){
mouseNumberDown = 0;
if (gameState == 4){
pauseGame();
};
};
};
}
public function doMainScreen2(event:MouseEvent):void{
removeChild(mapScreen2);
addChild(titleScreen);
titleScreen.gotoAndStop("mainScreen");
titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreen);
}
public function doLoadScreen():void{
if (!loaderStarted){
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
finishPreload();
} else {
loadingBox = new LoadingBox();
loadingBox.addEventListener(Event.ENTER_FRAME, loadingUpdater);
loaderStarted = true;
loadingBox.x = 0;
loadingBox.y = 0;
addChild(loadingBox);
};
};
}
public function checkDomain(){
domain = this.root.loaderInfo.url.split("/")[2];
if (domain.indexOf(allowed_site) == (domain.length - allowed_site.length)){
ArcadeBomb_Site = true;
} else {
ArcadeBomb_Site = false;
};
}
public function loadingUpdater(e:Event):void{
percentLoaded = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
gperc2 = int(percentLoaded);
if (gskip < 2){
gskip++;
return;
};
gskip = 0;
gperc = (gperc + 1);
if (gperc < gperc2){
gperc++;
loadingBox.loaderbar.gotoAndStop(gperc);
};
if (gperc >= 100){
loadingComplete();
};
}
public function doMochi():void{
if (!mochiOn){
MochiAd.showPreGameAd({clip:root, id:mochiId, res:"700x560", ad_finished:this.adFinished});
mochiOn = true;
};
}
public function finishPreload():void{
this.play();
gameState = STATE_SYSTEM_TITLE;
}
}
}//package classesAS3
Section 37
//GameMapScreen (classesAS3.GameMapScreen)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
public class GameMapScreen extends MovieClip {
public var rt:Object;
public var d4:MovieClip;
public var d6:MovieClip;
public var d5:MovieClip;
public var d8:MovieClip;
public var d9:MovieClip;
public var d2:MovieClip;
public var d7:MovieClip;
public var d3:MovieClip;
public var d1:MovieClip;
public var playBtn:SimpleButton;
public var placeNames:MovieClip;
public var savedMsgMc:MovieClip;
var levelsDefenses:Array;
var levelsRuler:Array;
public var levelNumberTxt:TextField;
public var map:MovieClip;
public var flag:MovieClip;
public var d10:MovieClip;
public var d11:MovieClip;
public var d12:MovieClip;
public var d14:MovieClip;
public var d16:MovieClip;
public var d17:MovieClip;
public var d15:MovieClip;
public var d18:MovieClip;
public var d13:MovieClip;
public var d19:MovieClip;
public var saveBtn:SimpleButton;
public var d20:MovieClip;
public var d22:MovieClip;
public var d24:MovieClip;
public var d25:MovieClip;
public var d21:MovieClip;
public var d23:MovieClip;
public var backBtn:SimpleButton;
public function GameMapScreen(rt2){
var i2:int;
var mcName:String;
super();
addFrameScript(0, frame1, 9, frame10);
rt = rt2;
this.placeNames.gotoAndStop(rt.GameMain.levelNumber);
this.flag.x = (this[("d" + String(rt.GameMain.levelNumber))].x + 13);
this.flag.y = this[("d" + String(rt.GameMain.levelNumber))].y;
i2 = 1;
while (i2 < 26) {
mcName = ("d" + i2);
if (rt.GameMain.levelNumber > i2){
this[mcName].gotoAndStop(2);
} else {
this[mcName].gotoAndStop(1);
};
i2++;
};
}
function frame10(){
stop();
}
function frame1(){
this.levelNumberTxt.text = (String("Level ") + rt.GameMain.levelNumber);
rt.doMapScreenStuff();
}
}
}//package classesAS3
Section 38
//GameMine (classesAS3.GameMine)
package classesAS3 {
import flash.display.*;
public class GameMine extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameMine(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 39
//GameMining (classesAS3.GameMining)
package classesAS3 {
import flash.display.*;
public class GameMining extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
var soldierState:Number;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_STATE_FIGHTING:int = 2;
public function GameMining(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myParent.removeChild(this);
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function mainLoop(){
}
}
}//package classesAS3
Section 40
//GameMissile (classesAS3.GameMissile)
package classesAS3 {
import classesAS3.*;
class GameMissile {
var rt:Object;
var xPos:Number;// = 0
var xVel:Number;// = 0
var myDamage:Number;
var mType:String;
var yPos:Number;// = 0
var trailDelay:Number;
var speed:Number;
var Useful:GameUseful;
var yVel:Number;// = 0
var myRow:Number;
var dead:Boolean;
var myParent:Object;
var mC:Object;
var arrayIndex:Number;
var velocities:Object;
var xOrigin:Number;// = 0
var yOrigin:Number;// = 0
function GameMissile(clip, rt2, xStart, yStart, type, useF, velocityObj, sp, myP, myD, myY){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
rt = rt2;
Useful = useF;
myParent = myP;
myDamage = myD;
myRow = myY;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
speed = sp;
dead = false;
mC = clip;
mType = type;
trailDelay = 2;
updatePosition();
velocities = new Object();
velocities.gravity = velocityObj.gravity;
if (type == "bullet"){
xVel = (velocityObj.vx * speed);
yVel = (velocityObj.vy * speed);
} else {
if (type == "bomb"){
xVel = (velocityObj.vx * speed);
yVel = (velocityObj.vy * speed);
} else {
if (type == "grenade"){
velocities.gravity = velocityObj.gravity;
velocities.steps = velocityObj.steps;
velocities.xStep = velocityObj.xStep;
velocities.yStep = velocityObj.yStep;
xVel = velocities.xStep;
yVel = velocities.yStep;
};
};
};
}
function applyGravity(){
yVel = (yVel + velocities.gravity);
}
function mainLoop(){
if (dead == true){
remove();
} else {
if (mType == "bomb"){
checkForGround();
checkForOffStage();
} else {
if (mType == "laserMothership"){
} else {
if (mType == "bullet"){
checkForOffStage();
collisionDetection();
} else {
checkForOffStage();
applyGravity();
collisionDetection();
};
};
};
updatePosition();
};
}
function checkForOffStage(){
if (mC.x < 0){
remove();
};
if (mC.y < -300){
remove();
};
if (mC.x > 700){
remove();
};
if (mC.y > 600){
remove();
};
}
function updatePosition(){
var oldX:*;
var oldY:*;
var dx:Number;
var dy:Number;
var angle2:Number;
xPos = (xPos + xVel);
yPos = (yPos + yVel);
oldX = mC.x;
oldY = mC.y;
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
dx = (mC.x - oldX);
dy = (mC.y - oldY);
angle2 = Math.atan2(dy, dx);
mC.rotation = ((angle2 * 180) / Math.PI);
}
function mCDeath(){
}
function checkForGround(){
var sprY:Number;
var explosionMc:*;
sprY = int((mC.y / rt.blockSizeY));
if (myRow == sprY){
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 40, true, false, false, 8, 10, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 2, 40, true, false, false, 8, 10, myParent.mC.goodBad, myRow));
explosionMc = new bigExplosion();
explosionMc.x = mC.x;
explosionMc.y = mC.y;
rt.inGameMissilesMc.addChild(explosionMc);
rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1);
rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1);
remove();
dead = true;
};
}
function remove(){
var arrayIndex:Number;
var i1:*;
if (dead == false){
arrayIndex = -1;
i1 = 0;
while (i1 < rt.missilesArray.length) {
if (this == rt.missilesArray[i1]){
arrayIndex = i1;
};
i1++;
};
if (arrayIndex >= 0){
if (mC != null){
if (mC.parent != null){
rt.inGameMissilesMc.removeChild(mC);
};
};
};
dead = true;
};
}
function collisionDetection(){
var parentGood:Boolean;
var i2:int;
var sss:*;
var doCheck:Boolean;
var poisonGroundMc:*;
var xx:Number;
var yy:Number;
var xx2:Number;
var yy2:Number;
var parentSame:Boolean;
parentGood = false;
if (myParent.mC.goodBad == false){
parentGood = true;
} else {
if (myParent.ImGood == true){
parentGood = true;
};
};
if (parentGood == true){
i2 = 0;
while (i2 < rt.badGuysArray.length) {
sss = rt.badGuysArray[i2].mC;
doCheck = false;
if (mC.hitTestObject(sss)){
sss.myObject.myDamageDelay = 1;
if (myParent.mC.goodBad == true){
sss.myObject.decreaseEnergy(myDamage);
} else {
if (myParent.catapultFireUpg == true){
sss.myObject.decreaseEnergy((myDamage + 20));
} else {
if (myParent.fireballsUpg == true){
sss.myObject.decreaseEnergy((myDamage + 30));
} else {
sss.myObject.decreaseEnergy(myDamage);
};
};
if (myParent.poisonGroundUpg == true){
poisonGroundMc = new poisonGround(rt);
rt.poisonGroundArray.push(poisonGroundMc);
poisonGroundMc.x = mC.x;
poisonGroundMc.y = mC.y;
rt.inGamePickupsMc.addChild(poisonGroundMc);
};
if (myParent.iceBoltsUpg == true){
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 3, rt.Useful, 17, 2, 20, true, false, false, 8, 1, myParent.mC.goodBad, myRow));
};
};
if (mType == "grenade"){
rt.Sounds.playSoundFx("explosionFx", 1, 0, 1);
if (myParent.mC.myType == "knight3"){
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 4, myParent.mC.goodBad, myRow));
} else {
if (myParent.mC.myType == "knight4"){
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 4, myParent.mC.goodBad, myRow));
} else {
if (myParent.mC.myType == "rocketTower"){
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 30, true, false, false, 8, 5, myParent.mC.goodBad, myRow));
} else {
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 3, myParent.mC.goodBad, myRow));
};
};
};
} else {
if (myParent.mC.myType == "archer"){
rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 3, myParent.mC.goodBad, myRow));
};
};
rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1);
remove();
dead = true;
break;
};
i2++;
};
if (mType == "bullet"){
doCheck = false;
if (myParent.mC.myType == "wizard"){
doCheck = true;
} else {
if (myParent.mC.myType == "knight4"){
doCheck = true;
} else {
if (myParent.mC.myType == "gunTower"){
doCheck = true;
};
};
};
if (doCheck == true){
xx = int((mC.x / rt.blockSize));
yy = int((mC.y / rt.blockSize));
if (xx < 27){
if (yy < 19){
if (xx >= 0){
if (yy >= 0){
if (rt.grid[yy][xx].sp == undefined){
xx2 = int((myParent.mC.x / rt.blockSize));
yy2 = int((myParent.mC.y / rt.blockSize));
parentSame = false;
if (xx == xx2){
if (yy == yy2){
parentSame = true;
};
};
if (parentSame == false){
if (rt.grid[yy][xx].t == 2){
if (myParent.mC.myObject.onTower == 0){
rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1);
remove();
dead = true;
};
};
};
} else {
doCheck = false;
if (rt.grid[yy][xx].sp.myType == "knight"){
doCheck = true;
} else {
if (rt.grid[yy][xx].sp.myType == "brickWall"){
doCheck = true;
} else {
if (rt.grid[yy][xx].sp.myType == "barbedWire"){
doCheck = true;
};
};
};
if (doCheck == true){
xx2 = int((myParent.mC.x / rt.blockSize));
yy2 = int((myParent.mC.y / rt.blockSize));
parentSame = false;
if (xx == xx2){
if (yy == yy2){
parentSame = true;
};
};
if (parentSame == false){
if (rt.grid[yy][xx].t == 2){
if (myParent.mC.myObject.onTower == 0){
rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1);
remove();
dead = true;
};
};
};
};
};
};
};
};
};
};
};
} else {
i2 = 0;
while (i2 < rt.inGameGoodGuysMc.numChildren) {
if (rt.inGameGoodGuysMc.getChildAt(i2) != rt.Box2d.bodyGrabbed){
sss = rt.inGameGoodGuysMc.getChildAt(i2);
if (sss.goodBad == false){
if (sss.myType != "knight"){
doCheck = false;
if (sss.myObject.dead == false){
if (mC.hitTestObject(sss)){
if (sss.myObject != null){
if (sss.myType == "kingGood"){
} else {
if (sss.goodBad == false){
if (myParent.mC.myType == "ram"){
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 3, rt.Useful, 17, 2, 20, true, false, false, 8, 1, myParent.mC.goodBad, myRow));
} else {
sss.myObject.myDamageDelay = 1;
sss.myObject.decreaseEnergy(myDamage, this);
if (myParent.mC.myType == "witch"){
if (sss.myObject.witchSpell != true){
sss.myObject.witchSpell = true;
sss.myObject.witchSpellDelay = 40;
};
};
};
};
};
} else {
if (sss.myType == "kingGood"){
rt.decreaseEnergy(int((myDamage / 4)));
} else {
sss.decreaseEnergy(myDamage, this);
};
};
if (mType == "grenade"){
rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 3, myParent.mC.goodBad, myRow));
} else {
if (myParent.mC.myType == "badKnight1"){
rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 3, myParent.mC.goodBad, myRow));
} else {
if (myParent.mC.myType == "viking1"){
rt.Sounds.playSoundFx("mainGunMissileHitFx", 1, 0, 1);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 17, 2, 20, true, false, false, 8, 0, myParent.mC.goodBad, myRow));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, rt.Useful, 7, 1, 20, true, false, false, 8, 3, myParent.mC.goodBad, myRow));
};
};
};
rt.Sounds.playSoundFx("hitEnemyFx", 1, 0, 1);
remove();
dead = true;
break;
};
};
};
};
};
i2++;
};
};
}
}
}//package classesAS3
Section 41
//GameMonsterIcon (classesAS3.GameMonsterIcon)
package classesAS3 {
import flash.display.*;
import flash.text.*;
public class GameMonsterIcon extends MovieClip {
public var myName:String;// = null
public var rt:Object;
public var waveNumber:Number;// = 0
public var nameTxt:TextField;
public function GameMonsterIcon(rt2, myN){
waveNumber = 0;
myName = null;
super();
rt = rt2;
myName = myN;
nameTxt.text = myName;
}
}
}//package classesAS3
Section 42
//GameMultipleExplosion (classesAS3.GameMultipleExplosion)
package classesAS3 {
import flash.display.*;
public class GameMultipleExplosion extends MovieClip {
public var yPos:Number;
public var numberOfExplosions:Number;
public var areaWidth:Number;
var delayToExplosion:Number;
var mType:Number;
public var rt:Object;
var Useful:GameUseful;
public var xPos:Number;
public function GameMultipleExplosion(rt2, useF, numberOfE, xx, yy, areaW, delay, mT){
super();
rt = rt2;
mType = mT;
numberOfExplosions = numberOfE;
xPos = xx;
yPos = yy;
areaWidth = areaW;
Useful = useF;
delayToExplosion = delay;
}
function mainLoop(){
var xx:Number;
var yy:Number;
delayToExplosion--;
if (delayToExplosion == 0){
delayToExplosion = Useful.RandomNumber(1, 8);
xx = (xPos + Useful.RandomNumber(1, areaWidth));
yy = (rt.alienBaseMc.y + Useful.RandomNumber(1, areaWidth));
};
}
}
}//package classesAS3
Section 43
//GameOverMsgAnim (classesAS3.GameOverMsgAnim)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import com.adobe.crypto.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
public class GameOverMsgAnim extends MovieClip {
public var m:MovieClip;
public var rt:Object;
public function GameOverMsgAnim(rt2){
super();
addFrameScript(9, frame10, 22, frame23);
rt = rt2;
this.play();
}
function frame10(){
stop();
}
function frame23(){
MovieClip(this).rt.quitGame();
stop();
}
public function buttonPressed(Name, Score){
var variables:URLVariables;
var request:URLRequest;
var loader:URLLoader;
if (rt.rt.policyLoaded == false){
rt.rt.policyLoaded = true;
Security.loadPolicyFile("http://hiscore.arcadebomb.com/crossdomain.xml");
};
variables = new URLVariables();
variables.n = Name;
variables.s = Score;
variables.t = new Date().getTime();
variables.k = Math.floor((Math.random() * 100));
variables.m = MD5.hash(("" + ((Score + variables.k) * 6061)));
request = new URLRequest("http://hiscore.arcadebomb.com/questpower2_submit.php");
request.method = "POST";
request.data = variables;
loader = new URLLoader();
loader.load(request);
loader.addEventListener(Event.COMPLETE, goodjob);
}
function goodjob(e:Event):void{
}
}
}//package classesAS3
Section 44
//GamePanelBuyMc (classesAS3.GamePanelBuyMc)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class GamePanelBuyMc extends MovieClip {
var buildFinished:Boolean;
var itemCosts:Array;
public var itemsMc:panelItems;
public var rt:Object;
public var myIndex:Number;
public var rollOverCostMc:GameRollOverCost;
public var pBtn:SimpleButton;
public var back:panelManBack;
public function GamePanelBuyMc(rt2, ind){
itemCosts = new Array(5, 40, 70, 100, 50, 65, 75, 150, 70, 100, 150, 200, 200, 300, 10);
super();
addFrameScript(0, frame1);
rt = rt2;
buildFinished = false;
myIndex = ind;
this.pBtn.addEventListener(MouseEvent.MOUSE_OVER, doCostRollOverB);
this.pBtn.addEventListener(MouseEvent.MOUSE_OUT, doCostRollOutB);
}
public function setupRollOut(){
if (rt.rollOverCostMc != null){
rt.rollOverCostMc.parent.removeChild(rt.rollOverCostMc);
rt.rollOverCostMc = null;
};
}
function frame1(){
stop();
}
function doCostRollOverB(e:MouseEvent):void{
setupRollOverCost();
}
public function setupRollOverCost(){
if (rt.rollOverCostMc == null){
if (rt.canIAfford(itemCosts[myIndex])){
rt.rollOverCostMc = new GameRollOverCost(myIndex);
} else {
rt.rollOverCostMc = new GameRollOverCost2();
};
this.addChild(rt.rollOverCostMc);
} else {
rt.rollOverCostMc.parent.removeChild(rt.rollOverCostMc);
if (rt.canIAfford(itemCosts[myIndex])){
rt.rollOverCostMc = new GameRollOverCost(myIndex);
} else {
rt.rollOverCostMc = new GameRollOverCost2();
};
this.addChild(rt.rollOverCostMc);
};
}
function doCostRollOutB(e:MouseEvent):void{
setupRollOut();
}
}
}//package classesAS3
Section 45
//GamePanelUpgrades (classesAS3.GamePanelUpgrades)
package classesAS3 {
import flash.display.*;
public class GamePanelUpgrades extends MovieClip {
var buildFinished:Boolean;
public var icons:MovieClip;
public var lockMc:MovieClip;
public var myIndex:Number;
public var upgradeBtn:SimpleButton;
public var rt:Object;
public var back:MovieClip;
public function GamePanelUpgrades(rt2, ind){
super();
addFrameScript(0, frame1);
rt = rt2;
buildFinished = false;
myIndex = ind;
}
function frame1(){
back.gotoAndStop(1);
stop();
}
}
}//package classesAS3
Section 46
//GameParticle (classesAS3.GameParticle)
package classesAS3 {
import flash.display.*;
public class GameParticle extends MovieClip {
var bounces:Number;
var yPos:Number;// = 0
var xVel:Number;// = 0
var myDamage:Number;
var gravity:Boolean;
var mType:Number;
var speed:Number;
var yVel:Number;// = 0
var mC:Object;
var rt:Object;
var dead:Boolean;
var myRow:Number;
var artillary:Boolean;
var Useful:GameUseful;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var gravityValue:Number;
var myParentGB:Boolean;
var endX:Number;
var endY:Number;
var arrayIndex:Number;
var explodeDistance:Number;
var yOrigin:Number;// = 0
public function GameParticle(rt2, useF, xStart, yStart, type, vx, vy, edX, edY, art, grav, dist, speed, myD, myGB, myR){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
rt = rt2;
Useful = useF;
myRow = myR;
artillary = art;
gravity = grav;
myDamage = myD;
myParentGB = myGB;
explodeDistance = dist;
xOrigin = xStart;
yOrigin = yStart;
gravityValue = 0;
endX = edX;
endY = edY;
xPos = 0;
yPos = 0;
bounces = 0;
dead = false;
xVel = (vx * speed);
yVel = (vy * speed);
mC = this;
mType = type;
mC.gotoAndStop(mType);
updatePosition();
}
function updatePosition(){
var oldX:Number;
var oldY:Number;
var dx:Number;
var dy:Number;
var angle2:Number;
xPos = (xPos + xVel);
yPos = (yPos + yVel);
oldX = x;
oldY = y;
x = (xOrigin + xPos);
y = (yOrigin + yPos);
dx = (x - oldX);
dy = (y - oldY);
angle2 = Math.atan2(dy, dx);
rotation = ((angle2 * 180) / Math.PI);
}
function mainLoop(){
var explodeLength:Number;
if (dead == false){
explodeLength = Useful.getDistance(x, y, endX, endY);
if (artillary == true){
if (explodeLength > (explodeDistance / 2)){
scaleX = (scaleX + 40);
scaleY = scaleX;
} else {
scaleX = (scaleX - 35);
scaleY = scaleX;
};
};
if (gravity == true){
gravityValue = (gravityValue + 0.2);
yVel = (yVel + gravityValue);
};
if (explodeLength > (explodeDistance + 10)){
if (this.parent != null){
remove();
};
};
if (myDamage != 0){
collisionDetection();
};
updatePosition();
};
}
function checkForOffStage(){
if (mC.x < 0){
remove();
};
if (mC.y < 0){
remove();
};
if (mC.x > 1700){
remove();
};
}
function collisionDetection(){
var dead2:Boolean;
var sss:Number;
var i2:int;
var badGuy:*;
var noFreeze:Boolean;
var freezeObject:Object;
var found:Boolean;
var i3:int;
dead2 = false;
sss = rt.Useful.RandomNumber(1, 10);
if (sss > 4){
if (myParentGB == true){
i2 = 0;
while (i2 < rt.goodGuysArray.length) {
badGuy = rt.goodGuysArray[i2];
if (myRow == badGuy.currentMapIndexY){
if (badGuy.mC.myType != "jet"){
if (mC.hitTestObject(badGuy.mC)){
noFreeze = false;
if (this.currentFrame == 3){
if (badGuy.mC.myType == "banshee"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "evilWizard"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "witch"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "dragon"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "demon"){
noFreeze = true;
};
};
};
};
};
if (noFreeze == false){
freezeObject = new Object();
freezeObject.mC = badGuy.mC;
freezeObject.colourValue = 14540287;
freezeObject.colourMult = 0;
freezeObject.toDefrost = 0;
freezeObject.defrost = false;
found = false;
i3 = 0;
while (i3 < rt.frozenArray.length) {
if (rt.frozenArray[i3].mC == badGuy.mC){
found = true;
break;
};
i3++;
};
if (found == false){
rt.frozenArray.push(freezeObject);
};
badGuy.frozen = true;
} else {
badGuy.myDamageDelay = 1;
badGuy.decreaseEnergy(5);
};
} else {
badGuy.myDamageDelay = 1;
badGuy.decreaseEnergy(myDamage);
};
dead2 = true;
};
};
};
i2++;
};
} else {
i2 = 0;
while (i2 < rt.badGuysArray.length) {
badGuy = rt.badGuysArray[i2];
noFreeze = false;
if (mC.hitTestObject(badGuy.mC)){
if (this.currentFrame == 3){
if (badGuy.mC.myType == "banshee"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "evilWizard"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "witch"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "dragon"){
noFreeze = true;
} else {
if (badGuy.mC.myType == "demon"){
noFreeze = true;
};
};
};
};
};
if (noFreeze == false){
freezeObject = new Object();
freezeObject.mC = badGuy.mC;
freezeObject.colourValue = 14540287;
freezeObject.colourMult = 0;
freezeObject.toDefrost = 0;
freezeObject.defrost = false;
found = false;
i3 = 0;
while (i3 < rt.frozenArray.length) {
if (rt.frozenArray[i3].mC == badGuy.mC){
found = true;
break;
};
i3++;
};
if (found == false){
rt.frozenArray.push(freezeObject);
};
badGuy.frozen = true;
} else {
badGuy.myDamageDelay = 1;
badGuy.decreaseEnergy(5);
};
} else {
badGuy.myDamageDelay = 1;
badGuy.decreaseEnergy(myDamage);
};
dead2 = true;
};
i2++;
};
};
};
if (dead2 == true){
remove();
};
}
function mCDeath(){
}
function remove(){
var arrayIndex:Number;
var i1:*;
arrayIndex = -1;
i1 = 0;
while (i1 < rt.particlesArray.length) {
if (this == rt.particlesArray[i1]){
arrayIndex = i1;
};
i1++;
};
if (this.parent != null){
this.parent.removeChild(this);
};
if (arrayIndex != -1){
rt.particlesArray.splice(arrayIndex, 1);
};
this.stop();
}
}
}//package classesAS3
Section 47
//GamePheonix (classesAS3.GamePheonix)
package classesAS3 {
import flash.display.*;
public class GamePheonix extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GamePheonix(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
}
}//package classesAS3
Section 48
//GamePlane (classesAS3.GamePlane)
package classesAS3 {
import flash.display.*;
public class GamePlane extends MovieClip {
public var soldierStart:Number;
public var xVel:Number;
public var soldierType:Array;
public var myObject:Object;
public var soldierDone:Number;
public var myParent:Object;
public var rt:Object;
public function GamePlane(myP, rt2){
super();
myParent = myP;
rt = rt2;
xVel = 0;
soldierDone = 0;
soldierType = new Array();
}
function updatePosition(){
this.x = (this.x + xVel);
}
function dropNow(){
rt.setupSoldier(soldierType[0], this.x, this.y);
soldierType.shift();
if (this.x < 200){
soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 100), this.x);
} else {
soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 100), 200);
};
}
public function mainLoop(){
updatePosition();
if (this.x < -100){
myParent.removeChild(this);
rt.planeMc = null;
this.stop();
};
if (soldierType.length > 0){
if (this.x < soldierStart){
rt.setupSoldier(soldierType[0], this.x, this.y);
soldierType.shift();
if (this.x < 200){
soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 130), this.x);
} else {
soldierStart = rt.Useful.RandomNumber(((this.x / 2) + 130), 200);
};
};
};
}
}
}//package classesAS3
Section 49
//GamePlayer (classesAS3.GamePlayer)
package classesAS3 {
import flash.display.*;
public class GamePlayer {
var playerdown:Number;// = 0
var xVel:Number;// = 0
var shotsLimit:Number;
var moveplayerup:Number;// = 0
var yOrigin:Number;// = 0
var multidirectional:Number;// = 0
var yPos:Number;// = 0
var dy:Number;// = 0
var gunFired:Boolean;
var santaspeed:Number;// = 2
var yVelOld:Number;// = 0
var vectorData:Object;
var rotateGunDown:Boolean;
var jumpTime:Number;
var dx:Number;// = 0
var numberOfMissiles:Number;
var jump:Number;// = 0
var Oldplayerleft:Number;// = 0
var shotsFired:Number;
var missileDistFromGun:Number;
var xPos:Number;// = 0
var xOrigin:Number;// = 0
var myinstance:Object;
var rt:Object;
var Oldplayerup:Number;// = 0
var Oldplayerdown:Number;// = 0
var playerup:Number;// = 0
var mouseButton:Number;
var keypress:Number;
var mygraphic:Object;
var Useful:GameUseful;
var angle:Number;// = 0
var playerright:Number;// = 0
var rotateGunUp:Boolean;
var xVelOld:Number;// = 0
var yVel:Number;// = 0
var gunRotation:Number;
var playerleft:Number;// = 0
var levelDir:Number;
var shotStrength:Number;
var energyLevel:Boolean;
var fireDelay:Number;
var n:Number;
var s:Number;// = 0
var Oldplayerright:Number;// = 0
var mC:MovieClip;
var scrollSpeed:Number;
public function GamePlayer(clip, rt2, uu){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
s = 0;
playerleft = 0;
playerright = 0;
jump = 0;
moveplayerup = 0;
playerdown = 0;
playerup = 0;
Oldplayerup = 0;
Oldplayerdown = 0;
Oldplayerright = 0;
Oldplayerleft = 0;
xVel = 0;
yVel = 0;
xVelOld = 0;
yVelOld = 0;
santaspeed = 2;
multidirectional = 0;
dx = 0;
dy = 0;
angle = 0;
super();
mC = clip;
rt = rt2;
Useful = uu;
missileDistFromGun = 40;
xOrigin = mC.x;
yOrigin = mC.y;
dx = 0;
dy = 0;
angle = 0;
shotsFired = 0;
shotsLimit = 2;
gunFired = false;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
xVelOld = 0;
numberOfMissiles = 0;
yVelOld = 0;
scrollSpeed = 10;
keypress = 0;
jump = 0;
jumpTime = 10;
mouseButton = 0;
shotStrength = 6;
gunRotation = 180;
rotateGunUp = false;
rotateGunDown = false;
vectorData = new Object();
energyLevel = false;
levelDir = 1;
fireDelay = 0;
updatePosition();
}
function updatePosition(){
}
function decreaseEnergy(damage){
}
function mainLoop(){
}
}
}//package classesAS3
Section 50
//GameRam1 (classesAS3.GameRam1)
package classesAS3 {
import flash.display.*;
public class GameRam1 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameRam1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 51
//GameRisingMoney (classesAS3.GameRisingMoney)
package classesAS3 {
import flash.display.*;
public class GameRisingMoney extends MovieClip {
public var inGameScoreMc:Sprite;
public var txt:risingMoneyTxt;
public var scoreNumber:Number;
public var rt:Object;
public function GameRisingMoney(rt2, inGame, scoreN){
super();
addFrameScript(22, frame23);
rt = rt2;
inGameScoreMc = inGame;
scoreNumber = scoreN;
txt.moneyTxt.text = String(scoreN);
}
function frame23(){
this.inGameScoreMc.removeChild(this);
stop();
}
}
}//package classesAS3
Section 52
//GameRisingScore (classesAS3.GameRisingScore)
package classesAS3 {
import flash.display.*;
public class GameRisingScore extends MovieClip {
public var inGameScoreMc:Sprite;
public var txt:MovieClip;
public var scoreNumber:Number;
public var rt:Object;
public function GameRisingScore(rt2, inGame, scoreN){
super();
addFrameScript(15, frame16);
rt = rt2;
inGameScoreMc = inGame;
scoreNumber = scoreN;
txt.scoreTxt.text = ("+" + String(scoreNumber));
}
function frame16(){
this.inGameScoreMc.removeChild(this);
stop();
}
}
}//package classesAS3
Section 53
//GameRocketTower (classesAS3.GameRocketTower)
package classesAS3 {
import flash.display.*;
public class GameRocketTower extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameRocketTower(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 54
//GameRollOverCost (classesAS3.GameRollOverCost)
package classesAS3 {
import flash.display.*;
import flash.text.*;
public class GameRollOverCost extends MovieClip {
var itemCosts:Array;
public var itemCostTxt:TextField;
public function GameRollOverCost(ind){
itemCosts = new Array(5, 40, 70, 100, 50, 65, 75, 150, 70, 100, 150, 200, 200, 300, 10);
super();
this.itemCostTxt.text = itemCosts[ind];
}
}
}//package classesAS3
Section 55
//GameSkeleton (classesAS3.GameSkeleton)
package classesAS3 {
import flash.display.*;
public class GameSkeleton extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameSkeleton(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
}
}//package classesAS3
Section 56
//GameSorcerer (classesAS3.GameSorcerer)
package classesAS3 {
import flash.display.*;
public class GameSorcerer extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameSorcerer(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myParent.removeChild(this);
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -250){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 57
//GameSounds (classesAS3.GameSounds)
package classesAS3 {
import flash.media.*;
import flash.utils.*;
public class GameSounds {
var rt:Object;
var currentChannel:SoundChannel;
var soundsArray:Array;
var fadeOutArray:Array;
public function GameSounds(rt2){
super();
rt = rt2;
fadeOutArray = new Array();
soundsArray = new Array();
}
public function playSoundFx(sound:String, vol:Number, startI:Number, numLoops:Number):SoundChannel{
var soundFxClass:Class;
var soundFx:*;
if (rt.soundsSwitch == true){
soundFxClass = Class(getDefinitionByName(sound));
soundFx = new (soundFxClass);
currentChannel = soundFx.play(startI, numLoops);
setVolume(currentChannel, vol);
return (currentChannel);
};
return (null);
}
public function FadeOut(channel){
var transform1:SoundTransform;
var vol:Number;
var i2:*;
transform1 = channel.soundTransform;
vol = transform1.volume;
vol = (vol - 0.1);
setVolume(channel, vol);
if (vol <= 0){
i2 = 0;
while (i2 < fadeOutArray.length) {
if (fadeOutArray[i2] == channel){
fadeOutArray.splice(i2, 1);
};
i2++;
};
};
}
public function setupFadeOut(){
fadeOutArray.push(currentChannel);
}
public function setVolume(ch:SoundChannel, vol:Number):void{
var transform1:SoundTransform;
if (ch != null){
transform1 = ch.soundTransform;
transform1.volume = vol;
ch.soundTransform = transform1;
};
}
public function mainLoop(){
var i:*;
i = 0;
while (i < fadeOutArray.length) {
FadeOut(fadeOutArray[i]);
i++;
};
}
public function stopAllMySounds(){
SoundMixer.stopAll();
}
}
}//package classesAS3
Section 58
//GameSpider (classesAS3.GameSpider)
package classesAS3 {
import flash.display.*;
public class GameSpider extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameSpider(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
}
}//package classesAS3
Section 59
//GameStartMsg (classesAS3.GameStartMsg)
package classesAS3 {
import flash.display.*;
import flash.events.*;
public class GameStartMsg extends MovieClip {
public var textBox:startGameMsg;
public var rt:Object;
public function GameStartMsg(rt2){
super();
addFrameScript(284, frame285);
rt = rt2;
}
function frame285(){
this.removeMe();
stop();
}
function finishStuff(event:MouseEvent):void{
this.gotoAndStop("startGame");
}
public function removeMe(){
rt.rt.startChat();
rt.inGameMsgsMc.removeChild(this);
rt.startGameMsgMc = null;
stop();
}
}
}//package classesAS3
Section 60
//GameTiles (classesAS3.GameTiles)
package classesAS3 {
import flash.display.*;
public class GameTiles extends MovieClip {
public var myType:String;
public var rt:Object;
public var tilesArray:Array;
public function GameTiles(rt2){
super();
rt = rt2;
}
public function clearTilesArray(){
var iy:*;
var ix:*;
tilesArray = new Array();
iy = 0;
while (iy < int(rt.levelHeightBlocks)) {
tilesArray[iy] = new Array();
ix = 0;
while (ix < int(rt.levelWidthBlocks)) {
if (iy == 0){
tilesArray[iy][ix] = new MapTile(this, "noPlot");
} else {
if (iy == (rt.levelHeightBlocks - 1)){
tilesArray[iy][ix] = new MapTile(this, "noPlot");
} else {
if (ix == 0){
tilesArray[iy][ix] = new MapTile(this, "noPlot");
} else {
if (ix == (rt.levelWidthBlocks - 1)){
tilesArray[iy][ix] = new MapTile(this, "noPlot");
} else {
tilesArray[iy][ix] = new MapTile(this, "noTile");
};
};
};
};
ix++;
};
iy++;
};
}
public function getMapTile(xx:Number, yy:Number):Object{
var tileObject:Object;
tileObject = new Object();
if (tilesArray[yy][xx].myType == "noPlot"){
tileObject.usage = "noPlot";
} else {
if (tilesArray[yy][xx].myType == "noTile"){
tileObject.usage = "noTile";
} else {
tileObject.usage = "object";
};
};
tileObject.tile = tilesArray[yy][xx];
return (tileObject);
}
public function setMapTile(xx:Number, yy:Number, spriteObject:Object){
var sprX:Number;
var sprY:Number;
sprX = int((xx / rt.blockSize));
sprY = int((yy / rt.blockSizeY));
tilesArray[sprY][sprX] = spriteObject;
}
public function setMap(xx:Number, yy:Number, spriteObject:Object){
tilesArray[yy][xx] = spriteObject;
}
public function getMap_XY(xx:Number, yy:Number):Object{
var sprX:Number;
var sprY:Number;
sprX = int((xx / rt.blockSize));
sprY = int((yy / rt.blockSize));
return (tilesArray[sprY][sprX]);
}
public function setMapClear(xx, yy){
var newTile:*;
if (xx > 0){
newTile = new MapTile(this, "noTile");
} else {
newTile = new MapTile(this, "noPlot");
};
setMap(xx, yy, newTile);
}
}
}//package classesAS3
Section 61
//GameTitleScreen (classesAS3.GameTitleScreen)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
public class GameTitleScreen extends MovieClip {
public var backBtn:SimpleButton;
public var musicBtn:SimpleButton;
public var sparkleDelay:Number;// = 0
public var survivalGameBtn:SimpleButton;
public var loadGameBtn:SimpleButton;
public var vidBtns:MovieClip;
public var moreGamesBtn:SimpleButton;
public var unitsBtn:SimpleButton;
public var txt:MovieClip;
public var instructionsBtn:SimpleButton;
public var rt:Object;
public var titleS:MovieClip;
public var musicMc:MovieClip;
public var playBtn:SimpleButton;
public var controlsBtn:SimpleButton;
public var highScoresBtn:SimpleButton;
public var addThisBtn:SimpleButton;
public var fgmBtn:MovieClip;
public function GameTitleScreen(rt2){
sparkleDelay = 0;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 6, frame7, 9, frame10);
rt = rt2;
sparkleDelay = rt.GameMain.Useful.RandomNumber(10, 100);
}
public function gotoArcD(e:MouseEvent):void{
}
function frame10(){
rt.showLeaderBoard2(this);
}
public function doHighScores(e:MouseEvent):void{
gotoAndStop("highscores");
}
function frame3(){
rt.doInstrBtns();
}
public function gotoFGM(e:MouseEvent):void{
navigateToURL(new URLRequest("http://www.flashgamemaker.com"), "_blank");
}
function frame7(){
rt.doContrBtns();
}
public function getScores(){
var handleComplete:Function;
var onIOError:Function;
handleComplete = function (event:Event):void{
};
onIOError = function (event:IOErrorEvent):void{
};
if (rt.policyLoaded == false){
rt.policyLoaded = true;
};
}
function frame4(){
rt.doUnitsBtns();
}
function frame1(){
addThisBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArcD, false);
moreGamesBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoBored2, false);
highScoresBtn.addEventListener(MouseEvent.MOUSE_DOWN, doHighScores, false);
fgmBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoFGM, false);
rt.doTitleScreenStuff();
stop();
}
public function gotoBored2(e:MouseEvent):void{
navigateToURL(new URLRequest("http://www.bored.com"), "_blank");
}
function frame2(){
playBtn.addEventListener(MouseEvent.MOUSE_DOWN, rt.doMapScreen, false);
loadGameBtn.addEventListener(MouseEvent.MOUSE_UP, rt.doMapScreenOld, false);
survivalGameBtn.addEventListener(MouseEvent.MOUSE_UP, rt.doSurvivalSetup, false);
}
}
}//package classesAS3
Section 62
//GameUnicorn (classesAS3.GameUnicorn)
package classesAS3 {
import flash.display.*;
public class GameUnicorn extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameUnicorn(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
}
}//package classesAS3
Section 63
//GameUpgradeEffect (classesAS3.GameUpgradeEffect)
package classesAS3 {
import flash.display.*;
public class GameUpgradeEffect extends MovieClip {
public var myParent:Object;
public var rt:Object;
public function GameUpgradeEffect(rt2, myP){
super();
addFrameScript(19, frame20);
rt = rt2;
myParent = myP;
}
public function removeMe(){
myParent.removeChild(this);
this.stop();
}
function frame20(){
MovieClip(this).removeMe();
stop();
}
}
}//package classesAS3
Section 64
//GameUseful (classesAS3.GameUseful)
package classesAS3 {
import flash.display.*;
public class GameUseful {
public var rt:Object;
public function GameUseful(rt2){
super();
rt = rt2;
}
function addThrust(rot, speed){
var thrustVectors:Object;
thrustVectors = new Object();
thrustVectors.xVel = (Math.cos(radian(rot)) * speed);
thrustVectors.yVel = (Math.sin(radian(rot)) * speed);
return (thrustVectors);
}
function rotateXY(centerX, centerY, radius, ringAngle){
var scA:Number;
var vectorData:Object;
scA = ((Math.PI * ringAngle) / 180);
vectorData = new Object();
vectorData.xPos = (centerX + (Math.cos(scA) * radius));
vectorData.yPos = (centerY + (Math.sin(scA) * radius));
return (vectorData);
}
public function getDistanceQ(xx1, yy1, xx2, yy2){
var nn:Number;
nn = (xx2 - xx1);
nn = Math.abs(nn);
return (nn);
}
function localToGlobalXY2(mc1:MovieClip):Object{
var temp:Object;
var clip:*;
var xs:*;
var ys:*;
var r:*;
temp = new Object();
temp.newX = 0;
temp.newY = 0;
clip = mc1;
while (clip != rt.parent) {
xs = (temp.newX * (clip.scaleX / 1));
ys = (temp.newY * (clip.scaleY / 1));
r = (clip.rotation * (Math.PI / 180));
temp.newX = ((xs * Math.cos(r)) - (ys * Math.sin(r)));
temp.newY = ((xs * Math.sin(r)) + (ys * Math.cos(r)));
temp.newX = (temp.newX + clip.x);
temp.newY = (temp.newY + clip.y);
clip = clip.parent;
};
return (temp);
}
function localToGlobalXY(mc1:MovieClip):Object{
var temp:Object;
var clip:*;
var xs:*;
var ys:*;
var r:*;
temp = new Object();
temp.newX = 0;
temp.newY = 0;
clip = mc1;
while (clip != rt.parent) {
xs = temp.newX;
ys = temp.newY;
r = (clip.rotation * (Math.PI / 180));
temp.newX = ((xs * Math.cos(r)) - (ys * Math.sin(r)));
temp.newY = ((xs * Math.sin(r)) + (ys * Math.cos(r)));
temp.newX = (temp.newX + clip.x);
temp.newY = (temp.newY + clip.y);
clip = clip.parent;
};
return (temp);
}
public function getDistance(xx1, yy1, xx2, yy2){
var dx2:Number;
var dy2:Number;
var dx:Number;
var dy:Number;
dx2 = xx1;
dy2 = yy1;
dx = xx2;
dy = yy2;
dx = (dx2 - dx);
dy = (dy2 - dy);
return (Math.sqrt(((dx * dx) + (dy * dy))));
}
public function RandomNumber(xn, yn):Number{
return ((Math.floor((Math.random() * ((1 + yn) - xn))) + xn));
}
function countMcs(mC):Array{
var movieClipsFound:Array;
var n:*;
movieClipsFound = new Array();
n = 0;
for (n in mC) {
if (typeof(mC[n]) == "movieclip"){
movieClipsFound.push(mC[n]);
};
};
return (movieClipsFound);
}
public function orientateToGround(rt, mC){
var leftC:Number;
var rightC:Number;
var xm:*;
var ym:*;
var yy1:Number;
var yy2:Number;
var rotData:Object;
leftC = (mC.x - (mC.width / 2));
rightC = (mC.x + (mC.width / 2));
xm = int(leftC);
ym = (mC.y + rt.spritesMc.y);
yy1 = rt.groundArray[xm];
xm = int(rightC);
yy2 = rt.groundArray[xm];
rotData = pointTowards(leftC, yy1, rightC, yy2);
return ((rotData.spriteRotation - 180));
}
function radian(degree){
return (((degree * Math.PI) / 180));
}
function capVectorSpeed(vx, vy, max):Object{
var vectorSpeedsCapped:Object;
var len:*;
vectorSpeedsCapped = new Object();
len = Math.sqrt(((vx * vx) + (vy * vy)));
if (len > max){
vx = (vx * (max / len));
vy = (vy * (max / len));
};
vectorSpeedsCapped.vx = vx;
vectorSpeedsCapped.vy = vy;
return (vectorSpeedsCapped);
}
function argbtohex(a:Number, r:Number, g:Number, b:Number){
return (((((a << 24) | (r << 16)) | (g << 8)) | b));
}
function getVectorFromAngle(rotationVar):Object{
var vectorObject:Object;
var angle:Number;
vectorObject = new Object();
angle = ((rotationVar * Math.PI) / 180);
vectorObject.vx = Math.cos(angle);
vectorObject.vy = Math.sin(angle);
return (vectorObject);
}
public function getArcVelocity(gravity:Number, speed:Number, xStart:Number, yStart:Number, xEnd:Number, yEnd:Number):Object{
var velocities:Object;
var xd:*;
var yd:*;
var dist:*;
var steps:*;
velocities = new Object();
xd = (xEnd - xStart);
yd = (yEnd - yStart);
dist = Math.sqrt(((xd * xd) + (yd * yd)));
steps = Math.ceil((dist / speed));
velocities.gravity = gravity;
velocities.steps = steps;
velocities.xStep = (xd / steps);
velocities.yStep = (yd / steps);
if (gravity > 0){
velocities.yStep = (velocities.yStep - ((steps * gravity) / 2));
};
return (velocities);
}
function pointTowards(xx, yy, xx2, yy2):Object{
var spriteData:Object;
var dx:*;
var dy:*;
spriteData = new Object();
dx = (xx - xx2);
dy = (yy - yy2);
spriteData.spriteAngle = Math.atan2(dy, dx);
spriteData.spriteRotation = ((spriteData.spriteAngle * 180) / Math.PI);
spriteData.vx = Math.cos(spriteData.spriteAngle);
spriteData.vy = Math.sin(spriteData.spriteAngle);
return (spriteData);
}
function bxConvertToMetres(pixelToConvert:Number, scalingFactor:Number){
return ((pixelToConvert / scalingFactor));
}
function checkForLOS(xx1, yy1, xx2, yy2, backgroundObject){
var dist:Number;
var distObj:Object;
var yy:Number;
var i2:*;
dist = int(getDistance(xx1, yy1, xx2, yy2));
distObj = pointTowards(xx1, yy1, xx2, yy2);
i2 = 0;
while (i2 < dist) {
yy = rt.GameMain.groundArray[int(xx1)];
if (int(yy1) > yy){
return (true);
};
xx1 = (xx1 - distObj.vx);
yy1 = (yy1 - distObj.vy);
i2++;
};
return (false);
}
}
}//package classesAS3
Section 65
//GameValkyrie (classesAS3.GameValkyrie)
package classesAS3 {
import flash.display.*;
public class GameValkyrie extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameValkyrie(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
}
}//package classesAS3
Section 66
//GameWall (classesAS3.GameWall)
package classesAS3 {
import flash.display.*;
public class GameWall extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameWall(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 67
//GameWarlock (classesAS3.GameWarlock)
package classesAS3 {
import flash.display.*;
public class GameWarlock extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameWarlock(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myParent.removeChild(this);
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -250){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 68
//GameWeaponsPanel (classesAS3.GameWeaponsPanel)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
public class GameWeaponsPanel extends MovieClip {
public var musicBtn:SimpleButton;
public var levelTxt:TextField;
public var soundFxBtn:SimpleButton;
public var gridOnOff:MovieClip;
public var gridOvBtn:SimpleButton;
public var rt:Object;
public var energy:TextField;
public var score:TextField;
public var quitBtn:SimpleButton;
public var musicMc:MovieClip;
public var soundFxMc:MovieClip;
public var startWaveMc:startWaveM;// = null
public var aliensLeftTxt:TextField;
public var pausePanelBtn:SimpleButton;
public var money:TextField;
public var rightMc:MovieClip;
public var infoPanel:MovieClip;
public function GameWeaponsPanel(rt2){
startWaveMc = null;
super();
addFrameScript(0, frame1);
rt = rt2;
if (rt.rt.gameMode == "quest"){
startWaveMc = new startWaveM();
this.addChild(startWaveMc);
startWaveMc.x = 557;
startWaveMc.y = -7;
startWaveMc.startWBtn.addEventListener(MouseEvent.MOUSE_DOWN, doWave);
};
}
public function soundSwitch(e:MouseEvent):void{
this.rt.soundFxBtn();
}
public function gridOnOffb(e:MouseEvent):void{
this.rt.switchGrid();
}
function doWave(e:MouseEvent):void{
if (rt.startGameMsgMc == null){
rt.startWave = true;
this.removeChild(startWaveMc);
startWaveMc = null;
};
}
function frame1(){
gridOvBtn.addEventListener(MouseEvent.MOUSE_DOWN, gridOnOffb, false);
quitBtn.addEventListener(MouseEvent.MOUSE_DOWN, quitGame, false);
soundFxBtn.addEventListener(MouseEvent.MOUSE_DOWN, soundSwitch, false);
musicBtn.addEventListener(MouseEvent.MOUSE_DOWN, musicSwitch, false);
pausePanelBtn.addEventListener(MouseEvent.MOUSE_DOWN, pauseSwitch, false);
infoPanel.gotoAndStop(1);
}
public function musicSwitch(e:MouseEvent):void{
this.rt.musicBtn();
}
public function pauseSwitch(e:MouseEvent):void{
this.rt.rt.pauseGame();
}
public function quitGame(e:MouseEvent):void{
this.rt.gameOver("game_over");
}
}
}//package classesAS3
Section 69
//GameViking1 (classesAS3.GameViking1)
package classesAS3 {
import flash.display.*;
public class GameViking1 extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameViking1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 70
//GameWire (classesAS3.GameWire)
package classesAS3 {
import flash.display.*;
public class GameWire extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameWire(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 70;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 71
//GameWitch (classesAS3.GameWitch)
package classesAS3 {
import flash.display.*;
public class GameWitch extends MovieClip {
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var energy:Number;
public var dir:MovieClip;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameWitch(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
removeMe();
}
public function removeMe(){
myObject.remove();
this.stop();
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -50){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function decreaseEnergy(dec){
myObject.decreaseEnergy(dec);
}
}
}//package classesAS3
Section 72
//GameWizard1 (classesAS3.GameWizard1)
package classesAS3 {
import flash.display.*;
public class GameWizard1 extends MovieClip {
public var coll:MovieClip;
public var myType:String;
public var goodBad:Boolean;
public var myObject:Object;
public var mySmoke;
public var collisionWith:MovieClip;
public var collisionWithS:MovieClip;
public var collisionWithW:MovieClip;
public var noRotation:Boolean;
public var myShapeDef:Object;
public var myParent:Object;
public var rt:Object;
public var soldier:MovieClip;
public var energy:Number;
public var filterData:Object;
public var myBodyDef:Object;
public var buildingBit:Boolean;// = false
public function GameWizard1(rt2, bD, sD, mT, myP, gB){
buildingBit = false;
super();
rt = rt2;
myBodyDef = bD;
myShapeDef = sD;
myType = mT;
myParent = myP;
mySmoke = null;
goodBad = gB;
energy = 100;
noRotation = true;
}
function destroyMe(){
if (rt.bodyGrabbed == myBodyDef){
rt.bodyGrabbed = null;
};
rt.m_world.DestroyBody(myBodyDef);
removeMe();
}
public function removeMe(){
myParent.removeChild(this);
}
public function checkOffScreen(){
if (this.x > 1700){
destroyMe();
} else {
if (this.x < -250){
destroyMe();
};
};
if (this.y > 800){
destroyMe();
};
}
public function setupPuffSmoke(){
if (mySmoke == null){
mySmoke = new GameHitFloorSmoke(rt, myParent, this);
mySmoke.x = this.x;
mySmoke.y = this.y;
myParent.addChild(mySmoke);
};
}
}
}//package classesAS3
Section 73
//MapTile (classesAS3.MapTile)
package classesAS3 {
import flash.display.*;
public class MapTile extends MovieClip {
public var myType:String;
public var rt:Object;
public function MapTile(rt2, mT){
super();
rt = rt2;
myType = mT;
}
}
}//package classesAS3
Section 74
//Path (classesAS3.Path)
package classesAS3 {
public class Path {
private var __startCell:Object;
private var __closedList:Array;
private var __hvScore:Number;// = 10
public var shortestPath:Array;
private var __grid:Array;
private var __openList:BinaryHeap;
private var __dScore:Number;// = 14
private var __endCell:Object;
public function Path(grid:Array){
__hvScore = 10;
__dScore = 14;
super();
init(grid);
}
private function calcF(cell:Object):Number{
return ((cell.G + cell.H));
}
private function calcG(cell:Object):Number{
var g:Number;
var curCell:Object;
if (cell.p != undefined){
g = 0;
curCell = cell;
do {
if ((((curCell.r == curCell.p.r)) || ((curCell.c == curCell.p.c)))){
g = (g + __hvScore);
} else {
g = (g + __dScore);
};
curCell = curCell.p;
} while (curCell != __startCell);
return (g);
//unresolved jump
};
return (undefined);
}
private function calcH(cell:Object):Number{
return (((Math.abs((__endCell.r - cell.r)) + Math.abs((__endCell.c - cell.c))) * __hvScore));
}
private function init(grid:Array):void{
var len:Number;
var i:*;
var iLen:Number;
var j:*;
shortestPath = new Array();
__grid = new Array();
__grid = grid.slice();
len = __grid.length;
i = 0;
while (i < len) {
iLen = __grid[i].length;
j = 0;
while (j < iLen) {
grid[i][j].r = i;
grid[i][j].c = j;
j++;
};
i++;
};
__closedList = new Array();
__openList = new BinaryHeap();
}
private function initFind(stCell:Object, endCell:Object):void{
var len:Number;
var i:*;
var m:Number;
var iLen:Number;
var j:*;
var n:Number;
var el:Object;
var ok:Boolean;
shortestPath.splice(0);
__startCell = stCell;
__endCell = endCell;
__closedList.splice(0);
__openList.init();
len = __grid.length;
i = 0;
while (i < len) {
iLen = __grid[i].length;
j = 0;
while (j < iLen) {
__grid[i][j].p = undefined;
__grid[i][j].isInOL = false;
__grid[i][j].isInCL = false;
delete __grid[i][j].i;
j++;
};
i++;
};
__closedList.push(stCell);
stCell.isInOL = false;
stCell.isInCL = true;
m = (stCell.r - 1);
while (m <= (stCell.r + 1)) {
n = (stCell.c - 1);
while (n <= (stCell.c + 1)) {
if ((((((((m > -1)) && ((m < __grid.length)))) && ((n > -1)))) && ((n < __grid[m].length)))){
el = __grid[m][n];
el.p = undefined;
if ((((el.t == 1)) && (!((el == stCell))))){
ok = true;
if (((!((stCell.r == m))) && (!((stCell.c == n))))){
ok = checkDiagonals(stCell, m, n);
};
if (ok){
el.p = stCell;
el.G = calcG(el);
el.H = calcH(el);
el.F = calcF(el);
__openList.addElement(el);
el.isInOL = true;
};
};
};
n++;
};
m++;
};
}
private function getNextCell(curCell:Object):Object{
var i:Number;
var j:Number;
var el:Object;
var ok:Boolean;
i = (curCell.r - 1);
while (i <= (curCell.r + 1)) {
j = (curCell.c - 1);
while (j <= (curCell.c + 1)) {
if ((((((((i > -1)) && ((i < __grid.length)))) && ((j > -1)))) && ((j < __grid[i].length)))){
el = __grid[i][j];
if ((((el.t == 1)) && (!((el == curCell))))){
ok = true;
if (((!((curCell.r == i))) && (!((curCell.c == j))))){
ok = checkDiagonals(curCell, i, j);
};
if (ok){
if (!el.isInCL){
if (!el.isInOL){
el.p = curCell;
el.G = calcG(el);
el.H = calcH(el);
el.F = calcF(el);
__openList.addElement(el);
el.isInOL = true;
} else {
if (el.G > calcGOL(el, curCell)){
el.p = curCell;
el.G = calcG(el);
el.H = calcH(el);
el.F = calcF(el);
};
};
};
};
};
};
j++;
};
i++;
};
return (__openList.removeElement());
}
private function calcGOL(cell:Object, npCell:Object):Number{
var g:Number;
g = 0;
if ((((cell.r == npCell.r)) || ((cell.c == npCell.c)))){
g = (g + __hvScore);
} else {
g = (g + __dScore);
};
g = (g + calcG(npCell));
return (g);
}
private function checkDiagonals(cell:Object, i:Number, j:Number):Boolean{
if ((((cell.r > i)) && ((cell.c > j)))){
if ((((__grid[(i + 1)][j].t > 1)) || ((__grid[i][(j + 1)].t > 1)))){
return (false);
};
} else {
if ((((cell.r > i)) && ((cell.c < j)))){
if ((((__grid[i][(j - 1)].t > 1)) || ((__grid[(i + 1)][j].t > 1)))){
return (false);
};
} else {
if ((((cell.r < i)) && ((cell.c < j)))){
if ((((__grid[(i - 1)][j].t > 1)) || ((__grid[i][(j - 1)].t > 1)))){
return (false);
};
} else {
if ((((cell.r < i)) && ((cell.c > j)))){
if ((((__grid[(i - 1)][j].t > 1)) || ((__grid[i][(j + 1)].t > 1)))){
return (false);
};
};
};
};
};
return (true);
}
public function findPath(stCell:Object, endCell:Object):Boolean{
var tempCell:*;
var pathEl:Object;
if (stCell != endCell){
initFind(stCell, endCell);
tempCell = __openList.removeElement();
__closedList.push(tempCell);
tempCell.isInOL = false;
tempCell.isInCL = true;
while (tempCell != endCell) {
tempCell = getNextCell(tempCell);
__closedList.push(tempCell);
if ((((__openList.getLength() < 1)) || ((tempCell == null)))){
break;
};
tempCell.isInOL = false;
tempCell.isInCL = true;
};
if (tempCell == endCell){
pathEl = endCell;
shortestPath.push(pathEl);
while (pathEl != __startCell) {
pathEl = pathEl.p;
shortestPath.push(pathEl);
};
shortestPath.reverse();
return (true);
} else {
return (false);
};
//unresolved jump
};
return (false);
}
}
}//package classesAS3
Section 75
//poisonGround (classesAS3.poisonGround)
package classesAS3 {
import flash.display.*;
public class poisonGround extends MovieClip {
var rt:Object;
public function poisonGround(rt2){
super();
addFrameScript(79, frame80);
rt = rt2;
}
function frame80(){
MovieClip(this).removeMe();
stop();
}
public function removeMe(){
var arrayIndex:Number;
var i1:*;
var i2:int;
arrayIndex = 0;
i1 = 0;
while (i1 < rt.poisonGroundArray.length) {
if (this == rt.poisonGroundArray[i1]){
arrayIndex = i1;
break;
};
i1++;
};
rt.poisonGroundArray.splice(arrayIndex, 1);
i2 = 0;
while (i2 < rt.inGamePickupsMc.numChildren) {
if (rt.inGamePickupsMc.getChildAt(i2) == this){
rt.inGamePickupsMc.removeChild(this);
this.stop();
break;
};
i2++;
};
this.stop();
}
}
}//package classesAS3
Section 76
//Tile (classesAS3.Tile)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class Tile extends MovieClip {
private var __row:Number;
public var tileType:Number;// = 1
private var __grid:Array;
public var rt:Object;
public var __pathFinder:Path;
private var __col:Number;
public var dirAngleX:Number;
public var dirAngleY:Number;
public function Tile(grid:Array, pf:Path, row:Number, col:Number, canClick:Boolean, rt2){
tileType = 1;
super();
rt = rt2;
__grid = grid;
__pathFinder = pf;
__row = row;
__col = col;
if (canClick){
addEventListener(MouseEvent.CLICK, clickHandler);
useHandCursor = true;
buttonMode = true;
};
}
private function clickHandler(event:MouseEvent):void{
var t:Number;
var i:*;
var i2:int;
var j:*;
var mc:*;
var ct:ColorTransform;
var c:*;
var colorTransform:ColorTransform;
var d:Dir;
t = getTimer();
__pathFinder.findPath(__grid[__row][__col], rt.endCell);
for (i in __grid) {
for (j in __grid[i]) {
if (__grid[i][j].t == 1){
mc = this.parent.getChildByName(((("cell_" + __grid[i][j].r) + "_") + __grid[i][j].c));
ct = mc.inner_mc.transform.colorTransform;
ct.color = 0xFFFFFF;
mc.inner_mc.transform.colorTransform = ct;
};
};
};
for (i in __pathFinder.shortestPath) {
c = this.parent.getChildByName(((("cell_" + __pathFinder.shortestPath[i].r) + "_") + __pathFinder.shortestPath[i].c));
colorTransform = c.inner_mc.transform.colorTransform;
colorTransform.color = 0xFF0000;
c.inner_mc.transform.colorTransform = colorTransform;
};
i2 = 0;
while (i2 < (__pathFinder.shortestPath.length - 1)) {
d = new Dir();
d.arrow.rotation = ((180 * Math.atan2((__pathFinder.shortestPath[(i2 + 1)].r - __pathFinder.shortestPath[i2].r), (__pathFinder.shortestPath[(i2 + 1)].c - __pathFinder.shortestPath[i2].c))) / Math.PI);
__pathFinder.shortestPath[i2].dirAngleX = d.arrow.rotation;
d.x = (__pathFinder.shortestPath[i2].c * rt.blockSize);
d.y = (__pathFinder.shortestPath[i2].r * rt.blockSize);
rt.backSkyMc.addChild(d);
i2++;
};
}
}
}//package classesAS3
Section 77
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import com.adobe.utils.*;
public class MD5 {
public function MD5(){
super();
}
private static function ff(a:int, b:int, c:int, d:int, x:int, s:int, t:int):int{
return (transform(f, a, b, c, d, x, s, t));
}
private static function createBlocks(s:String):Array{
var blocks:Array;
var len:int;
var mask:int;
var i:int;
blocks = new Array();
len = (s.length * 8);
mask = 0xFF;
i = 0;
while (i < len) {
blocks[(i >> 5)] = (blocks[(i >> 5)] | ((s.charCodeAt((i / 8)) & mask) << (i % 32)));
i = (i + 8);
};
blocks[(len >> 5)] = (blocks[(len >> 5)] | (128 << (len % 32)));
blocks[((((len + 64) >>> 9) << 4) + 14)] = len;
return (blocks);
}
private static function ii(a:int, b:int, c:int, d:int, x:int, s:int, t:int):int{
return (transform(i, a, b, c, d, x, s, t));
}
private static function f(x:int, y:int, z:int):int{
return (((x & y) | (~(x) & z)));
}
private static function g(x:int, y:int, z:int):int{
return (((x & z) | (y & ~(z))));
}
private static function h(x:int, y:int, z:int):int{
return (((x ^ y) ^ z));
}
private static function i(x:int, y:int, z:int):int{
return ((y ^ (x | ~(z))));
}
private static function transform(func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int{
var tmp:int;
tmp = (((a + int(func(b, c, d))) + x) + t);
return ((IntUtil.rol(tmp, s) + b));
}
private static function hh(a:int, b:int, c:int, d:int, x:int, s:int, t:int):int{
return (transform(h, a, b, c, d, x, s, t));
}
public static function hash(s:String):String{
var a:int;
var b:int;
var c:int;
var d:int;
var aa:int;
var bb:int;
var cc:int;
var dd:int;
var x:Array;
var len:int;
var i:int;
a = 1732584193;
b = -271733879;
c = -1732584194;
d = 271733878;
x = createBlocks(s);
len = x.length;
i = 0;
while (i < len) {
aa = a;
bb = b;
cc = c;
dd = d;
a = ff(a, b, c, d, x[(i + 0)], 7, -680876936);
d = ff(d, a, b, c, x[(i + 1)], 12, -389564586);
c = ff(c, d, a, b, x[(i + 2)], 17, 606105819);
b = ff(b, c, d, a, x[(i + 3)], 22, -1044525330);
a = ff(a, b, c, d, x[(i + 4)], 7, -176418897);
d = ff(d, a, b, c, x[(i + 5)], 12, 1200080426);
c = ff(c, d, a, b, x[(i + 6)], 17, -1473231341);
b = ff(b, c, d, a, x[(i + 7)], 22, -45705983);
a = ff(a, b, c, d, x[(i + 8)], 7, 1770035416);
d = ff(d, a, b, c, x[(i + 9)], 12, -1958414417);
c = ff(c, d, a, b, x[(i + 10)], 17, -42063);
b = ff(b, c, d, a, x[(i + 11)], 22, -1990404162);
a = ff(a, b, c, d, x[(i + 12)], 7, 1804603682);
d = ff(d, a, b, c, x[(i + 13)], 12, -40341101);
c = ff(c, d, a, b, x[(i + 14)], 17, -1502002290);
b = ff(b, c, d, a, x[(i + 15)], 22, 1236535329);
a = gg(a, b, c, d, x[(i + 1)], 5, -165796510);
d = gg(d, a, b, c, x[(i + 6)], 9, -1069501632);
c = gg(c, d, a, b, x[(i + 11)], 14, 643717713);
b = gg(b, c, d, a, x[(i + 0)], 20, -373897302);
a = gg(a, b, c, d, x[(i + 5)], 5, -701558691);
d = gg(d, a, b, c, x[(i + 10)], 9, 38016083);
c = gg(c, d, a, b, x[(i + 15)], 14, -660478335);
b = gg(b, c, d, a, x[(i + 4)], 20, -405537848);
a = gg(a, b, c, d, x[(i + 9)], 5, 568446438);
d = gg(d, a, b, c, x[(i + 14)], 9, -1019803690);
c = gg(c, d, a, b, x[(i + 3)], 14, -187363961);
b = gg(b, c, d, a, x[(i + 8)], 20, 1163531501);
a = gg(a, b, c, d, x[(i + 13)], 5, -1444681467);
d = gg(d, a, b, c, x[(i + 2)], 9, -51403784);
c = gg(c, d, a, b, x[(i + 7)], 14, 1735328473);
b = gg(b, c, d, a, x[(i + 12)], 20, -1926607734);
a = hh(a, b, c, d, x[(i + 5)], 4, -378558);
d = hh(d, a, b, c, x[(i + 8)], 11, -2022574463);
c = hh(c, d, a, b, x[(i + 11)], 16, 1839030562);
b = hh(b, c, d, a, x[(i + 14)], 23, -35309556);
a = hh(a, b, c, d, x[(i + 1)], 4, -1530992060);
d = hh(d, a, b, c, x[(i + 4)], 11, 1272893353);
c = hh(c, d, a, b, x[(i + 7)], 16, -155497632);
b = hh(b, c, d, a, x[(i + 10)], 23, -1094730640);
a = hh(a, b, c, d, x[(i + 13)], 4, 681279174);
d = hh(d, a, b, c, x[(i + 0)], 11, -358537222);
c = hh(c, d, a, b, x[(i + 3)], 16, -722521979);
b = hh(b, c, d, a, x[(i + 6)], 23, 76029189);
a = hh(a, b, c, d, x[(i + 9)], 4, -640364487);
d = hh(d, a, b, c, x[(i + 12)], 11, -421815835);
c = hh(c, d, a, b, x[(i + 15)], 16, 530742520);
b = hh(b, c, d, a, x[(i + 2)], 23, -995338651);
a = ii(a, b, c, d, x[(i + 0)], 6, -198630844);
d = ii(d, a, b, c, x[(i + 7)], 10, 1126891415);
c = ii(c, d, a, b, x[(i + 14)], 15, -1416354905);
b = ii(b, c, d, a, x[(i + 5)], 21, -57434055);
a = ii(a, b, c, d, x[(i + 12)], 6, 1700485571);
d = ii(d, a, b, c, x[(i + 3)], 10, -1894986606);
c = ii(c, d, a, b, x[(i + 10)], 15, -1051523);
b = ii(b, c, d, a, x[(i + 1)], 21, -2054922799);
a = ii(a, b, c, d, x[(i + 8)], 6, 1873313359);
d = ii(d, a, b, c, x[(i + 15)], 10, -30611744);
c = ii(c, d, a, b, x[(i + 6)], 15, -1560198380);
b = ii(b, c, d, a, x[(i + 13)], 21, 1309151649);
a = ii(a, b, c, d, x[(i + 4)], 6, -145523070);
d = ii(d, a, b, c, x[(i + 11)], 10, -1120210379);
c = ii(c, d, a, b, x[(i + 2)], 15, 718787259);
b = ii(b, c, d, a, x[(i + 9)], 21, -343485551);
a = (a + aa);
b = (b + bb);
c = (c + cc);
d = (d + dd);
i = (i + 16);
};
return ((((IntUtil.toHex(a) + IntUtil.toHex(b)) + IntUtil.toHex(c)) + IntUtil.toHex(d)));
}
private static function gg(a:int, b:int, c:int, d:int, x:int, s:int, t:int):int{
return (transform(g, a, b, c, d, x, s, t));
}
}
}//package com.adobe.crypto
Section 78
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public function IntUtil(){
super();
}
public static function toHex(n:int, bigEndian:Boolean=false):String{
var s:String;
var i:int;
var x:int;
s = "";
if (bigEndian){
i = 0;
while (i < 4) {
s = (s + (hexChars.charAt(((n >> (((3 - i) * 8) + 4)) & 15)) + hexChars.charAt(((n >> ((3 - i) * 8)) & 15))));
i++;
};
} else {
x = 0;
while (x < 4) {
s = (s + (hexChars.charAt(((n >> ((x * 8) + 4)) & 15)) + hexChars.charAt(((n >> (x * 8)) & 15))));
x++;
};
};
return (s);
}
public static function ror(x:int, n:int):uint{
var nn:int;
nn = (32 - n);
return (((x << nn) | (x >>> (32 - nn))));
}
public static function rol(x:int, n:int):int{
return (((x << n) | (x >>> (32 - n))));
}
}
}//package com.adobe.utils
Section 79
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var contentspotid:String;
private var cpmstarLoader:Loader;
public function AdLoader(contentspotid:String){
super();
this.contentspotid = contentspotid;
addEventListener(Event.ADDED, addedHandler);
}
private function addedHandler(event:Event):void{
var cpmstarViewSWFUrl:String;
var container:DisplayObjectContainer;
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
cpmstarViewSWFUrl = "http://server.cpmstar.com/adviewas3.swf";
container = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((cpmstarViewSWFUrl + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
private function dispatchHandler(event:Event):void{
dispatchEvent(event);
}
}
}//package CPMStar
Section 80
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintMultiplier:Number;// = 0
private var _tintColor:Number;// = 0
public function Color(redMultiplier:Number=1, greenMultiplier:Number=1, blueMultiplier:Number=1, alphaMultiplier:Number=1, redOffset:Number=0, greenOffset:Number=0, blueOffset:Number=0, alphaOffset:Number=0){
_tintColor = 0;
_tintMultiplier = 0;
super(redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier, redOffset, greenOffset, blueOffset, alphaOffset);
}
public function setTint(tintColor:uint, tintMultiplier:Number):void{
var r:uint;
var g:uint;
var b:uint;
this._tintColor = tintColor;
this._tintMultiplier = tintMultiplier;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - tintMultiplier)));
r = ((tintColor >> 16) & 0xFF);
g = ((tintColor >> 8) & 0xFF);
b = (tintColor & 0xFF);
this.redOffset = Math.round((r * tintMultiplier));
this.greenOffset = Math.round((g * tintMultiplier));
this.blueOffset = Math.round((b * tintMultiplier));
}
public function set tintColor(value:uint):void{
this.setTint(value, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
private function deriveTintColor():uint{
var ratio:Number;
var r:uint;
var g:uint;
var b:uint;
var colorNum:uint;
ratio = (1 / this.tintMultiplier);
r = Math.round((this.redOffset * ratio));
g = Math.round((this.greenOffset * ratio));
b = Math.round((this.blueOffset * ratio));
colorNum = (((r << 16) | (g << 8)) | b);
return (colorNum);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set brightness(value:Number):void{
var percent:Number;
var offset:Number;
if (value > 1){
value = 1;
} else {
if (value < -1){
value = -1;
};
};
percent = (1 - Math.abs(value));
offset = 0;
if (value > 0){
offset = (value * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = percent));
this.redOffset = (this.greenOffset = (this.blueOffset = offset));
}
public function set tintMultiplier(value:Number):void{
this.setTint(this.tintColor, value);
}
private function parseXML(xml:XML=null):Color{
var firstChild:XML;
var att:XML;
var name:String;
var tintColorNumber:uint;
if (!xml){
return (this);
};
firstChild = xml.elements()[0];
if (!firstChild){
return (this);
};
for each (att in firstChild.attributes()) {
name = att.localName();
if (name == "tintColor"){
tintColorNumber = (Number(att.toString()) as uint);
this.tintColor = tintColorNumber;
} else {
this[name] = Number(att.toString());
};
};
return (this);
}
public static function interpolateColor(fromColor:uint, toColor:uint, progress:Number):uint{
var q:Number;
var fromA:uint;
var fromR:uint;
var fromG:uint;
var fromB:uint;
var toA:uint;
var toR:uint;
var toG:uint;
var toB:uint;
var resultA:uint;
var resultR:uint;
var resultG:uint;
var resultB:uint;
var resultColor:uint;
q = (1 - progress);
fromA = ((fromColor >> 24) & 0xFF);
fromR = ((fromColor >> 16) & 0xFF);
fromG = ((fromColor >> 8) & 0xFF);
fromB = (fromColor & 0xFF);
toA = ((toColor >> 24) & 0xFF);
toR = ((toColor >> 16) & 0xFF);
toG = ((toColor >> 8) & 0xFF);
toB = (toColor & 0xFF);
resultA = ((fromA * q) + (toA * progress));
resultR = ((fromR * q) + (toR * progress));
resultG = ((fromG * q) + (toG * progress));
resultB = ((fromB * q) + (toB * progress));
resultColor = ((((resultA << 24) | (resultR << 16)) | (resultG << 8)) | resultB);
return (resultColor);
}
public static function interpolateTransform(fromColor:ColorTransform, toColor:ColorTransform, progress:Number):ColorTransform{
var q:Number;
var resultColor:ColorTransform;
q = (1 - progress);
resultColor = new ColorTransform(((fromColor.redMultiplier * q) + (toColor.redMultiplier * progress)), ((fromColor.greenMultiplier * q) + (toColor.greenMultiplier * progress)), ((fromColor.blueMultiplier * q) + (toColor.blueMultiplier * progress)), ((fromColor.alphaMultiplier * q) + (toColor.alphaMultiplier * progress)), ((fromColor.redOffset * q) + (toColor.redOffset * progress)), ((fromColor.greenOffset * q) + (toColor.greenOffset * progress)), ((fromColor.blueOffset * q) + (toColor.blueOffset * progress)), ((fromColor.alphaOffset * q) + (toColor.alphaOffset * progress)));
return (resultColor);
}
public static function fromXML(xml:XML):Color{
return (Color(new (Color).parseXML(xml)));
}
}
}//package fl.motion
Section 81
//advShieldUpgradev_380 (Magic_Defense_Bored_v12_fla.advShieldUpgradev_380)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class advShieldUpgradev_380 extends MovieClip {
public var infoBtn1:SimpleButton;
public function advShieldUpgradev_380(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.advShieldUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 82
//archerbeinghit_205 (Magic_Defense_Bored_v12_fla.archerbeinghit_205)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class archerbeinghit_205 extends MovieClip {
public function archerbeinghit_205(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 83
//archerdying_206 (Magic_Defense_Bored_v12_fla.archerdying_206)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class archerdying_206 extends MovieClip {
public function archerdying_206(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 84
//archerfiring_204 (Magic_Defense_Bored_v12_fla.archerfiring_204)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class archerfiring_204 extends MovieClip {
public function archerfiring_204(){
super();
addFrameScript(5, frame6, 21, frame22);
}
function frame6(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
if (MovieClip(this.parent.parent).myObject.fasterFiringUpg == true){
gotoAndPlay(14);
};
};
};
}
function frame22(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 85
//artillery_rocket_27 (Magic_Defense_Bored_v12_fla.artillery_rocket_27)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class artillery_rocket_27 extends MovieClip {
public function artillery_rocket_27(){
super();
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 86
//assetHolder_1 (Magic_Defense_Bored_v12_fla.assetHolder_1)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class assetHolder_1 extends MovieClip {
public function assetHolder_1(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 87
//badKnight2_82 (Magic_Defense_Bored_v12_fla.badKnight2_82)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class badKnight2_82 extends MovieClip {
public var mReleaseMc:MovieClip;
public var hFrame:MovieClip;
public function badKnight2_82(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 88
//banshee_135 (Magic_Defense_Bored_v12_fla.banshee_135)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class banshee_135 extends MovieClip {
public var mReleaseMc:MovieClip;
public function banshee_135(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 89
//bansheebeinghit_139 (Magic_Defense_Bored_v12_fla.bansheebeinghit_139)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bansheebeinghit_139 extends MovieClip {
public function bansheebeinghit_139(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 90
//bansheedying_140 (Magic_Defense_Bored_v12_fla.bansheedying_140)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bansheedying_140 extends MovieClip {
public function bansheedying_140(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 91
//bansheefiring_138 (Magic_Defense_Bored_v12_fla.bansheefiring_138)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class bansheefiring_138 extends MovieClip {
public function bansheefiring_138(){
super();
addFrameScript(19, frame20, 32, frame33);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame33(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 92
//barbarianbeinghit_187 (Magic_Defense_Bored_v12_fla.barbarianbeinghit_187)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class barbarianbeinghit_187 extends MovieClip {
public function barbarianbeinghit_187(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 93
//barbariandying_188 (Magic_Defense_Bored_v12_fla.barbariandying_188)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class barbariandying_188 extends MovieClip {
public function barbariandying_188(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 94
//barbarianfiring_186 (Magic_Defense_Bored_v12_fla.barbarianfiring_186)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class barbarianfiring_186 extends MovieClip {
public function barbarianfiring_186(){
super();
addFrameScript(6, frame7);
}
function frame7(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 95
//baseMc_246 (Magic_Defense_Bored_v12_fla.baseMc_246)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class baseMc_246 extends MovieClip {
public function baseMc_246(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 96
//basicFlag_589 (Magic_Defense_Bored_v12_fla.basicFlag_589)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class basicFlag_589 extends MovieClip {
public function basicFlag_589(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 97
//basicFlag2_588 (Magic_Defense_Bored_v12_fla.basicFlag2_588)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class basicFlag2_588 extends MovieClip {
public var flag4b:MovieClip;
public var flag4c:MovieClip;
public var flag4d:MovieClip;
public var flag4a:MovieClip;
public function basicFlag2_588(){
super();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 98
//basicFlag3_587 (Magic_Defense_Bored_v12_fla.basicFlag3_587)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class basicFlag3_587 extends MovieClip {
public var flag3a:MovieClip;
public var flag3b:MovieClip;
public function basicFlag3_587(){
super();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 99
//battleAxeUpgradev_372 (Magic_Defense_Bored_v12_fla.battleAxeUpgradev_372)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class battleAxeUpgradev_372 extends MovieClip {
public var infoBtn1:SimpleButton;
public function battleAxeUpgradev_372(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.battleAxeUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 100
//blueorbdestroyed_248 (Magic_Defense_Bored_v12_fla.blueorbdestroyed_248)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class blueorbdestroyed_248 extends MovieClip {
public function blueorbdestroyed_248(){
super();
addFrameScript(44, frame45);
}
function frame45(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 101
//boredBLogo_464 (Magic_Defense_Bored_v12_fla.boredBLogo_464)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class boredBLogo_464 extends MovieClip {
public var logoBtn:SimpleButton;
public function boredBLogo_464(){
super();
addFrameScript(0, frame1);
}
function frame1(){
logoBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoBored, false);
}
public function gotoBored(e:MouseEvent):void{
navigateToURL(new URLRequest("http://www.bored.com"), "_blank");
}
}
}//package Magic_Defense_Bored_v12_fla
Section 102
//boulderBit_314 (Magic_Defense_Bored_v12_fla.boulderBit_314)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class boulderBit_314 extends MovieClip {
public function boulderBit_314(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.gotoAndStop(MovieClip(parent).tileType);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 103
//carsB2_538 (Magic_Defense_Bored_v12_fla.carsB2_538)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class carsB2_538 extends MovieClip {
public function carsB2_538(){
super();
addFrameScript(0, frame1, 4, frame5);
}
function frame1(){
stop();
}
function frame5(){
MovieClip(this.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 104
//catapultbeinghit_223 (Magic_Defense_Bored_v12_fla.catapultbeinghit_223)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class catapultbeinghit_223 extends MovieClip {
public function catapultbeinghit_223(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 105
//catapultdying_224 (Magic_Defense_Bored_v12_fla.catapultdying_224)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class catapultdying_224 extends MovieClip {
public function catapultdying_224(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 106
//catapultFireballUpgradev_392 (Magic_Defense_Bored_v12_fla.catapultFireballUpgradev_392)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class catapultFireballUpgradev_392 extends MovieClip {
public var infoBtn1:SimpleButton;
public function catapultFireballUpgradev_392(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.catapultFireUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 107
//catapultfiring_222 (Magic_Defense_Bored_v12_fla.catapultfiring_222)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class catapultfiring_222 extends MovieClip {
public function catapultfiring_222(){
super();
addFrameScript(8, frame9, 57, frame58);
}
function frame9(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
if (MovieClip(this.parent.parent).myObject.fasterFiringUpg == true){
gotoAndPlay(30);
};
};
};
}
function frame58(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 108
//catapultPanelInfo_391 (Magic_Defense_Bored_v12_fla.catapultPanelInfo_391)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class catapultPanelInfo_391 extends MovieClip {
public function catapultPanelInfo_391(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 109
//clockAnim_292 (Magic_Defense_Bored_v12_fla.clockAnim_292)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class clockAnim_292 extends MovieClip {
public function clockAnim_292(){
super();
addFrameScript(44, frame45);
}
function frame45(){
MovieClip(this.parent.parent).rt.soldiersIconsArray[MovieClip(this.parent.parent).myIndex] = false;
MovieClip(this.parent.parent).rt.checkForAfford();
MovieClip(this.parent).gotoAndStop(1);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 110
//clockAnim2_293 (Magic_Defense_Bored_v12_fla.clockAnim2_293)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class clockAnim2_293 extends MovieClip {
public function clockAnim2_293(){
super();
addFrameScript(17, frame18);
}
function frame18(){
MovieClip(this.parent.parent).rt.setupGoodGuy(this);
if (MovieClip(this.parent).numberOrdered.text != 0){
gotoAndPlay(1);
} else {
MovieClip(this.parent).gotoAndStop(1);
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 111
//controlTxtMc_529 (Magic_Defense_Bored_v12_fla.controlTxtMc_529)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class controlTxtMc_529 extends MovieClip {
public function controlTxtMc_529(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 112
//crossbowmanbeinghit_217 (Magic_Defense_Bored_v12_fla.crossbowmanbeinghit_217)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class crossbowmanbeinghit_217 extends MovieClip {
public function crossbowmanbeinghit_217(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 113
//crossbowmandying_218 (Magic_Defense_Bored_v12_fla.crossbowmandying_218)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class crossbowmandying_218 extends MovieClip {
public function crossbowmandying_218(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 114
//crossbowmanfiring_216 (Magic_Defense_Bored_v12_fla.crossbowmanfiring_216)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class crossbowmanfiring_216 extends MovieClip {
public function crossbowmanfiring_216(){
super();
addFrameScript(7, frame8, 13, frame14);
}
function frame14(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
function frame8(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 115
//demon_157 (Magic_Defense_Bored_v12_fla.demon_157)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class demon_157 extends MovieClip {
public var mReleaseMc:MovieClip;
public function demon_157(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 116
//demonbeinghit_161 (Magic_Defense_Bored_v12_fla.demonbeinghit_161)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class demonbeinghit_161 extends MovieClip {
public function demonbeinghit_161(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 117
//demondying_162 (Magic_Defense_Bored_v12_fla.demondying_162)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class demondying_162 extends MovieClip {
public function demondying_162(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 118
//demonfiring_160 (Magic_Defense_Bored_v12_fla.demonfiring_160)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class demonfiring_160 extends MovieClip {
public function demonfiring_160(){
super();
addFrameScript(30, frame31, 48, frame49);
}
function frame31(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
function frame49(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 119
//desertBit_313 (Magic_Defense_Bored_v12_fla.desertBit_313)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class desertBit_313 extends MovieClip {
public function desertBit_313(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.gotoAndStop(MovieClip(parent).tileType);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 120
//dragon_164 (Magic_Defense_Bored_v12_fla.dragon_164)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class dragon_164 extends MovieClip {
public var mReleaseMc:MovieClip;
public function dragon_164(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 121
//dragonbeinghit_169 (Magic_Defense_Bored_v12_fla.dragonbeinghit_169)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class dragonbeinghit_169 extends MovieClip {
public function dragonbeinghit_169(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 122
//dragondying_170 (Magic_Defense_Bored_v12_fla.dragondying_170)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class dragondying_170 extends MovieClip {
public function dragondying_170(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 123
//dragonfiring_168 (Magic_Defense_Bored_v12_fla.dragonfiring_168)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class dragonfiring_168 extends MovieClip {
public function dragonfiring_168(){
super();
addFrameScript(19, frame20, 40, frame41);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame41(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 124
//druidbeinghit_256 (Magic_Defense_Bored_v12_fla.druidbeinghit_256)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class druidbeinghit_256 extends MovieClip {
public function druidbeinghit_256(){
super();
addFrameScript(14, frame15);
}
function frame15(){
MovieClip(this.parent).gotoAndStop("stand");
}
}
}//package Magic_Defense_Bored_v12_fla
Section 125
//druiddying_257 (Magic_Defense_Bored_v12_fla.druiddying_257)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class druiddying_257 extends MovieClip {
public function druiddying_257(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 126
//druidfiring_255 (Magic_Defense_Bored_v12_fla.druidfiring_255)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class druidfiring_255 extends MovieClip {
public function druidfiring_255(){
super();
addFrameScript(9, frame10, 24, frame25);
}
function frame10(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame25(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 127
//druidPanelInfo_395 (Magic_Defense_Bored_v12_fla.druidPanelInfo_395)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class druidPanelInfo_395 extends MovieClip {
public function druidPanelInfo_395(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 128
//Endtitle_437 (Magic_Defense_Bored_v12_fla.Endtitle_437)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class Endtitle_437 extends MovieClip {
public function Endtitle_437(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 129
//evilDwarf_53 (Magic_Defense_Bored_v12_fla.evilDwarf_53)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class evilDwarf_53 extends MovieClip {
public var mReleaseMc:MovieClip;
public function evilDwarf_53(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 130
//evilToGoodUpgradev_398 (Magic_Defense_Bored_v12_fla.evilToGoodUpgradev_398)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class evilToGoodUpgradev_398 extends MovieClip {
public var infoBtn1:SimpleButton;
public function evilToGoodUpgradev_398(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.evilToGoodUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 131
//evilWizard_149 (Magic_Defense_Bored_v12_fla.evilWizard_149)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class evilWizard_149 extends MovieClip {
public var mReleaseMc:MovieClip;
public function evilWizard_149(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 132
//evilwizardbeinghit_154 (Magic_Defense_Bored_v12_fla.evilwizardbeinghit_154)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class evilwizardbeinghit_154 extends MovieClip {
public function evilwizardbeinghit_154(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 133
//evilwizarddying_155 (Magic_Defense_Bored_v12_fla.evilwizarddying_155)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class evilwizarddying_155 extends MovieClip {
public function evilwizarddying_155(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 134
//evilwizardfiring_152 (Magic_Defense_Bored_v12_fla.evilwizardfiring_152)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class evilwizardfiring_152 extends MovieClip {
public function evilwizardfiring_152(){
super();
addFrameScript(13, frame14, 24, frame25);
}
function frame14(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame25(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 135
//expWeaponUpgradev_382 (Magic_Defense_Bored_v12_fla.expWeaponUpgradev_382)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class expWeaponUpgradev_382 extends MovieClip {
public var infoBtn1:SimpleButton;
public function expWeaponUpgradev_382(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(4);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.expWeaponUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 136
//fasterFiringUpgradev_387 (Magic_Defense_Bored_v12_fla.fasterFiringUpgradev_387)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class fasterFiringUpgradev_387 extends MovieClip {
public var infoBtn1:SimpleButton;
public function fasterFiringUpgradev_387(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(4);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.fasterFiringUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 137
//fasterFiringUpgradev2_394 (Magic_Defense_Bored_v12_fla.fasterFiringUpgradev2_394)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class fasterFiringUpgradev2_394 extends MovieClip {
public var infoBtn1:SimpleButton;
public function fasterFiringUpgradev2_394(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.fasterFiringUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 138
//fireballUpgradev_421 (Magic_Defense_Bored_v12_fla.fireballUpgradev_421)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class fireballUpgradev_421 extends MovieClip {
public var infoBtn1:SimpleButton;
public function fireballUpgradev_421(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.fireballsUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 139
//forestTree_311 (Magic_Defense_Bored_v12_fla.forestTree_311)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class forestTree_311 extends MovieClip {
public function forestTree_311(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.gotoAndStop(MovieClip(parent).tileType);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 140
//frontScreenAnim_445 (Magic_Defense_Bored_v12_fla.frontScreenAnim_445)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class frontScreenAnim_445 extends MovieClip {
public var sp2:MovieClip;
public var sp3:MovieClip;
public var sp4:MovieClip;
public var sp1:MovieClip;
public function frontScreenAnim_445(){
super();
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 141
//gameCompleteAnim_431 (Magic_Defense_Bored_v12_fla.gameCompleteAnim_431)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameCompleteAnim_431 extends MovieClip {
public function gameCompleteAnim_431(){
super();
addFrameScript(321, frame322);
}
function frame322(){
MovieClip(parent.parent).rt.gameComplete();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 142
//gameoverFilter_438 (Magic_Defense_Bored_v12_fla.gameoverFilter_438)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameoverFilter_438 extends MovieClip {
public var submitBtn:SimpleButton;
public var moreGamesBtn:SimpleButton;
public var score:TextField;
public var quitBtn:SimpleButton;
public var nameTxt:TextField;
public function gameoverFilter_438(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function doRestart(event:MouseEvent):void{
MovieClip(this.parent.parent).rt.restartLevel();
}
public function doViewScores(event:MouseEvent):void{
}
public function doMoreGames(e:MouseEvent):void{
}
function frame3(){
score.text = MovieClip(this.parent.parent).rt.score;
moreGamesBtn.addEventListener(MouseEvent.MOUSE_UP, doMoreGames);
quitBtn.addEventListener(MouseEvent.MOUSE_UP, doQuit);
stop();
}
function frame1(){
MovieClip(this.parent.parent).rt.rt.showLeaderBoard(MovieClip(this.parent.parent));
stop();
}
public function doSubmit(event:MouseEvent):void{
if (nameTxt.text != ""){
gotoAndStop(2);
};
}
function frame2(){
score.text = MovieClip(this.parent.parent).rt.score;
submitBtn.addEventListener(MouseEvent.MOUSE_UP, doSubmit);
moreGamesBtn.addEventListener(MouseEvent.MOUSE_UP, doMoreGames);
quitBtn.addEventListener(MouseEvent.MOUSE_UP, doQuit);
stop();
}
public function doQuit(event:MouseEvent):void{
MovieClip(this.parent.parent).rt.quitGame();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 143
//gameOverMsg_435 (Magic_Defense_Bored_v12_fla.gameOverMsg_435)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameOverMsg_435 extends MovieClip {
public var endTitle:MovieClip;
public var msg:MovieClip;
public function gameOverMsg_435(){
super();
addFrameScript(9, frame10, 13, frame14);
}
function frame10(){
if (MovieClip(this.parent).rt.levelNumber >= MovieClip(this.parent).rt.maxLevels){
endTitle.gotoAndStop(2);
};
if (MovieClip(this.parent).rt.rt.mindJolt == true){
msg.gotoAndStop(3);
};
}
function frame14(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 144
//gameSolderWizard_202 (Magic_Defense_Bored_v12_fla.gameSolderWizard_202)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gameSolderWizard_202 extends MovieClip {
public var mReleaseMc:MovieClip;
public function gameSolderWizard_202(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 145
//gameSoldier1_180 (Magic_Defense_Bored_v12_fla.gameSoldier1_180)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gameSoldier1_180 extends MovieClip {
public var mReleaseMc:MovieClip;
public function gameSoldier1_180(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 146
//gameSoldier2_184 (Magic_Defense_Bored_v12_fla.gameSoldier2_184)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gameSoldier2_184 extends MovieClip {
public var mReleaseMc:MovieClip;
public function gameSoldier2_184(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 147
//gameSoldier3_190 (Magic_Defense_Bored_v12_fla.gameSoldier3_190)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gameSoldier3_190 extends MovieClip {
public var mReleaseMc:MovieClip;
public function gameSoldier3_190(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 148
//GameSoldier5_196 (Magic_Defense_Bored_v12_fla.GameSoldier5_196)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class GameSoldier5_196 extends MovieClip {
public var mReleaseMc:MovieClip;
public function GameSoldier5_196(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 149
//gemSparkleAnim_449 (Magic_Defense_Bored_v12_fla.gemSparkleAnim_449)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gemSparkleAnim_449 extends MovieClip {
public function gemSparkleAnim_449(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 150
//giant_60 (Magic_Defense_Bored_v12_fla.giant_60)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class giant_60 extends MovieClip {
public var mReleaseMc:MovieClip;
public function giant_60(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 151
//giant_explosion_282 (Magic_Defense_Bored_v12_fla.giant_explosion_282)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class giant_explosion_282 extends MovieClip {
public function giant_explosion_282(){
super();
addFrameScript(73, frame74);
}
function frame74(){
MovieClip(this.parent).removeChild(MovieClip(this));
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 152
//giantbeinghit_64 (Magic_Defense_Bored_v12_fla.giantbeinghit_64)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class giantbeinghit_64 extends MovieClip {
public function giantbeinghit_64(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 153
//giantdying_65 (Magic_Defense_Bored_v12_fla.giantdying_65)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class giantdying_65 extends MovieClip {
public function giantdying_65(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 154
//giantfiring_63 (Magic_Defense_Bored_v12_fla.giantfiring_63)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class giantfiring_63 extends MovieClip {
public function giantfiring_63(){
super();
addFrameScript(29, frame30, 38, frame39);
}
function frame30(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
function frame39(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 155
//goblinbeinghit_93 (Magic_Defense_Bored_v12_fla.goblinbeinghit_93)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class goblinbeinghit_93 extends MovieClip {
public function goblinbeinghit_93(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 156
//goblindying_94 (Magic_Defense_Bored_v12_fla.goblindying_94)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class goblindying_94 extends MovieClip {
public function goblindying_94(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 157
//goblinfiring_92 (Magic_Defense_Bored_v12_fla.goblinfiring_92)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class goblinfiring_92 extends MovieClip {
public function goblinfiring_92(){
super();
addFrameScript(8, frame9, 21, frame22);
}
function frame22(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
function frame9(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 158
//goblinMc_89 (Magic_Defense_Bored_v12_fla.goblinMc_89)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class goblinMc_89 extends MovieClip {
public var mReleaseMc:MovieClip;
public function goblinMc_89(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 159
//gridOnOffMc_423 (Magic_Defense_Bored_v12_fla.gridOnOffMc_423)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gridOnOffMc_423 extends MovieClip {
public function gridOnOffMc_423(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 160
//gridOver_342 (Magic_Defense_Bored_v12_fla.gridOver_342)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class gridOver_342 extends MovieClip {
public function gridOver_342(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 161
//GunTower_214 (Magic_Defense_Bored_v12_fla.GunTower_214)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class GunTower_214 extends MovieClip {
public var mReleaseMc:MovieClip;
public function GunTower_214(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 162
//halfWayFlagcopy_585 (Magic_Defense_Bored_v12_fla.halfWayFlagcopy_585)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class halfWayFlagcopy_585 extends MovieClip {
public var flag2:MovieClip;
public function halfWayFlagcopy_585(){
super();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 163
//healthUpgradev_396 (Magic_Defense_Bored_v12_fla.healthUpgradev_396)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class healthUpgradev_396 extends MovieClip {
public var infoBtn1:SimpleButton;
public function healthUpgradev_396(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.healthUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 164
//iceBoltsUpgradev_412 (Magic_Defense_Bored_v12_fla.iceBoltsUpgradev_412)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class iceBoltsUpgradev_412 extends MovieClip {
public var infoBtn1:SimpleButton;
public function iceBoltsUpgradev_412(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(4);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.iceBoltsUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 165
//iconWave_4 (Magic_Defense_Bored_v12_fla.iconWave_4)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class iconWave_4 extends MovieClip {
public var waveNumTxt:TextField;
public function iconWave_4(){
super();
addFrameScript(0, frame1);
}
function frame1(){
waveNumTxt.text = ("Wave" + String(MovieClip(parent).waveNumber));
}
}
}//package Magic_Defense_Bored_v12_fla
Section 166
//improvedSightUpgradev_377 (Magic_Defense_Bored_v12_fla.improvedSightUpgradev_377)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class improvedSightUpgradev_377 extends MovieClip {
public var infoBtn1:SimpleButton;
public function improvedSightUpgradev_377(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.improvedSightUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 167
//infoDesc2_366 (Magic_Defense_Bored_v12_fla.infoDesc2_366)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class infoDesc2_366 extends MovieClip {
public function infoDesc2_366(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 168
//instructionsBtns_484 (Magic_Defense_Bored_v12_fla.instructionsBtns_484)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class instructionsBtns_484 extends MovieClip {
public var backBtn:SimpleButton;
public var nextBtn:SimpleButton;
public var endBtn:SimpleButton;
public var startBtn:SimpleButton;
public function instructionsBtns_484(){
super();
addFrameScript(0, frame1);
}
function frame1(){
startBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoStart, false);
endBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoEnd, false);
backBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoBack, false);
nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoNext, false);
}
public function gotoEnd(e:MouseEvent):void{
MovieClip(parent).txt.gotoAndStop(MovieClip(parent).txt.totalFrames);
}
public function gotoStart(e:MouseEvent):void{
MovieClip(parent).txt.gotoAndStop(1);
}
public function gotoBack(e:MouseEvent):void{
if (MovieClip(parent).txt.currentFrame == 1){
MovieClip(parent).txt.gotoAndStop(MovieClip(parent).txt.totalFrames);
} else {
MovieClip(parent).txt.gotoAndStop((MovieClip(parent).txt.currentFrame - 1));
};
}
public function gotoNext(e:MouseEvent):void{
if (MovieClip(parent).txt.currentFrame == MovieClip(parent).txt.totalFrames){
MovieClip(parent).txt.gotoAndStop(1);
} else {
MovieClip(parent).txt.gotoAndStop((MovieClip(parent).txt.currentFrame + 1));
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 169
//instructionsTxtScreens_483 (Magic_Defense_Bored_v12_fla.instructionsTxtScreens_483)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class instructionsTxtScreens_483 extends MovieClip {
public function instructionsTxtScreens_483(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 170
//knight4_208 (Magic_Defense_Bored_v12_fla.knight4_208)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class knight4_208 extends MovieClip {
public var mReleaseMc:MovieClip;
public function knight4_208(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 171
//knightbeinghit_193 (Magic_Defense_Bored_v12_fla.knightbeinghit_193)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class knightbeinghit_193 extends MovieClip {
public function knightbeinghit_193(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 172
//knightdying_194 (Magic_Defense_Bored_v12_fla.knightdying_194)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class knightdying_194 extends MovieClip {
public function knightdying_194(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 173
//knightfiring_192 (Magic_Defense_Bored_v12_fla.knightfiring_192)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class knightfiring_192 extends MovieClip {
public function knightfiring_192(){
super();
addFrameScript(8, frame9);
}
function frame9(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 174
//knomebeinghit_57 (Magic_Defense_Bored_v12_fla.knomebeinghit_57)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class knomebeinghit_57 extends MovieClip {
public function knomebeinghit_57(){
super();
addFrameScript(19, frame20);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 175
//knomedying_58 (Magic_Defense_Bored_v12_fla.knomedying_58)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class knomedying_58 extends MovieClip {
public function knomedying_58(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 176
//knomefiring_56 (Magic_Defense_Bored_v12_fla.knomefiring_56)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class knomefiring_56 extends MovieClip {
public function knomefiring_56(){
super();
addFrameScript(10, frame11, 19, frame20);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
function frame11(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 177
//large_explosion_249 (Magic_Defense_Bored_v12_fla.large_explosion_249)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class large_explosion_249 extends MovieClip {
public function large_explosion_249(){
super();
addFrameScript(38, frame39);
}
function frame39(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 178
//levelCompleteMsg_429 (Magic_Defense_Bored_v12_fla.levelCompleteMsg_429)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelCompleteMsg_429 extends MovieClip {
public var titleMc:levelCompleteMsgs;
public var speedBonus:TextField;
public var timeBonus:TextField;
public var scoreBonus:TextField;
public var totalScore:TextField;
public function levelCompleteMsg_429(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 179
//lizardmanbeinghit_79 (Magic_Defense_Bored_v12_fla.lizardmanbeinghit_79)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class lizardmanbeinghit_79 extends MovieClip {
public function lizardmanbeinghit_79(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 180
//lizardmandying_80 (Magic_Defense_Bored_v12_fla.lizardmandying_80)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class lizardmandying_80 extends MovieClip {
public function lizardmandying_80(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 181
//lizardmanfiring_78 (Magic_Defense_Bored_v12_fla.lizardmanfiring_78)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class lizardmanfiring_78 extends MovieClip {
public function lizardmanfiring_78(){
super();
addFrameScript(14, frame15, 22, frame23);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
function frame23(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 182
//lizardManMc_75 (Magic_Defense_Bored_v12_fla.lizardManMc_75)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class lizardManMc_75 extends MovieClip {
public var mReleaseMc:MovieClip;
public function lizardManMc_75(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 183
//magicShieldUpgradev_408 (Magic_Defense_Bored_v12_fla.magicShieldUpgradev_408)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class magicShieldUpgradev_408 extends MovieClip {
public var infoBtn1:SimpleButton;
public function magicShieldUpgradev_408(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.magicShieldUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 184
//mapLevelDot_583 (Magic_Defense_Bored_v12_fla.mapLevelDot_583)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class mapLevelDot_583 extends MovieClip {
public function mapLevelDot_583(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 185
//mapOrb_328 (Magic_Defense_Bored_v12_fla.mapOrb_328)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class mapOrb_328 extends MovieClip {
public function mapOrb_328(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 186
//mapSavedMsg_332 (Magic_Defense_Bored_v12_fla.mapSavedMsg_332)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class mapSavedMsg_332 extends MovieClip {
public function mapSavedMsg_332(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 187
//mapScreenScene_325 (Magic_Defense_Bored_v12_fla.mapScreenScene_325)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class mapScreenScene_325 extends MovieClip {
public function mapScreenScene_325(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 188
//mineBomb_226 (Magic_Defense_Bored_v12_fla.mineBomb_226)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class mineBomb_226 extends MovieClip {
public var mReleaseMc:MovieClip;
public function mineBomb_226(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 189
//mineMc_253 (Magic_Defense_Bored_v12_fla.mineMc_253)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class mineMc_253 extends MovieClip {
public var mReleaseMc:MovieClip;
public function mineMc_253(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 190
//musicBtn2_355 (Magic_Defense_Bored_v12_fla.musicBtn2_355)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class musicBtn2_355 extends MovieClip {
public function musicBtn2_355(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 191
//musicBtnMc_473 (Magic_Defense_Bored_v12_fla.musicBtnMc_473)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class musicBtnMc_473 extends MovieClip {
public function musicBtnMc_473(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 192
//nextMonster_348 (Magic_Defense_Bored_v12_fla.nextMonster_348)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class nextMonster_348 extends MovieClip {
public function nextMonster_348(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 193
//ogrebeinghit_107 (Magic_Defense_Bored_v12_fla.ogrebeinghit_107)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ogrebeinghit_107 extends MovieClip {
public function ogrebeinghit_107(){
super();
addFrameScript(19, frame20);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 194
//ogredying_108 (Magic_Defense_Bored_v12_fla.ogredying_108)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ogredying_108 extends MovieClip {
public function ogredying_108(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 195
//ogrefiring_106 (Magic_Defense_Bored_v12_fla.ogrefiring_106)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class ogrefiring_106 extends MovieClip {
public function ogrefiring_106(){
super();
addFrameScript(18, frame19, 29, frame30);
}
function frame19(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
function frame30(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 196
//ogreMc_103 (Magic_Defense_Bored_v12_fla.ogreMc_103)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class ogreMc_103 extends MovieClip {
public var mReleaseMc:MovieClip;
public function ogreMc_103(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 197
//orcbeinghit_86 (Magic_Defense_Bored_v12_fla.orcbeinghit_86)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class orcbeinghit_86 extends MovieClip {
public function orcbeinghit_86(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 198
//orcdying_87 (Magic_Defense_Bored_v12_fla.orcdying_87)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class orcdying_87 extends MovieClip {
public function orcdying_87(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 199
//orcfiring_85 (Magic_Defense_Bored_v12_fla.orcfiring_85)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class orcfiring_85 extends MovieClip {
public function orcfiring_85(){
super();
addFrameScript(4, frame5, 11, frame12);
}
function frame12(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
function frame5(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 200
//paladinbeinghit_199 (Magic_Defense_Bored_v12_fla.paladinbeinghit_199)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class paladinbeinghit_199 extends MovieClip {
public function paladinbeinghit_199(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 201
//paladindying_200 (Magic_Defense_Bored_v12_fla.paladindying_200)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class paladindying_200 extends MovieClip {
public function paladindying_200(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 202
//paladinfiring_198 (Magic_Defense_Bored_v12_fla.paladinfiring_198)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class paladinfiring_198 extends MovieClip {
public function paladinfiring_198(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 203
//panelArcherInfo_384 (Magic_Defense_Bored_v12_fla.panelArcherInfo_384)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelArcherInfo_384 extends MovieClip {
public function panelArcherInfo_384(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 204
//panelCrossbowmanInfo_390 (Magic_Defense_Bored_v12_fla.panelCrossbowmanInfo_390)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelCrossbowmanInfo_390 extends MovieClip {
public function panelCrossbowmanInfo_390(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 205
//panelInfo_361 (Magic_Defense_Bored_v12_fla.panelInfo_361)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelInfo_361 extends MovieClip {
public var upgradeBtn1:MovieClip;
public var upgradeBtn2:MovieClip;
public var upgradeBtn3:MovieClip;
public var upgradeBtn4:MovieClip;
public var infoDesc2:MovieClip;
public var infoDesc1:MovieClip;
public var infoClose:MovieClip;
public function panelInfo_361(){
super();
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(1);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 206
//panelInfoDesc1_365 (Magic_Defense_Bored_v12_fla.panelInfoDesc1_365)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelInfoDesc1_365 extends MovieClip {
public function panelInfoDesc1_365(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 207
//panelInfoSelectionClose_363 (Magic_Defense_Bored_v12_fla.panelInfoSelectionClose_363)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class panelInfoSelectionClose_363 extends MovieClip {
public var closeBtn:SimpleButton;
public var energyTxt:TextField;
public function panelInfoSelectionClose_363(){
super();
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
closeBtn.addEventListener(MouseEvent.MOUSE_DOWN, closeSelected, false);
}
public function closeSelected(e:MouseEvent):void{
MovieClip(parent.parent).rt.closeInfoSelected2();
MovieClip(this).gotoAndStop(1);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 208
//panelKnightInfo_374 (Magic_Defense_Bored_v12_fla.panelKnightInfo_374)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelKnightInfo_374 extends MovieClip {
public function panelKnightInfo_374(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 209
//panelPaladinInfo_379 (Magic_Defense_Bored_v12_fla.panelPaladinInfo_379)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelPaladinInfo_379 extends MovieClip {
public function panelPaladinInfo_379(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 210
//panelRangerInfo_389 (Magic_Defense_Bored_v12_fla.panelRangerInfo_389)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class panelRangerInfo_389 extends MovieClip {
public function panelRangerInfo_389(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 211
//pheonix_124 (Magic_Defense_Bored_v12_fla.pheonix_124)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class pheonix_124 extends MovieClip {
public var mReleaseMc:MovieClip;
public function pheonix_124(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 212
//pheonixUpgradev_419 (Magic_Defense_Bored_v12_fla.pheonixUpgradev_419)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class pheonixUpgradev_419 extends MovieClip {
public var infoBtn1:SimpleButton;
public function pheonixUpgradev_419(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(4);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.pheonixUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 213
//phoenixbeinghit_132 (Magic_Defense_Bored_v12_fla.phoenixbeinghit_132)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class phoenixbeinghit_132 extends MovieClip {
public function phoenixbeinghit_132(){
super();
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 214
//phoenixdying_133 (Magic_Defense_Bored_v12_fla.phoenixdying_133)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class phoenixdying_133 extends MovieClip {
public function phoenixdying_133(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 215
//phoenixfiring_131 (Magic_Defense_Bored_v12_fla.phoenixfiring_131)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class phoenixfiring_131 extends MovieClip {
public function phoenixfiring_131(){
super();
addFrameScript(19, frame20, 31, frame32);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame32(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 216
//poisonUpgradev_400 (Magic_Defense_Bored_v12_fla.poisonUpgradev_400)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class poisonUpgradev_400 extends MovieClip {
public var infoBtn1:SimpleButton;
public function poisonUpgradev_400(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.poisonGroundUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 217
//raiseDeadUpgradev_417 (Magic_Defense_Bored_v12_fla.raiseDeadUpgradev_417)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class raiseDeadUpgradev_417 extends MovieClip {
public var infoBtn1:SimpleButton;
public function raiseDeadUpgradev_417(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.raiseDeadUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 218
//rangerbeinghit_211 (Magic_Defense_Bored_v12_fla.rangerbeinghit_211)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class rangerbeinghit_211 extends MovieClip {
public function rangerbeinghit_211(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 219
//rangerdying_212 (Magic_Defense_Bored_v12_fla.rangerdying_212)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class rangerdying_212 extends MovieClip {
public function rangerdying_212(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 220
//rangerfiring_210 (Magic_Defense_Bored_v12_fla.rangerfiring_210)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class rangerfiring_210 extends MovieClip {
public function rangerfiring_210(){
super();
addFrameScript(12, frame13, 24, frame25);
}
function frame25(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
function frame13(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 221
//rightSide_344 (Magic_Defense_Bored_v12_fla.rightSide_344)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class rightSide_344 extends MovieClip {
public var enemyIconsS:MovieClip;
public var nMonsterBtn:SimpleButton;
public var speedMc:MovieClip;
public function rightSide_344(){
super();
addFrameScript(0, frame1);
}
function frame1(){
nMonsterBtn.addEventListener(MouseEvent.MOUSE_DOWN, nMon, false);
}
public function nMon(e:MouseEvent):void{
MovieClip(parent).rt.nextMonster(MovieClip(this));
}
}
}//package Magic_Defense_Bored_v12_fla
Section 222
//risingScoreTxt_337 (Magic_Defense_Bored_v12_fla.risingScoreTxt_337)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.text.*;
public dynamic class risingScoreTxt_337 extends MovieClip {
public var scoreTxt:TextField;
public function risingScoreTxt_337(){
super();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 223
//rocketTower_220 (Magic_Defense_Bored_v12_fla.rocketTower_220)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class rocketTower_220 extends MovieClip {
public var mReleaseMc:MovieClip;
public function rocketTower_220(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 224
//seeDistanceUpgradev_402 (Magic_Defense_Bored_v12_fla.seeDistanceUpgradev_402)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class seeDistanceUpgradev_402 extends MovieClip {
public var infoBtn1:SimpleButton;
public function seeDistanceUpgradev_402(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.seeDistanceUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 225
//serpent_67 (Magic_Defense_Bored_v12_fla.serpent_67)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class serpent_67 extends MovieClip {
public var mReleaseMc:MovieClip;
public function serpent_67(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 226
//serpentbeinghit_72 (Magic_Defense_Bored_v12_fla.serpentbeinghit_72)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class serpentbeinghit_72 extends MovieClip {
public function serpentbeinghit_72(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 227
//serpentdying_73 (Magic_Defense_Bored_v12_fla.serpentdying_73)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class serpentdying_73 extends MovieClip {
public function serpentdying_73(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 228
//serpentfiring_71 (Magic_Defense_Bored_v12_fla.serpentfiring_71)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class serpentfiring_71 extends MovieClip {
public function serpentfiring_71(){
super();
addFrameScript(7, frame8, 21, frame22);
}
function frame8(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame22(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 229
//skeleton_7 (Magic_Defense_Bored_v12_fla.skeleton_7)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class skeleton_7 extends MovieClip {
public var mReleaseMc:MovieClip;
public function skeleton_7(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 230
//skeletonbeinghit_12 (Magic_Defense_Bored_v12_fla.skeletonbeinghit_12)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class skeletonbeinghit_12 extends MovieClip {
public function skeletonbeinghit_12(){
super();
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 231
//skeletondying_13 (Magic_Defense_Bored_v12_fla.skeletondying_13)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class skeletondying_13 extends MovieClip {
public function skeletondying_13(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 232
//skeletonfiring_11 (Magic_Defense_Bored_v12_fla.skeletonfiring_11)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class skeletonfiring_11 extends MovieClip {
public function skeletonfiring_11(){
super();
addFrameScript(34, frame35);
}
function frame35(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 233
//slowTimeUpgradev_410 (Magic_Defense_Bored_v12_fla.slowTimeUpgradev_410)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class slowTimeUpgradev_410 extends MovieClip {
public var infoBtn1:SimpleButton;
public function slowTimeUpgradev_410(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.slowTimeUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 234
//small_explosion_335 (Magic_Defense_Bored_v12_fla.small_explosion_335)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class small_explosion_335 extends MovieClip {
public function small_explosion_335(){
super();
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 235
//sorcererbeinghit_266 (Magic_Defense_Bored_v12_fla.sorcererbeinghit_266)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class sorcererbeinghit_266 extends MovieClip {
public function sorcererbeinghit_266(){
super();
addFrameScript(19, frame20);
}
function frame20(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 236
//sorcererdying_267 (Magic_Defense_Bored_v12_fla.sorcererdying_267)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class sorcererdying_267 extends MovieClip {
public function sorcererdying_267(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 237
//sorcererfiring_265 (Magic_Defense_Bored_v12_fla.sorcererfiring_265)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class sorcererfiring_265 extends MovieClip {
public function sorcererfiring_265(){
super();
addFrameScript(33, frame34, 52, frame53);
}
function frame34(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame53(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 238
//sorcererInfoPanel_407 (Magic_Defense_Bored_v12_fla.sorcererInfoPanel_407)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class sorcererInfoPanel_407 extends MovieClip {
public function sorcererInfoPanel_407(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 239
//sorcererMc_263 (Magic_Defense_Bored_v12_fla.sorcererMc_263)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class sorcererMc_263 extends MovieClip {
public var mReleaseMc:MovieClip;
public function sorcererMc_263(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 240
//soundFxBtn2_354 (Magic_Defense_Bored_v12_fla.soundFxBtn2_354)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class soundFxBtn2_354 extends MovieClip {
public function soundFxBtn2_354(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 241
//spider_172 (Magic_Defense_Bored_v12_fla.spider_172)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class spider_172 extends MovieClip {
public var mReleaseMc:MovieClip;
public function spider_172(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 242
//spiderbeinghit_176 (Magic_Defense_Bored_v12_fla.spiderbeinghit_176)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spiderbeinghit_176 extends MovieClip {
public function spiderbeinghit_176(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 243
//spiderdying_177 (Magic_Defense_Bored_v12_fla.spiderdying_177)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spiderdying_177 extends MovieClip {
public function spiderdying_177(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 244
//spiderfiring_175 (Magic_Defense_Bored_v12_fla.spiderfiring_175)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spiderfiring_175 extends MovieClip {
public function spiderfiring_175(){
super();
addFrameScript(19, frame20, 35, frame36);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
function frame36(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 245
//steelTArrowUpgradev_385 (Magic_Defense_Bored_v12_fla.steelTArrowUpgradev_385)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class steelTArrowUpgradev_385 extends MovieClip {
public var infoBtn1:SimpleButton;
public function steelTArrowUpgradev_385(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.steelTUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 246
//Tree1_310 (Magic_Defense_Bored_v12_fla.Tree1_310)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Tree1_310 extends MovieClip {
public function Tree1_310(){
super();
addFrameScript(0, frame1);
}
function frame1(){
this.gotoAndStop(MovieClip(parent).tileType);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 247
//trollbeinghit_100 (Magic_Defense_Bored_v12_fla.trollbeinghit_100)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class trollbeinghit_100 extends MovieClip {
public function trollbeinghit_100(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 248
//trolldying_101 (Magic_Defense_Bored_v12_fla.trolldying_101)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class trolldying_101 extends MovieClip {
public function trolldying_101(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 249
//trollfiring_99 (Magic_Defense_Bored_v12_fla.trollfiring_99)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class trollfiring_99 extends MovieClip {
public function trollfiring_99(){
super();
addFrameScript(19, frame20, 37, frame38);
}
function frame20(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.groundAttack();
};
};
}
function frame38(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 250
//trollMc_96 (Magic_Defense_Bored_v12_fla.trollMc_96)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class trollMc_96 extends MovieClip {
public var mReleaseMc:MovieClip;
public function trollMc_96(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 251
//unicorn_117 (Magic_Defense_Bored_v12_fla.unicorn_117)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class unicorn_117 extends MovieClip {
public var mReleaseMc:MovieClip;
public function unicorn_117(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 252
//unicornbeinghit_121 (Magic_Defense_Bored_v12_fla.unicornbeinghit_121)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class unicornbeinghit_121 extends MovieClip {
public function unicornbeinghit_121(){
super();
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 253
//unicorndying_122 (Magic_Defense_Bored_v12_fla.unicorndying_122)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class unicorndying_122 extends MovieClip {
public function unicorndying_122(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 254
//unicornfiring_120 (Magic_Defense_Bored_v12_fla.unicornfiring_120)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class unicornfiring_120 extends MovieClip {
public function unicornfiring_120(){
super();
addFrameScript(17, frame18, 38, frame39);
}
function frame18(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
if (MovieClip(this.parent.parent).myObject.fasterFiringUpg == true){
gotoAndPlay(14);
};
};
};
}
function frame39(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 255
//unicornUpgradev_414 (Magic_Defense_Bored_v12_fla.unicornUpgradev_414)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class unicornUpgradev_414 extends MovieClip {
public var infoBtn1:SimpleButton;
public function unicornUpgradev_414(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(5);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.unicornUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 256
//unitsTxtScreens_491 (Magic_Defense_Bored_v12_fla.unitsTxtScreens_491)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
public dynamic class unitsTxtScreens_491 extends MovieClip {
public var mfsBtn:SimpleButton;
public var teBtn:SimpleButton;
public var gbsBtn:SimpleButton;
public var mbBtn:SimpleButton;
public var muBtn:SimpleButton;
public function unitsTxtScreens_491(){
super();
addFrameScript(0, frame1);
}
public function gotoTE(e:MouseEvent):void{
gotoAndStop("theEnemiesF");
}
public function gotoMU(e:MouseEvent):void{
gotoAndStop("magicUsersF");
}
function frame1(){
gbsBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoGBS, false);
mfsBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoMFS, false);
teBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoTE, false);
muBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoMU, false);
mbBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoMAG, false);
stop();
}
public function gotoGBS(e:MouseEvent):void{
gotoAndStop("groundBasedSoldiersF");
}
public function gotoMFS(e:MouseEvent):void{
gotoAndStop("missileFiringSoldiersF");
}
public function gotoMAG(e:MouseEvent):void{
gotoAndStop("magicalCreaturesF");
}
}
}//package Magic_Defense_Bored_v12_fla
Section 257
//upgradeBack_237 (Magic_Defense_Bored_v12_fla.upgradeBack_237)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class upgradeBack_237 extends MovieClip {
public function upgradeBack_237(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 258
//upgradeClock_239 (Magic_Defense_Bored_v12_fla.upgradeClock_239)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class upgradeClock_239 extends MovieClip {
public function upgradeClock_239(){
super();
addFrameScript(35, frame36);
}
function frame36(){
MovieClip(this.parent).gotoAndStop(1);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 259
//upgradePlatemailvv_367 (Magic_Defense_Bored_v12_fla.upgradePlatemailvv_367)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class upgradePlatemailvv_367 extends MovieClip {
public var infoBtn1:SimpleButton;
public function upgradePlatemailvv_367(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(3);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.plateMailUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
}
}
}//package Magic_Defense_Bored_v12_fla
Section 260
//upgradesLock_241 (Magic_Defense_Bored_v12_fla.upgradesLock_241)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class upgradesLock_241 extends MovieClip {
public function upgradesLock_241(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 261
//upgradeSwordv_375 (Magic_Defense_Bored_v12_fla.upgradeSwordv_375)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class upgradeSwordv_375 extends MovieClip {
public var infoBtn1:SimpleButton;
public function upgradeSwordv_375(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(2);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.swordUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 262
//valkyrie_110 (Magic_Defense_Bored_v12_fla.valkyrie_110)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class valkyrie_110 extends MovieClip {
public var mReleaseMc:MovieClip;
public function valkyrie_110(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 263
//valkyriebeinghit_114 (Magic_Defense_Bored_v12_fla.valkyriebeinghit_114)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class valkyriebeinghit_114 extends MovieClip {
public function valkyriebeinghit_114(){
super();
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 264
//valkyriedying_115 (Magic_Defense_Bored_v12_fla.valkyriedying_115)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class valkyriedying_115 extends MovieClip {
public function valkyriedying_115(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 265
//valkyriefiring_113 (Magic_Defense_Bored_v12_fla.valkyriefiring_113)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class valkyriefiring_113 extends MovieClip {
public function valkyriefiring_113(){
super();
addFrameScript(14, frame15, 23, frame24);
}
function frame15(){
}
function frame24(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 266
//valkyrieUpgradev_405 (Magic_Defense_Bored_v12_fla.valkyrieUpgradev_405)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class valkyrieUpgradev_405 extends MovieClip {
public var infoBtn1:SimpleButton;
public function valkyrieUpgradev_405(){
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function info1(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(4);
}
function frame3(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
function frame1(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
stop();
}
public function info1c(e:MouseEvent):void{
MovieClip(parent.parent).rt.selectionBoxMc.itemSprite.valkyrieUpgrade();
}
public function info1b(e:MouseEvent):void{
MovieClip(parent).infoDesc2.gotoAndStop(1);
}
function frame2(){
infoBtn1.addEventListener(MouseEvent.MOUSE_OVER, info1, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_OUT, info1b, false);
infoBtn1.addEventListener(MouseEvent.MOUSE_DOWN, info1c, false);
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 267
//wallBroken_181 (Magic_Defense_Bored_v12_fla.wallBroken_181)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class wallBroken_181 extends MovieClip {
public function wallBroken_181(){
super();
addFrameScript(4, frame5);
}
function frame5(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 268
//wallMc_261 (Magic_Defense_Bored_v12_fla.wallMc_261)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class wallMc_261 extends MovieClip {
public function wallMc_261(){
super();
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
MovieClip(this.parent).removeMe();
stop();
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 269
//warlockbeinghit_272 (Magic_Defense_Bored_v12_fla.warlockbeinghit_272)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class warlockbeinghit_272 extends MovieClip {
public function warlockbeinghit_272(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 270
//warlockdying_273 (Magic_Defense_Bored_v12_fla.warlockdying_273)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class warlockdying_273 extends MovieClip {
public function warlockdying_273(){
super();
addFrameScript(18, frame19);
}
function frame19(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 271
//warlockfiring_271 (Magic_Defense_Bored_v12_fla.warlockfiring_271)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class warlockfiring_271 extends MovieClip {
public function warlockfiring_271(){
super();
addFrameScript(7, frame8, 23, frame24);
}
function frame8(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame24(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 272
//WarlockInfoPanel_416 (Magic_Defense_Bored_v12_fla.WarlockInfoPanel_416)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class WarlockInfoPanel_416 extends MovieClip {
public function WarlockInfoPanel_416(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 273
//warlockMc_269 (Magic_Defense_Bored_v12_fla.warlockMc_269)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class warlockMc_269 extends MovieClip {
public var mReleaseMc:MovieClip;
public function warlockMc_269(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 274
//wireMc_259 (Magic_Defense_Bored_v12_fla.wireMc_259)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class wireMc_259 extends MovieClip {
public function wireMc_259(){
super();
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
MovieClip(this.parent).removeMe();
stop();
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 275
//witch_142 (Magic_Defense_Bored_v12_fla.witch_142)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class witch_142 extends MovieClip {
public var mReleaseMc:MovieClip;
public function witch_142(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 276
//witchbeinghit_146 (Magic_Defense_Bored_v12_fla.witchbeinghit_146)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class witchbeinghit_146 extends MovieClip {
public function witchbeinghit_146(){
super();
addFrameScript(14, frame15);
}
function frame15(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 277
//witchdying_147 (Magic_Defense_Bored_v12_fla.witchdying_147)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class witchdying_147 extends MovieClip {
public function witchdying_147(){
super();
addFrameScript(19, frame20);
}
function frame20(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 278
//witchfiring_145 (Magic_Defense_Bored_v12_fla.witchfiring_145)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class witchfiring_145 extends MovieClip {
public function witchfiring_145(){
super();
addFrameScript(35, frame36, 52, frame53);
}
function frame36(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame53(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 279
//wizardbeinghit_229 (Magic_Defense_Bored_v12_fla.wizardbeinghit_229)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class wizardbeinghit_229 extends MovieClip {
public function wizardbeinghit_229(){
super();
addFrameScript(10, frame11);
}
function frame11(){
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 280
//wizarddying_230 (Magic_Defense_Bored_v12_fla.wizarddying_230)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class wizarddying_230 extends MovieClip {
public function wizarddying_230(){
super();
addFrameScript(17, frame18);
}
function frame18(){
MovieClip(this.parent.parent).removeMe();
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 281
//wizardfiring_228 (Magic_Defense_Bored_v12_fla.wizardfiring_228)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class wizardfiring_228 extends MovieClip {
public function wizardfiring_228(){
super();
addFrameScript(9, frame10, 18, frame19);
}
function frame10(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
MovieClip(this.parent.parent).myObject.fireProjectile();
};
};
}
function frame19(){
if (MovieClip(parent) != null){
if (MovieClip(parent.parent) != null){
if (MovieClip(this.parent.parent).myObject != null){
MovieClip(this.parent.parent).myObject.soldierState = 0;
};
};
};
if (MovieClip(parent) != null){
MovieClip(this.parent).gotoAndStop("stand");
};
}
}
}//package Magic_Defense_Bored_v12_fla
Section 282
//wizardInfoPanel_404 (Magic_Defense_Bored_v12_fla.wizardInfoPanel_404)
package Magic_Defense_Bored_v12_fla {
import flash.display.*;
public dynamic class wizardInfoPanel_404 extends MovieClip {
public function wizardInfoPanel_404(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Magic_Defense_Bored_v12_fla
Section 283
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public function MochiAd(){
super();
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showClickAwayAd(options:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = options;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (width:Number, height:Number):void{
}, ad_failed:function ():void{
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (callbackID:Number, arg:Object):void{
MochiAd.rpc(clip, callbackID, arg);
};
sendHostProgress = false;
mc.regContLC = function (lc_name:String):void{
mc._containerLCName = lc_name;
};
chk["onEnterFrame"] = function ():void{
var ad_clip:Object;
var elapsed:Number;
var finished:Boolean;
var total:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
ad_clip = this.parent._mochiad_ctr;
elapsed = (getTimer() - this.started);
finished = false;
if (!chk.showing){
total = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (total > 0){
chk.showing = true;
finished = true;
chk.started = getTimer();
} else {
if (elapsed > chk.ad_timeout){
options.ad_failed();
finished = true;
};
};
};
if (this.root == null){
finished = true;
};
if (finished){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(server:String):String{
var hostname:String;
hostname = server.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (hostname);
};
Security.allowDomain("*");
Security.allowDomain(hostname);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(hostname);
return (hostname);
}
public static function unload(clip:Object):Boolean{
if (((clip.clip) && (clip.clip._mochiad))){
clip = clip.clip;
};
if (clip.origFrameRate != undefined){
clip.stage.frameRate = clip.origFrameRate;
};
if (!clip._mochiad){
return (false);
};
if (clip._mochiad._containerLCName != undefined){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
};
if (clip._mochiad.onUnload){
clip._mochiad.onUnload();
};
delete clip._mochiad_loaded;
delete clip._mochiad;
return (true);
}
public static function showInterLevelAd(options:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = options;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (width:Number, height:Number):void{
}, ad_failed:function ():void{
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var p:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
p = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0){
this.parent.alpha = (p * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (msec:Number):void{
var _chk:Object;
_chk = mc._mochiad_wait;
_chk.server_control = true;
_chk.showing = true;
_chk.started = getTimer();
_chk.ad_msec = (msec - 250);
};
mc.rpc = function (callbackID:Number, arg:Object):void{
MochiAd.rpc(clip, callbackID, arg);
};
chk["onEnterFrame"] = function ():void{
var ad_clip:Object;
var elapsed:Number;
var finished:Boolean;
var total:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
ad_clip = this.parent._mochiad_ctr;
elapsed = (getTimer() - this.started);
finished = false;
if (!chk.showing){
total = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (total > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (elapsed > chk.ad_timeout){
options.ad_failed();
finished = true;
};
};
};
if (elapsed > chk.ad_msec){
finished = true;
};
if (finished){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(options:Object, defaults:Object):Object{
var optcopy:Object;
var k:String;
var pairs:Array;
var i:Number;
var kv:Array;
optcopy = {};
for (k in defaults) {
optcopy[k] = defaults[k];
};
if (options){
for (k in options) {
optcopy[k] = options[k];
};
};
if (optcopy.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
options = optcopy.clip.loaderInfo.parameters.mochiad_options;
if (options){
pairs = options.split("&");
i = 0;
while (i < pairs.length) {
kv = pairs[i].split("=");
optcopy[unescape(kv[0])] = unescape(kv[1]);
i++;
};
};
if (optcopy.id == "test"){
};
return (optcopy);
}
public static function _cleanup(mc:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = mc;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
lc.client = null;
lc.close();
//unresolved jump
var _slot1 = e;
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(options:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = options;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
if (clip._mochiad_loaded){
return (null);
};
//unresolved jump
var _slot1 = e;
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
//unresolved jump
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (ev:Object):void{
ev.target.removeEventListener(ev.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (io:IOErrorEvent):void{
});
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(base:Object, methodName:String, argsArray:Array):Object{
var nameArray:Array;
var i:Number;
nameArray = methodName.split(".");
i = 0;
while (i < (nameArray.length - 1)) {
if ((((base[nameArray[i]] == undefined)) || ((base[nameArray[i]] == null)))){
return (undefined);
};
base = base[nameArray[i]];
i++;
};
if (typeof(base[nameArray[i]]) == "function"){
return (base[nameArray[i]].apply(base, argsArray));
};
return (undefined);
}
public static function createEmptyMovieClip(parent:Object, name:String, depth:Number):MovieClip{
var mc:MovieClip;
mc = new MovieClip();
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
parent[name] = mc;
mc["_name"] = name;
return (mc);
}
public static function _getRes(options:Object, clip:Object):Array{
var b:Object;
var w:Number;
var h:Number;
var xy:Array;
b = clip.getBounds(clip.root);
w = 0;
h = 0;
if (typeof(options.res) != "undefined"){
xy = options.res.split("x");
w = parseFloat(xy[0]);
h = parseFloat(xy[1]);
} else {
w = (b.xMax - b.xMin);
h = (b.yMax - b.yMin);
};
if ((((w == 0)) || ((h == 0)))){
w = clip.stage.stageWidth;
h = clip.stage.stageHeight;
};
return ([w, h]);
}
public static function adShowing(mc:Object):void{
mc.origFrameRate = mc.stage.frameRate;
mc.stage.frameRate = 30;
}
public static function getValue(base:Object, objectName:String):Object{
var nameArray:Array;
var i:Number;
nameArray = objectName.split(".");
i = 0;
while (i < (nameArray.length - 1)) {
if ((((base[nameArray[i]] == undefined)) || ((base[nameArray[i]] == null)))){
return (undefined);
};
base = base[nameArray[i]];
i++;
};
return (base[nameArray[i]]);
}
public static function rpc(clip:Object, callbackID:Number, arg:Object):void{
var _local4:Object;
var _local5:Object;
switch (arg.id){
case "setValue":
MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case "getValue":
_local4 = MochiAd.getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local5);
break;
};
}
public static function setValue(base:Object, objectName:String, value:Object):void{
var nameArray:Array;
var i:Number;
nameArray = objectName.split(".");
i = 0;
while (i < (nameArray.length - 1)) {
if ((((base[nameArray[i]] == undefined)) || ((base[nameArray[i]] == null)))){
return;
};
base = base[nameArray[i]];
i++;
};
base[nameArray[i]] = value;
}
public static function showPreGameAd(options:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_w:Number;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var progress:Number;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = options;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (width:Number, height:Number):void{
}, ad_failed:function ():void{
}, ad_skipped:function ():void{
}, ad_progress:function (percent:Number):void{
}, progress_override:function (_clip:Object):Number{
return (NaN);
}, bar_offset:0};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = (10 + options.bar_offset);
bar.y = (h - 20);
};
bar_w = ((w - bar.x) - 10);
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(bar_w, 0);
backing.lineTo(bar_w, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(bar_w, 0);
inside.lineTo(bar_w, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(bar_w, 0);
outline.lineTo(bar_w, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var p:Number;
p = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0){
this.parent.alpha = (p * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
progress = Math.min(1, options.progress_override(clip));
f = function (ev:Event):void{
ev.target.removeEventListener(ev.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (!isNaN(progress)){
complete = (progress == 1);
} else {
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (msec:Number):void{
var _chk:Object;
_chk = mc._mochiad_wait;
_chk.server_control = true;
_chk.showing = true;
_chk.started = getTimer();
_chk.ad_msec = msec;
};
mc.rpc = function (callbackID:Number, arg:Object):void{
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s:String):Object{
return (s);
};
mc.regContLC = function (lc_name:String):void{
mc._containerLCName = lc_name;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (lc_name:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _clip:Object;
var ad_clip:Object;
var elapsed:Number;
var finished:Boolean;
var clip_total:Number;
var clip_loaded:Number;
var clip_progress:Number;
var clip_pcnt:Number;
var ad_pcnt:Number;
var _inside:Object;
var pcnt:Number;
var total:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_clip = this.parent.parent.root;
ad_clip = this.parent._mochiad_ctr;
elapsed = (getTimer() - this.started);
finished = false;
clip_total = _clip.loaderInfo.bytesTotal;
clip_loaded = _clip.loaderInfo.bytesLoaded;
clip_progress = Math.min(1, options.progress_override(_clip));
if (clip_progress == 1){
complete = true;
};
if (complete){
clip_loaded = Math.max(1, clip_loaded);
clip_total = clip_loaded;
};
clip_pcnt = ((100 * clip_loaded) / clip_total);
if (!isNaN(clip_progress)){
clip_pcnt = (100 * clip_progress);
};
ad_pcnt = ((100 * elapsed) / chk.ad_msec);
_inside = this._mochiad_bar._inside;
pcnt = Math.min(100, Math.min(((clip_pcnt) || (0)), ad_pcnt));
pcnt = Math.max(this.last_pcnt, pcnt);
this.last_pcnt = pcnt;
_inside.scaleX = (pcnt * 0.01);
options.ad_progress(pcnt);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:clip_pcnt});
if (clip_pcnt >= 100){
sendHostProgress = false;
};
};
if (!chk.showing){
total = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (total > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((elapsed > chk.ad_timeout)) && ((clip_pcnt == 100)))){
options.ad_failed();
finished = true;
};
};
};
if (elapsed > chk.ad_msec){
finished = true;
};
if (((complete) && (finished))){
if (unloaded){
MochiAd.unload(_clip);
} else {
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(options:Object):void{
MochiAd.showPreGameAd(options);
}
public static function showTimedAd(options:Object):void{
MochiAd.showInterLevelAd(options);
}
public static function doOnEnterFrame(mc:MovieClip):void{
var f:Function;
var mc = mc;
f = function (ev:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
ev.target.removeEventListener(ev.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 284
//MochiCoins (mochi.as3.MochiCoins)
package mochi.as3 {
public class MochiCoins {
public static const STORE_HIDE:String = "StoreHide";
public static const LOGGED_IN:String = "LoggedIn";
public static const STORE_ITEMS:String = "StoreItems";
public static const NO_USER:String = "NoUser";
public static const PROPERTIES_SIZE:String = "PropertiesSize";
public static const ITEM_NEW:String = "ItemNew";
public static const USER_INFO:String = "UserInfo";
public static const IO_ERROR:String = "IOError";
public static const ITEM_OWNED:String = "ItemOwned";
public static const PROPERTIES_SAVED:String = "PropertySaved";
public static const WIDGET_LOADED:String = "WidgetLoaded";
public static const ERROR:String = "Error";
public static const LOGGED_OUT:String = "LoggedOut";
public static const PROFILE_SHOW:String = "ProfileShow";
public static const LOGIN_HIDE:String = "LoginHide";
public static const LOGIN_SHOW:String = "LoginShow";
public static const STORE_SHOW:String = "StoreShow";
public static const PROFILE_HIDE:String = "ProfileHide";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
public function MochiCoins(){
super();
}
public static function showItem(options:Object=null):void{
if (((!(options)) || (!((typeof(options.item) == "string"))))){
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showItem", {options:options}, null, null);
}
public static function saveUserProperties(properties:Object):void{
MochiServices.send("coins_saveUserProperties", properties);
}
public static function triggerEvent(eventType:String, args:Object):void{
_dispatcher.triggerEvent(eventType, args);
}
public static function showLoginWidget(options:Object=null):void{
MochiServices.setContainer();
MochiServices.bringToTop();
MochiServices.send("coins_showLoginWidget", {options:options});
}
public static function getStoreItems():void{
MochiServices.send("coins_getStoreItems");
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function showStore(options:Object=null):void{
MochiServices.bringToTop();
MochiServices.send("coins_showStore", {options:options}, null, null);
}
public static function addEventListener(eventType:String, delegate:Function):void{
_dispatcher.addEventListener(eventType, delegate);
}
public static function getUserInfo():void{
MochiServices.send("coins_getUserInfo");
}
public static function hideLoginWidget():void{
MochiServices.send("coins_hideLoginWidget");
}
public static function removeEventListener(eventType:String, delegate:Function):void{
_dispatcher.removeEventListener(eventType, delegate);
}
public static function showVideo(options:Object=null):void{
if (((!(options)) || (!((typeof(options.item) == "string"))))){
return;
};
MochiServices.bringToTop();
MochiServices.send("coins_showVideo", {options:options}, null, null);
}
}
}//package mochi.as3
Section 285
//MochiDigits (mochi.as3.MochiDigits)
package mochi.as3 {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(digit:Number=0, index:uint=0):void{
super();
Encoder = 0;
setValue(digit, index);
}
public function set value(v:Number):void{
setValue(v);
}
public function reencode():void{
var newEncode:uint;
newEncode = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (newEncode ^ Encoder));
Encoder = newEncode;
}
public function toString():String{
var s:String;
s = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
s = (s + Sibling.toString());
};
return (s);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(digit:Number=0, index:uint=0):void{
var s:String;
s = digit.toString();
var _temp1 = index;
index = (index + 1);
Fragment = (s.charCodeAt(_temp1) ^ Encoder);
if (index < s.length){
Sibling = new MochiDigits(digit, index);
} else {
Sibling = null;
};
reencode();
}
public function addValue(inc:Number):void{
value = (value + inc);
}
}
}//package mochi.as3
Section 286
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher)
package mochi.as3 {
public class MochiEventDispatcher {
private var eventTable:Object;
public function MochiEventDispatcher():void{
super();
eventTable = {};
}
public function triggerEvent(event:String, args:Object):void{
var i:Object;
if (eventTable[event] == undefined){
return;
};
for (i in eventTable[event]) {
var _local6 = eventTable[event];
_local6[i](args);
};
}
public function removeEventListener(event:String, delegate:Function):void{
var s:Object;
if (eventTable[event] == undefined){
eventTable[event] = [];
return;
};
for (s in eventTable[event]) {
if (eventTable[event][s] != delegate){
} else {
eventTable[event].splice(Number(s), 1);
};
};
}
public function addEventListener(event:String, delegate:Function):void{
removeEventListener(event, delegate);
eventTable[event].push(delegate);
}
}
}//package mochi.as3
Section 287
//MochiEvents (mochi.as3.MochiEvents)
package mochi.as3 {
import flash.display.*;
public class MochiEvents {
public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL";
public static const FORMAT_LONG:String = "LongForm";
public static const ALIGN_BOTTOM:String = "ALIGN_B";
public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived";
public static const FORMAT_SHORT:String = "ShortForm";
public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR";
public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR";
public static const ALIGN_TOP:String = "ALIGN_T";
public static const ALIGN_LEFT:String = "ALIGN_L";
public static const ALIGN_RIGHT:String = "ALIGN_R";
public static const ALIGN_TOP_LEFT:String = "ALIGN_TL";
public static const ALIGN_CENTER:String = "ALIGN_C";
private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher();
private static var gameStart:Number;
private static var levelStart:Number;
public function MochiEvents(){
super();
}
public static function addEventListener(eventType:String, delegate:Function):void{
_dispatcher.addEventListener(eventType, delegate);
}
public static function removeEventListener(eventType:String, delegate:Function):void{
_dispatcher.removeEventListener(eventType, delegate);
}
public static function startSession(achievementID:String):void{
MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
public static function triggerEvent(eventType:String, args:Object):void{
_dispatcher.triggerEvent(eventType, args);
}
public static function setNotifications(clip:MovieClip, style:Object):void{
var args:Object;
var s:Object;
args = {};
for (s in style) {
args[s] = style[s];
};
args.clip = clip;
MochiServices.send("events_setNotifications", args, null, null);
}
public static function endGame():void{
var delta:Number;
delta = (new Date().time - gameStart);
trigger("end_game", {time:delta});
}
public static function startGame():void{
gameStart = new Date().time;
trigger("start_game");
}
public static function trigger(kind:String, obj:Object=null):void{
if (obj == null){
obj = {};
} else {
if (obj["kind"] != undefined){
obj["kind"] = kind;
};
};
MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null);
}
public static function getVersion():String{
return (MochiServices.getVersion());
}
public static function startLevel():void{
levelStart = new Date().time;
trigger("start_level");
}
public static function endLevel():void{
var delta:Number;
delta = (new Date().time - levelStart);
trigger("end_level", {time:delta});
}
}
}//package mochi.as3
Section 288
//MochiScores (mochi.as3.MochiScores)
package mochi.as3 {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public function MochiScores(){
super();
}
public static function showLeaderboard(options:Object=null):void{
var n:Number;
var options = options;
if (options != null){
delete options.clip;
MochiServices.setContainer();
MochiServices.bringToTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
} else {
if (Math.floor(n) != n){
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
//unresolved jump
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
//unresolved jump
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
//unresolved jump
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.warnID(options.boardID, true);
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(callbackObj:Object, callbackMethod:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
public static function requestList(callbackObj:Object, callbackMethod:Object=null):void{
MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
public static function scoresArrayToObjects(scores:Object):Object{
var so:Object;
var i:Number;
var j:Number;
var o:Object;
var row_obj:Object;
var item:String;
var param:String;
so = {};
for (item in scores) {
if (typeof(scores[item]) == "object"){
if (((!((scores[item].cols == null))) && (!((scores[item].rows == null))))){
so[item] = [];
o = scores[item];
j = 0;
while (j < o.rows.length) {
row_obj = {};
i = 0;
while (i < o.cols.length) {
row_obj[o.cols[i]] = o.rows[j][i];
i++;
};
so[item].push(row_obj);
j++;
};
} else {
so[item] = {};
for (param in scores[item]) {
so[item][param] = scores[item][param];
};
};
} else {
so[item] = scores[item];
};
};
return (so);
}
public static function submit(score:Number, name:String, callbackObj:Object=null, callbackMethod:Object=null):void{
score = Number(score);
if (isNaN(score)){
} else {
if ((((score == Number.NEGATIVE_INFINITY)) || ((score == Number.POSITIVE_INFINITY)))){
} else {
if (Math.floor(score) != score){
};
score = Number(score);
};
};
MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
public static function onClose(args:Object=null):void{
if (((((args) && ((args.error == true)))) && (onErrorHandler))){
if (args.errorCode == null){
args.errorCode = "IOError";
};
onErrorHandler(args.errorCode);
MochiServices.doClose();
return;
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(boardID:String):void{
MochiServices.warnID(boardID, true);
MochiScores.boardID = boardID;
MochiServices.send("scores_setBoardID", {boardID:boardID});
}
}
}//package mochi.as3
Section 289
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _preserved:Object;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
public static var servicesSync:MochiSync = new MochiSync();
private static var _clip:MovieClip;
private static var _id:String;
private static var _services:String = "services.swf";
private static var _servURL:String = "http://www.mochiads.com/static/lib/services/";
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _loader:Loader;
private static var _connecting:Boolean = false;
private static var _mochiLocalConnection:MovieClip;
private static var _listenChannelName:String = "__ms_";
public static var onError:Object;
public static var netup:Boolean = true;
private static var _mochiLC:String = "MochiLC.swf";
public function MochiServices(){
super();
}
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function onReceive(pkg:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = pkg;
cb = pkg.callbackID;
cblst = _clip._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
//unresolved jump
};
};
if (method != undefined){
method.apply(obj, pkg.args);
//unresolved jump
var _slot1 = error;
} else {
if (obj != null){
obj(pkg.args);
//unresolved jump
var _slot1 = error;
};
};
delete _clip._callbacks[cb];
}
public static function get childClip():Object{
return (_clip);
}
public static function send(methodName:String, args:Object=null, callbackObject:Object=null, callbackMethod:Object=null):void{
if (_connected){
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
handleError(args, callbackObject, callbackMethod);
flush(true);
return;
};
_clip._queue.push({methodName:methodName, args:args, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_clip._nextcallbackID++;
};
};
}
private static function init(id:String, clip:Object):void{
_id = id;
if (clip != null){
_container = clip;
loadCommunicator(id, _container);
};
}
private static function clickMovie(url:String, cb:Function):MovieClip{
var avm1_bytecode:Array;
var b:int;
var header:Array;
var footer:Array;
var mc:MovieClip;
var lc:LocalConnection;
var lc_name:String;
var ba:ByteArray;
var cpool:ByteArray;
var actionLength:uint;
var fileLength:uint;
var loader:Loader;
avm1_bytecode = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
header = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
footer = [0, 64, 0, 0, 0];
mc = new MovieClip();
lc = new LocalConnection();
lc_name = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time));
lc = new LocalConnection();
mc.lc = lc;
mc.click = cb;
lc.client = mc;
lc.connect(lc_name);
ba = new ByteArray();
cpool = new ByteArray();
cpool.endian = Endian.LITTLE_ENDIAN;
cpool.writeShort(1);
cpool.writeUTFBytes(((url + " ") + lc_name));
cpool.writeByte(0);
actionLength = ((avm1_bytecode.length + cpool.length) + 4);
fileLength = (actionLength + 35);
ba.endian = Endian.LITTLE_ENDIAN;
ba.writeUTFBytes("FWS");
ba.writeByte(8);
ba.writeUnsignedInt(fileLength);
for each (b in header) {
ba.writeByte(b);
};
ba.writeUnsignedInt(actionLength);
ba.writeByte(136);
ba.writeShort(cpool.length);
ba.writeBytes(cpool);
for each (b in avm1_bytecode) {
ba.writeByte(b);
};
for each (b in footer) {
ba.writeByte(b);
};
loader = new Loader();
loader.loadBytes(ba);
mc.addChild(loader);
return (mc);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(url:String, burl:String, btn:DisplayObjectContainer, onClick:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = url;
var burl = burl;
var btn = btn;
var onClick = onClick;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (url:String):void{
var rect:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(url, onClick);
rect = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = rect.x;
avm1Click.y = rect.y;
avm1Click.scaleX = (0.01 * rect.width);
avm1Click.scaleY = (0.01 * rect.height);
};
err = function (ev:Object):void{
netup = false;
ev.target.removeEventListener(ev.type, arguments.callee);
setURL(burl);
};
complete = function (ev:Object):void{
ev.target.removeEventListener(ev.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function warnID(bid:String, leaderboard:Boolean):void{
var i:Number;
bid = bid.toLowerCase();
if (bid.length != 16){
return;
};
if (bid == "1e113c7239048b3f"){
if (leaderboard){
//unresolved jump
};
return;
} else {
if (bid == "84993a1de4031cd8"){
if (leaderboard){
//unresolved jump
};
return;
};
};
i = 0;
while (i < bid.length) {
switch (bid.charAt(i)){
case "0":
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
case "8":
case "9":
case "a":
case "b":
case "c":
case "d":
case "e":
case "f":
break;
default:
return;
};
i++;
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
_mochiLocalConnection.close();
//unresolved jump
var _slot1 = error;
};
if (_timer != null){
_timer.stop();
//unresolved jump
var _slot1 = error;
};
}
public static function allowDomains(server:String):String{
var hostname:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (server.indexOf("http://") != -1){
hostname = server.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(hostname);
Security.allowInsecureDomain(hostname);
};
};
return (hostname);
}
public static function getVersion():String{
return ("3.3 as3");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
}
private static function flush(error:Boolean):void{
var request:Object;
var callback:Object;
if (((_clip) && (_clip._queue))){
while (_clip._queue.length > 0) {
request = _clip._queue.shift();
callback = null;
if (request != null){
if (request.callbackID != null){
callback = _clip._callbacks[request.callbackID];
};
delete _clip._callbacks[request.callbackID];
if (((error) && (!((callback == null))))){
handleError(request.args, callback.callbackObject, callback.callbackMethod);
};
};
};
};
}
public static function get id():String{
return (_id);
}
private static function onEvent(pkg:Object):void{
var target:String;
var event:String;
target = pkg.target;
event = pkg.event;
switch (target){
case "events":
MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins":
MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "sync":
servicesSync.triggerEvent(pkg.event, pkg.args);
break;
};
}
private static function urlOptions(clip:Object):Object{
var opts:Object;
var options:String;
var pairs:Array;
var i:Number;
var kv:Array;
opts = {};
if (clip.stage){
options = clip.stage.loaderInfo.parameters.mochiad_options;
} else {
options = clip.loaderInfo.parameters.mochiad_options;
};
if (options){
pairs = options.split("&");
i = 0;
while (i < pairs.length) {
kv = pairs[i].split("=");
opts[unescape(kv[0])] = unescape(kv[1]);
i++;
};
};
return (opts);
}
public static function setContainer(container:Object=null, doAdd:Boolean=true):void{
if (container != null){
if ((container is Sprite)){
_container = container;
};
};
if (doAdd){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(args:Object, callbackObject:Object, callbackMethod:Object):void{
var args = args;
var callbackObject = callbackObject;
var callbackMethod = callbackMethod;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
var _local5 = callbackObject;
_local5[callbackMethod](args);
//unresolved jump
var _slot1 = error;
} else {
if (callbackMethod != null){
callbackMethod.apply(args);
//unresolved jump
var _slot1 = error;
};
};
};
}
private static function loadError(ev:Object):void{
_clip._mochiad_ctr_failed = true;
MochiServices.disconnect();
MochiServices.onError("IOError");
}
private static function initComChannels():void{
if (!_connected){
_connecting = false;
_connected = true;
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_clip.onReceive = onReceive;
_clip.onEvent = onEvent;
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
while (_clip._queue.length > 0) {
_mochiLocalConnection.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function loadLCBridge(clip:Object):void{
var loader:Loader;
var mochiLCURL:String;
var req:URLRequest;
var complete:Function;
var clip = clip;
loader = new Loader();
mochiLCURL = (_servURL + _mochiLC);
req = new URLRequest(mochiLCURL);
complete = function (ev:Object):void{
_mochiLocalConnection = MovieClip(loader.content);
listen();
};
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
loader.load(req);
clip.addChild(loader);
}
private static function listen():void{
_mochiLocalConnection.connect(_listenChannelName);
_clip.handshake = function (args:Object):void{
MochiServices.comChannelName = args.newChannel;
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(val:String):void{
if (val != null){
if (val.length > 3){
_sendChannelName = (val + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(id:String, clip:Object):MovieClip{
var clipname:String;
var servicesURL:String;
var req:URLRequest;
var vars:URLVariables;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servURL){
_servURL = urlOptions(clip).servURL;
};
servicesURL = (_servURL + _services);
if (urlOptions(clip).servicesURL){
servicesURL = urlOptions(clip).servicesURL;
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999))));
MochiServices.allowDomains(servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
loadLCBridge(_clip);
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
req = new URLRequest(servicesURL);
vars = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
vars.api_version = getVersion();
if (widget){
vars.widget = true;
};
req.data = vars;
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
_timer = new Timer(10000, 1);
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
return (_clip);
}
public static function connect(id:String, clip:Object, onError:Object=null):void{
var id = id;
var clip = clip;
var onError = onError;
warnID(id, false);
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
_connecting = true;
init(id, clip);
};
//unresolved jump
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (errorCode:String):void{
};
};
};
}
public static function createEmptyMovieClip(parent:Object, name:String, depth:Number, doAdd:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = parent;
var name = name;
var depth = depth;
var doAdd = doAdd;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
parent[name] = mc;
//unresolved jump
var _slot1 = e;
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
mc["_name"] = name;
return (mc);
}
public static function bringToTop(e:Event=null):void{
var e = e;
if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
//unresolved jump
var _slot1 = errorObject;
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
}
public static function connectWait(e:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 290
//MochiSync (mochi.as3.MochiSync)
package mochi.as3 {
import flash.utils.*;
public dynamic class MochiSync extends Proxy {
private var _syncContainer:Object;
public static var SYNC_PROPERTY:String = "UpdateProperty";
public static var SYNC_REQUEST:String = "SyncRequest";
public function MochiSync():void{
super();
_syncContainer = {};
}
public function triggerEvent(eventType:String, args:Object):void{
switch (eventType){
case SYNC_REQUEST:
MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY:
_syncContainer[args.name] = args.value;
break;
};
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){
return (_syncContainer[name]);
}
override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(name, value):void{
var n:String;
if (_syncContainer[name] == value){
return;
};
n = name.toString();
_syncContainer[n] = value;
MochiServices.send("sync_propUpdate", {name:n, value:value});
}
}
}//package mochi.as3
Section 291
//artilleryFx (artilleryFx)
package {
import flash.media.*;
public dynamic class artilleryFx extends Sound {
public function artilleryFx(){
super();
}
}
}//package
Section 292
//backgroundSkyMc (backgroundSkyMc)
package {
import flash.display.*;
public dynamic class backgroundSkyMc extends MovieClip {
public var gridOverlay:MovieClip;
public function backgroundSkyMc(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 293
//bansheeMissile (bansheeMissile)
package {
import flash.display.*;
public dynamic class bansheeMissile extends MovieClip {
public function bansheeMissile(){
super();
}
}
}//package
Section 294
//bestowHealth (bestowHealth)
package {
import flash.display.*;
public dynamic class bestowHealth extends MovieClip {
public function bestowHealth(){
super();
addFrameScript(29, frame30);
}
function frame30(){
MovieClip(parent).removeChild(this);
stop();
}
}
}//package
Section 295
//bigExplosion (bigExplosion)
package {
import flash.display.*;
public dynamic class bigExplosion extends MovieClip {
public function bigExplosion(){
super();
}
}
}//package
Section 296
//clickBtnFx (clickBtnFx)
package {
import flash.media.*;
public dynamic class clickBtnFx extends Sound {
public function clickBtnFx(){
super();
}
}
}//package
Section 297
//die_v1_Fx (die_v1_Fx)
package {
import flash.media.*;
public dynamic class die_v1_Fx extends Sound {
public function die_v1_Fx(){
super();
}
}
}//package
Section 298
//die_v2_Fx (die_v2_Fx)
package {
import flash.media.*;
public dynamic class die_v2_Fx extends Sound {
public function die_v2_Fx(){
super();
}
}
}//package
Section 299
//Dir (Dir)
package {
import flash.display.*;
public dynamic class Dir extends MovieClip {
public var arrow:MovieClip;
public function Dir(){
super();
}
}
}//package
Section 300
//dropMiningFx (dropMiningFx)
package {
import flash.media.*;
public dynamic class dropMiningFx extends Sound {
public function dropMiningFx(){
super();
}
}
}//package
Section 301
//energyBar (energyBar)
package {
import flash.display.*;
public dynamic class energyBar extends MovieClip {
public var bar:MovieClip;
public function energyBar(){
super();
}
}
}//package
Section 302
//explosion (explosion)
package {
import flash.display.*;
public dynamic class explosion extends MovieClip {
public function explosion(){
super();
}
}
}//package
Section 303
//explosionFx (explosionFx)
package {
import flash.media.*;
public dynamic class explosionFx extends Sound {
public function explosionFx(){
super();
}
}
}//package
Section 304
//fireMissileFx (fireMissileFx)
package {
import flash.media.*;
public dynamic class fireMissileFx extends Sound {
public function fireMissileFx(){
super();
}
}
}//package
Section 305
//GameAlienGrenade (GameAlienGrenade)
package {
import flash.display.*;
public dynamic class GameAlienGrenade extends MovieClip {
public function GameAlienGrenade(){
super();
}
}
}//package
Section 306
//GameArrow (GameArrow)
package {
import flash.display.*;
public dynamic class GameArrow extends MovieClip {
public function GameArrow(){
super();
}
}
}//package
Section 307
//GameBullet (GameBullet)
package {
import flash.display.*;
public dynamic class GameBullet extends MovieClip {
public function GameBullet(){
super();
}
}
}//package
Section 308
//GameFireBall (GameFireBall)
package {
import flash.display.*;
public dynamic class GameFireBall extends MovieClip {
public function GameFireBall(){
super();
}
}
}//package
Section 309
//GameFreezeBullet (GameFreezeBullet)
package {
import flash.display.*;
public dynamic class GameFreezeBullet extends MovieClip {
public function GameFreezeBullet(){
super();
}
}
}//package
Section 310
//GameGrenade (GameGrenade)
package {
import flash.display.*;
public dynamic class GameGrenade extends MovieClip {
public function GameGrenade(){
super();
}
}
}//package
Section 311
//GameHeavyTankMissile (GameHeavyTankMissile)
package {
import flash.display.*;
public dynamic class GameHeavyTankMissile extends MovieClip {
public function GameHeavyTankMissile(){
super();
}
}
}//package
Section 312
//GameIceBolt (GameIceBolt)
package {
import flash.display.*;
public dynamic class GameIceBolt extends MovieClip {
public function GameIceBolt(){
super();
}
}
}//package
Section 313
//GameLargeFireball (GameLargeFireball)
package {
import flash.display.*;
public dynamic class GameLargeFireball extends MovieClip {
public function GameLargeFireball(){
super();
}
}
}//package
Section 314
//GameLaserBig (GameLaserBig)
package {
import flash.display.*;
public dynamic class GameLaserBig extends MovieClip {
public function GameLaserBig(){
super();
}
}
}//package
Section 315
//GameLaserMotherShip (GameLaserMotherShip)
package {
import flash.display.*;
public dynamic class GameLaserMotherShip extends MovieClip {
public function GameLaserMotherShip(){
super();
}
}
}//package
Section 316
//GameLaserSaucer (GameLaserSaucer)
package {
import flash.display.*;
public dynamic class GameLaserSaucer extends MovieClip {
public function GameLaserSaucer(){
super();
}
}
}//package
Section 317
//GameLightTankMissile (GameLightTankMissile)
package {
import flash.display.*;
public dynamic class GameLightTankMissile extends MovieClip {
public function GameLightTankMissile(){
super();
}
}
}//package
Section 318
//GameMissileMc (GameMissileMc)
package {
import flash.display.*;
public dynamic class GameMissileMc extends MovieClip {
public function GameMissileMc(){
super();
}
}
}//package
Section 319
//GameMortarShell (GameMortarShell)
package {
import flash.display.*;
public dynamic class GameMortarShell extends MovieClip {
public function GameMortarShell(){
super();
}
}
}//package
Section 320
//gameOverFx (gameOverFx)
package {
import flash.media.*;
public dynamic class gameOverFx extends Sound {
public function gameOverFx(){
super();
}
}
}//package
Section 321
//GameRock (GameRock)
package {
import flash.display.*;
public dynamic class GameRock extends MovieClip {
public function GameRock(){
super();
}
}
}//package
Section 322
//GameRocket (GameRocket)
package {
import flash.display.*;
public dynamic class GameRocket extends MovieClip {
public function GameRocket(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 323
//GameRollOverCost2 (GameRollOverCost2)
package {
import flash.display.*;
public dynamic class GameRollOverCost2 extends MovieClip {
public function GameRollOverCost2(){
super();
}
}
}//package
Section 324
//GameShell (GameShell)
package {
import flash.display.*;
public dynamic class GameShell extends MovieClip {
public function GameShell(){
super();
}
}
}//package
Section 325
//GameSmallFireball (GameSmallFireball)
package {
import flash.display.*;
public dynamic class GameSmallFireball extends MovieClip {
public function GameSmallFireball(){
super();
}
}
}//package
Section 326
//getReadyMsg (getReadyMsg)
package {
import flash.display.*;
import flash.text.*;
public dynamic class getReadyMsg extends MovieClip {
public var levelText:TextField;
public function getReadyMsg(){
super();
}
}
}//package
Section 327
//getReadyMsgAnim (getReadyMsgAnim)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class getReadyMsgAnim extends MovieClip {
public var msg:getReadyMsg;
public function getReadyMsgAnim(){
super();
addFrameScript(10, frame11, 73, frame74);
}
function frame74(){
MovieClip(parent).rt.gameState = "play";
MovieClip(parent).removeChild(this);
stop();
}
function frame11(){
msg.levelText.text = ("Level " + MovieClip(parent).rt.levelNumber);
}
}
}//package
Section 328
//halfWayFlag (halfWayFlag)
package {
import flash.display.*;
public dynamic class halfWayFlag extends MovieClip {
public var flag1:MovieClip;
public function halfWayFlag(){
super();
}
}
}//package
Section 329
//hitEnemyFx (hitEnemyFx)
package {
import flash.media.*;
public dynamic class hitEnemyFx extends Sound {
public function hitEnemyFx(){
super();
}
}
}//package
Section 330
//jetFighterBomb (jetFighterBomb)
package {
import flash.display.*;
public dynamic class jetFighterBomb extends MovieClip {
public function jetFighterBomb(){
super();
}
}
}//package
Section 331
//jetIconMc (jetIconMc)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class jetIconMc extends MovieClip {
public var jetBtn:SimpleButton;
public function jetIconMc(){
super();
addFrameScript(0, frame1);
}
function frame1(){
jetBtn.addEventListener(MouseEvent.MOUSE_DOWN, setupJ, false);
}
public function setupJ(e:MouseEvent):void{
MovieClip(this.parent).rt.setupJets(this);
}
}
}//package
Section 332
//knight2 (knight2)
package {
import flash.display.*;
public dynamic class knight2 extends MovieClip {
public function knight2(){
super();
}
}
}//package
Section 333
//largeFireball (largeFireball)
package {
import flash.display.*;
public dynamic class largeFireball extends MovieClip {
public function largeFireball(){
super();
}
}
}//package
Section 334
//levelCompleteFx (levelCompleteFx)
package {
import flash.media.*;
public dynamic class levelCompleteFx extends Sound {
public function levelCompleteFx(){
super();
}
}
}//package
Section 335
//levelCompleteMsgs (levelCompleteMsgs)
package {
import flash.display.*;
public dynamic class levelCompleteMsgs extends MovieClip {
public function levelCompleteMsgs(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 336
//LoadingBox (LoadingBox)
package {
import flash.display.*;
public class LoadingBox extends MovieClip {
public var loaderbar:MovieClip;
public function LoadingBox(){
super();
addFrameScript(0, frame1);
}
function frame1(){
}
public function update(percent:int):void{
}
}
}//package
Section 337
//magicalshieldspell (magicalshieldspell)
package {
import flash.display.*;
public dynamic class magicalshieldspell extends MovieClip {
public function magicalshieldspell(){
super();
}
}
}//package
Section 338
//mainGunMissileHitFx (mainGunMissileHitFx)
package {
import flash.media.*;
public dynamic class mainGunMissileHitFx extends Sound {
public function mainGunMissileHitFx(){
super();
}
}
}//package
Section 339
//mainGunSound (mainGunSound)
package {
import flash.media.*;
public dynamic class mainGunSound extends Sound {
public function mainGunSound(){
super();
}
}
}//package
Section 340
//mcTest (mcTest)
package {
import flash.display.*;
public dynamic class mcTest extends MovieClip {
public function mcTest(){
super();
}
}
}//package
Section 341
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public function MochiBot(){
super();
}
public static function track(parent:Sprite, tag:String):MochiBot{
var self:MochiBot;
var server:String;
var lv:URLVariables;
var url:String;
var req:URLRequest;
var loader:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
self = new (MochiBot);
parent.addChild(self);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
server = "http://core.mochibot.com/my/core.swf";
lv = new URLVariables();
lv["sb"] = Security.sandboxType;
lv["v"] = Capabilities.version;
lv["swfid"] = tag;
lv["mv"] = "8";
lv["fv"] = "9";
url = self.root.loaderInfo.loaderURL;
if (url.indexOf("http") == 0){
lv["url"] = url;
} else {
lv["url"] = "local";
};
req = new URLRequest(server);
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
self.addChild(loader);
loader.load(req);
return (self);
}
}
}//package
Section 342
//panelItems (panelItems)
package {
import flash.display.*;
public dynamic class panelItems extends MovieClip {
public function panelItems(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 343
//panelManBack (panelManBack)
package {
import flash.display.*;
public dynamic class panelManBack extends MovieClip {
public var clock:MovieClip;
public function panelManBack(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 344
//pauseMc (pauseMc)
package {
import flash.display.*;
public dynamic class pauseMc extends MovieClip {
public function pauseMc(){
super();
}
}
}//package
Section 345
//placeFx (placeFx)
package {
import flash.media.*;
public dynamic class placeFx extends Sound {
public function placeFx(){
super();
}
}
}//package
Section 346
//PlayGameBtn (PlayGameBtn)
package {
import flash.display.*;
public dynamic class PlayGameBtn extends SimpleButton {
public function PlayGameBtn(){
super();
}
}
}//package
Section 347
//poisonGroundFire (poisonGroundFire)
package {
import flash.display.*;
public dynamic class poisonGroundFire extends MovieClip {
public function poisonGroundFire(){
super();
}
}
}//package
Section 348
//radarArrowAnim (radarArrowAnim)
package {
import flash.display.*;
public dynamic class radarArrowAnim extends MovieClip {
public function radarArrowAnim(){
super();
addFrameScript(84, frame85);
}
function frame85(){
stop();
}
}
}//package
Section 349
//radioSmallIcon (radioSmallIcon)
package {
import flash.display.*;
public dynamic class radioSmallIcon extends MovieClip {
public function radioSmallIcon(){
super();
}
}
}//package
Section 350
//rangeSquare (rangeSquare)
package {
import flash.display.*;
public dynamic class rangeSquare extends MovieClip {
public function rangeSquare(){
super();
}
}
}//package
Section 351
//rangeSquares (rangeSquares)
package {
import flash.display.*;
public dynamic class rangeSquares extends MovieClip {
public function rangeSquares(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 352
//risingMoneyTxt (risingMoneyTxt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class risingMoneyTxt extends MovieClip {
public var moneyTxt:TextField;
public function risingMoneyTxt(){
super();
}
}
}//package
Section 353
//rocketFx (rocketFx)
package {
import flash.media.*;
public dynamic class rocketFx extends Sound {
public function rocketFx(){
super();
}
}
}//package
Section 354
//selectionBox (selectionBox)
package {
import flash.display.*;
public dynamic class selectionBox extends MovieClip {
public function selectionBox(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 355
//smallFireball (smallFireball)
package {
import flash.display.*;
public dynamic class smallFireball extends MovieClip {
public function smallFireball(){
super();
}
}
}//package
Section 356
//SoundMusic1 (SoundMusic1)
package {
import flash.media.*;
public dynamic class SoundMusic1 extends Sound {
public function SoundMusic1(){
super();
}
}
}//package
Section 357
//spellBigFx (spellBigFx)
package {
import flash.media.*;
public dynamic class spellBigFx extends Sound {
public function spellBigFx(){
super();
}
}
}//package
Section 358
//startGameMsg (startGameMsg)
package {
import flash.display.*;
import flash.events.*;
public dynamic class startGameMsg extends MovieClip {
public var cBtn:SimpleButton;
public function startGameMsg(){
super();
addFrameScript(0, frame1);
}
public function doClose(e:MouseEvent):void{
MovieClip(parent).gotoAndPlay("closeStartMsg");
}
function frame1(){
cBtn.addEventListener(MouseEvent.MOUSE_DOWN, doClose);
}
}
}//package
Section 359
//startWaveM (startWaveM)
package {
import flash.display.*;
public dynamic class startWaveM extends MovieClip {
public var startWBtn:SimpleButton;
public function startWaveM(){
super();
}
}
}//package
Section 360
//swordFightFx (swordFightFx)
package {
import flash.media.*;
public dynamic class swordFightFx extends Sound {
public function swordFightFx(){
super();
}
}
}//package
Section 361
//throwFx (throwFx)
package {
import flash.media.*;
public dynamic class throwFx extends Sound {
public function throwFx(){
super();
}
}
}//package
Section 362
//turneviltogood (turneviltogood)
package {
import flash.display.*;
public dynamic class turneviltogood extends MovieClip {
public function turneviltogood(){
super();
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package
Section 363
//upgradeSpellFx (upgradeSpellFx)
package {
import flash.media.*;
public dynamic class upgradeSpellFx extends Sound {
public function upgradeSpellFx(){
super();
}
}
}//package
Section 364
//weaponUpgradeFx (weaponUpgradeFx)
package {
import flash.media.*;
public dynamic class weaponUpgradeFx extends Sound {
public function weaponUpgradeFx(){
super();
}
}
}//package
Section 365
//youarehereAnim (youarehereAnim)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class youarehereAnim extends MovieClip {
public var myNumber:Number;
public var l1:MovieClip;
public var l4:MovieClip;
public var youarehere:youarehereMc;
public var l5:MovieClip;
public var l3:MovieClip;
public var l2:MovieClip;
public var myNumber2:Number;
public var cLevel:Number;
public function youarehereAnim(){
super();
addFrameScript(0, frame1);
}
function frame1(){
myNumber = ((this.myIndex + 1) * 5);
myNumber2 = (this.myIndex * 5);
if (MovieClip(this.parent).rt.GameMain.levelNumber < (myNumber + 1)){
if (MovieClip(this.parent).rt.GameMain.levelNumber >= (myNumber2 + 1)){
cLevel = int((MovieClip(this.parent).rt.GameMain.levelNumber / myNumber));
cLevel = (MovieClip(this.parent).rt.GameMain.levelNumber - myNumber2);
gotoAndStop((cLevel + 1));
};
} else {
gotoAndStop(7);
};
if (MovieClip(this.parent).rt.GameMain.levelNumber == 1){
MovieClip(this.parent).cityMc1.play();
} else {
if (MovieClip(this.parent).rt.GameMain.levelNumber == 6){
MovieClip(this.parent).cityMc2.play();
} else {
if (MovieClip(this.parent).rt.GameMain.levelNumber == 11){
MovieClip(this.parent).cityMc3.play();
} else {
if (MovieClip(this.parent).rt.GameMain.levelNumber == 16){
MovieClip(this.parent).cityMc4.play();
} else {
if (MovieClip(this.parent).rt.GameMain.levelNumber == 21){
MovieClip(this.parent).cityMc5.play();
};
};
};
};
};
stop();
}
}
}//package
Section 366
//youarehereMc (youarehereMc)
package {
import flash.display.*;
public dynamic class youarehereMc extends MovieClip {
public function youarehereMc(){
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package