Section 1
//GameCloud1 (classesAS3.GameCloud1)
package classesAS3 {
import flash.display.*;
public class GameCloud1 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GameCloud1(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
if (x > rt.movieWidth){
trace((xPos + this.width));
xPos = (0 - (xOrigin + this.width));
};
updatePosition();
}
}
}//package classesAS3
Section 2
//GameCloud2 (classesAS3.GameCloud2)
package classesAS3 {
import flash.display.*;
public class GameCloud2 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GameCloud2(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
if (x > rt.movieWidth){
trace((xPos + this.width));
xPos = (0 - (xOrigin + this.width));
};
updatePosition();
}
}
}//package classesAS3
Section 3
//GameCollisionDetection (classesAS3.GameCollisionDetection)
package classesAS3 {
import flash.display.*;
import classesAS3.*;
import flash.geom.*;
class GameCollisionDetection {
var rect_1a:Rectangle;
var rect_1b:Rectangle;
var rect_1c:Rectangle;
var left:Number;
var intersectingArea:Rectangle;
var yd:Number;
var hoz:Number;
var yOverlap:Number;// = 0
var side:Number;
var right:Number;
var xOverlap2:Number;// = 0
var yOverlap2:Number;// = 0
var clipBounds:Object;
var Overlap:Number;
var rect_2a:Rectangle;
var rect_2c:Rectangle;
var clipBounds2:Object;
var xOverlap:Number;// = 0
var rect_2b:Rectangle;
function GameCollisionDetection(){
xOverlap = 0;
yOverlap = 0;
xOverlap2 = 0;
yOverlap2 = 0;
super();
rect_1a = new Rectangle();
rect_1b = new Rectangle();
rect_1c = new Rectangle();
rect_2a = new Rectangle();
rect_2b = new Rectangle();
rect_2c = new Rectangle();
intersectingArea = new Rectangle();
Overlap = 0;
xOverlap = 0;
yOverlap = 0;
xOverlap2 = 0;
yOverlap2 = 0;
side = 0;
hoz = 0;
left = 0;
right = 0;
yd = 0;
}
function CheckMoving(_arg1:MovieClip, _arg2, _arg3, _arg4, _arg5:MovieClip, _arg6):Object{
var _local7:Object;
_local7 = new Object();
_local7.vx = _arg3;
_local7.vy = _arg4;
CheckBounds(_arg5, _arg1, _arg2, _arg3, _arg4, 0, 0);
xOverlap2 = xOverlap;
yOverlap2 = yOverlap;
if (Overlap == 2){
if (_arg6 == "wall"){
AdjustSprite(_local7, _arg2);
trace("MOVING COLLISION hit!!!!");
};
_local7.hit = true;
return (_local7);
} else {
_local7.hit = false;
};
return (!NULL!);
}
function AdjustSprite(_arg1, _arg2){
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:*;
_local3 = whichSegment();
trace("WHICH SEGMENT");
trace(_local3);
if ((((_local3 == "top")) || ((_local3 == "bottom")))){
if (rect_1a.y > rect_2a.y){
_local4 = rect_1c.top;
_local4 = (rect_2c.bottom - _local4);
_arg1.vy = (int((_arg1.vy + _local4)) + 1);
_arg1.hitEdge = "bottom";
} else {
_local5 = (rect_1c.top + rect_1c.height);
_local5 = (_local5 - rect_2c.top);
_arg1.vy = (int((_arg1.vy - _local5)) - 1);
if (_arg1.vy < 0){
trace("error");
};
_arg1.hitEdge = "top";
};
} else {
if ((((_local3 == "left")) || ((_local3 == "right")))){
_local6 = (rect_1a.x + (rect_1a.width / 2));
_local7 = (rect_2a.x + (rect_2a.width / 2));
if ((_local6 - 5) > rect_2a.x){
_local4 = rect_1c.top;
_local4 = (rect_2c.bottom - _local4);
_arg1.vy = (int((_arg1.vy + _local4)) + 1);
_arg1.hitEdge = "bottom";
} else {
if (_local6 > _local7){
_local4 = (rect_2c.left + rect_2c.width);
trace(_local4);
_local4 = (_local4 - rect_1c.left);
trace(_local4);
_arg1.vx = (int((_arg1.vx + _local4)) + 1);
if (_arg2.xVel != null){
};
_arg1.hitEdge = "right";
} else {
_arg1.vx = (int((_arg1.vx - intersectingArea.width)) - 1);
if (_arg2.xVel != null){
};
_arg1.hitEdge = "left";
};
};
} else {
_arg1.vx = (int((_arg1.vx - intersectingArea.width)) + 1);
_arg1.vy = (int((_arg1.vy - intersectingArea.height)) + 1);
_arg1.hitEdge = "corner";
};
};
}
function CheckBounds(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
Overlap = 0;
clipBounds = _arg2.getBounds(_arg1);
rect_1a.x = clipBounds.left;
rect_1a.y = clipBounds.top;
rect_1a.width = 24;
rect_1a.height = 24;
rect_1b.x = clipBounds.left;
rect_1b.y = clipBounds.top;
rect_1b.width = 24;
rect_1b.height = 24;
trace("GET BOUNDS");
trace(rect_1a.toString());
rect_1b.offset(_arg4, _arg5);
trace(rect_1b.toString());
rect_1c = rect_1a.union(rect_1b);
trace(rect_1c.toString());
clipBounds2 = _arg3.getBounds(_arg1);
rect_2a.x = clipBounds2.left;
rect_2a.y = clipBounds2.top;
rect_2a.width = clipBounds2.width;
rect_2a.height = clipBounds2.height;
rect_2b.x = clipBounds2.left;
rect_2b.y = clipBounds2.top;
rect_2b.width = clipBounds2.width;
rect_2b.height = clipBounds2.height;
trace(rect_2a.toString());
rect_2b.offset(_arg6, _arg7);
trace(rect_2b.toString());
rect_2c = rect_2a.union(rect_2b);
trace(rect_2c.toString());
intersectingArea = rect_1c.intersection(rect_2c);
if (((!((intersectingArea.width == 0))) || (!((intersectingArea.height == 0))))){
Overlap = 2;
};
}
function whichSegment(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_local1 = (rect_1a.x + (rect_1a.width / 2));
_local2 = (rect_1a.y + (rect_1a.height / 2));
_local3 = rect_2a.width;
_local4 = rect_2a.height;
_local5 = (rect_2a.x + (rect_2a.width / 2));
_local6 = (rect_2a.y + (rect_2a.height / 2));
_local1 = (_local1 - _local5);
_local2 = (_local2 - _local6);
_local7 = (rect_2a.width / rect_2a.height);
_local8 = (_local1 / _local7);
if (_local8 > _local2){
_local9 = ((_local3 - _local1) / _local7);
if (_local9 > _local2){
return ("top");
};
return ("right");
} else {
_local10 = (_local4 - _local2);
if (_local8 > _local10){
return ("bottom");
};
};
return (!NULL!);
}
}
}//package classesAS3
Section 4
//GameDoor (classesAS3.GameDoor)
package classesAS3 {
import flash.display.*;
import flash.text.*;
public class GameDoor extends MovieClip {
public var doorMc:MovieClip;
public var txt:TextField;
public var rt:Object;
public function GameDoor(){
rt = 0;
}
}
}//package classesAS3
Section 5
//GameEnergyBar (classesAS3.GameEnergyBar)
package classesAS3 {
import flash.display.*;
public class GameEnergyBar extends MovieClip {
public var bar:energyBar;
var enemy:Object;
public function GameEnergyBar(_arg1){
addFrameScript(22, frame23);
enemy = _arg1;
}
function frame23(){
this.enemy.energyBarOn = 0;
MovieClip(this.parent).removeChild(this);
stop();
}
}
}//package classesAS3
Section 6
//GameExplosion (classesAS3.GameExplosion)
package classesAS3 {
import classesAS3.*;
class GameExplosion {
var rt:Object;
var xPos:Number;// = 0
var xVel:Number;// = 0
var artillary:Number;
var explodeFrame:Number;
var Count:Number;
var numberOfParticles:Number;
var mType:Number;
var Useful:GameUseful;
var yPos:Number;// = 0
var gravity:Number;
var speed:Number;
var explodeDistance:Number;
var yVel:Number;// = 0
var fullRange:Boolean;
var numberOfLoops:Number;
var mC:Object;
var arrayIndex:Number;
var xOrigin:Number;// = 0
var yOrigin:Number;// = 0
function GameExplosion(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
rt = _arg1;
Useful = _arg5;
fullRange = _arg11;
numberOfParticles = _arg6;
numberOfLoops = _arg7;
explodeDistance = _arg8;
gravity = _arg9;
artillary = _arg10;
speed = _arg12;
xOrigin = _arg2;
yOrigin = _arg3;
xPos = 0;
yPos = 0;
Count = 0;
mType = _arg4;
}
function remove(){
var _local1:Number;
var _local2:*;
_local1 = 0;
_local2 = 0;
while (_local2 < rt.explosionsArray.length) {
if (this == rt.explosionsArray[_local2]){
_local1 = _local2;
};
_local2++;
};
rt.explosionsArray.splice(_local1, 1);
delete ??getglobalscope
[this];
}
function mainLoop(){
var _local1:int;
var _local2:Number;
var _local3:Object;
var _local4:GameParticle;
_local1 = 0;
while (_local1 < numberOfParticles) {
if (fullRange == false){
_local2 = Useful.RandomNumber(1, 180);
_local2 = (_local2 + 180);
if (_local2 > 359){
_local2 = (_local2 - 359);
};
} else {
_local2 = Useful.RandomNumber(1, 360);
};
_local3 = Useful.getVectorFromAngle(_local2);
_local4 = new GameParticle(rt, Useful, xOrigin, yOrigin, mType, _local3.vx, _local3.vy, ((_local3.vx * explodeDistance) + xOrigin), ((_local3.vy * explodeDistance) + yOrigin), artillary, gravity, explodeDistance, speed);
rt.inGameExplosionsMc.addChild(_local4);
rt.particlesArray.push(_local4);
_local4.rotation = _local2;
_local1++;
};
Count++;
if (Count > numberOfLoops){
remove();
};
}
}
}//package classesAS3
Section 7
//GameGame (classesAS3.GameGame)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
public class GameGame extends MovieClip {
var left:Number;
var cloudsArray:Array;
var StartTimer:Number;
var startTileX:Number;
var badGuysArray:Array;
var selectionArray:Array;
var bf:BlurFilter;
var sec:Number;
var playerMc:MovieClip;
var inGameColourMc:Sprite;
var levelScreensHeight:Array;
var newTile:Number;
var movieWidth:Number;
var movieHeight:Number;
var inGamePickupsMc:Sprite;
var shift:Matrix;
var inGameEnemyMc:Sprite;
var ballNames:Array;
var spritesMc:Sprite;
var getReadyMsgAnim:GameReadyAnim;
var moneyMax:Number;
var filterAlienDelay:Number;
var inGameMissilesMc:Sprite;
var levelWidth:Number;
var clickloc:Point;
var moneyDelay:Number;
var money:Number;
var levelWidthBlocks:Number;
var gameOverMsgMc:GameOverMsgAnim;
var pauseSwitch:Boolean;
var backMc:MovieClip;
var minutes:Number;
var filterDelay:Number;
var lives:Number;
var inGameScoreMc:Sprite;
var groundArray:Array;
var explosionsArray:Array;
var energyAlien:Number;
var itemsToBuyMc:Sprite;
var cmf:ColorMatrixFilter;
var upgradeCost1:Number;
var upgradeCost2:Number;
var upgradeCost3:Number;
var levelData:Array;
var timeBonus:Number;
var top:Number;
var oldMouseY:Number;
var currentPickup:String;
var oldMouseX:Number;
var Sounds:GameSounds;
var levelCompleteMsg:GameLevelComplete;
var inGameGoodGuysMc:Sprite;
var maxScrollSpeed:Number;
var bmd:BitmapData;
var upgrade1:Boolean;
var upgrade2:Boolean;
var gameExplosions:GameMultipleExplosion;
var soundsSwitch:Boolean;// = true
var scrollScreen:String;
var upgrade3:Boolean;
var upgradeMc1:GameUpgrade;
var upgradeMc3:GameUpgrade3;
var musicSwitch:Boolean;// = true
var marchingAntsMc:Sprite;
var tilesArray:Array;
var releaseloc:Point;
var levelHeight:Number;
var fulltime:Number;
var panelItemsData:Array;
var alienBaseMc:alienBase;
var backSkyMc:backgroundSkyMc;
var badGuysLevels:Array;
var waveDelay:Number;
var spring:Number;
var minDisplay:String;
var tempGroupArray:Array;
var right:Number;
var bottom:Number;
var pauseMc:MovieClip;
var clockDelay:Number;
var blockSize:Number;
var inGameActionMc:Sprite;
public var rt:Object;
var missilesArray:Array;
public var scrollvx:Number;
var presentationMc:Sprite;
var gravity:Number;
var goodGuysArray:Array;
var itemsArray:Array;
var delayToDropN:Number;
var energy:Number;
public var statsMc:Weapons;
public var score:Number;
var inGameExplosionsMc:Sprite;
var antsbmp:antsMc;
var inGameMc:Sprite;
var Useful:GameUseful;
var blocksLeft:Number;
var marquee_mc:MovieClip;
var backMcWidth:Number;
var wave;
var Player:GamePlayer;
var currentMoneyDelay:Number;
var friction:Number;
var bestScore:Number;
var topLevelY:Number;
var pickupsArray:Array;
var backgroundLevelMc:Sprite;
var levelHeightBlocks:Number;
var secDisplay:String;
public var levelStart:Number;
var levelMax:Number;
var springLength:Number;
var glowFilter:GlowFilter;
var scrollyPos:Number;
var delayToDrop:Number;
var delayToWave;
var waveDelayD:Number;
var inGameGraphicsMc:Sprite;
var numberOfStartItems:Number;
var particlesArray:Array;
var itemsCost:Array;
var enemyArray:Array;
var inGameBackgroundMc:Sprite;
var doorExit1:Object;
var doorExit2:Object;
var currentTimeBonus:Number;
var pickupType:String;
var inGameStatsMc:Sprite;
var inGameMsgsMc:Sprite;
var pickupAdded:Boolean;
var blockSizeY:Number;
public var levelNumber:Number;
public var maxLevels:Number;
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_STATE_CRYSTAL:int = 2;
public static const SOLDIER_STATE_RETREAT:int = 3;
public function GameGame(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9){
var _local10:Bitmap;
var _local11:Array;
var _local12:Array;
var _local13:Array;
var _local14:Array;
var _local15:Array;
var _local16:Array;
var _local17:Array;
var _local18:Array;
var _local19:Array;
var _local20:Array;
var _local21:Array;
soundsSwitch = true;
musicSwitch = true;
super();
rt = _arg1;
Useful = _arg8;
upgrade1 = false;
upgrade2 = false;
upgrade3 = false;
movieWidth = _arg2;
movieHeight = _arg3;
backMcWidth = 1700;
maxLevels = _arg9;
blockSize = _arg6;
Sounds = new GameSounds(this);
levelWidthBlocks = (_arg4 / blockSize);
levelHeightBlocks = (_arg5 / blockSize);
levelWidth = (levelWidthBlocks * blockSize);
levelHeight = (levelHeightBlocks * blockSize);
inGameMc = new Sprite();
addChild(inGameMc);
presentationMc = new Sprite();
addChild(presentationMc);
inGameActionMc = new Sprite();
inGameMc.addChild(inGameActionMc);
inGameStatsMc = new Sprite();
inGameMc.addChild(inGameStatsMc);
marchingAntsMc = new Sprite();
inGameMc.addChild(marchingAntsMc);
inGameGraphicsMc = new Sprite();
inGameActionMc.addChild(inGameGraphicsMc);
inGameMsgsMc = new Sprite();
inGameActionMc.addChild(inGameMsgsMc);
inGameBackgroundMc = new Sprite();
inGameGraphicsMc.addChild(inGameBackgroundMc);
spritesMc = new Sprite();
inGameGraphicsMc.addChild(spritesMc);
backgroundLevelMc = new Sprite();
spritesMc.addChild(backgroundLevelMc);
playerMc = new MovieClip();
inGameGraphicsMc.addChild(playerMc);
inGameEnemyMc = new Sprite();
spritesMc.addChild(inGameEnemyMc);
inGameGoodGuysMc = new Sprite();
spritesMc.addChild(inGameGoodGuysMc);
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);
bmd = new BitmapData(700, 550, true, 0);
_local10 = new Bitmap(bmd);
spritesMc.addChild(_local10);
bf = new BlurFilter(4, 4, 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]);
missilesArray = new Array();
enemyArray = new Array();
goodGuysArray = new Array();
missilesArray = new Array();
badGuysArray = new Array();
tilesArray = new Array();
explosionsArray = new Array();
particlesArray = new Array();
pickupsArray = new Array();
groundArray = new Array();
itemsArray = new Array();
selectionArray = new Array();
_local11 = ["manStone"];
upgradeCost1 = 100;
upgradeCost2 = 150;
upgradeCost3 = 200;
newTile = 0;
ballNames = new Array("ballPink", "ballBlue", "ballRed");
panelItemsData = new Array("basicMan", 10, "Basic droid with laser gun, $10", "Grenader", 30, "Throws grenades, not very accurate, $30", "sniper", 100, "Sniper, can fire over long distance, $100", "rocketLauncher", 80, "Rocket launcher, good against aerial threats, $80", "heavyGunner", 225, "Battle droid, good armour and firepower, $225");
itemsCost = new Array(10, 10, 10, 10, 10);
levelScreensHeight = new Array(1, 1, 1, 4, 4);
_local12 = new Array("manStone", 1, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "manStone", 1, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "manStone", 1, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0, "badGuyFlying", 3, 200, (backMcWidth - 1), 100, 30, 5, "enemyBomb", 25, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0);
_local13 = new Array("badGuyRoundTank", 1, 200, (backMcWidth - 1), 100, 8, 9, "enemyBullet", 15, "manStone", 1, 210, (backMcWidth - 1), 100, 5, 10, "rock", 5, "manStone", 1, 210, (backMcWidth - 1), 100, 5, 10, "rock", 5, "manStone", 1, 210, (backMcWidth - 1), 100, 5, 10, "rock", 5, "manStone", 1, 210, (backMcWidth - 1), 100, 5, 10, "rock", 5, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0);
_local14 = new Array("badGuySword", 2, 25, (backMcWidth - 1), 100, 12, 7, "", 10, "manStone", 3, 200, (backMcWidth - 1), 100, 6, 5, "rock", 5);
_local15 = new Array("badGuyRoundTank", 4, 200, (backMcWidth - 1), 100, 10, 9, "enemyBullet", 15, "badGuyFlying", 3, 200, (backMcWidth - 1), 100, 40, 5, "enemyBomb", 25, "manStone", 2, 210, (backMcWidth - 1), 100, 7, 10, "rock", 5);
_local16 = new Array("badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 5, 20, "enemyShell", 30, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0, "badGuySword", 2, 25, (backMcWidth - 1), 100, 12, 7, "", 10);
_local17 = new Array("manStone", 1, 200, (backMcWidth - 1), 100, 6, 7, "rock", 5);
_local18 = new Array("manStone", 4, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "badGuyFlying", 1, 200, (backMcWidth - 1), 100, 40, 5, "enemyBomb", 25, "manStone", 4, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "manStone", 4, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "manStone", 4, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "manStone", 4, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5);
_local19 = new Array("badGuyRollingBomb", 7, 100, (backMcWidth - 1), 100, 15, 20, "", 5, "badGuyRoundTank", 1, 200, (backMcWidth - 1), 100, 10, 9, "enemyBullet", 15);
_local20 = new Array("badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 7, 20, "enemyShell", 20, "badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 7, 20, "enemyShell", 30, "badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 7, 20, "enemyShell", 30, "manStone", 6, 210, (backMcWidth - 1), 100, 6, 10, "rock", 5, "badGuyRoundTank", 2, 200, (backMcWidth - 1), 100, 8, 9, "enemyBullet", 15, "badGuyFlying", 1, 200, (backMcWidth - 1), 100, 40, 5, "enemyBomb", 25);
_local21 = new Array("badGuyWalker", 1, 200, (backMcWidth - 1), 100, 6, 4, "enemyPhoton", 25, "badGuySword", 2, 25, (backMcWidth - 1), 100, 12, 7, "", 10, "noBadGuy", 0, 0, 0, 0, 0, 0, "", 0, "badGuyWalker", 1, 200, (backMcWidth - 1), 100, 6, 4, "enemyPhoton", 25, "badGuyFlying", 4, 200, (backMcWidth - 1), 100, 40, 5, "enemyBomb", 25, "badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 7, 20, "enemyShell", 30, "badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 7, 20, "enemyShell", 30, "badGuyHoverTank", 1, 200, (backMcWidth - 1), 100, 7, 20, "enemyShell", 30);
badGuysLevels = new Array(_local17, _local13, _local12, _local14, _local19, _local15, _local18, _local16, _local20, _local21);
scrollvx = 0;
glowFilter = new GlowFilter(0xFFFFFF, 1, 8, 8, 3, 1);
score = 0;
bestScore = 0;
lives = _arg7;
energy = 100;
money = 0;
energyAlien = 100;
currentMoneyDelay = 40;
moneyDelay = currentMoneyDelay;
moneyMax = 100;
spring = 0.01;
friction = 0.8;
gravity = 0.3;
springLength = 10;
left = -20;
right = (movieWidth - 20);
top = 0;
bottom = movieHeight;
levelStart = 1;
levelNumber = levelStart;
levelMax = 10;
wave = 0;
delayToWave = 100;
maxScrollSpeed = 24;
scrollyPos = 0;
topLevelY = -4500;
secDisplay = "00";
minDisplay = "00";
StartTimer = 6;
clockDelay = 10;
minutes = StartTimer;
sec = 0;
fulltime = 0;
numberOfStartItems = 5;
pauseSwitch = false;
antsbmp = new antsMc(0, 0);
shift = new Matrix();
clickloc = new Point(-10, -10);
releaseloc = new Point(-10, -10);
filterDelay = 1;
filterAlienDelay = 1;
scrollScreen = "";
}
function endLevelStuff(){
rt.gameState = 6;
killAllGoodGuys();
levelNumber++;
inGameMsgsMc.removeChild(levelCompleteMsg);
levelCompleteMsg = null;
backMc.stop();
backMc = null;
spritesMc.y = 0;
rt.setupGameStuff();
}
public function setupGame(){
stage.focus = rt.stage;
waveDelayD = 1;
delayToDrop = 1;
delayToDropN = 30;
blocksLeft = int((((levelNumber - 1) * 20) + 40));
if (blocksLeft > 400){
blocksLeft = 400;
};
startTileX = -20;
energy = 100;
wave = 0;
waveDelay = 200;
money = 0;
moneyDelay = currentMoneyDelay;
moneyMax = (100 + ((levelNumber - 1) * 50));
setupArraySquares();
newArrays();
setupPanel();
if (levelNumber == 1){
setupPlayer();
} else {
Player.mC.visible = true;
Player.xOrigin = ((blockSize * Useful.RandomNumber(2, 2)) - 20);
Player.yOrigin = (blockSize + 20);
Player.xPos = 0;
Player.yPos = 0;
Player.xVel = 0;
Player.yVel = 0;
};
setupBackground();
soundFxBtn2();
musicBtn2();
setLevel();
setScore();
setBlocksLeft();
}
function scrollBackDown(){
scrollyPos = (scrollyPos + scrollvx);
spritesMc.y = (spritesMc.y - scrollvx);
}
function runDrop(){
delayToDrop--;
if (delayToDrop == 0){
setupNewTile();
delayToDrop = delayToDropN;
};
}
function setLevel(){
statsMc.levelTxt.text = String(levelNumber);
}
function soundFxBtn(){
if (statsMc.soundFxMc.currentFrame == 1){
statsMc.soundFxMc.gotoAndStop("off");
soundsSwitch = false;
} else {
statsMc.soundFxMc.gotoAndStop("on");
soundsSwitch = true;
};
}
function checkForGroup(_arg1, _arg2){
var _local3:Number;
var _local4:Number;
if (tilesArray[_arg2][_arg1] == 0){
return (false);
};
if (_arg1 < levelWidthBlocks){
if (_arg2 < levelHeightBlocks){
_local3 = ((levelWidthBlocks * _arg2) + _arg1);
tempGroupArray = new Array();
_local4 = tilesArray[_arg2][_arg1].mC.tile.currentFrame;
SeedFill_1((_arg1 - 1), _arg2, _local4, "left");
SeedFill_1((_arg1 + 1), _arg2, _local4, "right");
SeedFill_1(_arg1, (_arg2 - 1), _local4, "up");
SeedFill_1(_arg1, (_arg2 + 1), _local4, "down");
return (true);
};
return (false);
//unresolved jump
};
return (false);
}
function decreaseScore(_arg1){
score = int((score - _arg1));
if (score >= 0){
setScore();
} else {
score = 0;
setScore();
};
}
function setBlocksLeft(){
statsMc.blocksLeft.text = String(blocksLeft);
}
function turnMusicOff(){
var _local1:MovieClip;
_local1 = inGameStatsMc["ingamestatsmc"];
_local1 = _local1["wg"];
_local1 = _local1["stats"];
_local1["music"].gotoAndStop(2);
}
function decreaseEnergy(_arg1:Number){
var _local2:*;
energy = (energy - _arg1);
if (energy < 0){
energy = 0;
};
_local2 = new GameRisingScore(rt, inGameScoreMc, _arg1);
inGameScoreMc.addChild(_local2);
_local2.x = Player.mC.x;
_local2.y = Player.mC.y;
if (filterDelay == 1){
Player.mC.filters = [glowFilter];
filterDelay = 10;
};
setEnergy();
}
function doScore(_arg1){
var _local2:Number;
var _local3:*;
_local2 = ((_arg1 * _arg1) * 3);
increaseScore(_local2);
_local3 = new GameRisingScoreBig(this, inGameScoreMc, _local2);
inGameScoreMc.addChild(_local3);
_local3.x = ((movieWidth / 2) - 80);
_local3.y = (movieHeight / 2);
Sounds.playSoundFx("levelCompleteFx");
}
function decreaseAlienEnergy(_arg1:Number){
var _local2:*;
energyAlien = (energyAlien - _arg1);
if (energyAlien < 0){
energyAlien = 0;
};
_local2 = new GameRisingScore(rt, inGameScoreMc, _arg1);
inGameScoreMc.addChild(_local2);
_local2.x = alienBaseMc.x;
_local2.y = alienBaseMc.y;
if (filterAlienDelay == 1){
alienBaseMc.filters = [glowFilter];
filterAlienDelay = 10;
};
setAlienEnergy();
}
function musicBtn2(){
if (musicSwitch == false){
statsMc.musicMc.gotoAndStop("off");
} else {
statsMc.musicMc.gotoAndStop("on");
};
}
function checkLink(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
if (_arg1 < (levelWidthBlocks - 1)){
if (_arg2 < levelHeightBlocks){
if (_arg1 > 0){
if (_arg2 > 0){
if (tilesArray[_arg2][_arg1] != 0){
if (tilesArray[_arg2][_arg1].destroy == false){
if (tilesArray[_arg2][_arg1].mC != null){
_local5 = tilesArray[_arg2][_arg1].mC.tile.currentFrame;
if (_arg4 == "left"){
if (_arg3 < 3){
if (_arg3 == 1){
return (false);
};
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 < 7){
if (_arg3 == 3){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 4){
return (false);
};
if (_arg3 == 5){
return (false);
};
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
};
} else {
if (_arg3 < 11){
if (_arg3 == 7){
return (false);
};
if (_arg3 == 8){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 9){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (true);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (false);
};
return (true);
} else {
return (true);
};
};
};
};
};
};
} else {
if (_arg4 == "right"){
if (_arg3 < 3){
if (_arg3 == 1){
return (false);
};
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 < 7){
if (_arg3 == 3){
return (false);
};
if (_arg3 == 4){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 5){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
return (false);
};
};
} else {
if (_arg3 < 11){
if (_arg3 == 7){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 8){
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 9){
return (false);
};
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (false);
};
return (true);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (false);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (false);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
};
};
};
} else {
if (_arg4 == "up"){
if (_arg3 < 3){
if (_arg3 == 1){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
} else {
return (false);
};
} else {
if (_arg3 < 7){
if (_arg3 == 3){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 4){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 5){
return (false);
};
return (false);
};
};
} else {
if (_arg3 < 11){
if (_arg3 == 7){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 8){
return (false);
};
if (_arg3 == 9){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (false);
};
if (_local5 == 4){
return (false);
};
if (_local5 == 5){
return (true);
};
return (true);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (true);
};
if (_local5 == 9){
return (true);
};
return (false);
} else {
return (true);
};
};
};
};
};
};
} else {
if (_arg3 < 3){
if (_arg3 == 1){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
return (false);
};
} else {
if (_arg3 < 7){
if (_arg3 == 3){
return (false);
};
if (_arg3 == 4){
return (false);
};
if (_arg3 == 5){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
};
} else {
if (_arg3 < 11){
if (_arg3 == 7){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 8){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
if (_arg3 == 9){
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
} else {
return (false);
};
};
};
} else {
if (_local5 < 3){
if (_local5 == 1){
return (true);
};
return (false);
} else {
if (_local5 < 7){
if (_local5 == 3){
return (true);
};
if (_local5 == 4){
return (true);
};
if (_local5 == 5){
return (false);
};
return (false);
} else {
if (_local5 < 11){
if (_local5 == 7){
return (true);
};
if (_local5 == 8){
return (false);
};
if (_local5 == 9){
return (true);
};
return (true);
} else {
return (true);
};
};
};
};
};
};
};
};
};
} else {
return (false);
};
} else {
return (false);
};
} else {
return (false);
};
} else {
return (false);
};
} else {
return (false);
};
} else {
return (false);
};
//unresolved jump
};
return (false);
}
function setBest(){
var _local1:MovieClip;
_local1 = inGameStatsMc["ingamestatsmc"];
_local1 = _local1["wg"];
_local1 = _local1["stats"];
if (bestScore < 10){
_local1.bestScore.text = ("0000" + bestScore);
} else {
if (bestScore < 100){
_local1.bestScore.text = ("000" + bestScore);
} else {
if (bestScore < 1000){
_local1.bestScore.text = ("00" + bestScore);
} else {
if (bestScore < 10000){
_local1.bestScore.text = ("0" + bestScore);
} else {
_local1.bestScore.text = bestScore;
};
};
};
};
}
function killAllGoodGuys(){
var _local1:*;
_local1 = (goodGuysArray.length - 1);
while (_local1 >= 0) {
goodGuysArray[_local1].remove();
_local1--;
};
}
function increaseScore(_arg1){
score = int((score + _arg1));
if (score > 0){
setScore();
};
}
function setupArraySquares(){
var _local1:*;
var _local2:*;
tilesArray = new Array();
_local1 = 0;
while (_local1 < int(levelHeightBlocks)) {
tilesArray[_local1] = new Array();
_local2 = 0;
while (_local2 < int(levelWidthBlocks)) {
tilesArray[_local1][_local2] = 0;
_local2++;
};
_local1++;
};
}
function setMoney(){
statsMc.money.text = ((String(money) + "/") + moneyMax);
}
function setEnergy(){
statsMc.energy.text = String(energy);
if (filterDelay > 1){
filterDelay--;
if (filterDelay == 1){
Player.mC.filters = [];
};
};
}
public function setupPanel():void{
if (statsMc != null){
inGameStatsMc.removeChild(statsMc);
};
statsMc = new Weapons();
inGameStatsMc.addChild(statsMc);
statsMc.y = (movieHeight - 77);
}
function checkForGameOver(){
if (blocksLeft == 0){
gameOver("level_complete");
};
}
function setLives(){
var _local1:MovieClip;
_local1 = inGameStatsMc["ingamestatsmc"];
_local1 = _local1["wg"];
_local1 = _local1["stats"];
_local1.lives.text = lives;
}
function leftClick(){
if (statsMc.quitBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){
quitGame();
} else {
if (statsMc.musicBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){
musicBtn();
} else {
if (statsMc.soundFxBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){
soundFxBtn();
};
};
};
}
function killAllExplosions(){
var _local1:*;
_local1 = (explosionsArray.length - 1);
while (_local1 >= 0) {
explosionsArray[_local1].remove();
_local1--;
};
_local1 = (particlesArray.length - 1);
while (_local1 >= 0) {
particlesArray[_local1].remove();
_local1--;
};
}
function decreaseBlocksLeft(_arg1:Number){
blocksLeft = (blocksLeft - _arg1);
if (blocksLeft < 0){
blocksLeft = 0;
};
setBlocksLeft();
}
function musicBtn(){
if (statsMc.musicMc.currentFrame == 1){
statsMc.musicMc.gotoAndStop("off");
rt.titleMusicChannel.stop();
} else {
statsMc.musicMc.gotoAndStop("on");
rt.titleMusicChannel = rt.titleMusic.play(0, 10000);
};
}
public function setupGoodGuy(_arg1, _arg2, _arg3):void{
goodGuysArray.push(new GameGoodGuy(this, _arg1, _arg2, Useful));
}
public function checkForLink(){
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
_local1 = 0;
while (_local1 < goodGuysArray.length) {
if (goodGuysArray[_local1].destroy == false){
if (goodGuysArray[_local1].mC != null){
if (goodGuysArray[_local1].mC.tile.p != null){
goodGuysArray[_local1].mC.tile.p.gotoAndStop(1);
if (goodGuysArray[_local1].mC.tile.p2 != null){
goodGuysArray[_local1].mC.tile.p2.gotoAndStop(1);
};
};
};
};
_local1++;
};
_local1 = 0;
while (_local1 < goodGuysArray.length) {
if (goodGuysArray[_local1].destroy != true){
if (goodGuysArray[_local1].mC != null){
_local2 = (goodGuysArray[_local1].xOrigin + goodGuysArray[_local1].xPos);
_local3 = (goodGuysArray[_local1].yOrigin + goodGuysArray[_local1].yPos);
_local2 = (_local2 - 20);
_local3 = (_local3 - 60);
_local4 = int((_local2 / blockSize));
_local5 = int((_local3 / blockSize));
_local6 = false;
if (_local4 == 1){
_local6 = true;
} else {
if (_local4 == (levelWidthBlocks - 2)){
_local6 = true;
};
};
if (_local6 == true){
_local6 = false;
_local7 = goodGuysArray[_local1].mC.tile.currentFrame;
if (_local4 == 1){
if (_local7 < 3){
if (_local7 == 2){
_local6 = true;
};
} else {
if (_local7 < 7){
if (_local7 == 3){
_local6 = true;
} else {
if (_local7 == 6){
_local6 = true;
};
};
} else {
if (_local7 < 11){
if (_local7 != 7){
_local6 = true;
};
} else {
_local6 = true;
};
};
};
} else {
if (_local7 < 3){
if (_local7 == 2){
_local6 = true;
};
} else {
if (_local7 < 7){
if (_local7 == 4){
_local6 = true;
} else {
if (_local7 == 5){
_local6 = true;
};
};
} else {
if (_local7 < 11){
if (_local7 != 9){
_local6 = true;
};
} else {
_local6 = true;
};
};
};
};
if (_local6 == true){
if (goodGuysArray[_local1].mC.tile.p != null){
goodGuysArray[_local1].mC.tile.p.gotoAndStop(2);
if (goodGuysArray[_local1].mC.tile.p2 != null){
goodGuysArray[_local1].mC.tile.p2.gotoAndStop(2);
};
};
if (checkForGroup(_local4, _local5)){
_local8 = false;
_local9 = 0;
while (_local9 < tempGroupArray.length) {
if (goodGuysArray[_local1] != tempGroupArray[_local9]){
if (tempGroupArray[_local9].destroy != true){
if (tempGroupArray[_local9].mC != null){
if (tempGroupArray[_local9].mC.tile.p != null){
tempGroupArray[_local9].mC.tile.p.gotoAndStop(2);
if (tempGroupArray[_local9].mC.tile.p2 != null){
tempGroupArray[_local9].mC.tile.p2.gotoAndStop(2);
};
};
_local2 = (tempGroupArray[_local9].xOrigin + tempGroupArray[_local9].xPos);
_local2 = (_local2 - 20);
_local10 = int((_local2 / blockSize));
_local6 = false;
if (_local10 == 1){
_local7 = tempGroupArray[_local9].mC.tile.currentFrame;
if (_local7 < 3){
if (_local7 == 2){
_local6 = true;
};
} else {
if (_local7 < 7){
if (_local7 == 3){
_local6 = true;
} else {
if (_local7 == 6){
_local6 = true;
};
};
} else {
if (_local7 < 11){
if (_local7 != 7){
_local6 = true;
};
} else {
_local6 = true;
};
};
};
} else {
if (_local10 == (levelWidthBlocks - 2)){
_local7 = tempGroupArray[_local9].mC.tile.currentFrame;
if (_local7 < 3){
if (_local7 == 2){
_local6 = true;
};
} else {
if (_local7 < 7){
if (_local7 == 4){
_local6 = true;
} else {
if (_local7 == 5){
_local6 = true;
};
};
} else {
if (_local7 < 11){
if (_local7 != 9){
_local6 = true;
};
} else {
_local6 = true;
};
};
};
};
};
if (_local6 == true){
_local8 = true;
};
};
};
};
_local9++;
};
if (_local8 == true){
_local9 = 0;
while (_local9 < tempGroupArray.length) {
tempGroupArray[_local9].destroy = true;
if (Player.grabbedTile == tempGroupArray[_local9]){
Player.grabbedTile = null;
};
_local9++;
};
doScore(tempGroupArray.length);
};
};
};
};
};
};
_local1++;
};
}
function doClock(){
clockDelay--;
if (clockDelay == 0){
clockDelay = 10;
countDown();
};
}
function countDown(){
sec--;
if (sec < 0){
minutes--;
sec = 59;
if (minutes < 0){
minutes = 0;
sec = 0;
gameOver("out_of_time");
};
};
}
function SeedFill_1(_arg1, _arg2, _arg3, _arg4){
var _local5:Array;
var _local6:Boolean;
var _local7:*;
_local5 = tilesArray;
if (checkLink(_arg1, _arg2, _arg3, _arg4)){
_local6 = false;
_local7 = 0;
while (_local7 < tempGroupArray.length) {
if (tempGroupArray[_local7] == _local5[_arg2][_arg1]){
_local6 = true;
};
_local7++;
};
if (_local6 == false){
tempGroupArray.push(_local5[_arg2][_arg1]);
SeedFill_1((_arg1 - 1), _arg2, _local5[_arg2][_arg1].mC.tile.currentFrame, "left");
SeedFill_1((_arg1 + 1), _arg2, _local5[_arg2][_arg1].mC.tile.currentFrame, "right");
SeedFill_1(_arg1, (_arg2 - 1), _local5[_arg2][_arg1].mC.tile.currentFrame, "up");
SeedFill_1(_arg1, (_arg2 + 1), _local5[_arg2][_arg1].mC.tile.currentFrame, "down");
};
};
}
function setAlienEnergy(){
statsMc.energyAlien.text = String(energyAlien);
if (filterAlienDelay > 1){
filterAlienDelay--;
if (filterAlienDelay == 1){
alienBaseMc.filters = [];
};
};
}
function pauseOn(){
pauseSwitch = true;
}
function setWave(){
}
function killAllMissiles(){
var _local1:*;
_local1 = (missilesArray.length - 1);
while (_local1 >= 0) {
missilesArray[_local1].remove();
_local1--;
};
}
function newLevelStuff(){
energyAlien = (100 + ((levelNumber - 1) * 50));
if (energyAlien > 500){
energyAlien = 500;
};
wave = 0;
}
function displayTime(){
if (sec < 10){
secDisplay = ("0" + sec);
} else {
secDisplay = String(sec);
};
if (minutes < 10){
minDisplay = ("0" + minutes);
} else {
minDisplay = String(minutes);
};
statsMc.levelTime.text = (((minDisplay + ":") + secDisplay) + "s");
}
function decreaseMoney(_arg1:Number){
money = (money - _arg1);
if (money < 0){
money = 0;
};
setMoney();
}
public function quitGame(){
Sounds.playSoundFx("gameOverFx");
killAllGoodGuys();
rt.gameState = 1;
killAllExplosions();
levelNumber = 1;
if (gameOverMsgMc != null){
inGameMsgsMc.removeChild(gameOverMsgMc);
};
gameOverMsgMc = null;
backgroundLevelMc.removeChild(backMc);
backMc.stop();
backMc = null;
playerMc.removeChildAt(0);
Player = null;
energy = 100;
(energyAlien == 100);
money = 0;
score = 0;
currentMoneyDelay = 40;
moneyDelay = currentMoneyDelay;
moneyMax = 100;
spritesMc.x = 0;
rt.setupTitleScreen();
}
function newArrays(){
missilesArray = new Array();
enemyArray = new Array();
goodGuysArray = new Array();
missilesArray = new Array();
badGuysArray = new Array();
setupArraySquares();
explosionsArray = new Array();
particlesArray = new Array();
pickupsArray = new Array();
groundArray = new Array();
itemsArray = new Array();
selectionArray = new Array();
cloudsArray = new Array();
}
function scrollBackUp(){
scrollyPos = (scrollyPos - scrollvx);
spritesMc.y = (spritesMc.y + scrollvx);
}
function setupNewTile(){
newTile++;
setupGoodGuy((startTileX + (blockSize * 2)), (blockSize + 20), Useful.RandomNumber(1, 11));
startTileX = (startTileX + blockSize);
trace((levelWidth - blockSize));
if ((startTileX + 20) == (levelWidth - (blockSize * 2))){
startTileX = -20;
};
}
function soundFxBtn2(){
if (soundsSwitch == false){
statsMc.soundFxMc.gotoAndStop("off");
} else {
statsMc.soundFxMc.gotoAndStop("on");
};
}
function setScore(){
score = int(score);
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 killAllBadGuys(){
var _local1:*;
_local1 = (badGuysArray.length - 1);
while (_local1 >= 0) {
badGuysArray[_local1].remove();
_local1--;
};
}
function setEnemies(){
statsMc.enemies.text = String(badGuysArray.length);
}
function increaseEnergy(_arg1:Number){
energy = (energy + _arg1);
if (energy > 10000){
energy = 10000;
};
setEnergy();
}
function setupBackground(){
var _local1:String;
var _local2:Class;
var _local3:*;
var _local4:*;
_local1 = "level1_1";
_local2 = Class(getDefinitionByName(_local1));
backMc = new (_local2);
backgroundLevelMc.addChild(backMc);
scrollyPos = 0;
scrollvx = 0;
_local3 = 0;
while (_local3 < levelHeightBlocks) {
_local4 = new edgeTile();
_local4.x = blockSize;
_local4.x = (_local4.x - 20);
_local4.y = ((_local3 * blockSize) + blockSize);
_local4.y = (_local4.y + 20);
inGameGoodGuysMc.addChild(_local4);
_local3++;
};
_local3 = 0;
while (_local3 < levelHeightBlocks) {
_local4 = new edgeTileRight();
_local4.x = (blockSize * 12);
_local4.x = (_local4.x - 20);
_local4.y = ((_local3 * blockSize) + blockSize);
_local4.y = (_local4.y + 20);
inGameGoodGuysMc.addChild(_local4);
_local3++;
};
}
function pauseOff(){
pauseSwitch = false;
rt.gameState = "play";
}
function turnMusicOn(){
var _local1:MovieClip;
_local1 = inGameStatsMc["ingamestatsmc"];
_local1 = _local1["wg"];
_local1 = _local1["stats"];
_local1["music"].gotoAndStop(1);
}
function doCleanUp(){
var _local1:*;
var _local2:*;
var _local3:Boolean;
var _local4:*;
_local1 = 0;
while (_local1 < int(levelHeightBlocks)) {
_local2 = 0;
while (_local2 < int(levelWidthBlocks)) {
if (tilesArray[_local1][_local2] != 0){
_local3 = false;
_local4 = 0;
while (_local4 < goodGuysArray.length) {
if (goodGuysArray[_local4] == tilesArray[_local1][_local2]){
_local3 = true;
if (goodGuysArray[_local4].mC == null){
tilesArray[_local1][_local2] = 0;
goodGuysArray.splice(_local4, 1);
};
};
_local4++;
};
if (_local3 == false){
tilesArray[_local1][_local2] = 0;
};
};
_local2++;
};
_local1++;
};
}
function doBlurEffect(){
bmd.draw(playerMc);
bmd.applyFilter(bmd, bmd.rect, new Point(0, 0), bf);
bmd.applyFilter(bmd, bmd.rect, new Point(0, 0), cmf);
bmd.scroll(0, -(scrollvx));
}
function setupPlayer(){
var _local1:MovieClip;
_local1 = new playerSprite();
playerMc.addChild(_local1);
Player = new GamePlayer(_local1, this, ((blockSize * Useful.RandomNumber(2, 2)) - 20), (blockSize + 20), Useful);
}
function setSelectedAmount(){
if (statsMc.currentFrame == 2){
if (statsMc.selectedTxt != null){
statsMc.selectedTxt.text = String(selectionArray.length);
};
};
}
public function gameOver(_arg1){
if (_arg1 == "game_over"){
rt.gameState = 5;
Sounds.playSoundFx("gameOverFx");
increaseScore(money);
gameOverMsgMc = new GameOverMsgAnim(this);
inGameMsgsMc.addChild(gameOverMsgMc);
gameOverMsgMc.play();
gameOverMsgMc.x = (movieWidth / 2);
gameOverMsgMc.y = (movieHeight / 2);
gameExplosions = new GameMultipleExplosion(this, Useful, 8, Player.mC.x, (Player.mC.y - 60), 80, 1, 2);
} else {
Player.mC.visible = false;
Sounds.playSoundFx("levelFx");
rt.gameState = 5;
levelCompleteMsg = new GameLevelComplete(this);
inGameMsgsMc.addChild(levelCompleteMsg);
levelCompleteMsg.x = (movieWidth / 2);
levelCompleteMsg.y = ((movieHeight / 2) - 60);
};
}
public function mainLoop(){
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
trace("mouse");
trace(stage.mouseX);
trace(root.mouseX);
runDrop();
_local1 = 0;
while (_local1 < goodGuysArray.length) {
goodGuysArray[_local1].mainLoop();
_local1++;
};
_local1 = 0;
while (_local1 < explosionsArray.length) {
explosionsArray[_local1].mainLoop();
_local1++;
};
_local2 = 0;
while (_local2 < particlesArray.length) {
particlesArray[_local2].mainLoop();
_local2++;
};
if (Player != null){
Player.mainLoop();
setScore();
setBlocksLeft();
};
checkForGameOver();
_local3 = rt.mouseX;
_local4 = rt.mouseY;
_local3 = (_local3 - 20);
_local4 = (_local4 - 60);
_local5 = int((_local3 / blockSize));
_local6 = int((_local4 / blockSize));
}
}
}//package classesAS3
Section 8
//GameGoodGuy (classesAS3.GameGoodGuy)
package classesAS3 {
import flash.display.*;
import flash.filters.*;
public class GameGoodGuy {
var xVel:Number;// = 0
var dead:Boolean;
var energy:Number;// = 0
var xxRight:Number;
var hitVel;
var destroy:Boolean;
var yyMiddle2:Number;
var yPos:Number;// = 0
var xxMiddle2:Number;
var inToGround:Number;
var energyBarOn:Number;
var numberOfMissiles;// = 0
var soldierState:int;
var xxMiddle:Number;
var Useful:GameUseful;
var energyStart:Number;// = 0
var myDamage:Number;
var xPos:Number;// = 0
var range:Number;
var xxLeft:Number;
var rt:Object;
var energyMc:MovieClip;
var myScore:Number;
var speed:Number;// = 0
var xOrigin:Number;// = 0
var gravity:Number;
var missileName:String;
var delayToFireMissile:Number;// = 1
var myName:String;
var myRotation:Number;
var yyMiddle:Number;
var projectileMc:Object;
var speedOld:Number;
var energyBarMc:GameEnergyBar;
var yyRight:Number;
var yVel:Number;// = 0
var glowFilter:GlowFilter;
var yyLeft:Number;
var distanceArray:Array;
var myRange:Number;
var filterDelay:Number;
var xDir:Number;
var myParent:Object;
var mC:Object;
var yOrigin:Number;// = 0
public static const SOLDIER_STATE_DEFEND:int = 1;
public static const SOLDIER_STATE_ATTACK:int = 0;
public static const SOLDIER_STATE_CRYSTAL:int = 2;
public static const SOLDIER_STATE_RETREAT:int = 3;
public function GameGoodGuy(_arg1, _arg2, _arg3, _arg4){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
speed = 0;
energyStart = 0;
energy = 0;
delayToFireMissile = 1;
numberOfMissiles = 0;
super();
rt = _arg1;
Useful = _arg4;
mC = new tiles();
rt.inGameGoodGuysMc.addChild(mC);
mC.tile.gotoAndStop(Useful.RandomNumber(1, 11));
destroy = false;
dead = false;
inToGround = 0;
xOrigin = _arg2;
yOrigin = _arg3;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
hitVel = 0;
energyBarOn = 0;
gravity = 1.5;
xDir = 1;
distanceArray = new Array();
glowFilter = new GlowFilter(0xFFFFFF, 1, 3, 3, 3, 1);
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
updatePosition();
}
function applyGravity(){
yVel = (yVel + gravity);
}
function remove(){
var _local1:Number;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = -1;
_local2 = 0;
while (_local2 < rt.goodGuysArray.length) {
if (this == rt.goodGuysArray[_local2]){
_local1 = _local2;
};
_local2++;
};
_local3 = xPos;
_local4 = (xOrigin + _local3);
_local5 = yPos;
_local6 = (yOrigin + _local5);
_local4 = (_local4 - 20);
_local6 = (_local6 - 60);
_local7 = int((_local4 / rt.blockSize));
_local8 = int((_local6 / rt.blockSize));
rt.tilesArray[_local8][_local7] = 0;
if (mC != null){
rt.inGameGoodGuysMc.removeChild(mC);
};
mC = null;
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
}
function mainLoop(){
if (mC != null){
if (destroy == true){
if (mC.currentFrame == 6){
rt.decreaseBlocksLeft(1);
remove();
} else {
if (mC.currentFrame == 1){
if (mC.tile.p.currentFrame == 2){
mC.tile.p.gotoAndPlay("liveWire");
if (mC.tile.p2 != null){
mC.tile.p2.gotoAndPlay("liveWire");
};
};
};
};
} else {
applyGravity();
checkForCollision();
updatePosition();
};
};
}
function checkForCollision(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = (xPos + xVel);
_local2 = (xOrigin + _local1);
_local3 = (yPos + yVel);
_local4 = (yOrigin + _local3);
_local2 = (_local2 - 20);
_local4 = (_local4 - 60);
_local5 = int((_local2 / rt.blockSize));
_local6 = int((_local4 / rt.blockSize));
if (_local5 < 1){
xVel = 0;
} else {
if (_local5 >= (rt.levelWidthBlocks - 2)){
xVel = 0;
};
};
if (_local6 < 0){
yVel = 0;
} else {
if (_local6 >= (rt.levelHeightBlocks - 1)){
yVel = 0;
yPos = int((_local6 * rt.blockSize));
if (rt.tilesArray[_local6][_local5] != this){
rt.tilesArray[_local6][_local5] = this;
rt.Sounds.playSoundFx("landFx");
rt.checkForLink();
};
return (true);
};
};
if ((_local6 + 1) < rt.levelHeightBlocks){
if (rt.tilesArray[(_local6 + 1)][_local5] != 0){
if (_local6 == 0){
rt.gameOver("game_over");
} else {
yVel = 0;
yPos = int((_local6 * rt.blockSize));
if (rt.tilesArray[_local6][_local5] != this){
rt.tilesArray[_local6][_local5] = this;
rt.Sounds.playSoundFx("landFx");
rt.checkForLink();
};
};
} else {
rt.tilesArray[_local6][_local5] = 0;
};
};
_local1 = (xPos + xVel);
_local2 = (xOrigin + _local1);
_local3 = (yPos + yVel);
_local4 = (yOrigin + _local3);
_local2 = (_local2 - 20);
_local4 = (_local4 - 60);
_local5 = int((_local2 / rt.blockSize));
_local6 = int((_local4 / rt.blockSize));
_local7 = (_local6 * rt.blockSize);
if (_local7 != _local4){
trace("weird");
if (rt.Player.grabbedTile == this){
rt.Player.grabbedTile = null;
};
};
}
}
}//package classesAS3
Section 9
//GameGroundPlatform1 (classesAS3.GameGroundPlatform1)
package classesAS3 {
import flash.display.*;
public class GameGroundPlatform1 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GameGroundPlatform1(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
}
}
}//package classesAS3
Section 10
//GameGroundPlatform2 (classesAS3.GameGroundPlatform2)
package classesAS3 {
import flash.display.*;
public class GameGroundPlatform2 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GameGroundPlatform2(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
}
}
}//package classesAS3
Section 11
//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 function GameLevelComplete(_arg1){
addFrameScript(0, frame1, 14, frame15, 30, frame31, 98, frame99);
rt = _arg1;
howWellDone = 1;
this.play();
}
function frame15(){
msg.totalScore.text = String(this.rt.score);
}
function frame1(){
play();
}
function frame31(){
}
function frame99(){
trace(this.rt.levelNumber);
this.rt.endLevelStuff();
stop();
}
}
}//package classesAS3
Section 12
//GameLoop (classesAS3.GameLoop)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import mochi.as3.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
import flash.ui.*;
public dynamic class GameLoop extends MovieClip {
public var pauseScreen:pauseMc;
public var pressUp:Boolean;// = false
public var mapScreen2:GameMapScreen;
public var mochiId:String;// = "df8dd06e2406808c"
public var titleMusic:SoundMusic1;
public var percentLoaded:int;
public var Useful:GameUseful;
public var domain:String;
var FPS:TextField;
public var titleScreen:GameTitleScreen;
public var GameMain:GameGame;
public var loaderStarted:Boolean;// = false
public var loadingBox:LoadingBox;
public var mindJolt:Boolean;// = false
public var titleStarted:Boolean;// = false
public var mochiScoreId:String;// = "54995e9e0b278177"
var Memory:TextField;
public var mochiOn:Boolean;// = false
public var mainBtnsSetup;
public var CollisionDetection:GameCollisionDetection;
public var titleMusicChannel:SoundChannel;
public var allowed_site:String;// = "mindjolt.com"
var Instructions:TextField;
public var gameState:int;// = 2
var currentTime:int;// = 0
public static const STATE_SYSTEM_MOCHI:int = 2;
public static const STATE_SYSTEM_NEW_LEVEL:int = 7;
public static const STATE_SYSTEM_GAME_COMPLETE:int = 6;
public static const STATE_SYSTEM_SETUP_GAME:int = 8;
public static const STATE_SYSTEM_PAUSE:int = 4;
public static const STATE_SYSTEM_LOADER:int = 0;
public static const STATE_SYSTEM_TITLE:int = 1;
public static const STATE_SYSTEM_GET_READY:int = 9;
public static const STATE_SYSTEM_PLAY:int = 3;
public static const STATE_SYSTEM_GAME_OVER:int = 5;
public function GameLoop():void{
gameState = STATE_SYSTEM_MOCHI;
loaderStarted = false;
titleStarted = false;
mochiOn = false;
mochiId = "df8dd06e2406808c";
mochiScoreId = "54995e9e0b278177";
pressUp = false;
currentTime = 0;
FPS = new TextField();
Instructions = new TextField();
Memory = new TextField();
allowed_site = "mindjolt.com";
mindJolt = false;
super();
addFrameScript(0, frame1, 2, frame3);
MochiBot.track(this, "fe6f2f71");
mainBtnsSetup = false;
checkDomain();
MochiServices.connect(mochiId, this);
Useful = new GameUseful(root);
CollisionDetection = new GameCollisionDetection();
GameMain = new GameGame(root, 600, 576, 480, 480, 40, 3, Useful, 10);
addChild(GameMain);
addEventListener(Event.ENTER_FRAME, runGame);
stage.addEventListener(KeyboardEvent.KEY_UP, keyListener);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyListenerDown);
}
public function doTitleScreenStuff(){
if (titleMusicChannel == null){
titleMusicChannel = titleMusic.play(0, 10000);
};
titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, doSetup);
mainBtnsSetup = true;
titleScreen.instructionsBtn.addEventListener(MouseEvent.MOUSE_UP, doInstScreen);
titleScreen.controlsBtn.addEventListener(MouseEvent.MOUSE_UP, doControlsScreen);
titleScreen.musicBtn.addEventListener(MouseEvent.MOUSE_UP, doSoundBtn);
}
public function showLeaderBoard(_arg1){
var o:Object;
var boardID:String;
var msgMc = _arg1;
o = {n:[5, 4, 9, 9, 5, 14, 9, 14, 0, 11, 2, 7, 8, 1, 7, 7], f:function (_arg1:Number, _arg2:String):String{
if (_arg2.length == 16){
return (_arg2);
};
return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16))));
}};
boardID = o.f(0, mochiScoreId);
MochiScores.showLeaderboard({boardID:boardID, score:GameMain.score, onClose:msgMc.play});
}
public function showLeaderBoard2(_arg1){
var o:Object;
var boardID:String;
var msgMc = _arg1;
o = {n:[5, 4, 9, 9, 5, 14, 9, 14, 0, 11, 2, 7, 8, 1, 7, 7], f:function (_arg1:Number, _arg2:String):String{
if (_arg2.length == 16){
return (_arg2);
};
return (this.f((_arg1 + 1), (_arg2 + this.n[_arg1].toString(16))));
}};
boardID = o.f(0, mochiScoreId);
MochiScores.showLeaderboard({boardID:boardID, onClose:msgMc.gotoAndStop("mainScreen")});
}
public function setupTitleScreen(){
titleScreen = new GameTitleScreen(this);
titleScreen.x = 0;
addChild(titleScreen);
if (GameMain.musicSwitch == false){
GameMain.musicSwitch = true;
titleMusic = new SoundMusic1();
titleMusicChannel = null;
} else {
if (titleMusic == null){
titleMusic = new SoundMusic1();
titleMusicChannel = null;
};
};
titleScreen.highScoresBtn2.addEventListener(MouseEvent.MOUSE_UP, showHighScores);
}
public function doControlsScreen(_arg1:MouseEvent):void{
titleScreen.gotoAndStop("controls");
}
public function doInstrBtns(){
GameMain.Sounds.playSoundFx("clickBtnFx");
titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastInstScreen);
}
public function mouseMoveHandler(_arg1:Event):void{
}
public function doPlay():void{
GameMain.mainLoop();
}
public function keyListener(_arg1:KeyboardEvent):void{
GameMain.Player.xVel = 0;
GameMain.Player.yVel = 0;
GameMain.Player.grabTile = false;
GameMain.Player.firstKeyDown = -1;
GameMain.Player.rotateBack = false;
if (_arg1.keyCode == Keyboard.SPACE){
GameMain.Player.grabbedTile = null;
};
if (_arg1.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 (_arg1.keyCode == Keyboard.UP){
};
if (_arg1.keyCode == Keyboard.DOWN){
};
if (_arg1.keyCode == Keyboard.RIGHT){
GameMain.Player.moveXArray = new Array();
} else {
if (_arg1.keyCode == Keyboard.LEFT){
GameMain.Player.moveXArray = new Array();
};
};
if (_arg1.keyCode == Keyboard.DOWN){
GameMain.Player.moveYArray = new Array();
} else {
if (_arg1.keyCode == Keyboard.UP){
GameMain.Player.moveYArray = new Array();
};
};
if (_arg1.keyCode == 65){
GameMain.Player.grabbedTile = null;
} else {
if (_arg1.keyCode == 68){
GameMain.Player.grabbedTile = null;
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
public function doMainScreen(_arg1:MouseEvent):void{
if (mapScreen2.planets.infoMc.currentFrame == 1){
titleScreen.gotoAndStop("mainScreen");
};
}
public function doSoundBtn(_arg1: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);
};
}
public function loadingComplete(_arg1:Event){
trace("loadingComplete");
removeChild(loadingBox);
loadingBox = null;
this.loaderInfo.removeEventListener(Event.INIT, loadingComplete);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadingProgress);
finishPreload();
}
public function doMapScreen(_arg1:MouseEvent):void{
removeChild(titleScreen);
setupMapScreen();
}
public function mouseLeftClick(_arg1:Event):void{
if (gameState == STATE_SYSTEM_PLAY){
GameMain.leftClick();
};
}
public function mapLeftUpClick(_arg1:MouseEvent):void{
if (mapScreen2.planets.infoMc.currentFrame == 1){
if (mapScreen2.planets.pBtn1.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(2);
} else {
if (mapScreen2.planets.pBtn2.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(3);
} else {
if (mapScreen2.planets.pBtn3.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(4);
} else {
if (mapScreen2.planets.pBtn4.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(5);
} else {
if (mapScreen2.planets.pBtn5.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(6);
} else {
if (mapScreen2.planets.pBtn6.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(7);
} else {
if (mapScreen2.planets.pBtn7.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(8);
} else {
if (mapScreen2.planets.pBtn8.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(9);
} else {
if (mapScreen2.planets.pBtn9.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(10);
} else {
if (mapScreen2.planets.pBtn10.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(11);
};
};
};
};
};
};
};
};
};
};
} else {
if (mapScreen2.planets.infoMc.closeBtn.hitTestPoint(stage.mouseX, stage.mouseY, true)){
mapScreen2.planets.infoMc.gotoAndStop(1);
};
};
}
public function showHUD():void{
FPS.text = "FPS";
Memory.text = "mem";
Memory.x = 200;
stage.addChild(FPS);
stage.addChild(Memory);
}
public function doSetup(_arg1:MouseEvent):void{
removeChild(titleScreen);
setupGameStuff();
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseLeftClick);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseLeftUpClick);
}
function doLastContScreen(_arg1:MouseEvent):void{
titleScreen.gotoAndStop("mainScreen");
}
public function doContrBtns(){
titleScreen.backBtn.addEventListener(MouseEvent.MOUSE_UP, doLastContScreen);
}
function setupMapScreen(){
mapScreen2 = new GameMapScreen(this);
mapScreen2.x = 0;
addChild(mapScreen2);
mapScreen2.planets.infoMc.gotoAndStop(1);
mapScreen2.addEventListener(MouseEvent.MOUSE_UP, mapLeftUpClick);
}
function doLastInstScreen(_arg1:MouseEvent):void{
titleScreen.gotoAndStop("mainScreen");
}
function doNextContScreen(_arg1:MouseEvent):void{
if (titleScreen.currentFrame < 122){
titleScreen.nextFrame();
} else {
titleScreen.gotoAndStop("mainScreen");
};
}
function doNextInstScreen(_arg1:MouseEvent):void{
if (titleScreen.currentFrame < 119){
titleScreen.nextFrame();
};
}
public function setupGameStuff(){
GameMain.setupGame();
gameState = STATE_SYSTEM_GET_READY;
GameMain.getReadyMsgAnim = new GameReadyAnim(GameMain);
GameMain.inGameMsgsMc.addChild(GameMain.getReadyMsgAnim);
GameMain.getReadyMsgAnim.play();
GameMain.getReadyMsgAnim.x = (GameMain.movieWidth / 2);
GameMain.getReadyMsgAnim.y = (GameMain.movieHeight / 2);
}
public function runGame(_arg1:Event):void{
switch (gameState){
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:
break;
case STATE_SYSTEM_GAME_COMPLETE:
break;
case STATE_SYSTEM_NEW_LEVEL:
GameMain.gameOver("level_complete");
break;
case STATE_SYSTEM_GET_READY:
break;
case STATE_SYSTEM_PAUSE:
break;
};
}
public function doInstScreen(_arg1:MouseEvent):void{
titleScreen.gotoAndStop("instructions");
}
public function showHighScores(_arg1:Event){
titleScreen.gotoAndStop("highscores");
}
public function doMapScreenStuff(){
mapScreen2.playBtn.addEventListener(MouseEvent.MOUSE_UP, doSetup);
if (GameMain.levelNumber > 1){
mapScreen2.youarehereMc.gotoAndPlay(((GameMain.levelNumber - 1) * 5));
} else {
mapScreen2.youarehereMc.gotoAndStop(1);
mapScreen2.backBtn.addEventListener(MouseEvent.MOUSE_UP, doMainScreen2);
};
}
public function updateHUD():void{
var _local1:Number;
_local1 = (1 / ((getTimer() - currentTime) / 1000));
currentTime = getTimer();
FPS.text = ("FPS: " + Math.round(_local1).toString());
Memory.text = (("Mem :" + (Math.round(((System.totalMemory / 0x100000) * 10)) / 10).toString()) + " MB");
}
public function doTitleScreen():void{
if (((!(titleStarted)) && ((currentFrame == 3)))){
setupTitleScreen();
titleStarted = true;
};
}
public function keyListenerDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.RIGHT){
GameMain.Player.moveXArray.push("right");
GameMain.Player.firstKeyDown = 0;
} else {
if (_arg1.keyCode == Keyboard.LEFT){
GameMain.Player.moveXArray.push("left");
GameMain.Player.firstKeyDown = 0;
};
};
if (_arg1.keyCode == Keyboard.DOWN){
GameMain.Player.moveYArray.push("down");
GameMain.Player.firstKeyDown = 0;
};
if (_arg1.keyCode == Keyboard.UP){
GameMain.Player.moveYArray.push("up");
GameMain.Player.firstKeyDown = 0;
};
if (_arg1.keyCode == Keyboard.SPACE){
GameMain.Player.grabTile = true;
};
if (_arg1.keyCode == 68){
GameMain.Player.grabTile = true;
GameMain.Player.rotateBack = false;
};
if (_arg1.keyCode == 65){
GameMain.Player.grabTile = true;
GameMain.Player.rotateBack = true;
};
}
public function loadingProgress(_arg1:Event):void{
percentLoaded = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100);
trace(percentLoaded);
loadingBox.update(percentLoaded);
}
public function adFinished(){
mochiOn = false;
gameState = STATE_SYSTEM_LOADER;
}
public function mouseLeftUpClick(_arg1:Event):void{
}
public function doMainScreen2(_arg1:MouseEvent):void{
if (mapScreen2.planets.infoMc.currentFrame == 1){
removeChild(mapScreen2);
addChild(titleScreen);
titleScreen.gotoAndStop("mainScreen");
titleScreen.playBtn.addEventListener(MouseEvent.MOUSE_UP, doMapScreen);
};
}
public function doLoadScreen():void{
trace(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
if (!loaderStarted){
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
finishPreload();
} else {
loadingBox = new LoadingBox();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadingProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, loadingComplete);
loaderStarted = true;
loadingBox.x = 200;
loadingBox.y = 200;
addChild(loadingBox);
};
};
}
public function checkDomain(){
domain = this.root.loaderInfo.url.split("/")[2];
if (domain.indexOf(allowed_site) == (domain.length - allowed_site.length)){
mindJolt = true;
} else {
mindJolt = false;
};
}
public function doMochi():void{
if (!mochiOn){
MochiAd.showPreGameAd({clip:root, id:mochiId, res:"600x576", ad_finished:this.adFinished});
mochiOn = true;
};
}
public function finishPreload():void{
this.play();
gameState = STATE_SYSTEM_TITLE;
}
}
}//package classesAS3
Section 13
//GameManGrenader (classesAS3.GameManGrenader)
package classesAS3 {
import flash.display.*;
public class GameManGrenader extends MovieClip {
public var myParent:Object;
public var selectionMc:manSelectionSquare;
public var manThrow:badGuyThrow;
public function GameManGrenader(_arg1){
myParent = _arg1;
}
}
}//package classesAS3
Section 14
//GameMapScreen (classesAS3.GameMapScreen)
package classesAS3 {
import flash.display.*;
import flash.events.*;
public class GameMapScreen extends MovieClip {
public var backBtn:SimpleButton;
var rt:Object;
public var playBtn:SimpleButton;
public var youarehereMc:MovieClip;
public var planets:MovieClip;
public function GameMapScreen(_arg1){
addFrameScript(20, frame21);
rt = _arg1;
}
function frame21(){
rt.doMapScreenStuff();
stop();
}
}
}//package classesAS3
Section 15
//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 dead:Boolean;
var myParent:Object;
var mC:Object;
var arrayIndex:Number;
var velocities:Object;
var xOrigin:Number;// = 0
var yOrigin:Number;// = 0
function GameMissile(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
rt = _arg2;
Useful = _arg6;
myParent = _arg9;
myDamage = _arg10;
xOrigin = _arg3;
yOrigin = _arg4;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
speed = _arg8;
dead = false;
mC = _arg1;
mType = _arg5;
trailDelay = 2;
updatePosition();
velocities = new Object();
velocities.gravity = _arg7.gravity;
if (_arg5 == "playerMissile"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "bullet"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "Photon"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "enemyShell"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "enemyPhoton"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "enemyBullet"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "rocket"){
xVel = (_arg7.vx * speed);
yVel = (_arg7.vy * speed);
} else {
if (_arg5 == "grenade"){
velocities.gravity = _arg7.gravity;
velocities.steps = _arg7.steps;
velocities.xStep = _arg7.xStep;
velocities.yStep = _arg7.yStep;
xVel = velocities.xStep;
yVel = velocities.yStep;
} else {
velocities.gravity = _arg7.gravity;
velocities.steps = _arg7.steps;
velocities.xStep = _arg7.xStep;
velocities.yStep = _arg7.yStep;
xVel = velocities.xStep;
yVel = velocities.yStep;
};
};
};
};
};
};
};
};
}
function applyGravity(){
yVel = (yVel + velocities.gravity);
}
function mainLoop(){
if (dead == true){
remove();
} else {
if (mType == "playerMissile"){
applyGravity();
checkForOffStage();
collisionDetection();
} else {
if (mType == "enemyPhoton"){
checkForOffStage();
collisionDetection();
} else {
if (mType == "enemyShell"){
checkForOffStage();
collisionDetection();
} else {
if (mType == "enemyBullet"){
checkForOffStage();
collisionDetection();
} else {
if (mType == "bullet"){
checkForOffStage();
collisionDetection();
} else {
if (mType == "Photon"){
checkForOffStage();
collisionDetection();
} else {
if (mType == "rocket"){
doTrail();
checkForOffStage();
collisionDetection();
} else {
applyGravity();
collisionDetection();
};
};
};
};
};
};
};
updatePosition();
};
}
function checkForOffStage(){
if (mC.x < 0){
remove();
};
if (mC.y < -1000){
remove();
};
if (mC.x > 1700){
remove();
};
}
function updatePosition(){
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
xPos = (xPos + xVel);
yPos = (yPos + yVel);
_local1 = mC.x;
_local2 = mC.y;
mC.x = (xOrigin + xPos);
mC.y = (yOrigin + yPos);
_local3 = (mC.x - _local1);
_local4 = (mC.y - _local2);
_local5 = Math.atan2(_local4, _local3);
mC.rotation = ((_local5 * 180) / Math.PI);
trace("missile y");
trace(mC._y);
}
function remove(){
var _local1:Number;
var _local2:*;
if (dead == false){
_local1 = -1;
_local2 = 0;
while (_local2 < rt.missilesArray.length) {
if (this == rt.missilesArray[_local2]){
_local1 = _local2;
};
_local2++;
};
if (_local1 >= 0){
if (mC != null){
if (mC.parent != null){
rt.inGameMissilesMc.removeChild(mC);
};
};
};
dead = true;
};
}
function mCDeath(){
}
function collisionDetection(){
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:Number;
if (mType == "bullet"){
_local1 = 0;
while (_local1 < rt.badGuysArray.length) {
if (rt.badGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.badGuysArray[_local1].mC)){
rt.badGuysArray[_local1].decreaseEnergy(this, false, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 7, 1, 10, true, false, false, 8));
};
};
_local1++;
};
if (dead == false){
if (mC.hitTestObject(rt.alienBaseMc)){
rt.decreaseAlienEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
} else {
if (mType == "Photon"){
_local1 = 0;
while (_local1 < rt.badGuysArray.length) {
if (rt.badGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.badGuysArray[_local1].mC)){
rt.badGuysArray[_local1].decreaseEnergy(this, false, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 3, 1, 8, true, false, false, 8));
};
};
_local1++;
};
if (dead == false){
if (mC.hitTestObject(rt.alienBaseMc)){
rt.decreaseAlienEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 3, 1, 8, true, false, false, 8));
};
};
} else {
if (mType == "rocket"){
_local1 = 0;
while (_local1 < rt.badGuysArray.length) {
if (rt.badGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.badGuysArray[_local1].mC)){
rt.badGuysArray[_local1].decreaseEnergy(this, false, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
_local1++;
};
if (dead == false){
if (mC.hitTestObject(rt.alienBaseMc)){
rt.decreaseAlienEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
} else {
if (mType == "grenade"){
_local1 = 0;
while (_local1 < rt.badGuysArray.length) {
if (rt.badGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.badGuysArray[_local1].mC)){
rt.badGuysArray[_local1].decreaseEnergy(this, true, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 7, 1, 10, true, false, false, 8));
};
};
_local1++;
};
if (dead == false){
if (mC.hitTestObject(rt.alienBaseMc)){
rt.decreaseAlienEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
} else {
if (mType == "enemyBomb"){
if (mC.hitTestObject(rt.Player.mC)){
rt.decreaseEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
if (dead == false){
_local1 = 0;
while (_local1 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.goodGuysArray[_local1].mC)){
rt.goodGuysArray[_local1].decreaseEnergy(mC.x, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
_local1++;
};
};
} else {
if (mType == "enemyPhoton"){
if (mC.hitTestObject(rt.Player.mC)){
rt.decreaseEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 3, 1, 16, true, false, false, 8));
};
if (dead == false){
_local1 = 0;
while (_local1 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.goodGuysArray[_local1].mC)){
rt.goodGuysArray[_local1].decreaseEnergy(mC.x, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 3, 1, 16, true, false, false, 8));
};
};
_local1++;
};
};
} else {
if (mType == "enemyShell"){
if (mC.hitTestObject(rt.Player.mC)){
rt.decreaseEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
if (dead == false){
_local1 = 0;
while (_local1 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.goodGuysArray[_local1].mC)){
rt.goodGuysArray[_local1].decreaseEnergy(mC.x, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
_local1++;
};
};
} else {
if (mType == "enemyBullet"){
if (mC.hitTestObject(rt.Player.mC)){
rt.decreaseEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
if (dead == false){
_local1 = 0;
while (_local1 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.goodGuysArray[_local1].mC)){
rt.goodGuysArray[_local1].decreaseEnergy(mC.x, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 7, 1, 10, true, false, false, 8));
};
};
_local1++;
};
};
} else {
if (mType == "rock"){
if (mC.hitTestObject(rt.Player.mC)){
rt.decreaseEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 7, 1, 10, true, false, false, 8));
};
if (dead == false){
_local1 = 0;
while (_local1 < rt.goodGuysArray.length) {
if (rt.goodGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.goodGuysArray[_local1].mC)){
rt.goodGuysArray[_local1].decreaseEnergy(mC.x, myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 7, 1, 10, true, false, false, 8));
};
};
_local1++;
};
};
} else {
_local1 = 0;
while (_local1 < rt.badGuysArray.length) {
if (rt.badGuysArray[_local1].dead == false){
if (mC.hitTestObject(rt.badGuysArray[_local1].mC)){
if (rt.upgrade3 == true){
rt.badGuysArray[_local1].decreaseEnergy(this, true, (myDamage * 2));
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, Useful, 5, 6, 60, true, false, false, 8));
} else {
rt.badGuysArray[_local1].decreaseEnergy(this, true, myDamage);
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
remove();
dead = true;
};
};
_local1++;
};
if (dead == false){
if (mC.hitTestObject(rt.alienBaseMc)){
if (rt.upgrade3 == true){
rt.decreaseAlienEnergy((myDamage * 2));
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 2, Useful, 5, 6, 60, true, false, false, 8));
} else {
rt.decreaseAlienEnergy(myDamage);
remove();
dead = true;
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 10, 3, 16, true, false, false, 8));
};
};
};
};
};
};
};
};
};
};
};
};
if (dead == false){
_local2 = int(mC.x);
_local3 = (mC.y + rt.spritesMc.y);
_local3 = (_local3 + yVel);
_local4 = rt.groundArray[_local2];
if (_local3 > _local4){
rt.Sounds.playSoundFx("mainGunMissileHitFx");
_local3 = (_local3 - _local4);
yVel = (yVel - _local3);
updatePosition();
rt.explosionsArray.push(new GameExplosion(rt, mC.x, mC.y, 1, Useful, 5, 1, 50, true, false, false, 8));
remove();
};
};
}
function doTrail(){
var _local1:*;
trailDelay--;
if (trailDelay == 0){
trailDelay = 2;
_local1 = new GameRocketSmoke(rt.inGameExplosionsMc);
rt.inGameExplosionsMc.addChild(_local1);
_local1.x = mC.x;
_local1.y = mC.y;
};
}
}
}//package classesAS3
Section 16
//GameMovingPlatform2 (classesAS3.GameMovingPlatform2)
package classesAS3 {
import flash.display.*;
public class GameMovingPlatform2 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GameMovingPlatform2(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
if (x > rt.movieWidth){
trace((xPos + this.width));
xPos = (0 - (xOrigin + this.width));
};
updatePosition();
}
}
}//package classesAS3
Section 17
//GameMovingPlatform23 (classesAS3.GameMovingPlatform23)
package classesAS3 {
import flash.display.*;
public class GameMovingPlatform23 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GameMovingPlatform23(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos - xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
if (x < -(this.width)){
trace((xPos + this.width));
xPos = (rt.movieWidth - xOrigin);
};
updatePosition();
}
}
}//package classesAS3
Section 18
//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(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){
rt = _arg1;
mType = _arg8;
numberOfExplosions = _arg3;
xPos = _arg4;
yPos = _arg5;
areaWidth = _arg6;
Useful = _arg2;
delayToExplosion = _arg7;
}
function mainLoop(){
var _local1:Number;
var _local2:Number;
delayToExplosion--;
if (delayToExplosion == 0){
delayToExplosion = Useful.RandomNumber(1, 8);
_local1 = (xPos + Useful.RandomNumber(1, areaWidth));
_local2 = (rt.alienBaseMc.y + Useful.RandomNumber(1, areaWidth));
rt.explosionsArray.push(new GameExplosion(rt, _local1, _local2, mType, Useful, 8, 5, 76, false, false, true, 8));
};
}
}
}//package classesAS3
Section 19
//GameOverMsgAnim (classesAS3.GameOverMsgAnim)
package classesAS3 {
import flash.display.*;
public class GameOverMsgAnim extends MovieClip {
public var m:MovieClip;
public var rt:Object;
public function GameOverMsgAnim(_arg1){
addFrameScript(9, frame10, 22, frame23);
rt = _arg1;
this.play();
}
function frame10(){
stop();
}
function frame23(){
this.rt.quitGame();
stop();
}
}
}//package classesAS3
Section 20
//GamePanelBuyMc (classesAS3.GamePanelBuyMc)
package classesAS3 {
import flash.display.*;
public class GamePanelBuyMc extends MovieClip {
var buildFinished:Boolean;
public var itemsMc:panelItems;
public var rt:Object;
public var back:panelManBack;
public function GamePanelBuyMc(_arg1){
addFrameScript(0, frame1);
rt = _arg1;
buildFinished = false;
}
function frame1(){
stop();
}
}
}//package classesAS3
Section 21
//GameParticle (classesAS3.GameParticle)
package classesAS3 {
import flash.display.*;
public class GameParticle extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var gravity:Boolean;
var mType:Number;
var speed:Number;
var yVel:Number;// = 0
var mC:Object;
var rt:Object;
var artillary:Boolean;
var Useful:GameUseful;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var gravityValue:Number;
var endX:Number;
var endY:Number;
var arrayIndex:Number;
var explodeDistance:Number;
var yOrigin:Number;// = 0
public function GameParticle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
rt = _arg1;
Useful = _arg2;
artillary = _arg10;
gravity = _arg11;
explodeDistance = _arg12;
xOrigin = _arg3;
yOrigin = _arg4;
gravityValue = 0;
endX = _arg8;
endY = _arg9;
xPos = 0;
yPos = 0;
xVel = (_arg6 * _arg13);
yVel = (_arg7 * _arg13);
mC = this;
mType = _arg5;
mC.gotoAndStop(mType);
updatePosition();
}
function updatePosition(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
xPos = (xPos + xVel);
yPos = (yPos + yVel);
_local1 = x;
_local2 = y;
x = (xOrigin + xPos);
y = (yOrigin + yPos);
_local3 = (x - _local1);
_local4 = (y - _local2);
_local5 = Math.atan2(_local4, _local3);
rotation = ((_local5 * 180) / Math.PI);
}
function mainLoop(){
var _local1:Number;
_local1 = Useful.getDistance(x, y, endX, endY);
if (artillary == true){
if (_local1 > (explodeDistance / 2)){
scaleX = (scaleX + 40);
scaleY = scaleX;
} else {
scaleX = (scaleX - 35);
scaleY = scaleX;
};
};
if (gravity == true){
gravityValue = (gravityValue + 0.2);
yVel = (yVel + gravityValue);
};
if (_local1 > (explodeDistance + 10)){
if (this.parent != null){
remove();
};
};
updatePosition();
}
function checkForOffStage(){
if (mC.x < 0){
remove();
};
if (mC.y < 0){
remove();
};
if (mC.x > 1700){
remove();
};
}
function collisionDetection(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
_local1 = yVel;
_local2 = yVel;
if (_local2 < 0){
_local2 = ((_local2 - _local2) - _local2);
};
_local3 = (mC.x + rt.spritesMc.x);
_local4 = (mC.y + rt.spritesMc.y);
_local4 = (_local4 - 6);
_local5 = 0;
while (_local5 < int(_local2)) {
if (rt.backMc.hitTestPoint(_local3, (_local4 + _local5), true)){
remove();
break;
};
_local5++;
};
_local5 = 0;
while (_local5 < rt.badGuysArray.length) {
if (rt.badGuysArray[_local5].dead == false){
if (mC.hitTestObject(rt.badGuysArray[_local5].mC)){
rt.badGuysArray[_local5].decreaseEnergy(mC.x);
remove();
};
};
_local5++;
};
}
function mCDeath(){
}
function remove(){
var _local1:Number;
var _local2:*;
_local1 = 0;
_local2 = 0;
while (_local2 < rt.particlesArray.length) {
if (this == rt.particlesArray[_local2]){
_local1 = _local2;
};
_local2++;
};
this.parent.removeChild(this);
rt.particlesArray.splice(_local1, 1);
delete ??getglobalscope
[this];
}
}
}//package classesAS3
Section 22
//GamePickups (classesAS3.GamePickups)
package classesAS3 {
import flash.display.*;
public class GamePickups extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var myParent:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GamePickups(_arg1){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
myParent = _arg1;
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
if (x > rt.movieWidth){
trace((xPos + this.width));
xPos = (0 - (xOrigin + this.width));
};
updatePosition();
}
}
}//package classesAS3
Section 23
//GamePlatform1 (classesAS3.GamePlatform1)
package classesAS3 {
import flash.display.*;
public class GamePlatform1 extends MovieClip {
var yPos:Number;// = 0
var xVel:Number;// = 0
var yVel:Number;// = 0
var mC:Object;
public var rt:Object;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var yOrigin:Number;// = 0
public function GamePlatform1(){
xOrigin = 0;
yOrigin = 0;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
super();
}
function updatePosition(){
xPos = (xPos + xVel);
yPos = (yPos + yVel);
x = (xOrigin + xPos);
y = (yOrigin + yPos);
}
function mainLoop(){
}
}
}//package classesAS3
Section 24
//GamePlayer (classesAS3.GamePlayer)
package classesAS3 {
import flash.display.*;
public class GamePlayer {
var playerdown:Number;// = 0
var xVel:Number;// = 0
var moveplayerup:Number;// = 0
var multidirectional:Number;// = 0
var grabbedTile:GameGoodGuy;
var yPos:Number;// = 0
var xxMiddle2:Number;
var santaspeed:Number;// = 2
var yVelOld:Number;// = 0
var rotateGunDown:Boolean;
var jumpTime:Number;
var numberOfMissiles:Number;
var jump:Number;// = 0
var grabTile:Boolean;
var mouseButton:Number;
var moveRArray:Array;
var playerup:Number;// = 0
var energyMc:gunEnergyLevel;
var xxLeft:Number;
var myinstance:Object;
var rt:Object;
var Oldplayerup:Number;// = 0
var keypress:Number;
var speed:Number;
var Oldplayerdown:Number;// = 0
var gravity:Number;// = 0
var myRotation:Number;
var maxSpeed:Number;
var yyLeft:Number;
var shotStrength:Number;
var rotateGunUp:Boolean;
var yVel:Number;// = 0
var playerleft:Number;// = 0
var levelDir:Number;
var bottomXX:Number;
var n:Number;
var s:Number;// = 0
var Oldplayerright:Number;// = 0
var mC:MovieClip;
var scrollSpeed:Number;
var shotsLimit:Number;
var bottomYY:Number;
var vectorData:Object;
var moveYArray:Array;
var dy:Number;// = 0
var dx:Number;// = 0
var missileDistFromGun:Number;
var Oldplayerleft:Number;// = 0
var shotsFired:Number;
var Useful:GameUseful;
var xOrigin:Number;// = 0
var xPos:Number;// = 0
var mygraphic:Object;
var xxMiddle:Number;
var firstKeyDown;
var angle:Number;// = 0
var dropDelay:Number;
var gravityDelay:Number;
var playerright:Number;// = 0
var gunRotation:Number;
var xVelOld:Number;// = 0
var energyLevel:Boolean;
var rotateBack:Boolean;
var yyRight:Number;
var yyMiddle:Number;
var turret:turretMc;
var moveXArray:Array;
var xxRight:Number;
var yyMiddle2:Number;
var yOrigin:Number;// = 0
public function GamePlayer(_arg1, _arg2, _arg3, _arg4, _arg5){
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;
gravity = 0;
super();
rt = _arg2;
Useful = _arg5;
firstKeyDown = -1;
missileDistFromGun = 40;
xOrigin = _arg3;
yOrigin = _arg4;
dx = 0;
dy = 0;
angle = 0;
gravity = 0.5;
shotsFired = 0;
shotsLimit = 2;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
xVelOld = 0;
moveXArray = [];
moveYArray = [];
moveRArray = [];
rotateBack = false;
numberOfMissiles = 0;
yVelOld = 0;
scrollSpeed = 10;
keypress = 0;
jump = 0;
jumpTime = 10;
mouseButton = 0;
mC = _arg1;
shotStrength = 6;
gunRotation = 180;
rotateGunUp = false;
rotateGunDown = false;
vectorData = new Object();
energyLevel = false;
levelDir = 1;
speed = 12;
maxSpeed = 10;
myRotation = 0;
dropDelay = (50 - (rt.levelNumber * 5));
gravityDelay = dropDelay;
grabbedTile = null;
updatePosition();
}
function applyGravity(){
gravityDelay--;
if (gravityDelay == 0){
yVel = (rt.blockSize / 2);
dropDelay = (50 - (rt.levelNumber * 5));
if (dropDelay < 10){
dropDelay = 10;
};
gravityDelay = dropDelay;
} else {
yVel = 0;
};
}
function mainLoop(){
var _local1:*;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Boolean;
_local1 = xPos;
_local2 = yPos;
if (grabTile == true){
grabTile = false;
checkForGrab();
};
if (moveXArray[0] == "right"){
if (firstKeyDown <= 0){
moveRight();
} else {
xVel = 0;
firstKeyDown--;
};
if (firstKeyDown != -1){
firstKeyDown = 10;
};
} else {
if (moveXArray[0] == "left"){
if (firstKeyDown <= 0){
moveLeft();
} else {
xVel = 0;
firstKeyDown--;
};
if (firstKeyDown != -1){
firstKeyDown = 10;
};
} else {
xVel = 0;
};
};
moveRArray.pop();
if (grabbedTile == null){
if (moveYArray[0] == "down"){
if (firstKeyDown <= 0){
moveDown();
} else {
yVel = 0;
firstKeyDown--;
};
if (firstKeyDown != -1){
firstKeyDown = 10;
};
} else {
if (moveYArray[0] == "up"){
if (firstKeyDown <= 0){
moveUp();
} else {
yVel = 0;
firstKeyDown--;
};
if (firstKeyDown != -1){
firstKeyDown = 10;
};
};
};
};
checkForObstruction();
if (grabbedTile != null){
_local3 = (xPos + xVel);
_local4 = (xOrigin + _local3);
_local5 = (yPos + yVel);
_local6 = (yOrigin + _local5);
_local4 = (_local4 - 20);
_local6 = (_local6 - 60);
_local7 = int((_local4 / rt.blockSize));
_local8 = int((_local6 / rt.blockSize));
if (rt.tilesArray[_local8][_local7] == 0){
_local9 = false;
if (mC.x != grabbedTile.mC.x){
_local9 = true;
} else {
if (mC.x != grabbedTile.mC.x){
_local9 = true;
};
};
if (_local9 == true){
_local3 = (grabbedTile.xPos + grabbedTile.xVel);
_local4 = (grabbedTile.xOrigin + _local3);
_local5 = (grabbedTile.yPos + grabbedTile.yVel);
_local6 = (grabbedTile.yOrigin + _local5);
_local4 = (_local4 - 20);
_local6 = (_local6 - 60);
_local7 = int((_local4 / rt.blockSize));
_local8 = int((_local6 / rt.blockSize));
rt.tilesArray[_local8][_local7] = 0;
};
grabbedTile.xOrigin = xOrigin;
grabbedTile.yOrigin = yOrigin;
grabbedTile.xPos = xPos;
grabbedTile.yPos = yPos;
} else {
xVel = 0;
yVel = 0;
};
};
updatePosition();
}
function fireMissile(){
var _local1:*;
var _local2:String;
var _local3:*;
var _local4:Object;
var _local5:Number;
rt.Sounds.playSoundFx("mainGunSound");
energyLevel = false;
_local1 = mC.getChildAt(0);
mC.turret.play();
_local2 = "playerMissile";
_local3 = new mainGunBullet();
rt.inGameMissilesMc.addChild(_local3);
_local4 = new Object();
_local4.vx = -(vectorData.vx);
_local4.vy = -(vectorData.vy);
_local4.gravity = 1;
_local5 = (((100 - rt.statsMc.gunEnergy.energyLevelMc.y) / 10) * 4);
if (_local5 < 8){
_local5 = 8;
};
rt.missilesArray.push(new GameMissile(_local3, rt, (mC.x + (_local4.vx * 105)), (mC.y + (_local4.vy * 105)), _local2, Useful, _local4, _local5, this, 10));
}
public function moveDown(){
yVel = rt.blockSize;
}
function updatePosition(){
var _local1:*;
var _local2:*;
_local1 = mC.x;
_local2 = mC.y;
yPos = (yPos + yVel);
mC.y = (yOrigin + yPos);
xPos = (xPos + xVel);
mC.x = (xOrigin + xPos);
if (mC.x > rt.movieWidth){
xPos = (xPos - rt.movieWidth);
mC.x = (xOrigin + xPos);
} else {
if (mC.x < 0){
xPos = (xPos + rt.movieWidth);
mC.x = (xOrigin + xPos);
};
};
}
function rotateTileBack(_arg1){
rt.Sounds.playSoundFx("rotateBlockFx");
if (_arg1.mC.tile.currentFrame < 3){
if (_arg1.mC.tile.currentFrame == 1){
_arg1.mC.tile.gotoAndStop(2);
} else {
_arg1.mC.tile.gotoAndStop(1);
};
} else {
if (_arg1.mC.tile.currentFrame < 7){
if (_arg1.mC.tile.currentFrame > 3){
_arg1.mC.tile.gotoAndStop((_arg1.mC.tile.currentFrame - 1));
} else {
_arg1.mC.tile.gotoAndStop(6);
};
} else {
if (_arg1.mC.tile.currentFrame < 11){
if (_arg1.mC.tile.currentFrame > 7){
_arg1.mC.tile.gotoAndStop((_arg1.mC.tile.currentFrame - 1));
} else {
_arg1.mC.tile.gotoAndStop(10);
};
};
};
};
}
public function moveUp(){
yVel = -(rt.blockSize);
}
function checkForObstruction(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
_local1 = (xPos + xVel);
_local2 = (xOrigin + _local1);
_local3 = (yPos + yVel);
_local4 = (yOrigin + _local3);
_local2 = (_local2 - 20);
_local4 = (_local4 - 60);
_local5 = int((_local2 / rt.blockSize));
_local6 = int((_local4 / rt.blockSize));
if (_local5 < 1){
xVel = 0;
} else {
if (_local5 >= (rt.levelWidthBlocks - 1)){
xVel = 0;
};
};
if (_local6 < 0){
yVel = 0;
} else {
if (_local6 >= rt.levelHeightBlocks){
yVel = 0;
};
};
}
public function moveLeft(){
xVel = -(rt.blockSize);
}
function checkForGrab(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local1 = (xPos + xVel);
_local2 = (xOrigin + _local1);
_local3 = (yPos + yVel);
_local4 = (yOrigin + _local3);
_local2 = (_local2 - 20);
_local4 = (_local4 - 60);
_local5 = int((_local2 / rt.blockSize));
_local6 = int((_local4 / rt.blockSize));
_local7 = (_local5 * rt.blockSize);
_local8 = (_local6 * rt.blockSize);
if (rt.tilesArray[_local6][_local5] != 0){
_local1 = (rt.tilesArray[_local6][_local5].xPos + rt.tilesArray[_local6][_local5].xVel);
_local9 = (rt.tilesArray[_local6][_local5].xOrigin + _local1);
_local3 = (rt.tilesArray[_local6][_local5].yPos + rt.tilesArray[_local6][_local5].yVel);
_local10 = (rt.tilesArray[_local6][_local5].yOrigin + _local3);
_local9 = (_local9 - 20);
_local10 = (_local10 - 60);
_local11 = int((_local9 / rt.blockSize));
_local12 = int((_local10 / rt.blockSize));
_local13 = (_local11 * rt.blockSize);
_local14 = (_local12 * rt.blockSize);
if (_local9 == _local13){
if (_local10 == _local14){
grabbedTile = rt.tilesArray[_local6][_local5];
if (rotateBack == true){
rotateTileBack(rt.tilesArray[_local6][_local5]);
} else {
rotateTile(rt.tilesArray[_local6][_local5]);
};
rt.checkForLink();
};
};
};
}
function rotateTile(_arg1){
rt.Sounds.playSoundFx("rotateBlockFx");
if (_arg1.mC.tile.currentFrame < 3){
if (_arg1.mC.tile.currentFrame == 1){
_arg1.mC.tile.gotoAndStop(2);
} else {
_arg1.mC.tile.gotoAndStop(1);
};
} else {
if (_arg1.mC.tile.currentFrame < 7){
if (_arg1.mC.tile.currentFrame < 6){
_arg1.mC.tile.gotoAndStop((_arg1.mC.tile.currentFrame + 1));
} else {
_arg1.mC.tile.gotoAndStop(3);
};
} else {
if (_arg1.mC.tile.currentFrame < 11){
if (_arg1.mC.tile.currentFrame < 10){
_arg1.mC.tile.gotoAndStop((_arg1.mC.tile.currentFrame + 1));
} else {
_arg1.mC.tile.gotoAndStop(7);
};
};
};
};
}
public function moveRight(){
xVel = rt.blockSize;
}
}
}//package classesAS3
Section 25
//GameReadyAnim (classesAS3.GameReadyAnim)
package classesAS3 {
import flash.display.*;
public class GameReadyAnim extends MovieClip {
public var rt:Object;
public var msg2:MovieClip;
public function GameReadyAnim(_arg1){
addFrameScript(10, frame11, 101, frame102);
rt = _arg1;
this.play();
}
function frame102(){
this.rt.rt.gameState = 3;
this.parent.removeChild(this);
stop();
}
function frame11(){
msg2.levelText2.text = ("Level " + this.rt.levelNumber);
}
}
}//package classesAS3
Section 26
//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(_arg1, _arg2, _arg3){
addFrameScript(22, frame23);
rt = _arg1;
inGameScoreMc = _arg2;
scoreNumber = _arg3;
txt.moneyTxt.text = String(scoreNumber);
}
function frame23(){
this.inGameScoreMc.removeChild(this);
stop();
}
}
}//package classesAS3
Section 27
//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(_arg1, _arg2, _arg3){
addFrameScript(15, frame16);
rt = _arg1;
inGameScoreMc = _arg2;
scoreNumber = _arg3;
txt.scoreTxt.text = ("-" + String(scoreNumber));
}
function frame16(){
this.inGameScoreMc.removeChild(this);
stop();
}
}
}//package classesAS3
Section 28
//GameRisingScoreBig (classesAS3.GameRisingScoreBig)
package classesAS3 {
import flash.display.*;
public class GameRisingScoreBig extends MovieClip {
public var inGameScoreMc:Sprite;
public var txt:MovieClip;
public var scoreNumber:Number;
public var rt:Object;
public function GameRisingScoreBig(_arg1, _arg2, _arg3){
addFrameScript(34, frame35);
rt = _arg1;
inGameScoreMc = _arg2;
scoreNumber = _arg3;
txt.scoreTxt.text = String(scoreNumber);
}
function frame35(){
this.inGameScoreMc.removeChild(this);
stop();
}
}
}//package classesAS3
Section 29
//GameRocketSmoke (classesAS3.GameRocketSmoke)
package classesAS3 {
import flash.display.*;
public class GameRocketSmoke extends MovieClip {
public var rt:Sprite;
public function GameRocketSmoke(_arg1){
addFrameScript(7, frame8);
rt = _arg1;
}
function removeMe(){
rt.removeChild(this);
this.stop();
}
function frame8(){
this.removeMe();
stop();
}
}
}//package classesAS3
Section 30
//GameSounds (classesAS3.GameSounds)
package classesAS3 {
import flash.media.*;
import flash.utils.*;
public class GameSounds {
var rt:Object;
public function GameSounds(_arg1){
rt = _arg1;
}
public function playSoundFx(_arg1:String){
var _local2:Class;
var _local3:*;
var _local4:SoundChannel;
if (rt.soundsSwitch == true){
_local2 = Class(getDefinitionByName(_arg1));
_local3 = new (_local2);
_local4 = _local3.play();
};
}
}
}//package classesAS3
Section 31
//GameStarAnim (classesAS3.GameStarAnim)
package classesAS3 {
import flash.display.*;
import flash.events.*;
public class GameStarAnim extends MovieClip {
public var i:Number;
public var scale:Number;
public var rt:Object;
public var heart:M_stars1;
public function GameStarAnim(_arg1){
addFrameScript(23, frame24);
scale = _arg1.Useful.RandomNumber(20, 80);
scale = (scale / 100);
rt = _arg1;
this.play();
i = 1;
addEventListener(Event.ENTER_FRAME, runAnim);
}
public function runAnim(_arg1:Event):void{
var _local2:*;
if (currentFrame < 13){
_local2 = new M_stars1();
this.addChild(_local2);
_local2.rotation = (Math.random() * 360);
_local2.scaleX = scale;
_local2.scaleY = scale;
scale = rt.Useful.RandomNumber(20, 80);
scale = (scale / 100);
};
}
function frame24(){
MovieClip(parent).removeChild(this);
stop();
}
}
}//package classesAS3
Section 32
//GameTitleScreen (classesAS3.GameTitleScreen)
package classesAS3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class GameTitleScreen extends MovieClip {
public var backBtn:SimpleButton;
public var musicBtn:SimpleButton;
public var highScoresBtn2:SimpleButton;
public var instructionsBtn:SimpleButton;
var rt:Object;
public var playBtn:PlayGameBtn;
public var musicMc:MovieClip;
public var controlsBtn:SimpleButton;
public var gunEnergy:gunEnergyLevel;
public var fgmBtn:MovieClip;
public function GameTitleScreen(_arg1){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 5, frame6);
rt = _arg1;
}
function frame3(){
rt.showLeaderBoard2(this);
}
public function gotoFGM(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.flashgamemaker.com"), "_blank");
}
function frame1(){
fgmBtn.addEventListener(MouseEvent.MOUSE_DOWN, gotoFGM, false);
rt.doTitleScreenStuff();
stop();
}
function frame6(){
rt.doContrBtns();
}
function frame2(){
rt.doInstrBtns();
}
}
}//package classesAS3
Section 33
//GameUpgrade (classesAS3.GameUpgrade)
package classesAS3 {
import flash.display.*;
public class GameUpgrade extends MovieClip {
var buildFinished:Boolean;
public var rt:Object;
public var upgradeBtn:SimpleButton;
public var back:MovieClip;
public function GameUpgrade(_arg1){
addFrameScript(0, frame1);
this.stop();
rt = _arg1;
buildFinished = false;
}
function frame1(){
back.gotoAndStop(1);
stop();
}
public function setupUpgrade(){
rt.setupUpgrade1();
}
}
}//package classesAS3
Section 34
//GameUpgrade2 (classesAS3.GameUpgrade2)
package classesAS3 {
import flash.display.*;
public dynamic class GameUpgrade2 extends MovieClip {
public var upgradeBtn:SimpleButton;
public var back:MovieClip;
public function GameUpgrade2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package classesAS3
Section 35
//GameUpgrade3 (classesAS3.GameUpgrade3)
package classesAS3 {
import flash.display.*;
public class GameUpgrade3 extends MovieClip {
var buildFinished:Boolean;
public var rt:Object;
public var upgradeBtn:SimpleButton;
public var back:MovieClip;
public function GameUpgrade3(_arg1){
this.stop();
rt = _arg1;
buildFinished = false;
}
public function setupUpgrade(){
rt.setupUpgrade3();
}
}
}//package classesAS3
Section 36
//GameUseful (classesAS3.GameUseful)
package classesAS3 {
import flash.display.*;
public class GameUseful {
public var rt:Object;
public function GameUseful(_arg1){
rt = _arg1;
}
function addThrust(_arg1, _arg2){
var _local3:Object;
_local3 = new Object();
_local3.xVel = (Math.cos(radian(_arg1)) * _arg2);
_local3.yVel = (Math.sin(radian(_arg1)) * _arg2);
return (_local3);
}
public function getDistanceQ(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
_local5 = (_arg3 - _arg1);
_local5 = Math.abs(_local5);
return (_local5);
}
function radian(_arg1){
return (((_arg1 * Math.PI) / 180));
}
function localToGlobalXY(_arg1:MovieClip):Object{
var _local2:Object;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = new Object();
_local2.newX = 0;
_local2.newY = 0;
_local3 = _arg1;
while (_local3 != rt.parent) {
_local4 = (_local2.newX * (_local3.scaleX / 1));
_local5 = (_local2.newY * (_local3.scaleY / 1));
_local6 = (_local3.rotation * (Math.PI / 180));
_local2.newX = ((_local4 * Math.cos(_local6)) - (_local5 * Math.sin(_local6)));
_local2.newY = ((_local4 * Math.sin(_local6)) + (_local5 * Math.cos(_local6)));
_local2.newX = (_local2.newX + _local3.x);
_local2.newY = (_local2.newY + _local3.y);
_local3 = _local3.parent;
};
return (_local2);
}
public function getDistance(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local5 = _arg1;
_local6 = _arg2;
_local7 = _arg3;
_local8 = _arg4;
_local7 = (_local5 - _local7);
_local8 = (_local6 - _local8);
return (Math.sqrt(((_local7 * _local7) + (_local8 * _local8))));
}
public function RandomNumber(_arg1, _arg2):Number{
return ((Math.floor((Math.random() * ((1 + _arg2) - _arg1))) + _arg1));
}
function countMcs(_arg1):Array{
var _local2:Array;
var _local3:*;
_local2 = new Array();
_local3 = 0;
for (_local3 in _arg1) {
if (typeof(_arg1[_local3]) == "movieclip"){
_local2.push(_arg1[_local3]);
};
};
return (_local2);
}
function checkForLOS(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:Number;
var _local7:Object;
var _local8:Number;
var _local9:*;
_local6 = int(getDistance(_arg1, _arg2, _arg3, _arg4));
_local7 = pointTowards(_arg1, _arg2, _arg3, _arg4);
_local9 = 0;
while (_local9 < _local6) {
_local8 = rt.GameMain.groundArray[int(_arg1)];
if (int(_arg2) > _local8){
return (true);
};
_arg1 = (_arg1 - _local7.vx);
_arg2 = (_arg2 - _local7.vy);
_local9++;
};
return (false);
}
function getVectorFromAngle(_arg1):Object{
var _local2:Object;
var _local3:Number;
_local2 = new Object();
_local3 = ((_arg1 * Math.PI) / 180);
_local2.vx = Math.cos(_local3);
_local2.vy = Math.sin(_local3);
return (_local2);
}
function capVectorSpeed(_arg1, _arg2, _arg3):Object{
var _local4:Object;
var _local5:*;
_local4 = new Object();
_local5 = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)));
if (_local5 > _arg3){
_arg1 = (_arg1 * (_arg3 / _local5));
_arg2 = (_arg2 * (_arg3 / _local5));
};
_local4.vx = _arg1;
_local4.vy = _arg2;
return (_local4);
}
function argbtohex(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){
return (((((_arg1 << 24) | (_arg2 << 16)) | (_arg3 << 8)) | _arg4));
}
public function getArcVelocity(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Object{
var _local7:Object;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local7 = new Object();
_local8 = (_arg5 - _arg3);
_local9 = (_arg6 - _arg4);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local11 = Math.ceil((_local10 / _arg2));
_local7.gravity = _arg1;
_local7.steps = _local11;
_local7.xStep = (_local8 / _local11);
_local7.yStep = (_local9 / _local11);
if (_arg1 > 0){
_local7.yStep = (_local7.yStep - ((_local11 * _arg1) / 2));
};
return (_local7);
}
function pointTowards(_arg1, _arg2, _arg3, _arg4):Object{
var _local5:Object;
var _local6:*;
var _local7:*;
_local5 = new Object();
_local6 = (_arg1 - _arg3);
_local7 = (_arg2 - _arg4);
_local5.spriteAngle = Math.atan2(_local7, _local6);
_local5.spriteRotation = ((_local5.spriteAngle * 180) / Math.PI);
_local5.vx = Math.cos(_local5.spriteAngle);
_local5.vy = Math.sin(_local5.spriteAngle);
return (_local5);
}
function rotateXY(_arg1, _arg2, _arg3, _arg4){
var _local5:Number;
var _local6:Object;
_local5 = ((Math.PI * _arg4) / 180);
_local6 = new Object();
_local6.xPos = (_arg1 + (Math.cos(_local5) * _arg3));
_local6.yPos = (_arg2 + (Math.sin(_local5) * _arg3));
return (_local6);
}
}
}//package classesAS3
Section 37
//allTiles_21 (Connecto_v10Mochi_fla.allTiles_21)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class allTiles_21 extends MovieClip {
public var p:MovieClip;
public var p2:MovieClip;
public function allTiles_21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 38
//assetHolder_1 (Connecto_v10Mochi_fla.assetHolder_1)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class assetHolder_1 extends MovieClip {
public function assetHolder_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 39
//background_ground_51 (Connecto_v10Mochi_fla.background_ground_51)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class background_ground_51 extends MovieClip {
public var levelMc:level1_1;
public function background_ground_51(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 40
//badGuySwordAttack_96 (Connecto_v10Mochi_fla.badGuySwordAttack_96)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class badGuySwordAttack_96 extends MovieClip {
public function badGuySwordAttack_96(){
addFrameScript(4, frame5);
}
function frame5(){
MovieClip(this.parent).gotoAndStop("stand");
}
}
}//package Connecto_v10Mochi_fla
Section 41
//ballPopAnim_184 (Connecto_v10Mochi_fla.ballPopAnim_184)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class ballPopAnim_184 extends MovieClip {
public function ballPopAnim_184(){
addFrameScript(7, frame8);
}
function frame8(){
}
}
}//package Connecto_v10Mochi_fla
Section 42
//baseExplodeBitAnim_132 (Connecto_v10Mochi_fla.baseExplodeBitAnim_132)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class baseExplodeBitAnim_132 extends MovieClip {
public function baseExplodeBitAnim_132(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 43
//clockAnim_141 (Connecto_v10Mochi_fla.clockAnim_141)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
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_141 extends MovieClip {
public function clockAnim_141(){
addFrameScript(35, frame36);
}
function frame36(){
MovieClip(this.parent.parent).rt.setupGoodGuy(this);
if (MovieClip(this.parent).numberOrdered.text != 0){
gotoAndPlay(1);
} else {
MovieClip(this.parent).gotoAndStop(1);
};
}
}
}//package Connecto_v10Mochi_fla
Section 44
//clockAnim2_143 (Connecto_v10Mochi_fla.clockAnim2_143)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
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_143 extends MovieClip {
public function clockAnim2_143(){
addFrameScript(17, frame18);
}
function frame18(){
trace(Object(this.parent.parent.parent));
MovieClip(this.parent.parent).rt.setupGoodGuy(this);
if (MovieClip(this.parent).numberOrdered.text != 0){
gotoAndPlay(1);
} else {
MovieClip(this.parent).gotoAndStop(1);
};
}
}
}//package Connecto_v10Mochi_fla
Section 45
//doorAnim_209 (Connecto_v10Mochi_fla.doorAnim_209)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
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 doorAnim_209 extends MovieClip {
public function doorAnim_209(){
addFrameScript(0, frame1, 18, frame19, 21, frame22, 37, frame38);
}
function frame1(){
stop();
}
function frame19(){
MovieClip(parent).rt.setupGame3();
}
function frame22(){
gotoAndStop(1);
}
function frame38(){
gotoAndStop(1);
}
}
}//package Connecto_v10Mochi_fla
Section 46
//Endtitle_38 (Connecto_v10Mochi_fla.Endtitle_38)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class Endtitle_38 extends MovieClip {
public function Endtitle_38(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 47
//gameoverFilter_37 (Connecto_v10Mochi_fla.gameoverFilter_37)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
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_37 extends MovieClip {
public var submitBtn:SimpleButton;
public var endTitle:MovieClip;
public var moreGamesBtn:SimpleButton;
public var score:TextField;
public var viewhighscores:SimpleButton;
public var quitBtn:SimpleButton;
public var nameTxt:TextField;
public function gameoverFilter_37(){
addFrameScript(0, frame1, 3, frame4);
}
public function doViewScores(_arg1:MouseEvent):void{
}
public function doMoreGames(_arg1:MouseEvent):void{
}
function frame1(){
MovieClip(this.parent.parent).rt.rt.showLeaderBoard(MovieClip(this.parent.parent));
stop();
}
function frame4(){
score.text = MovieClip(this.parent.parent).rt.score;
quitBtn.addEventListener(MouseEvent.MOUSE_UP, doQuit);
stop();
}
public function doSubmit(_arg1:MouseEvent):void{
if (nameTxt.text != ""){
gotoAndStop(2);
};
}
public function doQuit(_arg1:MouseEvent):void{
MovieClip(this.parent.parent).rt.quitGame();
}
}
}//package Connecto_v10Mochi_fla
Section 48
//gameOverMsg_36 (Connecto_v10Mochi_fla.gameOverMsg_36)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class gameOverMsg_36 extends MovieClip {
public var msg:MovieClip;
public function gameOverMsg_36(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package Connecto_v10Mochi_fla
Section 49
//getReadyMsg_253 (Connecto_v10Mochi_fla.getReadyMsg_253)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.text.*;
public dynamic class getReadyMsg_253 extends MovieClip {
public var levelText2:TextField;
}
}//package Connecto_v10Mochi_fla
Section 50
//infoMc_175 (Connecto_v10Mochi_fla.infoMc_175)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class infoMc_175 extends MovieClip {
public var closeBtn:SimpleButton;
public function infoMc_175(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 51
//levelCompleteMsg_44 (Connecto_v10Mochi_fla.levelCompleteMsg_44)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelCompleteMsg_44 extends MovieClip {
public var titleMc:levelCompleteMsgs;
public var totalScore:TextField;
}
}//package Connecto_v10Mochi_fla
Section 52
//manStoneHitBack_76 (Connecto_v10Mochi_fla.manStoneHitBack_76)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class manStoneHitBack_76 extends MovieClip {
public function manStoneHitBack_76(){
addFrameScript(9, frame10);
}
function frame10(){
MovieClip(this.parent).gotoAndStop("walk");
}
}
}//package Connecto_v10Mochi_fla
Section 53
//mapScreenScene_160 (Connecto_v10Mochi_fla.mapScreenScene_160)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class mapScreenScene_160 extends MovieClip {
public var pBtn8:SimpleButton;
public var infoMc:MovieClip;
public var pBtn10:SimpleButton;
public var pBtn7:SimpleButton;
public var pBtn1:SimpleButton;
public var pBtn2:SimpleButton;
public var pBtn4:SimpleButton;
public var pBtn5:SimpleButton;
public var pBtn9:SimpleButton;
public var pBtn3:SimpleButton;
public var pBtn6:SimpleButton;
}
}//package Connecto_v10Mochi_fla
Section 54
//musicBtnMc_16 (Connecto_v10Mochi_fla.musicBtnMc_16)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class musicBtnMc_16 extends MovieClip {
public function musicBtnMc_16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 55
//pipe1_24 (Connecto_v10Mochi_fla.pipe1_24)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class pipe1_24 extends MovieClip {
public function pipe1_24(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
MovieClip(parent.parent).play();
stop();
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 56
//pipe3Way_27 (Connecto_v10Mochi_fla.pipe3Way_27)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class pipe3Way_27 extends MovieClip {
public var p:MovieClip;
public function pipe3Way_27(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
MovieClip(parent.parent).play();
stop();
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 57
//pipeCorner_26 (Connecto_v10Mochi_fla.pipeCorner_26)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class pipeCorner_26 extends MovieClip {
public function pipeCorner_26(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
MovieClip(parent.parent).play();
stop();
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 58
//risingScore2_194 (Connecto_v10Mochi_fla.risingScore2_194)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.text.*;
public dynamic class risingScore2_194 extends MovieClip {
public var scoreTxt:TextField;
}
}//package Connecto_v10Mochi_fla
Section 59
//risingScoreTxt_116 (Connecto_v10Mochi_fla.risingScoreTxt_116)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.text.*;
public dynamic class risingScoreTxt_116 extends MovieClip {
public var scoreTxt:TextField;
}
}//package Connecto_v10Mochi_fla
Section 60
//shields_240 (Connecto_v10Mochi_fla.shields_240)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class shields_240 extends MovieClip {
public var w:MovieClip;
}
}//package Connecto_v10Mochi_fla
Section 61
//soundFxMc_49 (Connecto_v10Mochi_fla.soundFxMc_49)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class soundFxMc_49 extends MovieClip {
public function soundFxMc_49(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 62
//upgradeBack_236 (Connecto_v10Mochi_fla.upgradeBack_236)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class upgradeBack_236 extends MovieClip {
public function upgradeBack_236(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 63
//upgradeClock_237 (Connecto_v10Mochi_fla.upgradeClock_237)
package Connecto_v10Mochi_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
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 upgradeClock_237 extends MovieClip {
public function upgradeClock_237(){
addFrameScript(35, frame36);
}
function frame36(){
MovieClip(this.parent.parent).setupUpgrade();
MovieClip(this.parent).gotoAndStop(1);
}
}
}//package Connecto_v10Mochi_fla
Section 64
//walkerDeath_103 (Connecto_v10Mochi_fla.walkerDeath_103)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class walkerDeath_103 extends MovieClip {
public function walkerDeath_103(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 65
//weapons_59 (Connecto_v10Mochi_fla.weapons_59)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class weapons_59 extends MovieClip {
public function weapons_59(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 66
//yuoarehereAnim_178 (Connecto_v10Mochi_fla.yuoarehereAnim_178)
package Connecto_v10Mochi_fla {
import flash.display.*;
public dynamic class yuoarehereAnim_178 extends MovieClip {
public var youarehere:youarehereMc;
public function yuoarehereAnim_178(){
addFrameScript(0, frame1, 5, frame6, 10, frame11, 15, frame16, 20, frame21, 25, frame26, 30, frame31, 35, frame36, 40, frame41, 45, frame46);
}
function frame6(){
stop();
}
function frame16(){
stop();
}
function frame1(){
stop();
}
function frame26(){
stop();
}
function frame21(){
stop();
}
function frame36(){
stop();
}
function frame31(){
stop();
}
function frame11(){
stop();
}
function frame46(){
stop();
}
function frame41(){
stop();
}
}
}//package Connecto_v10Mochi_fla
Section 67
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("3.0 as3");
}
public static function showClickAwayAd(_arg1: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 = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, 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 (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1: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 = _arg1;
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 (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, 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 _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 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 (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.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."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
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(_arg1: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 = _arg1;
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);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
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;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
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 (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.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 (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1: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_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 f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
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 (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
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;
bar.y = (h - 20);
};
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((w - 20), 0);
backing.lineTo((w - 20), 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((w - 20), 0);
inside.lineTo((w - 20), 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((w - 20), 0);
outline.lineTo((w - 20), 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 _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 68
//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(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function addValue(_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi.as3
Section 69
//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 static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
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)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi.as3
Section 70
//MochiServices (mochi.as3.MochiServices)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
public static var widget:Boolean = false;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__ms_";
private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
public static var netup:Boolean = true;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [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];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
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(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4: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 = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
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 (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.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 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);
try {
_listenChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
};
return (_local2);
}
public static function getVersion():String{
return ("3.0");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
public static function get id():String{
return (_id);
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
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)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._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];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
trace("connected!");
_connecting = false;
_connected = true;
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var vars:URLVariables;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servicesURL != undefined){
_servicesURL = urlOptions(clip).servicesURL;
};
MochiServices.allowDomains(_servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999))));
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_servicesURL);
vars = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
if (widget){
vars.widget = true;
};
req.data = vars;
listen();
_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 get clip():Object{
return (_container);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
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 connectWait(_arg1:TimerEvent):void{
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load. (timeout)");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
}
}
}//package mochi.as3
Section 71
//alienBase (alienBase)
package {
import flash.display.*;
public dynamic class alienBase extends MovieClip {
}
}//package
Section 72
//antsMc (antsMc)
package {
import flash.display.*;
public dynamic class antsMc extends BitmapData {
public function antsMc(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 73
//backgroundMc (backgroundMc)
package {
import flash.display.*;
public dynamic class backgroundMc extends MovieClip {
public var levels:MovieClip;
}
}//package
Section 74
//backgroundSkyMc (backgroundSkyMc)
package {
import flash.display.*;
public dynamic class backgroundSkyMc extends MovieClip {
public function backgroundSkyMc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 75
//badGuyFlying (badGuyFlying)
package {
import flash.display.*;
public dynamic class badGuyFlying extends MovieClip {
}
}//package
Section 76
//badGuyFlyingWalk (badGuyFlyingWalk)
package {
import flash.display.*;
public dynamic class badGuyFlyingWalk extends MovieClip {
}
}//package
Section 77
//badGuyHoverTank (badGuyHoverTank)
package {
import flash.display.*;
public dynamic class badGuyHoverTank extends MovieClip {
}
}//package
Section 78
//badGuyRollingBomb (badGuyRollingBomb)
package {
import flash.display.*;
public dynamic class badGuyRollingBomb extends MovieClip {
}
}//package
Section 79
//badGuyRoundTank (badGuyRoundTank)
package {
import flash.display.*;
public dynamic class badGuyRoundTank extends MovieClip {
public var tankMc:badGuyRoundTank2;
}
}//package
Section 80
//badGuyRoundTank2 (badGuyRoundTank2)
package {
import flash.display.*;
public dynamic class badGuyRoundTank2 extends MovieClip {
}
}//package
Section 81
//BadGuyRun (BadGuyRun)
package {
import flash.display.*;
public dynamic class BadGuyRun extends MovieClip {
public var w:MovieClip;
}
}//package
Section 82
//badGuyRunStone (badGuyRunStone)
package {
import flash.display.*;
public dynamic class badGuyRunStone extends MovieClip {
}
}//package
Section 83
//badGuyStandRight (badGuyStandRight)
package {
import flash.display.*;
public dynamic class badGuyStandRight extends MovieClip {
public var w:MovieClip;
}
}//package
Section 84
//badGuySword (badGuySword)
package {
import flash.display.*;
public dynamic class badGuySword extends MovieClip {
}
}//package
Section 85
//badGuySwordWalk (badGuySwordWalk)
package {
import flash.display.*;
public dynamic class badGuySwordWalk extends MovieClip {
}
}//package
Section 86
//badGuyTankShoot (badGuyTankShoot)
package {
import flash.display.*;
public dynamic class badGuyTankShoot extends MovieClip {
public function badGuyTankShoot(){
addFrameScript(3, frame4);
}
function frame4(){
MovieClip(this.parent).gotoAndStop("walk");
}
}
}//package
Section 87
//badGuyThrow (badGuyThrow)
package {
import flash.display.*;
public dynamic class badGuyThrow extends MovieClip {
public function badGuyThrow(){
addFrameScript(8, frame9);
}
function frame9(){
MovieClip(this.parent).gotoAndStop("stand");
}
}
}//package
Section 88
//badGuyWalker (badGuyWalker)
package {
import flash.display.*;
public dynamic class badGuyWalker extends MovieClip {
}
}//package
Section 89
//bagGuyHoverTankWalk (bagGuyHoverTankWalk)
package {
import flash.display.*;
public dynamic class bagGuyHoverTankWalk extends MovieClip {
}
}//package
Section 90
//ballBlue (ballBlue)
package {
import flash.display.*;
public dynamic class ballBlue extends MovieClip {
public function ballBlue(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 91
//ballCharacter (ballCharacter)
package {
import flash.display.*;
public dynamic class ballCharacter extends MovieClip {
}
}//package
Section 92
//ballPink (ballPink)
package {
import flash.display.*;
public dynamic class ballPink extends MovieClip {
public function ballPink(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 93
//ballRed (ballRed)
package {
import flash.display.*;
public dynamic class ballRed extends MovieClip {
public function ballRed(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 94
//bullet (bullet)
package {
import flash.display.*;
public dynamic class bullet extends MovieClip {
}
}//package
Section 95
//bulletFx (bulletFx)
package {
import flash.media.*;
public dynamic class bulletFx extends Sound {
}
}//package
Section 96
//clickBtnFx (clickBtnFx)
package {
import flash.media.*;
public dynamic class clickBtnFx extends Sound {
}
}//package
Section 97
//ComputerFx (ComputerFx)
package {
import flash.media.*;
public dynamic class ComputerFx extends Sound {
}
}//package
Section 98
//death1 (death1)
package {
import flash.display.*;
public dynamic class death1 extends MovieClip {
public function death1(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 99
//droidBuiltFx (droidBuiltFx)
package {
import flash.media.*;
public dynamic class droidBuiltFx extends Sound {
}
}//package
Section 100
//edgeTile (edgeTile)
package {
import flash.display.*;
public dynamic class edgeTile extends MovieClip {
public function edgeTile(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 101
//edgeTileRight (edgeTileRight)
package {
import flash.display.*;
public dynamic class edgeTileRight extends MovieClip {
public function edgeTileRight(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 102
//enemyBomb (enemyBomb)
package {
import flash.display.*;
public dynamic class enemyBomb extends MovieClip {
}
}//package
Section 103
//enemyBullet (enemyBullet)
package {
import flash.display.*;
public dynamic class enemyBullet extends MovieClip {
}
}//package
Section 104
//enemyPhoton (enemyPhoton)
package {
import flash.display.*;
public dynamic class enemyPhoton extends MovieClip {
}
}//package
Section 105
//enemyPhotonFx (enemyPhotonFx)
package {
import flash.media.*;
public dynamic class enemyPhotonFx extends Sound {
}
}//package
Section 106
//enemyShell (enemyShell)
package {
import flash.display.*;
public dynamic class enemyShell extends MovieClip {
}
}//package
Section 107
//energyBar (energyBar)
package {
import flash.display.*;
public dynamic class energyBar extends MovieClip {
public var bar:MovieClip;
}
}//package
Section 108
//energyCrystals (energyCrystals)
package {
import flash.display.*;
public dynamic class energyCrystals extends MovieClip {
}
}//package
Section 109
//explosionFx (explosionFx)
package {
import flash.media.*;
public dynamic class explosionFx extends Sound {
}
}//package
Section 110
//fireMissileFx (fireMissileFx)
package {
import flash.media.*;
public dynamic class fireMissileFx extends Sound {
}
}//package
Section 111
//gameOverFx (gameOverFx)
package {
import flash.media.*;
public dynamic class gameOverFx extends Sound {
}
}//package
Section 112
//grenade (grenade)
package {
import flash.display.*;
public dynamic class grenade extends MovieClip {
}
}//package
Section 113
//grenadeMc (grenadeMc)
package {
import flash.display.*;
public dynamic class grenadeMc extends MovieClip {
}
}//package
Section 114
//grenaderStand (grenaderStand)
package {
import flash.display.*;
public dynamic class grenaderStand extends MovieClip {
}
}//package
Section 115
//gunEnergy (gunEnergy)
package {
import flash.display.*;
public dynamic class gunEnergy extends MovieClip {
}
}//package
Section 116
//gunEnergyLevel (gunEnergyLevel)
package {
import flash.display.*;
public dynamic class gunEnergyLevel extends MovieClip {
public var energyLevelMc:gunEnergy;
}
}//package
Section 117
//heavyGunner (heavyGunner)
package {
import flash.display.*;
public dynamic class heavyGunner extends MovieClip {
public var selectionMc:manSelectionSquare;
}
}//package
Section 118
//heavyGunnerBody (heavyGunnerBody)
package {
import flash.display.*;
public dynamic class heavyGunnerBody extends MovieClip {
}
}//package
Section 119
//heavyGunnerGun (heavyGunnerGun)
package {
import flash.display.*;
public dynamic class heavyGunnerGun extends MovieClip {
}
}//package
Section 120
//heavyGunnerStand (heavyGunnerStand)
package {
import flash.display.*;
public dynamic class heavyGunnerStand extends MovieClip {
public var w:MovieClip;
}
}//package
Section 121
//heavyGunnerWalk (heavyGunnerWalk)
package {
import flash.display.*;
public dynamic class heavyGunnerWalk extends MovieClip {
}
}//package
Section 122
//heavyGunnerWalk2 (heavyGunnerWalk2)
package {
import flash.display.*;
public dynamic class heavyGunnerWalk2 extends MovieClip {
public var w:MovieClip;
}
}//package
Section 123
//hitEnemyFx (hitEnemyFx)
package {
import flash.media.*;
public dynamic class hitEnemyFx extends Sound {
}
}//package
Section 124
//landFx (landFx)
package {
import flash.media.*;
public dynamic class landFx extends Sound {
}
}//package
Section 125
//level1_1 (level1_1)
package {
import flash.display.*;
public dynamic class level1_1 extends MovieClip {
}
}//package
Section 126
//level1_5 (level1_5)
package {
import flash.display.*;
public dynamic class level1_5 extends MovieClip {
public var movingPlatforms:movingPlatforms2;
}
}//package
Section 127
//level1_6 (level1_6)
package {
import flash.display.*;
public dynamic class level1_6 extends MovieClip {
public var clouds1:MovieClip;
public var clouds2:MovieClip;
public var platforms:staticPlatforms;
public var movingPlatforms:movingPlatforms2;
}
}//package
Section 128
//level1_7 (level1_7)
package {
import flash.display.*;
public dynamic class level1_7 extends MovieClip {
public var platforms:staticPlatforms;
public var movingPlatforms:movingPlatforms2;
}
}//package
Section 129
//level1_8 (level1_8)
package {
import flash.display.*;
import classesAS3.*;
public dynamic class level1_8 extends MovieClip {
public var doorExit:GameDoor;
public var platforms:staticPlatforms;
public var movingPlatforms:movingPlatforms2;
}
}//package
Section 130
//level2_1 (level2_1)
package {
import flash.display.*;
import classesAS3.*;
public dynamic class level2_1 extends MovieClip {
public var doorClip:GameDoor;
public var ground:MovieClip;
public var movingPlatforms:level2_platforms1;
}
}//package
Section 131
//level2_2 (level2_2)
package {
import flash.display.*;
public dynamic class level2_2 extends MovieClip {
public var movingPlatforms:level2Platforms2;
}
}//package
Section 132
//level2_platforms1 (level2_platforms1)
package {
import flash.display.*;
public dynamic class level2_platforms1 extends MovieClip {
}
}//package
Section 133
//level2Platforms2 (level2Platforms2)
package {
import flash.display.*;
public dynamic class level2Platforms2 extends MovieClip {
}
}//package
Section 134
//levelCompleteFx (levelCompleteFx)
package {
import flash.media.*;
public dynamic class levelCompleteFx extends Sound {
}
}//package
Section 135
//levelCompleteMsgs (levelCompleteMsgs)
package {
import flash.display.*;
public dynamic class levelCompleteMsgs extends MovieClip {
public function levelCompleteMsgs(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 136
//levelFx (levelFx)
package {
import flash.media.*;
public dynamic class levelFx extends Sound {
}
}//package
Section 137
//LoadingBox (LoadingBox)
package {
import flash.display.*;
import flash.text.*;
public dynamic class LoadingBox extends MovieClip {
public var loading_txt:TextField;
public function LoadingBox(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 138
//M_stars1 (M_stars1)
package {
import flash.display.*;
public dynamic class M_stars1 extends MovieClip {
public function M_stars1(){
addFrameScript(14, frame15);
}
function frame15(){
MovieClip(parent).removeChild(this);
stop();
}
}
}//package
Section 139
//mainGunBullet (mainGunBullet)
package {
import flash.display.*;
public dynamic class mainGunBullet extends MovieClip {
}
}//package
Section 140
//mainGunMissileHitFx (mainGunMissileHitFx)
package {
import flash.media.*;
public dynamic class mainGunMissileHitFx extends Sound {
}
}//package
Section 141
//mainGunRotSound (mainGunRotSound)
package {
import flash.media.*;
public dynamic class mainGunRotSound extends Sound {
}
}//package
Section 142
//mainGunSound (mainGunSound)
package {
import flash.media.*;
public dynamic class mainGunSound extends Sound {
}
}//package
Section 143
//man (man)
package {
import flash.display.*;
public dynamic class man extends MovieClip {
public var selectionMc:manSelectionSquare;
public var manFrames:BadGuyRun;
public var manThrow:badGuyThrow;
public var manStand:badGuyStandRight;
}
}//package
Section 144
//manGrenaderW (manGrenaderW)
package {
import flash.display.*;
public dynamic class manGrenaderW extends MovieClip {
}
}//package
Section 145
//manGunStand (manGunStand)
package {
import flash.display.*;
public dynamic class manGunStand extends MovieClip {
public var w:MovieClip;
}
}//package
Section 146
//manHit (manHit)
package {
import flash.display.*;
public dynamic class manHit extends MovieClip {
public function manHit(){
addFrameScript(9, frame10);
}
function frame10(){
MovieClip(this.parent).gotoAndStop("walk");
}
}
}//package
Section 147
//manHitBack (manHitBack)
package {
import flash.display.*;
public dynamic class manHitBack extends MovieClip {
public function manHitBack(){
addFrameScript(9, frame10);
}
function frame10(){
MovieClip(this.parent).gotoAndStop("walk");
}
}
}//package
Section 148
//manMachineGun (manMachineGun)
package {
import flash.display.*;
public dynamic class manMachineGun extends MovieClip {
public var w:MovieClip;
}
}//package
Section 149
//manMachineGunAnim (manMachineGunAnim)
package {
import flash.display.*;
public dynamic class manMachineGunAnim extends MovieClip {
public function manMachineGunAnim(){
addFrameScript(16, frame17);
}
function frame17(){
MovieClip(this.parent).gotoAndStop("gunStand");
}
}
}//package
Section 150
//manSelectionSquare (manSelectionSquare)
package {
import flash.display.*;
public dynamic class manSelectionSquare extends MovieClip {
public function manSelectionSquare(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 151
//manStone (manStone)
package {
import flash.display.*;
public dynamic class manStone extends MovieClip {
}
}//package
Section 152
//manStoneDeath (manStoneDeath)
package {
import flash.display.*;
public dynamic class manStoneDeath extends MovieClip {
public function manStoneDeath(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package
Section 153
//manStoneHit (manStoneHit)
package {
import flash.display.*;
public dynamic class manStoneHit extends MovieClip {
public function manStoneHit(){
addFrameScript(9, frame10);
}
function frame10(){
MovieClip(this.parent).gotoAndStop("walk");
}
}
}//package
Section 154
//manStoneThrow (manStoneThrow)
package {
import flash.display.*;
public dynamic class manStoneThrow extends MovieClip {
public function manStoneThrow(){
addFrameScript(6, frame7);
}
function frame7(){
MovieClip(this.parent).gotoAndStop("stand");
}
}
}//package
Section 155
//mapShowFx (mapShowFx)
package {
import flash.media.*;
public dynamic class mapShowFx extends Sound {
}
}//package
Section 156
//marineEngineer (marineEngineer)
package {
import flash.display.*;
public dynamic class marineEngineer extends MovieClip {
}
}//package
Section 157
//mcTest (mcTest)
package {
import flash.display.*;
public dynamic class mcTest extends MovieClip {
}
}//package
Section 158
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 159
//movingPlatforms2 (movingPlatforms2)
package {
import flash.display.*;
public dynamic class movingPlatforms2 extends MovieClip {
}
}//package
Section 160
//panelItems (panelItems)
package {
import flash.display.*;
public dynamic class panelItems extends MovieClip {
public function panelItems(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 161
//panelManBack (panelManBack)
package {
import flash.display.*;
import flash.text.*;
public dynamic class panelManBack extends MovieClip {
public var numberOrdered:TextField;
public var clock:MovieClip;
public function panelManBack(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 162
//pauseMc (pauseMc)
package {
import flash.display.*;
public dynamic class pauseMc extends MovieClip {
}
}//package
Section 163
//Photon (Photon)
package {
import flash.display.*;
public dynamic class Photon extends MovieClip {
}
}//package
Section 164
//playerSprite (playerSprite)
package {
import flash.display.*;
public dynamic class playerSprite extends MovieClip {
}
}//package
Section 165
//PlayGameBtn (PlayGameBtn)
package {
import flash.display.*;
public dynamic class PlayGameBtn extends SimpleButton {
}
}//package
Section 166
//playGameTxt (playGameTxt)
package {
import flash.display.*;
public dynamic class playGameTxt extends MovieClip {
}
}//package
Section 167
//projectiles (projectiles)
package {
import flash.display.*;
public dynamic class projectiles extends MovieClip {
}
}//package
Section 168
//risingMoneyTxt (risingMoneyTxt)
package {
import flash.display.*;
import flash.text.*;
public dynamic class risingMoneyTxt extends MovieClip {
public var moneyTxt:TextField;
}
}//package
Section 169
//rocket (rocket)
package {
import flash.display.*;
public dynamic class rocket extends MovieClip {
}
}//package
Section 170
//rocketLauncher (rocketLauncher)
package {
import flash.display.*;
public dynamic class rocketLauncher extends MovieClip {
public var selectionMc:manSelectionSquare;
}
}//package
Section 171
//rocketLauncherShoot (rocketLauncherShoot)
package {
import flash.display.*;
public dynamic class rocketLauncherShoot extends MovieClip {
public function rocketLauncherShoot(){
addFrameScript(4, frame5);
}
function frame5(){
MovieClip(this.parent).gotoAndStop("gunStand");
}
}
}//package
Section 172
//rocketStand (rocketStand)
package {
import flash.display.*;
public dynamic class rocketStand extends MovieClip {
}
}//package
Section 173
//rockFx (rockFx)
package {
import flash.media.*;
public dynamic class rockFx extends Sound {
}
}//package
Section 174
//rotateBlockFx (rotateBlockFx)
package {
import flash.media.*;
public dynamic class rotateBlockFx extends Sound {
}
}//package
Section 175
//sniper (sniper)
package {
import flash.display.*;
public dynamic class sniper extends MovieClip {
public var selectionMc:manSelectionSquare;
}
}//package
Section 176
//sniperHead (sniperHead)
package {
import flash.display.*;
public dynamic class sniperHead extends MovieClip {
}
}//package
Section 177
//sniperStand (sniperStand)
package {
import flash.display.*;
public dynamic class sniperStand extends MovieClip {
}
}//package
Section 178
//sniperWalk (sniperWalk)
package {
import flash.display.*;
public dynamic class sniperWalk extends MovieClip {
}
}//package
Section 179
//SoundMusic1 (SoundMusic1)
package {
import flash.media.*;
public dynamic class SoundMusic1 extends Sound {
}
}//package
Section 180
//startGameFx (startGameFx)
package {
import flash.media.*;
public dynamic class startGameFx extends Sound {
}
}//package
Section 181
//staticPlatforms (staticPlatforms)
package {
import flash.display.*;
public dynamic class staticPlatforms extends MovieClip {
}
}//package
Section 182
//tankRoundBitAnim (tankRoundBitAnim)
package {
import flash.display.*;
public dynamic class tankRoundBitAnim extends MovieClip {
public var roundMc:MovieClip;
}
}//package
Section 183
//throwFx (throwFx)
package {
import flash.media.*;
public dynamic class throwFx extends Sound {
}
}//package
Section 184
//tiles (tiles)
package {
import flash.display.*;
public dynamic class tiles extends MovieClip {
public var tile:MovieClip;
public function tiles(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 185
//tower1 (tower1)
package {
import flash.display.*;
public dynamic class tower1 extends MovieClip {
}
}//package
Section 186
//triangle1 (triangle1)
package {
import flash.display.*;
public dynamic class triangle1 extends MovieClip {
public function triangle1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 187
//turretMc (turretMc)
package {
import flash.display.*;
public dynamic class turretMc extends MovieClip {
public function turretMc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 188
//upgradeFx (upgradeFx)
package {
import flash.media.*;
public dynamic class upgradeFx extends Sound {
}
}//package
Section 189
//Weapons (Weapons)
package {
import flash.display.*;
import flash.text.*;
public dynamic class Weapons extends MovieClip {
public var musicBtn:SimpleButton;
public var levelTxt:TextField;
public var soundFxBtn:SimpleButton;
public var score:TextField;
public var blocksLeft:TextField;
public var quitBtn:SimpleButton;
public var musicMc:MovieClip;
public var soundFxMc:MovieClip;
public function Weapons(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 190
//youarehereMc (youarehereMc)
package {
import flash.display.*;
public dynamic class youarehereMc extends MovieClip {
}
}//package