Section 1
//BubbleBoxAPI (com.bubblebox.BubbleBoxAPI)
package com.bubblebox {
import flash.display.*;
import flash.net.*;
public dynamic class BubbleBoxAPI extends Sprite {
public static function submit(_arg1:String, _arg2:Number, _arg3:String):URLLoader{
var _local4:BubbleBoxAPI = new (BubbleBoxAPI);
var _local5:String = ((((("name=" + escape(_arg1)) + "&score=") + _arg2) + "&game=") + _arg3);
var _local6:URLVariables = new URLVariables(_local5);
var _local7:URLRequest = new URLRequest("http://www.bubblebox.com/scripts/insertscore.php");
_local7.data = _local6;
_local7.method = URLRequestMethod.POST;
var _local8:URLLoader = new URLLoader();
_local8.dataFormat = URLLoaderDataFormat.TEXT;
_local8.load(_local7);
return (_local8);
}
}
}//package com.bubblebox
Section 2
//AirBaseBean (com.wbwar.chopraider.common.beans.AirBaseBean)
package com.wbwar.chopraider.common.beans {
public class AirBaseBean extends LevelObjectBean {
public var maxBombers:Number;// = 0
public var bomberHealth:Number;
public var repairRate:Number;// = 0
public var bomberLaunchTime:Number;// = 0
public var planeHealth:Number;
public var maxPlanes:Number;// = 0
public var planeLaunchTime:Number;// = 0
public function AirBaseBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
maxPlanes = _arg1.maxPlanes;
planeLaunchTime = _arg1.planeLaunchTime;
maxBombers = _arg1.maxBombers;
bomberLaunchTime = _arg1.bomberLaunchTime;
planeHealth = _arg1.planeHealth;
bomberHealth = _arg1.bomberHealth;
} else {
owner = 0;
health = 400;
repairRate = 0.01;
maxPlanes = 3;
planeLaunchTime = 360;
maxBombers = 1;
bomberLaunchTime = 2000;
planeHealth = 10;
bomberHealth = 50;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.maxPlanes = this.maxPlanes;
_local1.planeLaunchTime = this.planeLaunchTime;
_local1.maxBombers = this.maxBombers;
_local1.bomberLaunchTime = this.bomberLaunchTime;
_local1.planeHealth = this.planeHealth;
_local1.bomberHealth = this.bomberHealth;
return (_local1);
}
override public function getXMLRoot():XML{
return (<airbase/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 3
//CivBean (com.wbwar.chopraider.common.beans.CivBean)
package com.wbwar.chopraider.common.beans {
public class CivBean extends LevelObjectBean {
public var roadNumbers:String;// = ""
public var building:int;// = 0
public var directionBias:int;// = 0
public function CivBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
building = _arg1.building;
roadNumbers = _arg1.roadNumbers;
directionBias = _arg1.directionBias;
} else {
owner = 0;
health = 15;
roadNumbers = "";
directionBias = 0;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.directionBias = this.directionBias;
_local1.roadNumbers = this.roadNumbers;
_local1.building = this.building;
return (_local1);
}
override public function getXMLRoot():XML{
return (<civ/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 4
//FactoryBean (com.wbwar.chopraider.common.beans.FactoryBean)
package com.wbwar.chopraider.common.beans {
public class FactoryBean extends LevelObjectBean {
public var building:int;// = 0
public function FactoryBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
building = _arg1.building;
} else {
owner = 0;
health = 400;
building = 0;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.building = this.building;
return (_local1);
}
override public function getXMLRoot():XML{
return (<factory/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 5
//GameObjectBean (com.wbwar.chopraider.common.beans.GameObjectBean)
package com.wbwar.chopraider.common.beans {
public class GameObjectBean {
public var owner:int;// = -1
public var x:Number;// = 0
public var y:Number;// = 0
public var health:Number;// = 0
public function GameObjectBean(_arg1:XML=null){
if (_arg1 != null){
owner = _arg1.owner;
x = _arg1.x;
y = _arg1.y;
health = _arg1.health;
};
}
public function getXML():XML{
var _local1:XML = getXMLRoot();
_local1.owner = this.owner;
_local1.x = int(this.x);
_local1.y = int(this.y);
_local1.health = this.health;
return (_local1);
}
public function getXMLRoot():XML{
return (<gameObject/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 6
//GunBean (com.wbwar.chopraider.common.beans.GunBean)
package com.wbwar.chopraider.common.beans {
public class GunBean extends TrackingGroundWeaponBean {
public function GunBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
} else {
owner = 0;
health = 20;
repairRate = 0.01;
recharge = 50;
turnRate = 0.8;
range = 400;
weaponDamage = 5;
};
}
override public function getXML():XML{
return (super.getXML());
}
override public function getXMLRoot():XML{
return (<gun/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 7
//LevelObjectBean (com.wbwar.chopraider.common.beans.LevelObjectBean)
package com.wbwar.chopraider.common.beans {
public class LevelObjectBean extends GameObjectBean {
public var level:int;// = 0
public function LevelObjectBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
level = _arg1.level;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.level = this.level;
return (_local1);
}
override public function getXMLRoot():XML{
return (<levelObject/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 8
//MissileLauncherBean (com.wbwar.chopraider.common.beans.MissileLauncherBean)
package com.wbwar.chopraider.common.beans {
public class MissileLauncherBean extends TrackingGroundWeaponBean {
public var missileSpeed:Number;// = 0
public var missileLife:Number;// = 0
public var missileHealth:Number;// = 0
public function MissileLauncherBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
missileHealth = _arg1.missileHealth;
missileLife = _arg1.missileLife;
missileSpeed = _arg1.missileSpeed;
} else {
owner = 0;
health = 20;
recharge = 100;
turnRate = 3;
range = 500;
repairRate = 0.01;
weaponDamage = 5;
missileHealth = 3;
missileLife = 150;
missileSpeed = 6.5;
};
}
override public function getXMLRoot():XML{
return (<missileLauncher/>
);
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.missileHealth = this.missileHealth;
_local1.missileLife = this.missileLife;
_local1.missileSpeed = this.missileSpeed;
return (_local1);
}
}
}//package com.wbwar.chopraider.common.beans
Section 9
//PowCampBean (com.wbwar.chopraider.common.beans.PowCampBean)
package com.wbwar.chopraider.common.beans {
public class PowCampBean extends LevelObjectBean {
public var prisonerCount:int;// = 40
public var repairRate:Number;// = 0
public function PowCampBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
prisonerCount = _arg1.prisonerCount;
} else {
owner = 0;
health = 500;
repairRate = 0;
prisonerCount = 40;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.prisonerCount = this.prisonerCount;
return (_local1);
}
override public function getXMLRoot():XML{
return (<powcamp/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 10
//PowerLineBean (com.wbwar.chopraider.common.beans.PowerLineBean)
package com.wbwar.chopraider.common.beans {
public class PowerLineBean extends LevelObjectBean {
public var orientation:int;// = 0
public var segmentCount:int;// = 1
public function PowerLineBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
segmentCount = _arg1.segmentCount;
orientation = _arg1.orientation;
} else {
owner = 0;
health = 9999;
segmentCount = 5;
orientation = 0;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.segmentCount = this.segmentCount;
_local1.orientation = this.orientation;
return (_local1);
}
override public function getXMLRoot():XML{
return (<powerline/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 11
//PowerPlantBean (com.wbwar.chopraider.common.beans.PowerPlantBean)
package com.wbwar.chopraider.common.beans {
public class PowerPlantBean extends LevelObjectBean {
public var repairRate:Number;// = 0
public function PowerPlantBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
} else {
owner = 0;
health = 200;
repairRate = 0;
};
}
override public function getXMLRoot():XML{
return (<powerplant/>
);
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
return (_local1);
}
}
}//package com.wbwar.chopraider.common.beans
Section 12
//RoadBlockBean (com.wbwar.chopraider.common.beans.RoadBlockBean)
package com.wbwar.chopraider.common.beans {
public class RoadBlockBean extends LevelObjectBean {
public var orientation:int;// = 0
public var roadNumber:int;// = 0
public function RoadBlockBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
roadNumber = _arg1.roadNumber;
orientation = _arg1.orientation;
} else {
owner = 0;
health = 500;
orientation = 0;
roadNumber = 0;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.orientation = this.orientation;
_local1.roadNumber = this.roadNumber;
return (_local1);
}
override public function getXMLRoot():XML{
return (<roadblock/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 13
//ShipYardBean (com.wbwar.chopraider.common.beans.ShipYardBean)
package com.wbwar.chopraider.common.beans {
public class ShipYardBean extends LevelObjectBean {
public var boatLaunchTime:Number;// = 0
public var repairRate:Number;// = 0
public var orientation:int;// = 0
public var maxBoats:Number;// = 0
public var boatHealth:Number;
public function ShipYardBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
maxBoats = _arg1.maxBoats;
boatLaunchTime = _arg1.boatLaunchTime;
orientation = _arg1.orientation;
boatHealth = _arg1.boatHealth;
} else {
owner = 0;
health = 400;
repairRate = 0.01;
maxBoats = 15;
boatLaunchTime = 240;
orientation = 0;
boatHealth = 10;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.maxBoats = this.maxBoats;
_local1.boatLaunchTime = this.boatLaunchTime;
_local1.orientation = this.orientation;
_local1.boatHealth = this.boatHealth;
return (_local1);
}
override public function getXMLRoot():XML{
return (<shipyard/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 14
//TankBaseBean (com.wbwar.chopraider.common.beans.TankBaseBean)
package com.wbwar.chopraider.common.beans {
public class TankBaseBean extends LevelObjectBean {
public var maxTanks:Number;// = 0
public var tankHealth:Number;
public var tankLaunchTime:Number;// = 0
public var repairRate:Number;// = 0
public function TankBaseBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
maxTanks = _arg1.maxTanks;
tankLaunchTime = _arg1.tankLaunchTime;
tankHealth = _arg1.tankHealth;
} else {
owner = 0;
health = 400;
repairRate = 0.01;
maxTanks = 15;
tankLaunchTime = 240;
tankHealth = 10;
};
}
override public function getXMLRoot():XML{
return (<tankbase/>
);
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.maxTanks = this.maxTanks;
_local1.tankLaunchTime = this.tankLaunchTime;
_local1.tankHealth = this.tankHealth;
return (_local1);
}
}
}//package com.wbwar.chopraider.common.beans
Section 15
//TowerBean (com.wbwar.chopraider.common.beans.TowerBean)
package com.wbwar.chopraider.common.beans {
public class TowerBean extends LevelObjectBean {
public var repairRate:Number;// = 0
public var recharge:Number;// = 0
public var weaponDamage:Number;// = 0
public var range:Number;// = 0
public function TowerBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
recharge = _arg1.recharge;
range = _arg1.range;
weaponDamage = _arg1.weaponDamage;
} else {
owner = 0;
health = 20;
repairRate = 0.01;
recharge = 4;
range = 200;
weaponDamage = 0.5;
};
}
override public function getXMLRoot():XML{
return (<tower/>
);
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.recharge = this.recharge;
_local1.range = this.range;
_local1.weaponDamage = this.weaponDamage;
return (_local1);
}
}
}//package com.wbwar.chopraider.common.beans
Section 16
//TrackingGroundWeaponBean (com.wbwar.chopraider.common.beans.TrackingGroundWeaponBean)
package com.wbwar.chopraider.common.beans {
public class TrackingGroundWeaponBean extends LevelObjectBean {
public var turnRate:Number;// = 0
public var recharge:Number;// = 0
public var weaponDamage:Number;// = 0
public var repairRate:Number;// = 0
public var range:Number;// = 0
public function TrackingGroundWeaponBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
recharge = _arg1.recharge;
turnRate = _arg1.turnRate;
range = _arg1.range;
weaponDamage = _arg1.weaponDamage;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.recharge = this.recharge;
_local1.turnRate = this.turnRate;
_local1.range = this.range;
_local1.weaponDamage = this.weaponDamage;
return (_local1);
}
override public function getXMLRoot():XML{
return (<trackingGroundWeapon/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 17
//WallBean (com.wbwar.chopraider.common.beans.WallBean)
package com.wbwar.chopraider.common.beans {
public class WallBean extends LevelObjectBean {
public var orientation:int;// = 0
public var segmentCount:int;// = 1
public var repairRate:Number;// = 0
public function WallBean(_arg1:XML=null){
super(_arg1);
if (_arg1 != null){
repairRate = _arg1.repairRate;
segmentCount = _arg1.segmentCount;
orientation = _arg1.orientation;
} else {
owner = 0;
health = 30;
repairRate = 0.01;
segmentCount = 3;
orientation = 0;
};
}
override public function getXML():XML{
var _local1:XML = super.getXML();
_local1.repairRate = this.repairRate;
_local1.segmentCount = this.segmentCount;
_local1.orientation = this.orientation;
return (_local1);
}
override public function getXMLRoot():XML{
return (<wall/>
);
}
}
}//package com.wbwar.chopraider.common.beans
Section 18
//GameBitmaps (com.wbwar.chopraider.common.GameBitmaps)
package com.wbwar.chopraider.common {
import flash.display.*;
public class GameBitmaps {
public static const landBitmapHeight:int = 100;
public static const landBitmapWidth:int = 100;
private static var landImage0:Class = GameBitmaps_landImage0;
private static var landImage1:Class = GameBitmaps_landImage1;
private static var landImage3:Class = GameBitmaps_landImage3;
private static var landImage5:Class = GameBitmaps_landImage5;
public static var borderTopRightImage:Class = GameBitmaps_borderTopRightImage;
private static var landImage2:Class = GameBitmaps_landImage2;
public static var borderTopLeftImage:Class = GameBitmaps_borderTopLeftImage;
private static var landImage6:Class = GameBitmaps_landImage6;
public static var roadBlockImage:Class = GameBitmaps_roadBlockImage;
private static var landImage4:Class = GameBitmaps_landImage4;
private static var landImage68:Class = GameBitmaps_landImage68;
private static var landImage8:Class = GameBitmaps_landImage8;
private static var landImage9:Class = GameBitmaps_landImage9;
public static var civ2Image:Class = GameBitmaps_civ2Image;
private static var landImage7:Class = GameBitmaps_landImage7;
public static var powerLineSegmentImage:Class = GameBitmaps_powerLineSegmentImage;
private static var landImage60:Class = GameBitmaps_landImage60;
public static var borderBottomImage:Class = GameBitmaps_borderBottomImage;
private static var landImage62:Class = GameBitmaps_landImage62;
private static var landImage58:Class = GameBitmaps_landImage58;
public static var wallSegmentEndBitmapData:BitmapData = (new wallSegmentEndImage() as Bitmap).bitmapData;
public static var borderLeftBitmapData:BitmapData = (new borderLeftImage() as Bitmap).bitmapData;
public static var factory1Image:Class = GameBitmaps_factory1Image;
public static var borderBottomLeftBitmapData:BitmapData = (new borderBottomLeftImage() as Bitmap).bitmapData;
public static var borderBottomRightBitmapData:BitmapData = (new borderBottomRightImage() as Bitmap).bitmapData;
public static var tankBaseImage:Class = GameBitmaps_tankBaseImage;
private static var landImage67:Class = GameBitmaps_landImage67;
public static var gunPlatformImage:Class = GameBitmaps_gunPlatformImage;
public static var borderBottomBitmapData:BitmapData = (new borderBottomImage() as Bitmap).bitmapData;
private static var landImage12:Class = GameBitmaps_landImage12;
public static var borderTopImage:Class = GameBitmaps_borderTopImage;
private static var landImage14:Class = GameBitmaps_landImage14;
private static var landImage15:Class = GameBitmaps_landImage15;
private static var landImage16:Class = GameBitmaps_landImage16;
public static var civ4Image:Class = GameBitmaps_civ4Image;
private static var landImage13:Class = GameBitmaps_landImage13;
private static var landImage17:Class = GameBitmaps_landImage17;
private static var landImage18:Class = GameBitmaps_landImage18;
private static var landImage11:Class = GameBitmaps_landImage11;
public static var wallSegmentBitmapData:BitmapData = (new wallSegmentImage() as Bitmap).bitmapData;
public static var shipYardImage:Class = GameBitmaps_shipYardImage;
private static var landImage19:Class = GameBitmaps_landImage19;
public static var factoryImage:Class = GameBitmaps_factoryImage;
public static var powerLineSegmentBitmapData:BitmapData = (new powerLineSegmentImage() as Bitmap).bitmapData;
public static var borderBottomRightImage:Class = GameBitmaps_borderBottomRightImage;
public static var wallSegmentEndImage:Class = GameBitmaps_wallSegmentEndImage;
public static var civ1Image:Class = GameBitmaps_civ1Image;
public static var missileLauncherBarrelImage:Class = GameBitmaps_missileLauncherBarrelImage;
public static var powerPlantImage:Class = GameBitmaps_powerPlantImage;
public static var roadBlockBitmapData:BitmapData = (new roadBlockImage() as Bitmap).bitmapData;
public static var wallImage:Class = GameBitmaps_wallImage;
public static var civ3Image:Class = GameBitmaps_civ3Image;
public static var landBitmapData:Array = new Array(100);
public static var borderLeftImage:Class = GameBitmaps_borderLeftImage;
public static var borderTopLeftBitmapData:BitmapData = (new borderTopLeftImage() as Bitmap).bitmapData;
private static var landImage51:Class = GameBitmaps_landImage51;
private static var landImage52:Class = GameBitmaps_landImage52;
private static var landImage53:Class = GameBitmaps_landImage53;
private static var landImage54:Class = GameBitmaps_landImage54;
private static var landImage55:Class = GameBitmaps_landImage55;
private static var landImage56:Class = GameBitmaps_landImage56;
public static var factory2Image:Class = GameBitmaps_factory2Image;
private static var landImage59:Class = GameBitmaps_landImage59;
public static var towerImage:Class = GameBitmaps_towerImage;
private static var landImage50:Class = GameBitmaps_landImage50;
public static var civ0Image:Class = GameBitmaps_civ0Image;
public static var borderBottomLeftImage:Class = GameBitmaps_borderBottomLeftImage;
public static var airBaseImage:Class = GameBitmaps_airBaseImage;
public static var wallSegmentImage:Class = GameBitmaps_wallSegmentImage;
public static var borderTopBitmapData:BitmapData = (new borderTopImage() as Bitmap).bitmapData;
public static var wallBitmapData:BitmapData = (new wallImage() as Bitmap).bitmapData;
public static var borderRightBitmapData:BitmapData = (new borderRightImage() as Bitmap).bitmapData;
public static var borderRightImage:Class = GameBitmaps_borderRightImage;
private static var landImage63:Class = GameBitmaps_landImage63;
private static var landImage64:Class = GameBitmaps_landImage64;
private static var landImage65:Class = GameBitmaps_landImage65;
private static var landImage66:Class = GameBitmaps_landImage66;
public static var powCampImage:Class = GameBitmaps_powCampImage;
private static var landImage61:Class = GameBitmaps_landImage61;
public static var gunBarrelImage:Class = GameBitmaps_gunBarrelImage;
public static var borderTopRightBitmapData:BitmapData = (new borderTopRightImage() as Bitmap).bitmapData;
private static var landImage57:Class = GameBitmaps_landImage57;
public static function getTileBitmap(_arg1:int):BitmapData{
if (_arg1 == -1){
return (wallBitmapData);
};
if (_arg1 == 0){
return (landBitmapData[0]);
};
if ((((_arg1 >= 1)) && ((_arg1 <= 9)))){
return (landBitmapData[_arg1]);
};
if ((((_arg1 >= 11)) && ((_arg1 <= 19)))){
return (landBitmapData[_arg1]);
};
if ((((_arg1 >= 50)) && ((_arg1 <= 68)))){
return (landBitmapData[_arg1]);
};
return (null);
}
landBitmapData[0] = (new landImage0() as Bitmap).bitmapData;
landBitmapData[1] = (new landImage1() as Bitmap).bitmapData;
landBitmapData[2] = (new landImage2() as Bitmap).bitmapData;
landBitmapData[3] = (new landImage3() as Bitmap).bitmapData;
landBitmapData[4] = (new landImage4() as Bitmap).bitmapData;
landBitmapData[5] = (new landImage5() as Bitmap).bitmapData;
landBitmapData[6] = (new landImage6() as Bitmap).bitmapData;
landBitmapData[7] = (new landImage7() as Bitmap).bitmapData;
landBitmapData[8] = (new landImage8() as Bitmap).bitmapData;
landBitmapData[9] = (new landImage9() as Bitmap).bitmapData;
landBitmapData[11] = (new landImage11() as Bitmap).bitmapData;
landBitmapData[12] = (new landImage12() as Bitmap).bitmapData;
landBitmapData[13] = (new landImage13() as Bitmap).bitmapData;
landBitmapData[14] = (new landImage14() as Bitmap).bitmapData;
landBitmapData[15] = (new landImage15() as Bitmap).bitmapData;
landBitmapData[16] = (new landImage16() as Bitmap).bitmapData;
landBitmapData[17] = (new landImage17() as Bitmap).bitmapData;
landBitmapData[18] = (new landImage18() as Bitmap).bitmapData;
landBitmapData[19] = (new landImage19() as Bitmap).bitmapData;
landBitmapData[50] = (new landImage50() as Bitmap).bitmapData;
landBitmapData[51] = (new landImage51() as Bitmap).bitmapData;
landBitmapData[52] = (new landImage52() as Bitmap).bitmapData;
landBitmapData[53] = (new landImage53() as Bitmap).bitmapData;
landBitmapData[54] = (new landImage54() as Bitmap).bitmapData;
landBitmapData[55] = (new landImage55() as Bitmap).bitmapData;
landBitmapData[56] = (new landImage56() as Bitmap).bitmapData;
landBitmapData[57] = (new landImage57() as Bitmap).bitmapData;
landBitmapData[58] = (new landImage58() as Bitmap).bitmapData;
landBitmapData[59] = (new landImage59() as Bitmap).bitmapData;
landBitmapData[60] = (new landImage60() as Bitmap).bitmapData;
landBitmapData[61] = (new landImage61() as Bitmap).bitmapData;
landBitmapData[62] = (new landImage62() as Bitmap).bitmapData;
landBitmapData[63] = (new landImage63() as Bitmap).bitmapData;
landBitmapData[64] = (new landImage64() as Bitmap).bitmapData;
landBitmapData[65] = (new landImage65() as Bitmap).bitmapData;
landBitmapData[66] = (new landImage66() as Bitmap).bitmapData;
landBitmapData[67] = (new landImage67() as Bitmap).bitmapData;
landBitmapData[68] = (new landImage68() as Bitmap).bitmapData;
}
}//package com.wbwar.chopraider.common
Section 19
//GameBitmaps_airBaseImage (com.wbwar.chopraider.common.GameBitmaps_airBaseImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_airBaseImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 20
//GameBitmaps_borderBottomImage (com.wbwar.chopraider.common.GameBitmaps_borderBottomImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderBottomImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 21
//GameBitmaps_borderBottomLeftImage (com.wbwar.chopraider.common.GameBitmaps_borderBottomLeftImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderBottomLeftImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 22
//GameBitmaps_borderBottomRightImage (com.wbwar.chopraider.common.GameBitmaps_borderBottomRightImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderBottomRightImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 23
//GameBitmaps_borderLeftImage (com.wbwar.chopraider.common.GameBitmaps_borderLeftImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderLeftImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 24
//GameBitmaps_borderRightImage (com.wbwar.chopraider.common.GameBitmaps_borderRightImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderRightImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 25
//GameBitmaps_borderTopImage (com.wbwar.chopraider.common.GameBitmaps_borderTopImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderTopImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 26
//GameBitmaps_borderTopLeftImage (com.wbwar.chopraider.common.GameBitmaps_borderTopLeftImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderTopLeftImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 27
//GameBitmaps_borderTopRightImage (com.wbwar.chopraider.common.GameBitmaps_borderTopRightImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_borderTopRightImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 28
//GameBitmaps_civ0Image (com.wbwar.chopraider.common.GameBitmaps_civ0Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_civ0Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 29
//GameBitmaps_civ1Image (com.wbwar.chopraider.common.GameBitmaps_civ1Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_civ1Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 30
//GameBitmaps_civ2Image (com.wbwar.chopraider.common.GameBitmaps_civ2Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_civ2Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 31
//GameBitmaps_civ3Image (com.wbwar.chopraider.common.GameBitmaps_civ3Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_civ3Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 32
//GameBitmaps_civ4Image (com.wbwar.chopraider.common.GameBitmaps_civ4Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_civ4Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 33
//GameBitmaps_factory1Image (com.wbwar.chopraider.common.GameBitmaps_factory1Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_factory1Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 34
//GameBitmaps_factory2Image (com.wbwar.chopraider.common.GameBitmaps_factory2Image)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_factory2Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 35
//GameBitmaps_factoryImage (com.wbwar.chopraider.common.GameBitmaps_factoryImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_factoryImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 36
//GameBitmaps_gunBarrelImage (com.wbwar.chopraider.common.GameBitmaps_gunBarrelImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_gunBarrelImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 37
//GameBitmaps_gunPlatformImage (com.wbwar.chopraider.common.GameBitmaps_gunPlatformImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_gunPlatformImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 38
//GameBitmaps_landImage0 (com.wbwar.chopraider.common.GameBitmaps_landImage0)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage0 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 39
//GameBitmaps_landImage1 (com.wbwar.chopraider.common.GameBitmaps_landImage1)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage1 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 40
//GameBitmaps_landImage11 (com.wbwar.chopraider.common.GameBitmaps_landImage11)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage11 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 41
//GameBitmaps_landImage12 (com.wbwar.chopraider.common.GameBitmaps_landImage12)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage12 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 42
//GameBitmaps_landImage13 (com.wbwar.chopraider.common.GameBitmaps_landImage13)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage13 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 43
//GameBitmaps_landImage14 (com.wbwar.chopraider.common.GameBitmaps_landImage14)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage14 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 44
//GameBitmaps_landImage15 (com.wbwar.chopraider.common.GameBitmaps_landImage15)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage15 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 45
//GameBitmaps_landImage16 (com.wbwar.chopraider.common.GameBitmaps_landImage16)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage16 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 46
//GameBitmaps_landImage17 (com.wbwar.chopraider.common.GameBitmaps_landImage17)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage17 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 47
//GameBitmaps_landImage18 (com.wbwar.chopraider.common.GameBitmaps_landImage18)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage18 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 48
//GameBitmaps_landImage19 (com.wbwar.chopraider.common.GameBitmaps_landImage19)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage19 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 49
//GameBitmaps_landImage2 (com.wbwar.chopraider.common.GameBitmaps_landImage2)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage2 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 50
//GameBitmaps_landImage3 (com.wbwar.chopraider.common.GameBitmaps_landImage3)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage3 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 51
//GameBitmaps_landImage4 (com.wbwar.chopraider.common.GameBitmaps_landImage4)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage4 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 52
//GameBitmaps_landImage5 (com.wbwar.chopraider.common.GameBitmaps_landImage5)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage5 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 53
//GameBitmaps_landImage50 (com.wbwar.chopraider.common.GameBitmaps_landImage50)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage50 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 54
//GameBitmaps_landImage51 (com.wbwar.chopraider.common.GameBitmaps_landImage51)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage51 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 55
//GameBitmaps_landImage52 (com.wbwar.chopraider.common.GameBitmaps_landImage52)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage52 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 56
//GameBitmaps_landImage53 (com.wbwar.chopraider.common.GameBitmaps_landImage53)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage53 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 57
//GameBitmaps_landImage54 (com.wbwar.chopraider.common.GameBitmaps_landImage54)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage54 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 58
//GameBitmaps_landImage55 (com.wbwar.chopraider.common.GameBitmaps_landImage55)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage55 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 59
//GameBitmaps_landImage56 (com.wbwar.chopraider.common.GameBitmaps_landImage56)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage56 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 60
//GameBitmaps_landImage57 (com.wbwar.chopraider.common.GameBitmaps_landImage57)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage57 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 61
//GameBitmaps_landImage58 (com.wbwar.chopraider.common.GameBitmaps_landImage58)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage58 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 62
//GameBitmaps_landImage59 (com.wbwar.chopraider.common.GameBitmaps_landImage59)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage59 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 63
//GameBitmaps_landImage6 (com.wbwar.chopraider.common.GameBitmaps_landImage6)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage6 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 64
//GameBitmaps_landImage60 (com.wbwar.chopraider.common.GameBitmaps_landImage60)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage60 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 65
//GameBitmaps_landImage61 (com.wbwar.chopraider.common.GameBitmaps_landImage61)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage61 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 66
//GameBitmaps_landImage62 (com.wbwar.chopraider.common.GameBitmaps_landImage62)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage62 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 67
//GameBitmaps_landImage63 (com.wbwar.chopraider.common.GameBitmaps_landImage63)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage63 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 68
//GameBitmaps_landImage64 (com.wbwar.chopraider.common.GameBitmaps_landImage64)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage64 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 69
//GameBitmaps_landImage65 (com.wbwar.chopraider.common.GameBitmaps_landImage65)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage65 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 70
//GameBitmaps_landImage66 (com.wbwar.chopraider.common.GameBitmaps_landImage66)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage66 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 71
//GameBitmaps_landImage67 (com.wbwar.chopraider.common.GameBitmaps_landImage67)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage67 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 72
//GameBitmaps_landImage68 (com.wbwar.chopraider.common.GameBitmaps_landImage68)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage68 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 73
//GameBitmaps_landImage7 (com.wbwar.chopraider.common.GameBitmaps_landImage7)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage7 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 74
//GameBitmaps_landImage8 (com.wbwar.chopraider.common.GameBitmaps_landImage8)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage8 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 75
//GameBitmaps_landImage9 (com.wbwar.chopraider.common.GameBitmaps_landImage9)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_landImage9 extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 76
//GameBitmaps_missileLauncherBarrelImage (com.wbwar.chopraider.common.GameBitmaps_missileLauncherBarrelImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_missileLauncherBarrelImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 77
//GameBitmaps_powCampImage (com.wbwar.chopraider.common.GameBitmaps_powCampImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_powCampImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 78
//GameBitmaps_powerLineSegmentImage (com.wbwar.chopraider.common.GameBitmaps_powerLineSegmentImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_powerLineSegmentImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 79
//GameBitmaps_powerPlantImage (com.wbwar.chopraider.common.GameBitmaps_powerPlantImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_powerPlantImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 80
//GameBitmaps_roadBlockImage (com.wbwar.chopraider.common.GameBitmaps_roadBlockImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_roadBlockImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 81
//GameBitmaps_shipYardImage (com.wbwar.chopraider.common.GameBitmaps_shipYardImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_shipYardImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 82
//GameBitmaps_tankBaseImage (com.wbwar.chopraider.common.GameBitmaps_tankBaseImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_tankBaseImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 83
//GameBitmaps_towerImage (com.wbwar.chopraider.common.GameBitmaps_towerImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_towerImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 84
//GameBitmaps_wallImage (com.wbwar.chopraider.common.GameBitmaps_wallImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_wallImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 85
//GameBitmaps_wallSegmentEndImage (com.wbwar.chopraider.common.GameBitmaps_wallSegmentEndImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_wallSegmentEndImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 86
//GameBitmaps_wallSegmentImage (com.wbwar.chopraider.common.GameBitmaps_wallSegmentImage)
package com.wbwar.chopraider.common {
import mx.core.*;
public class GameBitmaps_wallSegmentImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.common
Section 87
//GameMap (com.wbwar.chopraider.common.GameMap)
package com.wbwar.chopraider.common {
import flash.display.*;
import flash.geom.*;
public class GameMap {
private const oceanColor:Number = 4289058303;
private const borderColor:Number = 4285558896;
private const landColor:Number = 4294967295;
public var mapName:String;
public var towers:XMLList;
public var airBases:XMLList;
public var superbomb:int;
public var powCamps:XMLList;
public var civs:XMLList;
public var shipYards:XMLList;
public var mapData:Array;
public var factories:XMLList;
public var guns:XMLList;
public var mapDataWidth:int;
public var roadBlocks:XMLList;
public var time:int;
public var missileLaunchers:XMLList;
public var title:String;
public var missileBarrages:int;
public var powerPlants:XMLList;
private var oc:Number;
public var walls:XMLList;
public var mapDataHeight:int;
public var tankBases:XMLList;
public var powerLines:XMLList;
public var description:String;
private var lc:Number;
public var carrier:XML;
public static const cellHeight:int = 100;
public static const cellWidth:int = 100;
public function GameMap(){
mapData = new Array();
super();
}
public function get worldPixelWidth():Number{
return ((mapDataWidth * cellWidth));
}
public function generateThumbNail(_arg1:int, _arg2:int):Bitmap{
var _local3:Number;
var _local4:Number;
var _local10:uint;
var _local11:Number;
var _local12:Number;
var _local13:Number;
if (mapDataWidth > mapDataHeight){
_local3 = (_arg1 / mapDataWidth);
_local4 = (_arg2 / mapDataWidth);
} else {
_local3 = (_arg1 / mapDataHeight);
_local4 = (_arg2 / mapDataHeight);
};
var _local5:BitmapData = new BitmapData(_arg1, _arg2, false, 4278190080);
var _local6:Bitmap = new Bitmap(_local5);
var _local7:Number = (mapDataWidth * _local3);
var _local8:Number = (mapDataHeight * _local4);
_local5.fillRect(new Rectangle(0, 0, _arg1, _arg2), 4294967295);
_local5.fillRect(new Rectangle(0, 0, (_local7 - 1), (_local8 - 1)), 4289058303);
var _local9:uint;
while (_local9 < mapDataHeight) {
_local10 = 0;
while (_local10 < mapDataWidth) {
_local11 = (_local10 * _local3);
_local12 = (_local9 * _local4);
if (mapData[_local9][_local10] == 0){
_local13 = 4289058303;
} else {
_local13 = 4294967295;
};
drawCell(_local5, _local10, _local9, _local11, _local12, _local3, _local4);
_local10++;
};
_local9++;
};
Raster.line(_local5, 0, 0, (_local7 - 1), 0, 4278190080);
Raster.line(_local5, (_local7 - 1), 0, (_local7 - 1), (_local8 - 1), 4278190080);
Raster.line(_local5, 0, (_local8 - 1), (_local7 - 1), (_local8 - 1), 4278190080);
Raster.line(_local5, 0, 0, 0, (_local8 - 1), 4278190080);
return (_local6);
}
public function get worldPixelHeight():Number{
return ((mapDataHeight * cellHeight));
}
private function drawCell(_arg1:BitmapData, _arg2:uint, _arg3:uint, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):void{
var _local8:Number = (_arg6 / 2);
var _local9:Number = (_arg7 / 2);
var _local10:int = mapData[_arg3][_arg2];
if ((((_local10 >= 11)) && ((_local10 <= 19)))){
_local10 = (_local10 - 10);
oc = landColor;
lc = oceanColor;
} else {
oc = oceanColor;
lc = landColor;
};
if (_local10 == 0){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
} else {
if (_local10 == 1){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle((_arg4 + _local8), (_arg5 + _local9), _local8, _local9), lc);
Raster.line(_arg1, (_arg4 + _local8), (_arg5 + _arg7), (_arg4 + _local8), (_arg5 + _local9), borderColor);
Raster.line(_arg1, (_arg4 + _local8), (_arg5 + _local9), (_arg4 + _arg6), (_arg5 + _local9), borderColor);
} else {
if ((((_local10 == 2)) || ((_local10 == 63)))){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle(_arg4, (_arg5 + _local9), _arg6, _local9), lc);
Raster.line(_arg1, _arg4, (_arg5 + _local9), (_arg4 + _arg6), (_arg5 + _local9), borderColor);
} else {
if (_local10 == 3){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle(_arg4, (_arg5 + _local9), (_arg6 / 2), _local9), lc);
Raster.line(_arg1, (_arg4 + _local8), (_arg5 + _arg7), (_arg4 + (_arg6 / 2)), (_arg5 + _local9), borderColor);
Raster.line(_arg1, (_arg4 + _local8), (_arg5 + _local9), _arg4, (_arg5 + _local9), borderColor);
} else {
if ((((_local10 == 4)) || ((_local10 == 64)))){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle((_arg4 + _local8), _arg5, _local8, _arg7), lc);
Raster.line(_arg1, (_arg4 + _local8), _arg5, (_arg4 + _local8), (_arg5 + _arg7), borderColor);
} else {
if (_local10 == 5){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), lc);
} else {
if ((((_local10 == 6)) || ((_local10 == 65)))){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle(_arg4, _arg5, _local8, _arg7), lc);
Raster.line(_arg1, (_arg4 + _local8), _arg5, (_arg4 + _local8), (_arg5 + _arg7), borderColor);
} else {
if (_local10 == 7){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle((_arg4 + _local8), _arg5, _local8, _local9), lc);
Raster.line(_arg1, (_arg4 + _local8), _arg5, (_arg4 + _local8), (_arg5 + _local9), borderColor);
Raster.line(_arg1, (_arg4 + _local8), (_arg5 + _local9), (_arg4 + _arg6), (_arg5 + _local9), borderColor);
} else {
if ((((_local10 == 8)) || ((_local10 == 66)))){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _local9), lc);
Raster.line(_arg1, _arg4, (_arg5 + _local9), (_arg4 + _arg6), (_arg5 + _local9), borderColor);
} else {
if (_local10 == 9){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
_arg1.fillRect(new Rectangle(_arg4, _arg5, _local8, _local9), lc);
Raster.line(_arg1, (_arg4 + _local8), _arg5, (_arg4 + _local8), (_arg5 + _local9), borderColor);
Raster.line(_arg1, (_arg4 + (_arg6 / 2)), (_arg5 + (_arg7 / 2)), _arg4, (_arg5 + (_arg7 / 2)), borderColor);
} else {
if ((((_local10 == 67)) || ((_local10 == 68)))){
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), oc);
} else {
_arg1.fillRect(new Rectangle(_arg4, _arg5, _arg6, _arg7), lc);
};
};
};
};
};
};
};
};
};
};
};
}
public function generateXML():XML{
var _local1:XML = <mission/>
;
_local1.description = description;
_local1.time = time;
_local1.title = title;
_local1.missilebarrages = missileBarrages;
_local1.superbomb = superbomb;
_local1.columns = mapDataWidth;
_local1.rows = mapDataHeight;
_local1.map = mapData;
_local1.carrier = carrier;
_local1.tower = towers;
_local1.gun = guns;
_local1.missileLauncher = missileLaunchers;
_local1.factory = factories;
_local1.tankbase = tankBases;
_local1.roadblock = roadBlocks;
_local1.civ = civs;
_local1.powcamp = powCamps;
_local1.airbase = airBases;
_local1.shipyard = shipYards;
_local1.powerplant = powerPlants;
_local1.powerline = powerLines;
_local1.wall = walls;
return (_local1);
}
public function parseXML(_arg1:String, _arg2:String):void{
var _local7:Array;
var _local8:int;
this.mapName = _arg1;
trace(("MAPNAME: " + this.mapName));
mapData = new Array();
var _local3:XML = new XML(_arg2);
description = _local3.description;
time = _local3.time;
title = _local3.title;
missileBarrages = _local3.missilebarrages;
superbomb = _local3.superbomb;
mapDataWidth = _local3.columns;
mapDataHeight = _local3.rows;
carrier = _local3.carrier[0];
towers = _local3.tower;
guns = _local3.gun;
missileLaunchers = _local3.missileLauncher;
factories = _local3.factory;
airBases = _local3.airbase;
powCamps = _local3.powcamp;
tankBases = _local3.tankbase;
roadBlocks = _local3.roadblock;
civs = _local3.civ;
shipYards = _local3.shipyard;
powerPlants = _local3.powerplant;
powerLines = _local3.powerline;
walls = _local3.wall;
var _local4:int;
var _local5:Array = _local3.map[0].split(",");
var _local6:int;
while (_local6 < mapDataHeight) {
_local7 = new Array();
_local8 = 0;
while (_local8 < mapDataWidth) {
_local7.push(_local5[_local4]);
_local4++;
_local8++;
};
mapData.push(_local7);
_local6++;
};
}
}
}//package com.wbwar.chopraider.common
Section 88
//Raster (com.wbwar.chopraider.common.Raster)
package com.wbwar.chopraider.common {
import flash.display.*;
import flash.geom.*;
public class Raster {
public static function aaCircle(_arg1:BitmapData, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Number):void{
var _local6:int;
var _local7:int;
var _local8:int;
var _local10:Number;
_local6 = _arg4;
_local7 = 0;
var _local9:Number = 0;
var _local11:Function = Math.sqrt;
var _local12:Function = Math.ceil;
_arg1.setPixel((_arg2 + _local6), (_arg3 + _local7), _arg5);
_arg1.setPixel((_arg2 - _local6), (_arg3 + _local7), _arg5);
_arg1.setPixel((_arg2 + _local7), (_arg3 + _local6), _arg5);
_arg1.setPixel((_arg2 + _local7), (_arg3 - _local6), _arg5);
while (_local6 > (_local7 + 1)) {
_local7++;
_local10 = (_local12(_local11(((_arg4 * _arg4) - (_local7 * _local7)))) - _local11(((_arg4 * _arg4) - (_local7 * _local7))));
if (_local10 < _local9){
_local6--;
};
drawAlphaPixel(_arg1, (_arg2 + _local6), (_arg3 + _local7), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, ((_arg2 + _local6) - 1), (_arg3 + _local7), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 - _local6), (_arg3 + _local7), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, ((_arg2 - _local6) + 1), (_arg3 + _local7), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 + _local6), (_arg3 - _local7), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, ((_arg2 + _local6) - 1), (_arg3 - _local7), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 - _local6), (_arg3 - _local7), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, ((_arg2 - _local6) + 1), (_arg3 - _local7), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 + _local7), (_arg3 + _local6), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, (_arg2 + _local7), ((_arg3 + _local6) - 1), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 - _local7), (_arg3 + _local6), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, (_arg2 - _local7), ((_arg3 + _local6) - 1), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 + _local7), (_arg3 - _local6), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, (_arg2 + _local7), ((_arg3 - _local6) + 1), _local10, _arg5);
drawAlphaPixel(_arg1, (_arg2 - _local7), (_arg3 - _local6), (1 - _local10), _arg5);
drawAlphaPixel(_arg1, (_arg2 - _local7), ((_arg3 - _local6) + 1), _local10, _arg5);
_local9 = _local10;
};
}
public static function cubicBezier(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int, _arg9:int, _arg10:Number, _arg11:int=5):void{
var _local14:int;
var _local15:int;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local12:Number = _arg2;
var _local13:Number = _arg3;
var _local16:Number = 0;
var _local17:Number = (1 / _arg11);
var _local24:int;
while (++_local24 <= _arg11) {
_local18 = (_local17 * _local24);
_local19 = ((_local17 * _local24) * _local18);
_local20 = (_local19 * _local18);
_local21 = (1 - _local18);
_local22 = ((1 - _local18) * _local21);
_local23 = (_local22 * _local21);
_local14 = ((((_local23 * _arg2) + (((3 * _local18) * _local22) * _arg4)) + (((3 * _arg6) * _local19) * _local21)) + (_arg8 * _local20));
_local15 = ((((_local23 * _arg3) + (((3 * _local18) * _local22) * _arg5)) + (((3 * _arg7) * _local19) * _local21)) + (_arg9 * _local20));
_local16 = (_local16 + Math.sqrt((((_local14 - _local12) * (_local14 - _local12)) + ((_local15 - _local13) * (_local15 - _local13)))));
_local12 = _local14;
_local13 = _local15;
};
var _local25:int = Math.floor(_local16);
_local17 = (1 / _local25);
var _local26:int = _arg2;
var _local27:int = _arg3;
_local24 = -1;
while (++_local24 <= _local25) {
_local18 = (_local17 * _local24);
_local19 = ((_local17 * _local24) * _local18);
_local20 = (_local19 * _local18);
_local21 = (1 - _local18);
_local22 = ((1 - _local18) * _local21);
_local23 = (_local22 * _local21);
_local14 = ((((_local23 * _arg2) + (((3 * _local18) * _local22) * _arg4)) + (((3 * _arg6) * _local19) * _local21)) + (_arg8 * _local20));
_local15 = ((((_local23 * _arg3) + (((3 * _local18) * _local22) * _arg5)) + (((3 * _arg7) * _local19) * _local21)) + (_arg9 * _local20));
line(_arg1, _local26, _local27, _local14, _local15, _arg10);
_local26 = _local14;
_local27 = _local15;
};
}
private static function checkLine(_arg1:Object, _arg2:int, _arg3:int, _arg4:BitmapData, _arg5:int, _arg6:Rectangle):void{
if (_arg1[_arg3]){
if (_arg1[_arg3] > _arg2){
_arg6.width = (_arg1[_arg3] - _arg2);
_arg6.x = _arg2;
_arg6.y = _arg3;
_arg4.fillRect(_arg6, _arg5);
} else {
_arg6.width = (_arg2 - _arg1[_arg3]);
_arg6.x = _arg1[_arg3];
_arg6.y = _arg3;
_arg4.fillRect(_arg6, _arg5);
};
} else {
_arg1[_arg3] = _arg2;
};
}
public static function line(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Number):void{
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
_local13 = _arg2;
_local14 = _arg3;
_local7 = (_arg4 - _arg2);
_local8 = (_arg5 - _arg3);
_local10 = ((_local7)>0) ? 1 : -1;
_local11 = ((_local8)>0) ? 1 : -1;
_local7 = Math.abs(_local7);
_local8 = Math.abs(_local8);
_arg1.setPixel32(_local13, _local14, _arg6);
if (_local7 > _local8){
_local12 = (_local7 / 2);
_local9 = 1;
while (_local9 <= _local7) {
_local13 = (_local13 + _local10);
_local12 = (_local12 + _local8);
if (_local12 >= _local7){
_local12 = (_local12 - _local7);
_local14 = (_local14 + _local11);
};
_arg1.setPixel32(_local13, _local14, _arg6);
_local9++;
};
} else {
_local12 = (_local8 / 2);
_local9 = 1;
while (_local9 <= _local8) {
_local14 = (_local14 + _local11);
_local12 = (_local12 + _local7);
if (_local12 >= _local8){
_local12 = (_local12 - _local8);
_local13 = (_local13 + _local10);
};
_arg1.setPixel32(_local13, _local14, _arg6);
_local9++;
};
};
}
public static function quadBezier(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Number, _arg9:int=3):void{
var _local12:int;
var _local13:int;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local10:Number = _arg2;
var _local11:Number = _arg3;
var _local14:Number = 0;
var _local15:Number = (1 / _arg9);
var _local20:int;
while (++_local20 <= _arg9) {
_local16 = (_local15 * _local20);
_local17 = ((_local15 * _local20) * _local16);
_local18 = (1 - _local16);
_local19 = ((1 - _local16) * _local18);
_local12 = (((_local19 * _arg2) + (((2 * _local16) * _local18) * _arg4)) + (_local17 * _arg6));
_local13 = (((_local19 * _arg3) + (((2 * _local16) * _local18) * _arg5)) + (_local17 * _arg7));
_local14 = (_local14 + Math.sqrt((((_local12 - _local10) * (_local12 - _local10)) + ((_local13 - _local11) * (_local13 - _local11)))));
_local10 = _local12;
_local11 = _local13;
};
var _local21:int = Math.floor(_local14);
_local15 = (1 / _local21);
var _local22:int = _arg2;
var _local23:int = _arg3;
_local20 = -1;
while (++_local20 <= _local21) {
_local16 = (_local15 * _local20);
_local17 = ((_local15 * _local20) * _local16);
_local18 = (1 - _local16);
_local19 = ((1 - _local16) * _local18);
_local12 = (((_local19 * _arg2) + (((2 * _local16) * _local18) * _arg4)) + (_local17 * _arg6));
_local13 = (((_local19 * _arg3) + (((2 * _local16) * _local18) * _arg5)) + (_local17 * _arg7));
line(_arg1, _local22, _local23, _local12, _local13, _arg8);
_local22 = _local12;
_local23 = _local13;
};
}
public static function circle(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:Number):void{
var _local6:int;
var _local7:int;
var _local8:int;
_local6 = 0;
_local7 = _arg4;
_local8 = (1 - _arg4);
_arg1.setPixel32((_arg2 + _local6), (_arg3 + _local7), _arg5);
_arg1.setPixel32((_arg2 + _local6), (_arg3 - _local7), _arg5);
_arg1.setPixel32((_arg2 - _local7), (_arg3 + _local6), _arg5);
_arg1.setPixel32((_arg2 + _local7), (_arg3 + _local6), _arg5);
while (_local7 > _local6) {
if (_local8 < 0){
_local8 = (_local8 + ((2 * _local6) + 3));
} else {
_local8 = (_local8 + ((2 * (_local6 - _local7)) + 5));
_local7--;
};
_local6++;
_arg1.setPixel32((_arg2 + _local6), (_arg3 + _local7), _arg5);
_arg1.setPixel32((_arg2 - _local6), (_arg3 + _local7), _arg5);
_arg1.setPixel32((_arg2 + _local6), (_arg3 - _local7), _arg5);
_arg1.setPixel32((_arg2 - _local6), (_arg3 - _local7), _arg5);
_arg1.setPixel32((_arg2 - _local7), (_arg3 + _local6), _arg5);
_arg1.setPixel32((_arg2 - _local7), (_arg3 - _local6), _arg5);
_arg1.setPixel32((_arg2 + _local7), (_arg3 - _local6), _arg5);
_arg1.setPixel32((_arg2 + _local7), (_arg3 + _local6), _arg5);
};
}
public static function triangle(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Number):void{
line(_arg1, _arg2, _arg3, _arg4, _arg5, _arg8);
line(_arg1, _arg4, _arg5, _arg6, _arg7, _arg8);
line(_arg1, _arg6, _arg7, _arg2, _arg3, _arg8);
}
public static function filledTri(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:Number):void{
var _local9:Object = {};
lineTri(_local9, _arg1, _arg2, _arg3, _arg4, _arg5, _arg8);
lineTri(_local9, _arg1, _arg4, _arg5, _arg6, _arg7, _arg8);
lineTri(_local9, _arg1, _arg6, _arg7, _arg2, _arg3, _arg8);
}
public static function aaLine(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Number):void{
var _local8:int;
var _local17:Number;
var _local7 = (Math.abs((_arg5 - _arg3)) > Math.abs((_arg4 - _arg2)));
if (_local7){
_local8 = _arg2;
_arg2 = _arg3;
_arg3 = _local8;
_local8 = _arg4;
_arg4 = _arg5;
_arg5 = _local8;
};
if (_arg2 > _arg4){
_local8 = _arg2;
_arg2 = _arg4;
_arg4 = _local8;
_local8 = _arg3;
_arg3 = _arg5;
_arg5 = _local8;
};
var _local9:int = (_arg4 - _arg2);
var _local10:int = (_arg5 - _arg3);
var _local11:Number = (_local10 / _local9);
var _local12:int = _arg2;
var _local13:Number = (_arg3 + (_local11 * (_local12 - _arg2)));
var _local14:Number = (1 - ((_arg2 + 0.5) % 1));
var _local15:int = _local12;
var _local16:int = Math.floor(_local13);
_local17 = ((1 - (_local13 % 1)) * _local14);
if (_local7){
};
_local17 = ((_local13 % 1) * _local14);
if (_local7){
};
var _local18:Number = (_local13 + _local11);
_local12 = _arg4;
_local13 = (_arg5 + (_local11 * (_local12 - _arg4)));
_local14 = ((_arg4 + 0.5) % 1);
var _local19:int = _local12;
var _local20:int = Math.floor(_local13);
_local17 = ((1 - (_local13 % 1)) * _local14);
if (_local7){
drawAlphaPixel(_arg1, _local20, _local19, _local17, _arg6);
} else {
drawAlphaPixel(_arg1, _local19, _local20, _local17, _arg6);
};
_local17 = ((_local13 % 1) * _local14);
if (_local7){
drawAlphaPixel(_arg1, (_local20 + 1), _local19, _local17, _arg6);
} else {
drawAlphaPixel(_arg1, _local19, (_local20 + 1), _local17, _arg6);
};
var _local21:int = _local15;
while (_local21++ < _local19) {
_local17 = (1 - (_local18 % 1));
if (_local7){
drawAlphaPixel(_arg1, _local18, _local21, _local17, _arg6);
} else {
drawAlphaPixel(_arg1, _local21, _local18, _local17, _arg6);
};
_local17 = (_local18 % 1);
if (_local7){
drawAlphaPixel(_arg1, (_local18 + 1), _local21, _local17, _arg6);
} else {
drawAlphaPixel(_arg1, _local21, (_local18 + 1), _local17, _arg6);
};
_local18 = (_local18 + _local11);
};
}
private static function drawAlphaPixel(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number):void{
var _local6:uint = _arg1.getPixel32(_arg2, _arg3);
var _local7:uint = ((_local6 & 0xFF0000) >> 16);
var _local8:uint = ((_local6 & 0xFF00) >> 8);
var _local9:uint = (_local6 & 0xFF);
var _local10:uint = ((_arg5 & 0xFF0000) >> 16);
var _local11:uint = ((_arg5 & 0xFF00) >> 8);
var _local12:uint = (_arg5 & 0xFF);
var _local13:Number = 0xFF;
var _local14:Number = ((_local10 * _arg4) + (_local7 * (1 - _arg4)));
var _local15:Number = ((_local11 * _arg4) + (_local8 * (1 - _arg4)));
var _local16:Number = ((_local12 * _arg4) + (_local9 * (1 - _arg4)));
var _local17:uint = ((((_local13 << 24) + (_local14 << 16)) + (_local15 << 8)) + _local16);
_arg1.setPixel32(_arg2, _arg3, _local17);
}
private static function lineTri(_arg1:Object, _arg2:BitmapData, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Number):void{
var _local9:int;
var _local8 = (((_arg6 - _arg4) * (_arg6 - _arg4)) > ((_arg5 - _arg3) * (_arg5 - _arg3)));
if (_local8){
_local9 = _arg3;
_arg3 = _arg4;
_arg4 = _local9;
_local9 = _arg5;
_arg5 = _arg6;
_arg6 = _local9;
};
if (_arg3 > _arg5){
_arg3 = (_arg3 ^ _arg5);
_arg5 = (_arg5 ^ _arg3);
_arg3 = (_arg3 ^ _arg5);
_arg4 = (_arg4 ^ _arg6);
_arg6 = (_arg6 ^ _arg4);
_arg4 = (_arg4 ^ _arg6);
};
var _local10:int = (_arg5 - _arg3);
var _local11:int = Math.abs((_arg6 - _arg4));
var _local12:int;
var _local13:int = _arg4;
var _local14:int = ((_arg4 < _arg6)) ? 1 : -1;
var _local15:int = _arg3;
var _local16:int = (_arg5 - (_local10 >> 1));
var _local17:int = _arg5;
var _local18:int = _arg6;
var _local19:Rectangle = new Rectangle();
var _local20:int;
_local19.x = 0;
_local19.y = 0;
_local19.width = 0;
_local19.height = 1;
while (_local15++ <= _local16) {
if (_local8){
checkLine(_arg1, _local13, _local15, _arg2, _arg7, _local19);
if (((!((_local17 == _arg5))) && (!((_local17 == _local16))))){
checkLine(_arg1, _local18, (_local17 + 1), _arg2, _arg7, _local19);
};
};
_local12 = (_local12 + _local11);
if ((_local12 << 1) >= _local10){
if (!_local8){
checkLine(_arg1, ((_local15 - _local20) + 1), _local13, _arg2, _arg7, _local19);
if (_local17 != _local16){
checkLine(_arg1, (_local17 + 1), _local18, _arg2, _arg7, _local19);
};
};
_local20 = 0;
_local13 = (_local13 + _local14);
_local18 = (_local18 - _local14);
_local12 = (_local12 - _local10);
};
_local20++;
_local17--;
};
if (!_local8){
checkLine(_arg1, ((_local15 - _local20) + 1), _local13, _arg2, _arg7, _local19);
};
}
}
}//package com.wbwar.chopraider.common
Section 89
//AirBase (com.wbwar.chopraider.game.AirBase)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class AirBase extends HittableGameObject {
public var baseState:int;// = 0
private var planeLaunchTimer:int;// = 0
private var airBaseBitmap:Bitmap;
private var bomberHealth:Number;
private var repairRate:Number;
public var currentBomberCount:int;// = 0
private var bomberLaunchTimer:int;// = 0
private var bomberLaunchTime:Number;
private var healthBar:HealthBar;
private var maxBombers:Number;
private var maxPlanes:Number;
private var planeLaunchTime:Number;
private var planeHealth:Number;
public var bombIndicator:BombIndicator;
public var currentPlaneCount:int;// = 0
private var destroyedSound:Sound;
private var repairTimer:int;// = 0
public function AirBase(_arg1:Space, _arg2:AirBaseBean):void{
airBaseBitmap = (new GameBitmaps.airBaseImage() as Bitmap);
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
repairRate = _arg2.repairRate;
maxPlanes = _arg2.maxPlanes;
planeLaunchTime = _arg2.planeLaunchTime;
maxBombers = _arg2.maxBombers;
bomberLaunchTime = _arg2.bomberLaunchTime;
planeHealth = _arg2.planeHealth;
bomberHealth = _arg2.bomberHealth;
planeLaunchTimer = planeLaunchTime;
bomberLaunchTimer = bomberLaunchTime;
healthBar = new HealthBar(airBaseBitmap.width);
healthBar.x = (-(airBaseBitmap.width) / 2);
healthBar.y = ((airBaseBitmap.height / 2) + 2);
bombIndicator = new BombIndicator();
this.addChild(airBaseBitmap);
this.addChild(healthBar);
this.addChild(bombIndicator);
airBaseBitmap.x = (-(airBaseBitmap.width) / 2);
airBaseBitmap.y = (-(airBaseBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (airBaseBitmap.width / 2));
hitRight = (Number(_arg2.x) + (airBaseBitmap.width / 2));
hitTop = (Number(_arg2.y) - (airBaseBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (airBaseBitmap.height / 2));
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
baseState = 1;
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
}
override public function update():void{
var _local1:Explosion;
var _local2:Plane;
var _local3:Bomber;
if (bombIndicator.visible){
bombIndicator.update();
bombIndicator.visible = false;
};
if (baseState == 0){
if (health <= 0){
if (destroyedSound != null){
destroyedSound.play();
};
_local1 = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 5);
this.space.score = (this.space.score + this.startHealth);
baseState = 1;
this.health = 0;
repairTimer = repairRate;
this.alpha = 0.15;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
} else {
if (currentPlaneCount < maxPlanes){
planeLaunchTimer--;
if (planeLaunchTimer < 0){
planeLaunchTimer = 0;
};
if (planeLaunchTimer == 0){
_local2 = new Plane(this, this.space, this.gamespace_x, this.gamespace_y, 0, planeHealth, 999999, 1, 10);
currentPlaneCount++;
planeLaunchTimer = planeLaunchTime;
};
};
if (currentBomberCount < maxBombers){
bomberLaunchTimer--;
if (bomberLaunchTimer < 0){
bomberLaunchTimer = 0;
};
if (bomberLaunchTimer == 0){
_local3 = new Bomber(this, space, this.gamespace_x, this.gamespace_y, 0, bomberHealth, 999999, 1, 5);
currentBomberCount++;
bomberLaunchTimer = bomberLaunchTime;
};
};
};
};
if ((((baseState == 1)) && ((this.health < this.startHealth)))){
this.health = (this.health + this.repairRate);
if (this.health >= this.startHealth){
this.health = this.startHealth;
baseState = 0;
this.health = this.startHealth;
this.alpha = 1;
};
healthBar.setHealth((this.health / startHealth));
};
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
}
}//package com.wbwar.chopraider.game
Section 90
//App (com.wbwar.chopraider.game.App)
package com.wbwar.chopraider.game {
import flash.events.*;
import com.wbwar.chopraider.common.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.utils.*;
import flash.text.*;
public class App extends Sprite {
private var resultsScreen:ResultsScreen;
private var splashBackgroundBitmap:Bitmap;
private var mainScreen:MainScreen;
private var space:Space;
private var sm:SoundManager;
private var campaignScreen:CampaignScreen;
private var arenaScreen:ArenaScreen;
private var creditsScreen:CreditsScreen;
private var trainingScreen:TrainingScreen;
private var text:TextField;
private var wbwarlogoBitmap:Bitmap;
private var flashScreen:Sprite;
private static var wbwarlogoImage:Class = App_wbwarlogoImage;
public static var GAME_HEIGHT:uint = 500;
private static var splashBackgroundImage:Class = App_splashBackgroundImage;
public static var GAME_WIDTH:uint = 700;
private static var splashswf:Class = App_splashswf;
public function App(){
splashBackgroundBitmap = (new splashBackgroundImage() as Bitmap);
wbwarlogoBitmap = (new wbwarlogoImage() as Bitmap);
super();
}
public function soundLoaded(_arg1:int):void{
}
public function showFlashScreen(_arg1:Boolean):void{
trace(("showflash:" + _arg1));
flashScreen.visible = _arg1;
}
public function init():void{
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
mainScreen = new MainScreen(this);
addChild(mainScreen);
creditsScreen = new CreditsScreen(this);
addChild(creditsScreen);
creditsScreen.visible = false;
trainingScreen = new TrainingScreen(this);
addChild(trainingScreen);
trainingScreen.visible = false;
campaignScreen = new CampaignScreen(this);
addChild(campaignScreen);
campaignScreen.visible = false;
arenaScreen = new ArenaScreen(this);
addChild(arenaScreen);
arenaScreen.visible = false;
resultsScreen = new ResultsScreen(this);
addChild(resultsScreen);
resultsScreen.visible = false;
flashScreen = new Sprite();
flashScreen.graphics.beginFill(0xFFFFFF);
flashScreen.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
flashScreen.graphics.endFill();
flashScreen.visible = false;
}
public function showTrainingScreen():void{
creditsScreen.visible = false;
trainingScreen.visible = true;
campaignScreen.visible = false;
arenaScreen.visible = false;
mainScreen.visible = false;
resultsScreen.visible = false;
}
public function showResultsScreen():void{
campaignScreen.visible = false;
arenaScreen.visible = false;
mainScreen.visible = false;
if (space.remainingTime <= 0){
resultsScreen.reason = 1;
} else {
if (space.endGameState == 2){
resultsScreen.reason = 2;
} else {
resultsScreen.reason = 0;
};
};
resultsScreen.mapName = space.selectedGameMap.mapName;
resultsScreen.skill = space.skill;
resultsScreen.missionName = space.selectedGameMap.title;
resultsScreen.score = space.score;
resultsScreen.timeLeft = int((space.remainingTime / 1000));
resultsScreen.shipDeaths = space.shipDeaths;
resultsScreen.bulletsFired = space.bulletsFired;
resultsScreen.bulletsHit = space.bulletsHit;
resultsScreen.bombsDropped = space.bombsDropped;
resultsScreen.bombsHit = space.bombsHit;
resultsScreen.victoryState = space.victoryState;
resultsScreen.refreshDisplays();
resultsScreen.visible = true;
if (space != null){
space.visible = false;
space = null;
};
}
public function createGame(_arg1:GameMap, _arg2:int):void{
campaignScreen.visible = false;
arenaScreen.visible = false;
trainingScreen.visible = false;
mainScreen.visible = false;
if (space != null){
removeChild(space);
removeChild(flashScreen);
};
space = new Space(this, _arg1, _arg2);
addChild(space);
addChild(flashScreen);
space.init();
}
public function showArenaScreen():void{
creditsScreen.visible = false;
campaignScreen.visible = false;
arenaScreen.visible = true;
mainScreen.visible = false;
resultsScreen.visible = false;
}
public function onEnterFrame(_arg1:Event):void{
if (space != null){
space.update();
};
}
public function firstInit():void{
sm = new SoundManager(this);
}
public function splashTimerHandler(_arg1:TimerEvent):void{
init();
}
public function soundsLoaded():void{
showSplash();
}
public function showCreditsScreen():void{
creditsScreen.visible = true;
campaignScreen.visible = false;
arenaScreen.visible = false;
mainScreen.visible = false;
resultsScreen.visible = false;
}
private function showSplash():void{
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
this.addChild(splashBackgroundBitmap);
splashBackgroundBitmap.x = ((App.GAME_WIDTH / 2) - (splashBackgroundBitmap.width / 2));
splashBackgroundBitmap.y = ((App.GAME_HEIGHT / 2) - (splashBackgroundBitmap.height / 2));
var wbwarLogo:ImageButton = new ImageButton(wbwarlogoBitmap, 1.02);
addChild(wbwarLogo);
wbwarLogo.x = ((App.GAME_WIDTH / 2) - (wbwarLogo.width / 2));
wbwarLogo.y = 100;
wbwarLogo.addEventListener(ImageButton.CLICKED, function (_arg1:Event):void{
wbwar.wbwarClick("splash");
});
var splash:MovieClip = new splashswf();
addChild(splash);
splash.x = ((App.GAME_WIDTH / 2) - (splash.width / 2));
splash.y = ((App.GAME_HEIGHT / 2) - (splash.height / 2));
var timer:Timer = new Timer(5500, 1);
timer.addEventListener("timer", splashTimerHandler);
timer.start();
}
public function showCampaignScreen():void{
creditsScreen.visible = false;
campaignScreen.update();
campaignScreen.visible = true;
arenaScreen.visible = false;
mainScreen.visible = false;
resultsScreen.visible = false;
}
public function showMainScreen():void{
if (space != null){
space.visible = false;
space = null;
};
creditsScreen.visible = false;
campaignScreen.visible = false;
arenaScreen.visible = false;
trainingScreen.visible = false;
mainScreen.visible = true;
resultsScreen.visible = false;
}
}
}//package com.wbwar.chopraider.game
Section 91
//App_splashBackgroundImage (com.wbwar.chopraider.game.App_splashBackgroundImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class App_splashBackgroundImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 92
//App_splashswf (com.wbwar.chopraider.game.App_splashswf)
package com.wbwar.chopraider.game {
import mx.core.*;
import flash.utils.*;
public class App_splashswf extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function App_splashswf(){
dataClass = App_splashswf_dataClass;
super();
initialWidth = (9100 / 20);
initialHeight = (1800 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package com.wbwar.chopraider.game
Section 93
//App_splashswf_dataClass (com.wbwar.chopraider.game.App_splashswf_dataClass)
package com.wbwar.chopraider.game {
import mx.core.*;
public class App_splashswf_dataClass extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 94
//App_wbwarlogoImage (com.wbwar.chopraider.game.App_wbwarlogoImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class App_wbwarlogoImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 95
//ArenaScreen (com.wbwar.chopraider.game.ArenaScreen)
package com.wbwar.chopraider.game {
import flash.events.*;
import com.wbwar.chopraider.common.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
public class ArenaScreen extends Sprite {
private var app:App;
private var backBitmap:Bitmap;
private var missionSelectionBitmap:Bitmap;
private var skillSelection:SkillSelection;
private var bbNewMissionsBitmap:Bitmap;
private static var mission1:Class = ArenaScreen_mission1;
private static var mission2:Class = ArenaScreen_mission2;
private static var mission3:Class = ArenaScreen_mission3;
private static var missionSelectionImage:Class = ArenaScreen_missionSelectionImage;
private static var backImage:Class = ArenaScreen_backImage;
private static var bbNewMissionsImage:Class = ArenaScreen_bbNewMissionsImage;
public function ArenaScreen(_arg1:App):void{
var app = _arg1;
missionSelectionBitmap = (new missionSelectionImage() as Bitmap);
backBitmap = (new backImage() as Bitmap);
bbNewMissionsBitmap = (new bbNewMissionsImage() as Bitmap);
skillSelection = new SkillSelection();
super();
this.app = app;
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
addChild(missionSelectionBitmap);
missionSelectionBitmap.x = ((App.GAME_WIDTH / 2) - (missionSelectionBitmap.width / 2));
missionSelectionBitmap.y = 20;
var bbNewMissionsButton:ImageButton = new ImageButton(bbNewMissionsBitmap, 1.05);
bbNewMissionsButton.x = ((App.GAME_WIDTH / 2) - (bbNewMissionsButton.width / 2));
bbNewMissionsButton.y = 260;
bbNewMissionsButton.addEventListener(ImageButton.CLICKED, function (_arg1:Event):void{
wbwar.bubbleBoxClick("arenascreen", true);
});
addChild(bbNewMissionsButton);
var backButton:ImageButton = new ImageButton(backBitmap);
addChild(backButton);
backButton.x = 10;
backButton.y = 10;
backButton.addEventListener(ImageButton.CLICKED, backButtonClicked);
addChild(skillSelection);
skillSelection.x = 580;
skillSelection.y = 5;
var gameMap:GameMap = new GameMap();
gameMap.parseXML("arena1", new mission1());
var tn1:Bitmap = gameMap.generateThumbNail(150, 150);
var n1:TextDisplay = new TextDisplay();
n1.setText("1");
var t1:TextDisplay = new TextDisplay();
t1.setText(gameMap.title.toUpperCase());
gameMap.parseXML("arena2", new mission2());
var tn2:Bitmap = gameMap.generateThumbNail(150, 150);
var n2:TextDisplay = new TextDisplay();
n2.setText("2");
var t2:TextDisplay = new TextDisplay();
t2.setText(gameMap.title.toUpperCase());
gameMap.parseXML("arena3", new mission3());
var tn3:Bitmap = gameMap.generateThumbNail(150, 150);
var n3:TextDisplay = new TextDisplay();
n3.setText("3");
var t3:TextDisplay = new TextDisplay();
t3.setText(gameMap.title.toUpperCase());
var mission1Bitmap:Bitmap = tn1;
var mission2Bitmap:Bitmap = tn2;
var mission3Bitmap:Bitmap = tn3;
var x1:Number = 15;
var x2:Number = ((x1 + 150) + 18);
var x3:Number = ((x2 + 150) + 18);
var x4:Number = ((x3 + 150) + 18);
var y1:Number = 100;
var y2:Number = 300;
var mission1Button:ImageButton = new ImageButton(mission1Bitmap);
mission1Button.x = x1;
mission1Button.y = y1;
n1.x = (mission1Button.x + 2);
n1.y = (mission1Button.y + 2);
t1.x = ((mission1Button.x + (mission1Button.width / 2)) - (t1.width / 2));
t1.y = (y1 + 120);
mission1Button.addEventListener(ImageButton.CLICKED, mission1ButtonClicked);
addChild(mission1Button);
addChild(n1);
addChild(t1);
var mission2Button:ImageButton = new ImageButton(mission2Bitmap);
mission2Button.x = x2;
mission2Button.y = y1;
n2.x = (mission2Button.x + 2);
n2.y = (mission2Button.y + 2);
t2.x = ((mission2Button.x + (mission2Button.width / 2)) - (t2.width / 2));
t2.y = (y1 + 120);
mission2Button.addEventListener(ImageButton.CLICKED, mission2ButtonClicked);
addChild(mission2Button);
addChild(n2);
addChild(t2);
var mission3Button:ImageButton = new ImageButton(mission3Bitmap);
mission3Button.x = x3;
mission3Button.y = y1;
n3.x = (mission3Button.x + 2);
n3.y = (mission3Button.y + 2);
t3.x = ((mission3Button.x + (mission3Button.width / 2)) - (t3.width / 2));
t3.y = (y1 + 120);
mission3Button.addEventListener(ImageButton.CLICKED, mission3ButtonClicked);
addChild(mission3Button);
addChild(n3);
addChild(t3);
}
private function mission2ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "36b5e40e");
var _local2:GameMap = new GameMap();
_local2.parseXML("arena2", new mission2());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function backButtonClicked(_arg1:ButtonEvent):void{
app.showMainScreen();
}
private function mission1ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "0d689c25");
var _local2:GameMap = new GameMap();
_local2.parseXML("arena1", new mission1());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission3ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "9ef209b1");
var _local2:GameMap = new GameMap();
_local2.parseXML("arena3", new mission3());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
}
}//package com.wbwar.chopraider.game
Section 96
//ArenaScreen_backImage (com.wbwar.chopraider.game.ArenaScreen_backImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ArenaScreen_backImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 97
//ArenaScreen_bbNewMissionsImage (com.wbwar.chopraider.game.ArenaScreen_bbNewMissionsImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ArenaScreen_bbNewMissionsImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 98
//ArenaScreen_mission1 (com.wbwar.chopraider.game.ArenaScreen_mission1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ArenaScreen_mission1 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 99
//ArenaScreen_mission2 (com.wbwar.chopraider.game.ArenaScreen_mission2)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ArenaScreen_mission2 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 100
//ArenaScreen_mission3 (com.wbwar.chopraider.game.ArenaScreen_mission3)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ArenaScreen_mission3 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 101
//ArenaScreen_missionSelectionImage (com.wbwar.chopraider.game.ArenaScreen_missionSelectionImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ArenaScreen_missionSelectionImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 102
//Beacon (com.wbwar.chopraider.game.Beacon)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
public class Beacon extends GameObject {
private const MISSILES_TO_FIRE:int = 100;
private const COUNT_DOWN:int = 100;
private var firedCount:int;
private var speed:Number;// = 10
private var state:int;
private var beaconBitmap:Bitmap;
private var beaconSoundChannel:SoundChannel;
private var deltaX:Number;
private var deltaY:Number;
private var countDown:int;
private var beaconSound:Sound;
private var age:uint;// = 0
private static const timeToHit:uint = 25;
private static var beaconImage:Class = Beacon_beaconImage;
public function Beacon(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
beaconBitmap = (new beaconImage() as Bitmap);
super(_arg1, _arg4, _arg5);
_arg1.layerEffectsUpperGround.addGameObject(this);
this.addChild(beaconBitmap);
beaconBitmap.x = (-(beaconBitmap.width) / 2);
beaconBitmap.y = (-(beaconBitmap.height) / 2);
this.gamespace_x = _arg4;
this.gamespace_y = _arg5;
this.deltaX = _arg2;
this.deltaY = _arg3;
this.rotation = _arg6;
var _local7:Number = Math.sqrt(((deltaX * deltaX) + (deltaY * deltaY)));
beaconSound = SoundManager.instance.getSound("beacon");
}
override public function update():void{
age++;
if (state == 0){
if (age > timeToHit){
if (beaconSoundChannel == null){
beaconSoundChannel = beaconSound.play(0, 999999, soundTransform);
};
state = 1;
} else {
this.gamespace_x = (this.gamespace_x + this.deltaX);
this.gamespace_y = (this.gamespace_y + this.deltaY);
beaconBitmap.scaleX = (1 - ((age / timeToHit) * 0.5));
beaconBitmap.scaleY = (1 - ((age / timeToHit) * 0.5));
};
} else {
if (state == 1){
countDown++;
if (countDown > COUNT_DOWN){
state = 2;
};
} else {
if (state == 2){
if (beaconSoundChannel != null){
beaconSoundChannel.stop();
};
if ((age % 5) == 0){
space.carrier.fireMissile(((gamespace_x + (Math.random() * 400)) - 200), ((gamespace_y + (Math.random() * 400)) - 200));
firedCount++;
};
if (firedCount > MISSILES_TO_FIRE){
space.layerEffectsUpperGround.removeGameObject(this);
};
};
};
};
}
}
}//package com.wbwar.chopraider.game
Section 103
//Beacon_beaconImage (com.wbwar.chopraider.game.Beacon_beaconImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Beacon_beaconImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 104
//Boat (com.wbwar.chopraider.game.Boat)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Boat extends HittableGameObject {
private const speed:Number = 2;
private const boatTurnRate:Number = 6;
private var lastCellX:int;
private var lastCellY:int;
private var range:Number;
private var age:uint;// = 0
private var boatBitmap:Bitmap;
private var rangeSquare:Number;
private var shipYard:ShipYard;
private var damageAmt:Number;
private var boatExplosionSound:Sound;
private var recharge:Number;
private var targetCellX:int;
private var targetCellY:int;
private var targetX:Number;
private var targetY:Number;
private var firedTimer:Number;// = 0
private var carrierDeltaX:Number;
private var carrierDeltaY:Number;
private var maxAge:uint;
private var shipDeltaX:Number;
private var shipDeltaY:Number;
private static var boatImage:Class = Boat_boatImage;
public function Boat(_arg1:ShipYard, _arg2:Space, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number){
boatBitmap = (new boatImage() as Bitmap);
super(_arg2, _arg3, _arg4, _arg6);
this.maxAge = _arg7;
this.damageAmt = _arg8;
_arg2.layerGround.addGameObject(this);
this.shipYard = _arg1;
this.range = _arg9;
this.rangeSquare = (_arg9 * _arg9);
this.recharge = _arg10;
this.addChild(boatBitmap);
boatBitmap.x = (-(boatBitmap.width) / 2);
boatBitmap.y = (-(boatBitmap.height) / 2);
this.gamespace_x = _arg3;
this.gamespace_y = _arg4;
this.rotation = _arg5;
boatExplosionSound = SoundManager.instance.getSound("destroyed2");
var _local11:int = (this.gamespace_x / GameMap.cellWidth);
var _local12:int = (this.gamespace_y / GameMap.cellHeight);
this.lastCellX = _local11;
this.lastCellY = _local12;
pickNewTarget();
}
private function pickNewTarget():void{
var _local1:int;
var _local2:Point;
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:*;
var _local3:Number = this.rotation;
var _local4:Number = ((Math.random() * 5) + 5);
if (Math.random() < 0.5){
_local4 = -20;
};
var _local5:int;
do {
_local2 = getRotProjection(20, _local3);
_local6 = Math.abs((_local2.x - this.space.carrier.gamespace_x));
_local7 = Math.abs((_local2.y - this.space.carrier.gamespace_y));
} while (!((((_local6 < 250)) && ((_local7 < 250)))));
this.targetX = _local2.x;
this.targetY = _local2.y;
}
override public function update():void{
var _local3:Point;
if ((((health <= 0)) || ((shipYard.baseState == 1)))){
space.layerGround.removeGameObject(this);
boatExplosionSound.play();
new Explosion(space, this.gamespace_x, this.gamespace_y, false, 15);
this.space.score = (this.space.score + this.startHealth);
this.shipYard.currentBoatCount--;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
return;
};
if (age > maxAge){
};
age++;
firedTimer--;
if (firedTimer < 0){
firedTimer = 0;
};
if ((((Math.abs((targetX - this.gamespace_x)) < 3)) && ((Math.abs((targetY - this.gamespace_y)) < 3)))){
pickNewTarget();
};
rotation = getTurn(targetX, targetY, boatTurnRate);
var _local1:Number = 0;
var _local2:Number = 0;
if (Math.abs(this.update_diff) < 45){
_local1 = (speed * Math.sin(((rotation / 180) * Math.PI)));
_local2 = (speed * Math.cos(((rotation / 180) * Math.PI)));
if ((age % 10) == 0){
_local3 = this.getProjection(20, 180);
new Wake(space, _local3.x, _local3.y, this.rotation, 0.1, 0.25, 20);
};
};
this.gamespace_x = (this.gamespace_x + _local2);
this.gamespace_y = (this.gamespace_y + _local1);
shipDeltaX = (this.gamespace_x - this.space.ship.gamespace_x);
shipDeltaY = (this.gamespace_y - this.space.ship.gamespace_y);
if ((((((((((this.space.ship.shipState < 4)) && (!((this.space.ship.shipState == 0))))) && ((Math.abs(shipDeltaX) < range)))) && ((Math.abs(shipDeltaY) < range)))) && ((firedTimer == 0)))){
if (((shipDeltaX * shipDeltaX) + (shipDeltaY * shipDeltaY)) < rangeSquare){
fireWeapon();
firedTimer = recharge;
};
};
carrierDeltaX = Math.abs((this.gamespace_x - this.space.carrier.gamespace_x));
carrierDeltaY = Math.abs((this.gamespace_y - this.space.carrier.gamespace_y));
if ((((carrierDeltaX < 180)) && ((carrierDeltaY < 180)))){
};
this.hitLeft = (gamespace_x - (boatBitmap.width / 2));
this.hitRight = (gamespace_x + (boatBitmap.width / 2));
this.hitTop = (gamespace_y - (boatBitmap.height / 2));
this.hitBottom = (gamespace_y + (boatBitmap.height / 2));
}
private function fireWeapon():void{
new Bullet(space, 0, 0, this.gamespace_x, this.gamespace_y, this.space.ship.gamespace_x, this.space.ship.gamespace_y, damageAmt, true, true);
}
private function evaluateLoc(_arg1:int, _arg2:int):Boolean{
var _local3:int;
if ((((((((_arg1 >= 1)) && ((_arg2 >= 1)))) && ((_arg1 < (space.selectedGameMap.mapDataWidth - 1))))) && ((_arg2 < (space.selectedGameMap.mapDataHeight - 1))))){
_local3 = space.selectedGameMap.mapData[_arg2][_arg1];
if (_local3 == 0){
return (true);
};
};
return (false);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
}
}
}//package com.wbwar.chopraider.game
Section 105
//Boat_boatImage (com.wbwar.chopraider.game.Boat_boatImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Boat_boatImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 106
//Bomb (com.wbwar.chopraider.game.Bomb)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
public class Bomb extends GameObject {
private var deltaX:Number;
private var deltaY:Number;
private var hitSound:Sound;
private var bombRedBitmap:Bitmap;
public var enemy:Boolean;
private var speed:Number;// = 10
private var bombBlueBitmap:Bitmap;
private var age:uint;// = 0
private static const timeToHit:uint = 25;
private static var bombRedImage:Class = Bomb_bombRedImage;
private static var bombBlueImage:Class = Bomb_bombBlueImage;
public function Bomb(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
bombBlueBitmap = (new bombBlueImage() as Bitmap);
bombRedBitmap = (new bombRedImage() as Bitmap);
super(_arg1, _arg4, _arg5);
this.enemy = _arg7;
_arg1.layerEffectsUpperGround.addGameObject(this);
if (!_arg7){
this.addChild(bombBlueBitmap);
bombBlueBitmap.x = (-(bombBlueBitmap.width) / 2);
bombBlueBitmap.y = (-(bombBlueBitmap.height) / 2);
} else {
this.addChild(bombRedBitmap);
bombRedBitmap.x = (-(bombRedBitmap.width) / 2);
bombRedBitmap.y = (-(bombRedBitmap.height) / 2);
};
this.gamespace_x = _arg4;
this.gamespace_y = _arg5;
this.deltaX = _arg2;
this.deltaY = _arg3;
this.rotation = _arg6;
var _local8:Number = Math.sqrt(((deltaX * deltaX) + (deltaY * deltaY)));
hitSound = SoundManager.instance.getSound("bombexplosion");
}
override public function update():void{
var _local1:HittableGameObject;
var _local2:int;
age++;
if (age > timeToHit){
space.layerEffectsUpperGround.removeGameObject(this);
if (enemy){
new RadialExplosion(space, this.gamespace_x, this.gamespace_y, true);
} else {
new RadialExplosion(space, this.gamespace_x, this.gamespace_y, false);
};
hitSound.play();
_local2 = 0;
while (_local2 < space.layerGround.numChildren) {
_local1 = (space.layerGround.getChildAt(_local2) as HittableGameObject);
if (enemy){
if ((_local1 is Carrier)){
if (_local1.hitTest(this.gamespace_x, this.gamespace_y)){
_local1.damage(50);
return;
};
};
} else {
if (_local1.hitTest(this.gamespace_x, this.gamespace_y)){
_local1.damage(50);
space.bombsHit++;
return;
};
};
_local2++;
};
} else {
this.gamespace_x = (this.gamespace_x + this.deltaX);
this.gamespace_y = (this.gamespace_y + this.deltaY);
this.scaleX = (1 - ((age / timeToHit) * 0.5));
this.scaleY = (1 - ((age / timeToHit) * 0.5));
};
}
}
}//package com.wbwar.chopraider.game
Section 107
//Bomb_bombBlueImage (com.wbwar.chopraider.game.Bomb_bombBlueImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bomb_bombBlueImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 108
//Bomb_bombRedImage (com.wbwar.chopraider.game.Bomb_bombRedImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bomb_bombRedImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 109
//BombBar (com.wbwar.chopraider.game.BombBar)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.text.*;
public class BombBar extends Sprite {
private var barHeight:int;
private var border:Boolean;
private var text:TextField;
private var barWidth:int;
private var maxBombs:int;
private var images:Array;
private static var sourceImage:Class = BombBar_sourceImage;
public function BombBar(_arg1:int){
var _local2:Bitmap;
var _local5:int;
images = new Array();
text = new TextField();
super();
this.barWidth = barWidth;
this.barHeight = barHeight;
this.border = border;
this.maxBombs = _arg1;
var _local3:int;
while (_local3 < _arg1) {
_local2 = (new sourceImage() as Bitmap);
images.push(_local2);
this.addChild(_local2);
_local5 = (_local3 / 10);
_local2.x = ((_local3 - (_local5 * 10)) * (_local2.width + 2));
_local2.y = (_local5 * (_local2.height + 2));
_local3++;
};
var _local4:TextFormat = new TextFormat();
_local4.font = "wbfont";
_local4.color = 0xA00000;
_local4.size = 14;
_local4.bold = true;
text.background = false;
text.border = false;
text.embedFonts = true;
text.defaultTextFormat = _local4;
text.autoSize = TextFieldAutoSize.LEFT;
text.text = "EMPTY!";
addChild(text);
text.visible = false;
text.x = 15;
text.y = -5;
}
public function setBombCount(_arg1:int):void{
if (_arg1 == 0){
text.visible = true;
} else {
text.visible = false;
};
var _local2:int;
while (_local2 < this.maxBombs) {
if (_local2 >= _arg1){
(images[_local2] as Bitmap).visible = false;
} else {
(images[_local2] as Bitmap).visible = true;
};
_local2++;
};
}
}
}//package com.wbwar.chopraider.game
Section 110
//BombBar_sourceImage (com.wbwar.chopraider.game.BombBar_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class BombBar_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 111
//Bomber (com.wbwar.chopraider.game.Bomber)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Bomber extends HittableGameObject {
private var bomberExplosionSound:Sound;
private var airBase:AirBase;
private var tcarrier:Boolean;// = true
private var speed:Number;
private var bombCount:int;
private var startBombCount:int;// = 50
private var bomberDamage:Number;
private var flyStraightDistance:Number;// = 1250
private var bomberFlySound:Sound;
private var targetX:Number;
private var targetY:Number;
private var sourceBitmap:Bitmap;
private var recharge:Number;// = 15
private var flyingStraight:Boolean;// = false
private var rangeFromAirBaseSquare:Number;
private var rangeFromAirBase:Number;// = 3000
private var firedTimer:int;// = 0
private var bomberFlySoundChannel:SoundChannel;
private var maxAge:uint;
private var turnRate:Number;// = 2
private var age:uint;// = 0
private static var sourceImage:Class = Bomber_sourceImage;
public function Bomber(_arg1:AirBase, _arg2:Space, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
sourceBitmap = (new sourceImage() as Bitmap);
rangeFromAirBaseSquare = (rangeFromAirBase * rangeFromAirBase);
bombCount = startBombCount;
super(_arg2, _arg3, _arg4, _arg6);
this.airBase = _arg1;
this.maxAge = _arg7;
this.bomberDamage = _arg8;
this.speed = _arg9;
_arg2.layerAir.addGameObject(this);
this.addChild(sourceBitmap);
sourceBitmap.x = (-(sourceBitmap.width) / 2);
sourceBitmap.y = (-(sourceBitmap.height) / 2);
this.gamespace_x = _arg3;
this.gamespace_y = _arg4;
this.rotation = _arg5;
bomberExplosionSound = SoundManager.instance.getSound("destroyed3");
}
override public function update():void{
var _local9:Point;
if ((((health <= 0)) || ((airBase.baseState == 1)))){
space.layerAir.removeGameObject(this);
bomberExplosionSound.play();
new Explosion(space, this.gamespace_x, this.gamespace_y, false, 15);
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10, 0);
this.space.score = (this.space.score + this.startHealth);
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
this.airBase.currentBomberCount--;
return;
};
if (age > maxAge){
};
age++;
if (bombCount == 0){
targetX = this.airBase.gamespace_x;
targetY = this.airBase.gamespace_y;
} else {
if (tcarrier){
_local9 = this.space.carrier.getProjection(0, 0);
targetX = _local9.x;
targetY = _local9.y;
};
};
var _local1:Number = Math.abs((targetX - this.gamespace_x));
var _local2:Number = Math.abs((targetY - this.gamespace_y));
if ((((_local1 < 20)) && ((_local2 < 20)))){
if (bombCount == 0){
if ((((Math.abs((airBase.gamespace_x - gamespace_x)) < 20)) && ((Math.abs((airBase.gamespace_y - gamespace_y)) < 20)))){
bombCount = startBombCount;
flyingStraight = true;
};
};
if (flyingStraight){
flyingStraight = false;
tcarrier = true;
} else {
flyingStraight = true;
tcarrier = false;
_local9 = this.getProjection(flyStraightDistance, 0);
targetX = _local9.x;
targetY = _local9.y;
};
};
var _local3:Number = (this.gamespace_x - this.airBase.gamespace_x);
var _local4:Number = (this.gamespace_y - this.airBase.gamespace_y);
if (((!(flyingStraight)) && ((((_local3 * _local3) + (_local4 * _local4)) > rangeFromAirBaseSquare)))){
targetX = this.airBase.gamespace_x;
targetY = this.airBase.gamespace_y;
};
rotation = getTurn(targetX, targetY, turnRate);
var _local5:Number = (speed * Math.sin(((rotation / 180) * Math.PI)));
var _local6:Number = (speed * Math.cos(((rotation / 180) * Math.PI)));
this.gamespace_x = (this.gamespace_x + _local6);
this.gamespace_y = (this.gamespace_y + _local5);
var _local7:Number = Math.abs((this.space.carrier.gamespace_x - this.gamespace_x));
var _local8:Number = Math.abs((this.space.carrier.gamespace_y - this.gamespace_y));
if ((((((((_local7 < 250)) && ((_local8 < 250)))) && ((firedTimer == 0)))) && ((bombCount > 0)))){
bombCount--;
new Bomb(space, (_local6 * 0.5), (_local5 * 0.5), this.gamespace_x, this.gamespace_y, this.rotation, true);
firedTimer = recharge;
};
firedTimer--;
if (firedTimer < 0){
firedTimer = 0;
};
if ((age % 2) == 0){
new Smoke(space, this.gamespace_x, this.gamespace_y);
};
}
override public function hitTest(_arg1:Number, _arg2:Number):Boolean{
var _local3:Point;
this.hitLeft = (gamespace_x - 27);
this.hitRight = (gamespace_x + 27);
this.hitTop = (gamespace_y - 27);
this.hitBottom = (gamespace_y + 27);
if (super.hitTest(_arg1, _arg2)){
return (true);
};
_local3 = getProjection(50, 92);
this.hitLeft = (_local3.x - 15);
this.hitRight = (_local3.x + 15);
this.hitTop = (_local3.y - 15);
this.hitBottom = (_local3.y + 15);
if (super.hitTest(_arg1, _arg2)){
return (true);
};
_local3 = getProjection(50, -92);
this.hitLeft = (_local3.x - 15);
this.hitRight = (_local3.x + 15);
this.hitTop = (_local3.y - 15);
this.hitBottom = (_local3.y + 15);
if (super.hitTest(_arg1, _arg2)){
return (true);
};
return (false);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
}
}
}//package com.wbwar.chopraider.game
Section 112
//Bomber_sourceImage (com.wbwar.chopraider.game.Bomber_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bomber_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 113
//BombIndicator (com.wbwar.chopraider.game.BombIndicator)
package com.wbwar.chopraider.game {
import flash.display.*;
public class BombIndicator extends Sprite {
private const minScale:Number = 0.7;
private var bombBitmap:Bitmap;
private var scaleDelta:Number;// = 0.05
private static var bombImage:Class = BombIndicator_bombImage;
public function BombIndicator(){
bombBitmap = (new bombImage() as Bitmap);
super();
addChild(bombBitmap);
bombBitmap.x = (-(bombBitmap.width) / 2);
bombBitmap.y = (-(bombBitmap.height) / 2);
}
public function update():void{
if (scaleX >= 1){
scaleDelta = -(scaleDelta);
} else {
if (scaleX <= minScale){
scaleDelta = -(scaleDelta);
};
};
this.scaleX = (this.scaleX + scaleDelta);
this.scaleY = (this.scaleY + scaleDelta);
}
}
}//package com.wbwar.chopraider.game
Section 114
//BombIndicator_bombImage (com.wbwar.chopraider.game.BombIndicator_bombImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class BombIndicator_bombImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 115
//Bullet (com.wbwar.chopraider.game.Bullet)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
public class Bullet extends GameObject {
private var redBitmap:Bitmap;
private var deltaY:Number;
private var targetY:Number;
private var blueBitmap:Bitmap;
private var targetX:Number;
private var deltaX:Number;
private var speed:Number;// = 10
public var enemy:Boolean;
private var damageAmt:Number;// = 1
private var hitSound:Sound;
private var age:uint;// = 0
private static const maxAge:uint = 35;
private static var blueImage:Class = Bullet_blueImage;
private static var redSmallImage:Class = Bullet_redSmallImage;
private static var redImage:Class = Bullet_redImage;
private static var blueSmallImage:Class = Bullet_blueSmallImage;
public function Bullet(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int, _arg7:int, _arg8:Number, _arg9:Boolean, _arg10:Boolean, _arg11:Number=10){
super(_arg1, _arg4, _arg5);
this.speed = _arg11;
this.enemy = _arg9;
this.damageAmt = _arg8;
_arg1.layerEffectsLowerShip.addGameObject(this);
if (_arg9){
if (_arg10){
redBitmap = (new redSmallImage() as Bitmap);
} else {
redBitmap = (new redImage() as Bitmap);
};
this.addChild(redBitmap);
redBitmap.x = (-(redBitmap.width) / 2);
redBitmap.y = (-(redBitmap.height) / 2);
} else {
if (_arg10){
blueBitmap = (new blueSmallImage() as Bitmap);
} else {
blueBitmap = (new blueImage() as Bitmap);
};
this.addChild(blueBitmap);
blueBitmap.x = (-(blueBitmap.width) / 2);
blueBitmap.y = (-(blueBitmap.height) / 2);
};
this.gamespace_x = _arg4;
this.gamespace_y = _arg5;
this.targetX = _arg6;
this.targetY = _arg7;
this.deltaX = (_arg6 - _arg4);
this.deltaY = (_arg7 - _arg5);
this.rotation = ((Math.atan2(deltaY, deltaX) * 180) / Math.PI);
var _local12:Number = Math.sqrt(((deltaX * deltaX) + (deltaY * deltaY)));
this.deltaX = (this.deltaX / _local12);
this.deltaY = (this.deltaY / _local12);
this.deltaX = (this.deltaX * _arg11);
this.deltaY = (this.deltaY * _arg11);
this.deltaX = (this.deltaX + _arg2);
this.deltaY = (this.deltaY + _arg3);
hitSound = SoundManager.instance.getSound("hit");
}
override public function update():void{
var _local1:HittableGameObject;
var _local2:uint;
age++;
if (age > maxAge){
space.layerEffectsLowerShip.removeGameObject(this);
} else {
this.gamespace_x = (this.gamespace_x + this.deltaX);
this.gamespace_y = (this.gamespace_y + this.deltaY);
if (!enemy){
_local2 = 0;
while (_local2 < space.layerAir.numChildren) {
_local1 = (space.layerAir.getChildAt(_local2) as HittableGameObject);
if (_local1.hitTest(this.gamespace_x, this.gamespace_y)){
_local1.damage(damageAmt);
space.layerEffectsLowerShip.removeGameObject(this);
if ((_local1 is Missile)){
new Explosion(space, this.gamespace_x, this.gamespace_y, true, 3);
} else {
new Explosion(space, this.gamespace_x, this.gamespace_y, true, 4);
};
hitSound.play();
space.bulletsHit++;
return;
};
_local2++;
};
_local2 = 0;
while (_local2 < space.layerGround.numChildren) {
_local1 = (space.layerGround.getChildAt(_local2) as HittableGameObject);
if ((((((((((((((((((_local1 is Carrier)) || ((_local1 is Factory)))) || ((_local1 is AirBase)))) || ((_local1 is TankBase)))) || ((_local1 is ShipYard)))) || ((_local1 is PowCamp)))) || ((_local1 is PowerPlant)))) || ((_local1 is Prisoner)))) || ((_local1 is RoadBlock)))){
} else {
if (_local1.hitTest(this.gamespace_x, this.gamespace_y)){
_local1.damage(damageAmt);
space.layerEffectsLowerShip.removeGameObject(this);
new Explosion(space, this.gamespace_x, this.gamespace_y, true, 4);
hitSound.play();
space.bulletsHit++;
return;
};
};
_local2++;
};
} else {
if ((((space.ship.shipState < 4)) && (space.ship.hitTest(this.gamespace_x, this.gamespace_y)))){
space.ship.damage(damageAmt);
if (Math.random() < 0.5){
space.ship.rotation = (space.ship.rotation + 5);
} else {
space.ship.rotation = (space.ship.rotation - 5);
};
space.layerEffectsLowerShip.removeGameObject(this);
new Explosion(space, this.gamespace_x, this.gamespace_y, false, 10);
hitSound.play();
};
};
};
}
}
}//package com.wbwar.chopraider.game
Section 116
//Bullet_blueImage (com.wbwar.chopraider.game.Bullet_blueImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bullet_blueImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 117
//Bullet_blueSmallImage (com.wbwar.chopraider.game.Bullet_blueSmallImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bullet_blueSmallImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 118
//Bullet_redImage (com.wbwar.chopraider.game.Bullet_redImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bullet_redImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 119
//Bullet_redSmallImage (com.wbwar.chopraider.game.Bullet_redSmallImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Bullet_redSmallImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 120
//CampaignScreen (com.wbwar.chopraider.game.CampaignScreen)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.net.*;
public class CampaignScreen extends Sprite {
private var mission4Button:ImageButton;
private var mission6Button:ImageButton;
private var backBitmap:Bitmap;
private var skillSelection:SkillSelection;
private var mission2Locked:LockedMap;
private var mission3Locked:LockedMap;
private var mission4Locked:LockedMap;
private var mission5Locked:LockedMap;
private var mission6Locked:LockedMap;
private var mission7Locked:LockedMap;
private var mission8Locked:LockedMap;
private var app:App;
private var missionSelectionBitmap:Bitmap;
private var mission1Button:ImageButton;
private var mission2Button:ImageButton;
private var mission3Button:ImageButton;
private var mission5Button:ImageButton;
private var mission7Button:ImageButton;
private var mission8Button:ImageButton;
private static var mission1:Class = CampaignScreen_mission1;
private static var mission2:Class = CampaignScreen_mission2;
private static var mission3:Class = CampaignScreen_mission3;
private static var mission5:Class = CampaignScreen_mission5;
private static var mission7:Class = CampaignScreen_mission7;
private static var mission4:Class = CampaignScreen_mission4;
private static var mission6:Class = CampaignScreen_mission6;
private static var mission8:Class = CampaignScreen_mission8;
private static var backImage:Class = CampaignScreen_backImage;
private static var missionSelectionImage:Class = CampaignScreen_missionSelectionImage;
public function CampaignScreen(_arg1:App):void{
missionSelectionBitmap = (new missionSelectionImage() as Bitmap);
backBitmap = (new backImage() as Bitmap);
skillSelection = new SkillSelection();
mission2Locked = new LockedMap();
mission3Locked = new LockedMap();
mission4Locked = new LockedMap();
mission5Locked = new LockedMap();
mission6Locked = new LockedMap();
mission7Locked = new LockedMap();
mission8Locked = new LockedMap();
super();
this.app = _arg1;
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
addChild(missionSelectionBitmap);
missionSelectionBitmap.x = ((App.GAME_WIDTH / 2) - (missionSelectionBitmap.width / 2));
missionSelectionBitmap.y = 20;
var _local2:ImageButton = new ImageButton(backBitmap);
addChild(_local2);
_local2.x = 10;
_local2.y = 10;
_local2.addEventListener(ImageButton.CLICKED, backButtonClicked);
addChild(skillSelection);
skillSelection.x = 580;
skillSelection.y = 5;
var _local3:GameMap = new GameMap();
_local3.parseXML("campaign1", new mission1());
var _local4:Bitmap = _local3.generateThumbNail(150, 150);
var _local5:TextDisplay = new TextDisplay();
_local5.setText("1");
var _local6:TextDisplay = new TextDisplay();
_local6.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign2", new mission2());
var _local7:Bitmap = _local3.generateThumbNail(150, 150);
var _local8:TextDisplay = new TextDisplay();
_local8.setText("2");
var _local9:TextDisplay = new TextDisplay();
_local9.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign3", new mission3());
var _local10:Bitmap = _local3.generateThumbNail(150, 150);
var _local11:TextDisplay = new TextDisplay();
_local11.setText("3");
var _local12:TextDisplay = new TextDisplay();
_local12.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign4", new mission4());
var _local13:Bitmap = _local3.generateThumbNail(150, 150);
var _local14:TextDisplay = new TextDisplay();
_local14.setText("4");
var _local15:TextDisplay = new TextDisplay();
_local15.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign5", new mission5());
var _local16:Bitmap = _local3.generateThumbNail(150, 150);
var _local17:TextDisplay = new TextDisplay();
_local17.setText("5");
var _local18:TextDisplay = new TextDisplay();
_local18.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign6", new mission6());
var _local19:Bitmap = _local3.generateThumbNail(150, 150);
var _local20:TextDisplay = new TextDisplay();
_local20.setText("6");
var _local21:TextDisplay = new TextDisplay();
_local21.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign7", new mission7());
var _local22:Bitmap = _local3.generateThumbNail(150, 150);
var _local23:TextDisplay = new TextDisplay();
_local23.setText("7");
var _local24:TextDisplay = new TextDisplay();
_local24.setText(_local3.title.toUpperCase());
_local3.parseXML("campaign8", new mission8());
var _local25:Bitmap = _local3.generateThumbNail(150, 150);
var _local26:TextDisplay = new TextDisplay();
_local26.setText("8");
var _local27:TextDisplay = new TextDisplay();
_local27.setText(_local3.title.toUpperCase());
var _local28:Bitmap = _local4;
var _local29:Bitmap = _local7;
var _local30:Bitmap = _local10;
var _local31:Bitmap = _local13;
var _local32:Bitmap = _local16;
var _local33:Bitmap = _local19;
var _local34:Bitmap = _local22;
var _local35:Bitmap = _local25;
var _local36:Number = 15;
var _local37:Number = ((_local36 + 150) + 18);
var _local38:Number = ((_local37 + 150) + 18);
var _local39:Number = ((_local38 + 150) + 18);
var _local40:Number = 100;
var _local41:Number = 300;
mission1Button = new ImageButton(_local28);
mission1Button.x = _local36;
mission1Button.y = _local40;
_local5.x = (mission1Button.x + 2);
_local5.y = (mission1Button.y + 2);
_local6.x = ((mission1Button.x + (mission1Button.width / 2)) - (_local6.width / 2));
_local6.y = (_local40 + 120);
mission1Button.addEventListener(ImageButton.CLICKED, mission1ButtonClicked);
addChild(mission1Button);
addChild(_local5);
addChild(_local6);
mission2Button = new ImageButton(_local29);
mission2Button.x = _local37;
mission2Button.y = _local40;
_local8.x = (mission2Button.x + 2);
_local8.y = (mission2Button.y + 2);
_local9.x = ((mission2Button.x + (mission2Button.width / 2)) - (_local9.width / 2));
_local9.y = (_local40 + 120);
mission2Button.addEventListener(ImageButton.CLICKED, mission2ButtonClicked);
addChild(mission2Button);
addChild(_local8);
addChild(_local9);
mission3Button = new ImageButton(_local30);
mission3Button.x = _local38;
mission3Button.y = _local40;
_local11.x = (mission3Button.x + 2);
_local11.y = (mission3Button.y + 2);
_local12.x = ((mission3Button.x + (mission3Button.width / 2)) - (_local12.width / 2));
_local12.y = (_local40 + 120);
mission3Button.addEventListener(ImageButton.CLICKED, mission3ButtonClicked);
addChild(mission3Button);
addChild(_local11);
addChild(_local12);
mission4Button = new ImageButton(_local31);
mission4Button.x = _local39;
mission4Button.y = _local40;
_local14.x = (mission4Button.x + 2);
_local14.y = (mission4Button.y + 2);
_local15.x = ((mission4Button.x + (mission4Button.width / 2)) - (_local15.width / 2));
_local15.y = (_local40 + 120);
mission4Button.addEventListener(ImageButton.CLICKED, mission4ButtonClicked);
addChild(mission4Button);
addChild(_local14);
addChild(_local15);
mission5Button = new ImageButton(_local32);
mission5Button.x = _local36;
mission5Button.y = _local41;
_local17.x = (mission5Button.x + 2);
_local17.y = (mission5Button.y + 2);
_local18.x = ((mission5Button.x + (mission5Button.width / 2)) - (_local18.width / 2));
_local18.y = ((_local41 + _local32.height) + 5);
mission5Button.addEventListener(ImageButton.CLICKED, mission5ButtonClicked);
addChild(mission5Button);
addChild(_local17);
addChild(_local18);
mission6Button = new ImageButton(_local33);
mission6Button.x = _local37;
mission6Button.y = _local41;
_local20.x = (mission6Button.x + 2);
_local20.y = (mission6Button.y + 2);
_local21.x = ((mission6Button.x + (mission6Button.width / 2)) - (_local21.width / 2));
_local21.y = ((_local41 + _local32.height) + 5);
mission6Button.addEventListener(ImageButton.CLICKED, mission6ButtonClicked);
addChild(mission6Button);
addChild(_local20);
addChild(_local21);
mission7Button = new ImageButton(_local34);
mission7Button.x = _local38;
mission7Button.y = _local41;
_local23.x = (mission7Button.x + 2);
_local23.y = (mission7Button.y + 2);
_local24.x = ((mission7Button.x + (mission7Button.width / 2)) - (_local24.width / 2));
_local24.y = ((_local41 + _local32.height) + 5);
mission7Button.addEventListener(ImageButton.CLICKED, mission7ButtonClicked);
addChild(mission7Button);
addChild(_local23);
addChild(_local24);
mission8Button = new ImageButton(_local35);
mission8Button.x = _local39;
mission8Button.y = _local41;
_local26.x = (mission8Button.x + 2);
_local26.y = (mission8Button.y + 2);
_local27.x = ((mission8Button.x + (mission8Button.width / 2)) - (_local27.width / 2));
_local27.y = ((_local41 + _local32.height) + 5);
mission8Button.addEventListener(ImageButton.CLICKED, mission8ButtonClicked);
addChild(mission8Button);
addChild(_local26);
addChild(_local27);
mission2Locked.x = mission2Button.x;
mission2Locked.y = mission2Button.y;
addChild(mission2Locked);
mission3Locked.x = mission3Button.x;
mission3Locked.y = mission3Button.y;
addChild(mission3Locked);
mission4Locked.x = mission4Button.x;
mission4Locked.y = mission4Button.y;
addChild(mission4Locked);
mission5Locked.x = mission5Button.x;
mission5Locked.y = mission5Button.y;
addChild(mission5Locked);
mission6Locked.x = mission6Button.x;
mission6Locked.y = mission6Button.y;
addChild(mission6Locked);
mission7Locked.x = mission7Button.x;
mission7Locked.y = mission7Button.y;
addChild(mission7Locked);
mission8Locked.x = mission8Button.x;
mission8Locked.y = mission8Button.y;
addChild(mission8Locked);
}
private function mission5ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "8ddc0d06");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign5", new mission5());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission3ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "3abb0d7d");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign3", new mission3());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission1ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "42389cba");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign1", new mission1());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
public function update():void{
var campaignCount:int;
var lso:SharedObject;
try {
lso = SharedObject.getLocal("chopraider", "/");
campaignCount = lso.data.campaignCount;
if (campaignCount == 0){
campaignCount = 1;
};
} catch(e:Error) {
trace(e);
campaignCount = 8;
};
if (campaignCount < 2){
mission2Locked.visible = true;
mission3Locked.visible = true;
mission4Locked.visible = true;
mission5Locked.visible = true;
mission6Locked.visible = true;
mission7Locked.visible = true;
mission8Locked.visible = true;
} else {
if (campaignCount < 3){
mission2Locked.visible = false;
mission3Locked.visible = true;
mission4Locked.visible = true;
mission5Locked.visible = true;
mission6Locked.visible = true;
mission7Locked.visible = true;
mission8Locked.visible = true;
} else {
if (campaignCount < 4){
mission2Locked.visible = false;
mission3Locked.visible = false;
mission4Locked.visible = true;
mission5Locked.visible = true;
mission6Locked.visible = true;
mission7Locked.visible = true;
mission8Locked.visible = true;
} else {
if (campaignCount < 5){
mission2Locked.visible = false;
mission3Locked.visible = false;
mission4Locked.visible = false;
mission5Locked.visible = true;
mission6Locked.visible = true;
mission7Locked.visible = true;
mission8Locked.visible = true;
} else {
if (campaignCount < 6){
mission2Locked.visible = false;
mission3Locked.visible = false;
mission4Locked.visible = false;
mission5Locked.visible = false;
mission6Locked.visible = true;
mission7Locked.visible = true;
mission8Locked.visible = true;
} else {
if (campaignCount < 7){
mission2Locked.visible = false;
mission3Locked.visible = false;
mission4Locked.visible = false;
mission5Locked.visible = false;
mission6Locked.visible = false;
mission7Locked.visible = true;
mission8Locked.visible = true;
} else {
if (campaignCount < 8){
mission2Locked.visible = false;
mission3Locked.visible = false;
mission4Locked.visible = false;
mission5Locked.visible = false;
mission6Locked.visible = false;
mission7Locked.visible = false;
mission8Locked.visible = true;
} else {
mission2Locked.visible = false;
mission3Locked.visible = false;
mission4Locked.visible = false;
mission5Locked.visible = false;
mission6Locked.visible = false;
mission7Locked.visible = false;
mission8Locked.visible = false;
};
};
};
};
};
};
};
}
private function mission4ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "aa11a690");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign4", new mission4());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission2ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "1fb5a347");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign2", new mission2());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission8ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "5f9127cc");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign8", new mission8());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission6ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "628d95fb");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign6", new mission6());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function mission7ButtonClicked(_arg1:ButtonEvent):void{
MochiBot.track(this, "5c7b404f");
var _local2:GameMap = new GameMap();
_local2.parseXML("campaign7", new mission7());
app.createGame(_local2, (skillSelection.r1.selected) ? 0 : (skillSelection.r2.selected) ? 1 : 2);
}
private function backButtonClicked(_arg1:ButtonEvent):void{
app.showMainScreen();
}
}
}//package com.wbwar.chopraider.game
Section 121
//CampaignScreen_backImage (com.wbwar.chopraider.game.CampaignScreen_backImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_backImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 122
//CampaignScreen_mission1 (com.wbwar.chopraider.game.CampaignScreen_mission1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission1 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 123
//CampaignScreen_mission2 (com.wbwar.chopraider.game.CampaignScreen_mission2)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission2 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 124
//CampaignScreen_mission3 (com.wbwar.chopraider.game.CampaignScreen_mission3)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission3 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 125
//CampaignScreen_mission4 (com.wbwar.chopraider.game.CampaignScreen_mission4)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission4 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 126
//CampaignScreen_mission5 (com.wbwar.chopraider.game.CampaignScreen_mission5)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission5 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 127
//CampaignScreen_mission6 (com.wbwar.chopraider.game.CampaignScreen_mission6)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission6 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 128
//CampaignScreen_mission7 (com.wbwar.chopraider.game.CampaignScreen_mission7)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission7 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 129
//CampaignScreen_mission8 (com.wbwar.chopraider.game.CampaignScreen_mission8)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_mission8 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 130
//CampaignScreen_missionSelectionImage (com.wbwar.chopraider.game.CampaignScreen_missionSelectionImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CampaignScreen_missionSelectionImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 131
//Car (com.wbwar.chopraider.game.Car)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.geom.*;
public class Car extends HittableGameObject {
private const speed:Number = 2;
private const carTurnRate:Number = 4;
private var lastCellY:int;
private var lastCellX:int;
private var directionBias:int;// = -1
private var carBitmap:Bitmap;
private var targetCellX:int;
private var targetCellY:int;
private var targetX:Number;
private var targetY:Number;
private var age:uint;// = 0
private static var carImage:Class = Car_carImage;
public function Car(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:int){
carBitmap = (new carImage() as Bitmap);
super(_arg1, _arg2, _arg3, 100);
_arg1.layerGround.addGameObject(this);
this.directionBias = _arg4;
_arg1.carCount++;
this.addChild(carBitmap);
carBitmap.x = (-(carBitmap.width) / 2);
carBitmap.y = (-(carBitmap.height) / 2);
rotation = (Math.random() * 360);
this.gamespace_x = _arg2;
this.gamespace_y = _arg3;
var _local5:int = (this.gamespace_x / GameMap.cellWidth);
var _local6:int = (this.gamespace_y / GameMap.cellHeight);
this.lastCellX = _local5;
this.lastCellY = _local6;
pickNewTarget();
}
override public function update():void{
age++;
if ((((Math.abs((targetX - this.gamespace_x)) < 3)) && ((Math.abs((targetY - this.gamespace_y)) < 3)))){
pickNewTarget();
};
rotation = getTurn(targetX, targetY, carTurnRate);
var _local1:Number = 0;
var _local2:Number = 0;
if (Math.abs(this.update_diff) < 2){
_local1 = (speed * Math.sin(((rotation / 180) * Math.PI)));
_local2 = (speed * Math.cos(((rotation / 180) * Math.PI)));
};
this.gamespace_x = (this.gamespace_x + _local2);
this.gamespace_y = (this.gamespace_y + _local1);
}
private function evaluateLoc(_arg1:Array, _arg2:int, _arg3:int):void{
var _local4:int;
if ((((((((((((_arg2 >= 0)) && ((_arg3 >= 0)))) && ((_arg2 < space.selectedGameMap.mapDataWidth)))) && ((_arg3 < space.selectedGameMap.mapDataHeight)))) && (((!((_arg2 == 0))) || (!((_arg3 == 0))))))) && (((!((_arg2 == lastCellX))) || (!((_arg3 == lastCellY))))))){
_local4 = space.selectedGameMap.mapData[_arg3][_arg2];
if ((((_local4 >= 52)) && ((_local4 <= 68)))){
_arg1.push(new Point(_arg2, _arg3));
};
};
}
override public function damage(_arg1:Number):void{
}
private function pickNewTarget():void{
var _local5:int;
var _local6:Point;
var _local1:int = (this.gamespace_x / GameMap.cellWidth);
var _local2:int = (this.gamespace_y / GameMap.cellHeight);
if ((((((((_local1 == 0)) || ((_local1 == (space.selectedGameMap.mapDataWidth - 1))))) || ((_local2 == 0)))) || ((_local2 == (space.selectedGameMap.mapDataHeight - 1))))){
space.layerGround.removeGameObject(this);
space.carCount--;
};
var _local3:int = space.selectedGameMap.mapData[_local2][_local1];
var _local4:Array = new Array();
if (_local3 == 52){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 53){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 54){
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 55){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 56){
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 - 1));
} else {
if (_local3 == 57){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 - 1));
} else {
if (_local3 == 58){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
evaluateLoc(_local4, (_local1 - 1), _local2);
} else {
if (_local3 == 59){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 60){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 61){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 62){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 63){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 64){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 65){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 66){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 67){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 68){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
evaluateLoc(_local4, (_local1 - 1), _local2);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (_local4.length == 0){
this.targetCellX = this.lastCellX;
this.targetCellY = this.lastCellY;
} else {
if ((((directionBias == 0)) || ((directionBias == 1)))){
_local5 = directionBias;
} else {
_local5 = (Math.random() * _local4.length);
};
if (_local5 >= _local4.length){
_local5 = 0;
};
_local6 = _local4[_local5];
this.targetCellX = _local6.x;
this.targetCellY = _local6.y;
};
this.lastCellX = _local1;
this.lastCellY = _local2;
this.targetX = ((this.targetCellX * 100) + 50);
this.targetY = ((this.targetCellY * 100) + 50);
}
}
}//package com.wbwar.chopraider.game
Section 132
//Car_carImage (com.wbwar.chopraider.game.Car_carImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Car_carImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 133
//Carrier (com.wbwar.chopraider.game.Carrier)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Carrier extends HittableGameObject {
public const START_HEALTH:Number = 3000;
public const CARRIER_ATTACK_NOTICE_TIME:int = 100;
private var turnRate:Number;
private var speed:Number;
private var dx:Number;
private var healthBar:HealthBar;
private var dy:Number;
private var path:Array;
private var targetX:Number;
private var targetY:Number;
private var currentPathPoint:uint;// = 0
private var klaxon:Sound;
public var carrierUnderAttackTimer:int;
private var age:uint;// = 0
private static var carrierImage:Class = Carrier_carrierImage;
private static var carrierBitmap:Bitmap = (new carrierImage() as Bitmap);
public function Carrier(_arg1:Space, _arg2:XML):void{
var _local4:int;
var _local6:Point;
path = new Array();
this.turnRate = _arg2.turnRate;
this.speed = _arg2.speed;
var _local3:Array = _arg2.path.split(",");
while (_local4 < _local3.length) {
path.push(new Point(_local3[_local4], _local3[(_local4 + 1)]));
_local4 = (_local4 + 2);
};
var _local5:Point = path[0];
targetX = _local5.x;
targetY = _local5.y;
super(_arg1, _local5.x, _local5.y, START_HEALTH);
if (path.length > 1){
_local6 = path[1];
} else {
_local6 = path[0];
};
var _local7:Point = this.getDistanceAndDegree(_local6.x, _local6.y);
this.rotation = _local7.y;
addChild(carrierBitmap);
carrierBitmap.x = (-(carrierBitmap.width) / 2);
carrierBitmap.y = (-(carrierBitmap.height) / 2);
healthBar = new HealthBar(100);
healthBar.x = (9 - (carrierBitmap.width / 2));
healthBar.y = (8 - (carrierBitmap.height / 2));
healthBar.rotation = 90;
addChild(healthBar);
klaxon = SoundManager.instance.getSound("carrieralarm");
}
override public function update():void{
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Point;
age++;
if (carrierUnderAttackTimer > 0){
carrierUnderAttackTimer--;
};
if (this.health <= 0){
this.space.endGame(false);
this.alpha = 0.5;
if ((age % 5) == 0){
new Explosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), false, 15);
new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 5, 0);
};
};
if (this.path.length > 1){
if ((((Math.abs((targetX - this.gamespace_x)) < 10)) && ((Math.abs((targetY - this.gamespace_y)) < 10)))){
_local1 = nextPathPoint();
this.targetX = _local1.x;
this.targetY = _local1.y;
};
rotation = getTurn(targetX, targetY, turnRate);
if ((age % 20) == 0){
_local2 = this.getProjection(105, -25);
new Wake(space, _local2.x, _local2.y, (this.rotation - 45), 0.3, 1, 60);
_local3 = this.getProjection(105, 25);
new Wake(space, _local3.x, _local3.y, (this.rotation + 45), 0.3, 1, 60);
};
if (Math.abs(update_diff) < 30){
dy = (speed * Math.sin(((rotation / 180) * Math.PI)));
dx = (speed * Math.cos(((rotation / 180) * Math.PI)));
if ((age % 30) == 0){
_local4 = this.getProjection(175, 180);
new Wake(space, _local4.x, _local4.y, this.rotation, 1.4, 0.2, 50);
};
} else {
dy = 0;
dx = 0;
};
this.gamespace_x = (this.gamespace_x + dx);
this.gamespace_y = (this.gamespace_y + dy);
};
this.hitLeft = (gamespace_x - 180);
this.hitRight = (gamespace_x + 180);
this.hitTop = (gamespace_y - 58);
this.hitBottom = (gamespace_y + 58);
}
public function fireMissile(_arg1:Number, _arg2:Number):void{
var _local3:Point = this.getProjection(132, 0);
new CarrierMissile(this.space, _local3.x, _local3.y, _arg1, _arg2, 20, 15);
}
public function overLandingPad(_arg1:Number, _arg2:Number):Boolean{
var _local3:Point = getProjection(115, 180);
var _local4:Number = (_arg1 - _local3.x);
var _local5:Number = (_arg2 - _local3.y);
if (((_local4 * _local4) + (_local5 * _local5)) < (45 * 45)){
return (true);
};
return (false);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
if (carrierUnderAttackTimer == 0){
klaxon.play();
};
carrierUnderAttackTimer = CARRIER_ATTACK_NOTICE_TIME;
}
private function nextPathPoint():Point{
currentPathPoint++;
if (currentPathPoint > (path.length - 1)){
currentPathPoint = 0;
};
return (path[currentPathPoint]);
}
}
}//package com.wbwar.chopraider.game
Section 134
//Carrier_carrierImage (com.wbwar.chopraider.game.Carrier_carrierImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Carrier_carrierImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 135
//CarrierMissile (com.wbwar.chopraider.game.CarrierMissile)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
public class CarrierMissile extends HittableGameObject {
private var deltaY:Number;
private var missileLaunchSound:Sound;
private var speed:Number;
private var targetY:Number;
private var sourceBitmap:Bitmap;
private var deltaX:Number;
private var targetX:Number;
private var missileExplosionSound:Sound;
private var maxAge:uint;
private var missileDamage:Number;
private var age:uint;// = 0
private static var sourceImage:Class = CarrierMissile_sourceImage;
public function CarrierMissile(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number){
sourceBitmap = (new sourceImage() as Bitmap);
super(_arg1, _arg2, _arg3, 100);
this.missileDamage = _arg6;
this.speed = _arg7;
_arg1.layerAir.addGameObject(this);
this.addChild(sourceBitmap);
sourceBitmap.x = (-(sourceBitmap.width) / 2);
sourceBitmap.y = (-(sourceBitmap.height) / 2);
this.gamespace_x = _arg2;
this.gamespace_y = _arg3;
this.targetX = _arg4;
this.targetY = _arg5;
this.deltaX = (_arg4 - _arg2);
this.deltaY = (_arg5 - _arg3);
this.rotation = ((Math.atan2(deltaY, deltaX) * 180) / Math.PI);
var _local8:Number = Math.sqrt(((deltaX * deltaX) + (deltaY * deltaY)));
this.deltaX = (this.deltaX / _local8);
this.deltaY = (this.deltaY / _local8);
this.deltaX = (this.deltaX * speed);
this.deltaY = (this.deltaY * speed);
missileExplosionSound = SoundManager.instance.getSound("missileexplosion");
missileLaunchSound = SoundManager.instance.getSound("rocket");
missileLaunchSound.play();
}
override public function damage(_arg1:Number):void{
}
override public function update():void{
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:HittableGameObject;
var _local10:Boolean;
var _local11:int;
age++;
if ((((((Math.abs((targetX - this.gamespace_x)) < 15)) && ((Math.abs((targetY - this.gamespace_y)) < 15)))) || ((age > 400)))){
space.layerAir.removeGameObject(this);
missileExplosionSound.play();
_local1 = ((this.gamespace_x + (Math.random() * 80)) - 40);
_local2 = ((this.gamespace_y + (Math.random() * 80)) - 40);
_local3 = ((this.gamespace_x + (Math.random() * 80)) - 40);
_local4 = ((this.gamespace_y + (Math.random() * 80)) - 40);
_local5 = ((this.gamespace_x + (Math.random() * 80)) - 40);
_local6 = ((this.gamespace_y + (Math.random() * 80)) - 40);
_local7 = ((this.gamespace_x + (Math.random() * 80)) - 40);
_local8 = ((this.gamespace_y + (Math.random() * 80)) - 40);
new Explosion(space, this.gamespace_x, this.gamespace_y, true, 7);
new Explosion(space, _local1, _local2, true, 5);
new Explosion(space, _local3, _local4, true, 5);
new Explosion(space, _local5, _local6, true, 5);
new Explosion(space, _local7, _local8, true, 5);
new FragmentExplosion(space, gamespace_x, gamespace_y, 3, 1);
_local10 = false;
_local11 = 0;
while (_local11 < space.layerGround.numChildren) {
_local9 = (space.layerGround.getChildAt(_local11) as HittableGameObject);
if (_local9.hitTest(this.gamespace_x, this.gamespace_y)){
_local9.damage(missileDamage);
_local10 = true;
};
if (_local9.hitTest(_local1, _local2)){
_local9.damage(missileDamage);
_local10 = true;
};
if (_local9.hitTest(_local3, _local4)){
_local9.damage(missileDamage);
_local10 = true;
};
if (_local9.hitTest(_local5, _local6)){
_local9.damage(missileDamage);
_local10 = true;
};
if (_local9.hitTest(_local7, _local8)){
_local9.damage(missileDamage);
_local10 = true;
};
if (_local10){
return;
};
_local11++;
};
};
this.gamespace_x = (this.gamespace_x + deltaX);
this.gamespace_y = (this.gamespace_y + deltaY);
}
}
}//package com.wbwar.chopraider.game
Section 136
//CarrierMissile_sourceImage (com.wbwar.chopraider.game.CarrierMissile_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CarrierMissile_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 137
//Civ (com.wbwar.chopraider.game.Civ)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class Civ extends HittableGameObject {
private var civBitmap:Bitmap;
private var roadNumbers:Dictionary;
public var baseState:int;// = 0
private var roadBlocksRemaining:int;
private var destroyedSound:Sound;
private var healthBar:HealthBar;
private var directionBias:int;// = -1
public function Civ(_arg1:Space, _arg2:CivBean):void{
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
_arg1.civCount++;
roadNumbers = new Dictionary();
var _local3:Array = _arg2.roadNumbers.split(",");
var _local4:int;
while (_local4 < _local3.length) {
roadNumbers[int(_local3[_local4])] = int(_local3[_local4]);
roadBlocksRemaining++;
_local4++;
};
directionBias = _arg2.directionBias;
if (_arg2.building == 0){
civBitmap = (new GameBitmaps.civ0Image() as Bitmap);
};
if (_arg2.building == 1){
civBitmap = (new GameBitmaps.civ1Image() as Bitmap);
};
if (_arg2.building == 2){
civBitmap = (new GameBitmaps.civ2Image() as Bitmap);
};
if (_arg2.building == 3){
civBitmap = (new GameBitmaps.civ3Image() as Bitmap);
};
if (_arg2.building == 4){
civBitmap = (new GameBitmaps.civ4Image() as Bitmap);
};
healthBar = new HealthBar(civBitmap.width);
healthBar.x = (-(civBitmap.width) / 2);
healthBar.y = ((civBitmap.height / 2) + 2);
this.addChild(civBitmap);
this.addChild(healthBar);
civBitmap.x = (-(civBitmap.width) / 2);
civBitmap.y = (-(civBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (civBitmap.width / 2));
hitRight = (Number(_arg2.x) + (civBitmap.width / 2));
hitTop = (Number(_arg2.y) - (civBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (civBitmap.height / 2));
}
override public function update():void{
if (baseState == 0){
if (health <= 0){
destroy();
};
};
if ((((baseState == 1)) && ((this.health < this.startHealth)))){
};
}
private function release():void{
space.civCount--;
this.space.layerGround.removeGameObject(this);
baseState = 1;
this.space.score = (this.space.score + 100);
new FadingPopup(space, gamespace_x, gamespace_y, "Outta Here!", 0xFF);
new Car(space, gamespace_x, gamespace_y, directionBias);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
override public function destroy():void{
space.civCount--;
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
baseState = 1;
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
this.space.score = (this.space.score - 100);
new FadingPopup(space, gamespace_x, gamespace_y, "-100", 0xFF0000);
}
public function roadBlockGone(_arg1:int):void{
if (roadNumbers[_arg1] != null){
delete roadNumbers[_arg1];
roadBlocksRemaining--;
};
if (roadBlocksRemaining <= 0){
release();
};
}
}
}//package com.wbwar.chopraider.game
Section 138
//CivBar (com.wbwar.chopraider.game.CivBar)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.text.*;
public class CivBar extends Sprite {
private var civsTextValue:TextField;
private var carsTextValue:TextField;
private var carsText:TextField;
private var space:Space;
private var civsText:TextField;
private var roadBlocksText:TextField;
private var roadBlocksTextValue:TextField;
public function CivBar(_arg1:Space){
roadBlocksText = new GenericTextField(0, 10);
civsText = new GenericTextField(0, 10);
carsText = new GenericTextField(0, 10);
roadBlocksTextValue = new GenericTextField(0xFF0000, 10);
civsTextValue = new GenericTextField(4666657, 10);
carsTextValue = new GenericTextField(4666657, 10);
super();
this.space = _arg1;
roadBlocksText.text = "Road Blocks: ";
civsText.text = "Civilian Buildings: ";
carsText.text = "Moving Trucks: ";
roadBlocksTextValue.background = true;
civsTextValue.background = true;
carsTextValue.background = true;
addChild(roadBlocksText);
roadBlocksText.x = 0;
roadBlocksText.y = 0;
addChild(roadBlocksTextValue);
roadBlocksTextValue.x = 66;
roadBlocksTextValue.y = 0;
addChild(civsText);
civsText.x = 95;
civsText.y = 0;
addChild(civsTextValue);
civsTextValue.x = 190;
civsTextValue.y = 0;
addChild(carsText);
carsText.x = 0;
carsText.y = 12;
addChild(carsTextValue);
carsTextValue.x = 78;
carsTextValue.y = 12;
}
public function update():void{
roadBlocksTextValue.text = String(space.roadBlockCount);
civsTextValue.text = String(space.civCount);
carsTextValue.text = String(space.carCount);
}
}
}//package com.wbwar.chopraider.game
Section 139
//Compass (com.wbwar.chopraider.game.Compass)
package com.wbwar.chopraider.game {
import flash.display.*;
public class Compass extends Sprite {
private const compassRadius:Number = 17.5;
private var compassBadBitmap:Bitmap;
private var distanceCircle:Sprite;
private var space:Space;
private var compassNormalBitmap:Bitmap;
private var updateCount:int;// = 0
private var drewDangerState:Boolean;
private var needle:Sprite;
private var compassCenterBitmap:Bitmap;
private static var compassNormalImage:Class = Compass_compassNormalImage;
private static var compassCenterImage:Class = Compass_compassCenterImage;
private static var compassBadImage:Class = Compass_compassBadImage;
public function Compass(_arg1:Space){
compassCenterBitmap = (new compassCenterImage() as Bitmap);
compassNormalBitmap = (new compassNormalImage() as Bitmap);
compassBadBitmap = (new compassBadImage() as Bitmap);
super();
this.space = _arg1;
addChild(compassNormalBitmap);
addChild(compassBadBitmap);
compassBadBitmap.visible = false;
needle = new Sprite();
needle.graphics.lineStyle(1, 0);
needle.graphics.drawRect(-10, 0, 10, 1);
needle.graphics.drawRect(-1, -10, 1, 10);
needle.graphics.drawRect(-1, 0, 1, 1);
needle.graphics.drawRect(-3, -2, 1, 1);
needle.graphics.drawRect(-5, -4, 1, 1);
needle.graphics.drawRect(-7, -6, 1, 1);
needle.graphics.drawRect(-9, -8, 1, 1);
needle.graphics.drawRect(-11, -10, 1, 1);
distanceCircle = new Sprite();
distanceCircle.graphics.lineStyle(1, 0x9900);
distanceCircle.graphics.drawCircle(0, 0, compassRadius);
distanceCircle.x = compassRadius;
distanceCircle.y = compassRadius;
compassCenterBitmap.x = (compassRadius - (compassCenterBitmap.width / 2));
compassCenterBitmap.y = (compassRadius - (compassCenterBitmap.height / 2));
addChild(compassCenterBitmap);
addChild(distanceCircle);
addChild(needle);
}
public function update():void{
var _local1:Number;
updateCount++;
if (space.carrier.carrierUnderAttackTimer > 0){
if ((updateCount % 2) == 0){
drewDangerState = true;
compassNormalBitmap.visible = false;
compassBadBitmap.visible = true;
} else {
compassNormalBitmap.visible = true;
compassBadBitmap.visible = false;
};
} else {
if (drewDangerState){
drewDangerState = false;
compassNormalBitmap.visible = true;
compassBadBitmap.visible = false;
};
};
_local1 = (space.carrier.gamespace_x - space.ship.gamespace_x);
var _local2:Number = (space.carrier.gamespace_y - space.ship.gamespace_y);
var _local3:Number = ((Math.atan2(_local2, _local1) / Math.PI) * 180);
if (_local3 < 0){
_local3 = (360 + _local3);
};
var _local4:Number = (compassRadius + (compassRadius * Math.cos((((_local3 / 360) * 2) * Math.PI))));
var _local5:Number = (compassRadius + (compassRadius * Math.sin((((_local3 / 360) * 2) * Math.PI))));
needle.rotation = (_local3 - 45);
needle.x = _local4;
needle.y = _local5;
var _local6:Number = (((_local1 * _local1) + (_local2 * _local2)) / (2000 * 2000));
if (_local6 > 1){
_local6 = 1;
};
distanceCircle.scaleX = _local6;
distanceCircle.scaleY = _local6;
}
}
}//package com.wbwar.chopraider.game
Section 140
//Compass_compassBadImage (com.wbwar.chopraider.game.Compass_compassBadImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Compass_compassBadImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 141
//Compass_compassCenterImage (com.wbwar.chopraider.game.Compass_compassCenterImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Compass_compassCenterImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 142
//Compass_compassNormalImage (com.wbwar.chopraider.game.Compass_compassNormalImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Compass_compassNormalImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 143
//CreditsScreen (com.wbwar.chopraider.game.CreditsScreen)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
public class CreditsScreen extends Sprite {
private var app:App;
private var bboxBitmap:Bitmap;
private var fglBitmap:Bitmap;
private static var fglImage:Class = CreditsScreen_fglImage;
private static var bboxImage:Class = CreditsScreen_bboxImage;
public function CreditsScreen(_arg1:App):void{
var app = _arg1;
bboxBitmap = (new bboxImage() as Bitmap);
fglBitmap = (new fglImage() as Bitmap);
super();
this.app = app;
this.graphics.beginFill(0);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
var title:GenericTextField = new GenericTextField(0xFFFFFF, 30);
title.text = "WhiteboardWar: ChopRaider";
title.x = ((App.GAME_WIDTH / 2) - (title.width / 2));
title.y = 5;
addChild(title);
var creds:GenericTextField = new GenericTextField(0xFFFFFF, 20);
creds.text = "A Game by Virgil Wall";
creds.x = ((App.GAME_WIDTH / 2) - (creds.width / 2));
creds.y = 50;
addChild(creds);
var creds2:GenericTextField = new GenericTextField(0xE0E0E0, 16);
creds2.text = " Special thanks:\n\n Martijn at Bubblebox.com.\n Adam at FlashGameLicense.\nEveryone who play-tested the game.";
creds2.x = ((App.GAME_WIDTH / 2) - (creds2.width / 2));
creds2.y = 120;
addChild(creds2);
var creds3:GenericTextField = new GenericTextField(0xE0E0E0, 11);
creds3.text = " For April\n\n and\n\nIn memory of my Dad who convinced me\nthat I really wanted an Atari 2600 for\nChristmas that year.\n [Virgil Wall, Sr. 1912 - 2004]";
creds3.x = ((App.GAME_WIDTH / 2) - (creds3.width / 2));
creds3.y = 260;
addChild(creds3);
var creds4:GenericTextField = new GenericTextField(0xE0E0E0, 12);
creds4.text = "Copyright© 2008 by Virgil Wall";
creds4.x = ((App.GAME_WIDTH / 2) - (creds4.width / 2));
creds4.y = 390;
addChild(creds4);
var returnButton:FontButton = new FontButton("RETURN", 180, 25, 0xFFFFFF, 18, 0x202020);
returnButton.x = ((App.GAME_WIDTH / 2) - (returnButton.width / 2));
returnButton.y = ((App.GAME_HEIGHT - returnButton.height) - 50);
returnButton.addEventListener(FontButton.CLICKED, function (_arg1:Event):void{
app.showMainScreen();
});
addChild(returnButton);
var bboxButton:ImageButton = new ImageButton(bboxBitmap, 1);
bboxButton.x = 5;
bboxButton.y = ((App.GAME_HEIGHT - bboxButton.height) - 5);
bboxButton.addEventListener(ImageButton.CLICKED, function (_arg1:Event):void{
wbwar.bubbleBoxClick("credits");
});
addChild(bboxButton);
var fglButton:ImageButton = new ImageButton(fglBitmap, 1);
fglButton.x = ((App.GAME_WIDTH - fglButton.width) - 10);
fglButton.y = ((App.GAME_HEIGHT - fglButton.height) - 5);
fglButton.addEventListener(ImageButton.CLICKED, function (_arg1:Event):void{
wbwar.fglClick("credits");
});
addChild(fglButton);
}
}
}//package com.wbwar.chopraider.game
Section 144
//CreditsScreen_bboxImage (com.wbwar.chopraider.game.CreditsScreen_bboxImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CreditsScreen_bboxImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 145
//CreditsScreen_fglImage (com.wbwar.chopraider.game.CreditsScreen_fglImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class CreditsScreen_fglImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 146
//DefeatIndicator (com.wbwar.chopraider.game.DefeatIndicator)
package com.wbwar.chopraider.game {
import flash.display.*;
public class DefeatIndicator extends Sprite {
private const minScale:Number = 0.9;
private var defeatBitmap:Bitmap;
private var scaleDelta:Number;// = 0.015
private static var defeatImage:Class = DefeatIndicator_defeatImage;
public function DefeatIndicator(){
defeatBitmap = (new defeatImage() as Bitmap);
super();
addChild(defeatBitmap);
defeatBitmap.x = (-(defeatBitmap.width) / 2);
defeatBitmap.y = (-(defeatBitmap.height) / 2);
}
public function update():void{
if (scaleX >= 1){
scaleDelta = -(scaleDelta);
} else {
if (scaleX <= minScale){
scaleDelta = -(scaleDelta);
};
};
this.scaleX = (this.scaleX + scaleDelta);
this.scaleY = (this.scaleY + scaleDelta);
}
}
}//package com.wbwar.chopraider.game
Section 147
//DefeatIndicator_defeatImage (com.wbwar.chopraider.game.DefeatIndicator_defeatImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class DefeatIndicator_defeatImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 148
//Explosion (com.wbwar.chopraider.game.Explosion)
package com.wbwar.chopraider.game {
import flash.display.*;
public class Explosion extends GameObject {
private var age:uint;// = 0
private var fragments:Array;
public var duration:Number;// = 10
public var speed:Number;// = 7
private var fragmentCount:int;// = 20
private static var fragmentImage:Class = Explosion_fragmentImage;
private static var fragmentImage1:Class = Explosion_fragmentImage1;
public function Explosion(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:int):void{
var _local6:Bitmap;
fragments = new Array();
super(_arg1, _arg2, _arg3);
this.fragmentCount = _arg5;
_arg1.layerEffectsUpperAir.addGameObject(this);
var _local7:int;
while (_local7 < _arg5) {
if (_arg4){
_local6 = (new fragmentImage1() as Bitmap);
} else {
_local6 = (new fragmentImage() as Bitmap);
};
fragments.push(new ExplosionFragment(((Math.random() * 2) - 1), ((Math.random() * 2) - 1), _local6));
addChild(_local6);
_local6.rotation = (Math.random() * 360);
_local7++;
};
}
override public function update():void{
var _local1:ExplosionFragment;
age++;
if (age > duration){
for each (_local1 in fragments) {
this.removeChild(_local1.bitmap);
};
space.layerEffectsUpperAir.removeGameObject(this);
} else {
for each (_local1 in fragments) {
_local1.bitmap.x = (_local1.bitmap.x + (_local1.deltaX * speed));
_local1.bitmap.y = (_local1.bitmap.y + (_local1.deltaY * speed));
_local1.bitmap.alpha = (1 - (age / duration));
};
};
}
}
}//package com.wbwar.chopraider.game
Section 149
//Explosion_fragmentImage (com.wbwar.chopraider.game.Explosion_fragmentImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Explosion_fragmentImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 150
//Explosion_fragmentImage1 (com.wbwar.chopraider.game.Explosion_fragmentImage1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Explosion_fragmentImage1 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 151
//ExplosionFragment (com.wbwar.chopraider.game.ExplosionFragment)
package com.wbwar.chopraider.game {
import flash.display.*;
public class ExplosionFragment {
public var deltaX:Number;
public var deltaY:Number;
public var rotationRate:Number;
public var bitmap:Bitmap;
public function ExplosionFragment(_arg1:Number, _arg2:Number, _arg3:Bitmap, _arg4:Number=0):void{
this.deltaX = _arg1;
this.deltaY = _arg2;
this.rotationRate = _arg4;
this.bitmap = _arg3;
}
}
}//package com.wbwar.chopraider.game
Section 152
//Factory (com.wbwar.chopraider.game.Factory)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class Factory extends HittableGameObject {
public var bombIndicator:BombIndicator;
private var healthBar:HealthBar;
private var smokeStack:SmokeStack;
private var skipHitBottom:Number;
private var factoryBitmap:Bitmap;
private var victoryFlag1Bitmap:Bitmap;
public var factoryState:int;// = 0
private var beenSuperDestroyed:Boolean;
private var victoryFlagBitmap:Bitmap;
private var skipHitRight:Number;
private var skipHitTop:Number;
public var building:int;
private var factory1Bitmap:Bitmap;
private var factory2Bitmap:Bitmap;
private var skipHitLeft:Number;
private var destroyedSound:Sound;
private static var victoryFlag1Image:Class = Factory_victoryFlag1Image;
private static var victoryFlagImage:Class = Factory_victoryFlagImage;
public function Factory(_arg1:Space, _arg2:FactoryBean):void{
factoryBitmap = (new GameBitmaps.factoryImage() as Bitmap);
factory1Bitmap = (new GameBitmaps.factory1Image() as Bitmap);
factory2Bitmap = (new GameBitmaps.factory2Image() as Bitmap);
victoryFlagBitmap = (new victoryFlagImage() as Bitmap);
victoryFlag1Bitmap = (new victoryFlag1Image() as Bitmap);
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
building = _arg2.building;
if ((((building == 0)) || ((building == 1)))){
healthBar = new HealthBar(factoryBitmap.width);
healthBar.x = (-(factoryBitmap.width) / 2);
healthBar.y = ((factoryBitmap.height / 2) + 2);
} else {
if (building == 2){
healthBar = new HealthBar(factory2Bitmap.width);
healthBar.x = (-(factory2Bitmap.width) / 2);
healthBar.y = ((factory2Bitmap.height / 2) + 2);
};
};
bombIndicator = new BombIndicator();
bombIndicator.y = 16;
if (building == 0){
this.addChild(factoryBitmap);
} else {
if (building == 1){
this.addChild(factory1Bitmap);
} else {
if (building == 2){
this.addChild(factory2Bitmap);
};
};
};
this.addChild(healthBar);
this.addChild(bombIndicator);
if (building == 0){
this.addChild(victoryFlagBitmap);
} else {
if (building == 1){
this.addChild(victoryFlag1Bitmap);
};
};
if (building == 0){
smokeStack = new SmokeStack(this.space, (gamespace_x - 33), (gamespace_y + 63));
} else {
if (building == 1){
smokeStack = new SmokeStack(this.space, (gamespace_x + 48), (gamespace_y + 52));
} else {
if (building == 2){
};
};
};
if (building == 0){
factoryBitmap.x = (-(factoryBitmap.width) / 2);
factoryBitmap.y = (-(factoryBitmap.height) / 2);
} else {
if (building == 1){
factory1Bitmap.x = (-(factory1Bitmap.width) / 2);
factory1Bitmap.y = (-(factory1Bitmap.height) / 2);
} else {
if (building == 2){
factory2Bitmap.x = (-(factory2Bitmap.width) / 2);
factory2Bitmap.y = (-(factory2Bitmap.height) / 2);
};
};
};
victoryFlagBitmap.x = (-(victoryFlagBitmap.width) / 2);
victoryFlagBitmap.y = (-(victoryFlagBitmap.height) / 2);
victoryFlagBitmap.visible = false;
victoryFlag1Bitmap.x = (-(victoryFlag1Bitmap.width) / 2);
victoryFlag1Bitmap.y = (-(victoryFlag1Bitmap.height) / 2);
victoryFlag1Bitmap.visible = false;
destroyedSound = SoundManager.instance.getSound("factoryexplosion");
if (building == 0){
hitLeft = (Number(_arg2.x) - (factoryBitmap.width / 2));
hitRight = (Number(_arg2.x) + (factoryBitmap.width / 2));
hitTop = (Number(_arg2.y) - (factoryBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (factoryBitmap.height / 2));
skipHitLeft = (Number(_arg2.x) - (factoryBitmap.width / 2));
skipHitRight = (skipHitLeft + 70);
skipHitTop = (Number(_arg2.y) - (factoryBitmap.height / 2));
skipHitBottom = (skipHitTop + 40);
} else {
if (building == 1){
hitLeft = (Number(_arg2.x) - (factory1Bitmap.width / 2));
hitRight = (Number(_arg2.x) + (factory1Bitmap.width / 2));
hitTop = (Number(_arg2.y) - (factory1Bitmap.height / 2));
hitBottom = (Number(_arg2.y) + (factory1Bitmap.height / 2));
} else {
if (building == 2){
hitLeft = (Number(_arg2.x) - (factory2Bitmap.width / 2));
hitRight = (Number(_arg2.x) + (factory2Bitmap.width / 2));
hitTop = (Number(_arg2.y) - (factory2Bitmap.height / 2));
hitBottom = (Number(_arg2.y) + (factory2Bitmap.height / 2));
};
};
};
}
override public function damage(_arg1:Number):void{
if (building == 2){
return;
};
if (!hasPowerPlant()){
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
} else {
new FadingPopup(space, gamespace_x, gamespace_y, " NO DAMAGE!\nPOWER PLANTS REMAIN", 0xFF, true);
};
}
override public function update():void{
var _local1:Explosion;
var _local2:GameObject;
var _local3:int;
var _local4:FragmentExplosion;
if (bombIndicator.visible){
bombIndicator.update();
bombIndicator.visible = false;
};
if (factoryState == 1){
if (Math.random() < 0.07){
if ((((Math.abs((this.space.ship.gamespace_x - this.gamespace_x)) < 500)) && ((Math.abs((this.space.ship.gamespace_y - this.gamespace_y)) < 400)))){
};
};
};
if ((((factoryState == 0)) && ((health <= 0)))){
this.space.shakeScreen = true;
this.space.currentLevel++;
trace(("currentLevel: " + this.space.currentLevel));
this.factoryState = 1;
if (building == 0){
this.victoryFlagBitmap.visible = true;
} else {
if (building == 1){
this.victoryFlag1Bitmap.visible = true;
};
};
this.factoryBitmap.visible = false;
this.factory1Bitmap.visible = false;
this.factory2Bitmap.visible = false;
destroyedSound.play();
if ((((building == 0)) || ((building == 1)))){
_local3 = 0;
while (_local3 < 5) {
_local1 = new Explosion(space, ((this.gamespace_x + (Math.random() * 50)) - 25), ((this.gamespace_y + (Math.random() * 50)) - 25), false, 20);
_local1.duration = (25 + (Math.random() * 10));
_local1.speed = (2 + (Math.random() * 2));
_local3++;
};
_local4 = new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 20);
} else {
_local3 = 0;
while (_local3 < 10) {
_local1 = new Explosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), false, 20);
_local1.duration = (25 + (Math.random() * 30));
_local1.speed = (2 + (Math.random() * 2));
_local3++;
};
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
};
_local4.duration = 40;
_local4.speed = 1;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
if (this.smokeStack != null){
this.smokeStack.visible = false;
};
_local3 = 0;
while (_local3 < space.layerGround.numChildren) {
_local2 = (space.layerGround.getChildAt(_local3) as HittableGameObject);
if (_local2.owner == this.owner){
if ((_local2 is TrackingGroundWeapon)){
(_local2 as TrackingGroundWeapon).destroy();
} else {
if ((_local2 is Tower)){
(_local2 as Tower).destroy();
} else {
if ((_local2 is Wall)){
(_local2 as Wall).destroy();
} else {
if ((_local2 is PowerLine)){
(_local2 as PowerLine).destroy();
} else {
if ((_local2 is AirBase)){
(_local2 as AirBase).destroy();
} else {
if ((_local2 is TankBase)){
(_local2 as TankBase).destroy();
} else {
if ((_local2 is ShipYard)){
(_local2 as ShipYard).destroy();
} else {
if ((_local2 is PowCamp)){
(_local2 as PowCamp).destroy();
};
};
};
};
};
};
};
};
};
_local3++;
};
space.layerGround.removeStagedObjects(this.owner);
_local3 = 0;
while (_local3 < space.layerEffectsLowerGround.numChildren) {
_local2 = (space.layerEffectsLowerGround.getChildAt(_local3) as GameObject);
if (_local2.owner == this.owner){
if ((_local2 is PowerLine)){
(_local2 as PowerLine).destroy();
};
};
_local3++;
};
this.space.score = (this.space.score + this.startHealth);
return;
};
}
override public function superDamage(_arg1:Number):void{
var _local2:Explosion;
var _local3:int;
var _local4:FragmentExplosion;
if ((((building == 2)) && (!(beenSuperDestroyed)))){
this.visible = false;
beenSuperDestroyed = true;
_local3 = 0;
while (_local3 < 10) {
_local2 = new Explosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), false, 20);
_local2.duration = (25 + (Math.random() * 30));
_local2.speed = (2 + (Math.random() * 2));
_local3++;
};
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
_local4 = new FragmentExplosion(space, ((this.gamespace_x + (Math.random() * 100)) - 50), ((this.gamespace_y + (Math.random() * 100)) - 50), 20);
};
}
override public function hitTest(_arg1:Number, _arg2:Number):Boolean{
if (factoryState == 1){
return (false);
};
if ((((((((_arg1 < hitLeft)) || ((_arg1 > hitRight)))) || ((_arg2 < hitTop)))) || ((_arg2 > hitBottom)))){
return (false);
};
if ((((((((_arg1 > skipHitLeft)) && ((_arg1 < skipHitRight)))) && ((_arg2 > skipHitTop)))) && ((_arg2 < skipHitBottom)))){
return (false);
};
return (true);
}
private function hasPowerPlant():Boolean{
var _local1:GameObject;
var _local2:int;
while (_local2 < space.layerGround.numChildren) {
_local1 = (space.layerGround.getChildAt(_local2) as GameObject);
if (_local1.owner == this.owner){
if ((_local1 is PowerPlant)){
return (true);
};
};
_local2++;
};
return (false);
}
}
}//package com.wbwar.chopraider.game
Section 153
//Factory_victoryFlag1Image (com.wbwar.chopraider.game.Factory_victoryFlag1Image)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Factory_victoryFlag1Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 154
//Factory_victoryFlagImage (com.wbwar.chopraider.game.Factory_victoryFlagImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Factory_victoryFlagImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 155
//FadingPopup (com.wbwar.chopraider.game.FadingPopup)
package com.wbwar.chopraider.game {
import flash.text.*;
public class FadingPopup extends GameObject {
private var text:TextField;
private var age:uint;
private static const maxAge:uint = 40;
private static const maxAge2:uint = uint((maxAge / 2));
public function FadingPopup(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:String, _arg5:Number=0xFF, _arg6:Boolean=false){
text = new TextField();
super(_arg1, _arg2, _arg3);
_arg1.layerEffectsUpperAir.addGameObject(this);
var _local7:TextFormat = new TextFormat();
_local7.font = "wbfont";
_local7.color = _arg5;
_local7.size = 14;
_local7.bold = true;
text.antiAliasType = AntiAliasType.ADVANCED;
text.gridFitType = GridFitType.PIXEL;
text.background = _arg6;
text.border = false;
text.embedFonts = true;
text.defaultTextFormat = _local7;
text.autoSize = TextFieldAutoSize.LEFT;
text.selectable = false;
text.text = _arg4;
text.x = (-(text.width) / 2);
this.addChild(text);
}
override public function update():void{
age++;
if (age >= maxAge){
space.layerEffectsUpperAir.removeGameObject(this);
} else {
if (age > 1){
text.y = (text.y - 1);
if (age > maxAge2){
text.alpha = (1 - ((age - maxAge2) / maxAge2));
};
};
};
}
}
}//package com.wbwar.chopraider.game
Section 156
//FragmentExplosion (com.wbwar.chopraider.game.FragmentExplosion)
package com.wbwar.chopraider.game {
import flash.display.*;
public class FragmentExplosion extends GameObject {
private const cos:Function;
private const sin:Function;
private var fragments:Array;
public var speed:Number;// = 1
public var duration:Number;// = 20
private var fragmentCount:int;// = 7
private var age:uint;// = 0
private static var fragmentBlueImage:Class = FragmentExplosion_fragmentBlueImage;
private static var fragmentRedImage:Class = FragmentExplosion_fragmentRedImage;
private static var fragmentBlackImage:Class = FragmentExplosion_fragmentBlackImage;
public function FragmentExplosion(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:int, _arg5:int=2):void{
var _local6:Bitmap;
var _local7:Bitmap;
var _local8:Number;
var _local9:Number;
fragments = new Array();
sin = Math.sin;
cos = Math.cos;
super(_arg1, _arg2, _arg3);
this.fragmentCount = _arg4;
_arg1.layerEffectsUpperGround.addGameObject(this);
var _local10:int;
while (_local10 < _arg4) {
_local8 = ((_local10 * 360) / _arg4);
_local9 = ((_local8 / 180) * Math.PI);
if (_arg5 == 2){
_local6 = (new fragmentBlackImage() as Bitmap);
} else {
if (_arg5 == 1){
_local6 = (new fragmentBlueImage() as Bitmap);
} else {
if (_arg5 == 0){
_local6 = (new fragmentRedImage() as Bitmap);
};
};
};
_local6.rotation = (_local8 + 90);
fragments.push(new ExplosionFragment(((cos(_local9) * Math.random()) * 8), (((sin(_local9) * Math.random()) * 4.5) + 0.5), _local6, ((Math.random() * 90) - 45)));
addChild(_local6);
_local10++;
};
}
override public function update():void{
var _local1:ExplosionFragment;
age++;
if (age > duration){
for each (_local1 in fragments) {
this.removeChild(_local1.bitmap);
};
space.layerEffectsUpperGround.removeGameObject(this);
} else {
for each (_local1 in fragments) {
_local1.bitmap.x = (_local1.bitmap.x + (_local1.deltaX * speed));
_local1.bitmap.y = (_local1.bitmap.y + (_local1.deltaY * speed));
_local1.bitmap.rotation = (_local1.bitmap.rotation + _local1.rotationRate);
_local1.bitmap.alpha = (1 - (age / duration));
};
};
}
}
}//package com.wbwar.chopraider.game
Section 157
//FragmentExplosion_fragmentBlackImage (com.wbwar.chopraider.game.FragmentExplosion_fragmentBlackImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class FragmentExplosion_fragmentBlackImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 158
//FragmentExplosion_fragmentBlueImage (com.wbwar.chopraider.game.FragmentExplosion_fragmentBlueImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class FragmentExplosion_fragmentBlueImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 159
//FragmentExplosion_fragmentRedImage (com.wbwar.chopraider.game.FragmentExplosion_fragmentRedImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class FragmentExplosion_fragmentRedImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 160
//GameObject (com.wbwar.chopraider.game.GameObject)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.geom.*;
public class GameObject extends Sprite {
public var level:int;
protected var space:Space;
public var owner:int;
public var gamespace_x:Number;
public var gamespace_y:Number;
protected var update_deltaX:Number;
protected var update_deltaY:Number;
protected var update_angle:Number;
protected var update_diff:Number;
public function GameObject(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:int=-1, _arg5:int=-1){
this.space = _arg1;
this.gamespace_x = _arg2;
this.gamespace_y = _arg3;
this.mouseEnabled = false;
this.owner = _arg4;
this.level = _arg5;
}
public function getDegree(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (_arg1 - this.gamespace_x);
var _local4:Number = (_arg2 - this.gamespace_y);
var _local5:Number = (((Math.atan2(_local4, _local3) / Math.PI) * 180) - this.rotation);
if (_local5 < 0){
_local5 = (360 + _local5);
};
return (_local5);
}
public function getProjection(_arg1:Number, _arg2:Number=0):Point{
var _local3:Number = (this.gamespace_x + (_arg1 * Math.cos(((((rotation + _arg2) / 360) * 2) * Math.PI))));
var _local4:Number = (this.gamespace_y + (_arg1 * Math.sin(((((rotation + _arg2) / 360) * 2) * Math.PI))));
return (new Point(_local3, _local4));
}
public function update():void{
}
public function getRotProjection(_arg1:Number, _arg2:Number, _arg3:Number=0):Point{
var _local4:Number = (this.gamespace_x + (_arg1 * Math.cos(((((_arg2 + _arg3) / 360) * 2) * Math.PI))));
var _local5:Number = (this.gamespace_y + (_arg1 * Math.sin(((((_arg2 + _arg3) / 360) * 2) * Math.PI))));
return (new Point(_local4, _local5));
}
public function getDistanceAndDegree(_arg1:Number, _arg2:Number):Point{
var _local3:Number = (_arg1 - this.gamespace_x);
var _local4:Number = (_arg2 - this.gamespace_y);
var _local5:Number = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
var _local6:Number = (((Math.atan2(_local4, _local3) / Math.PI) * 180) - this.rotation);
if (_local6 < 0){
_local6 = (360 + _local6);
};
return (new Point(_local5, _local6));
}
public function getGameSpaceX():Number{
return (gamespace_x);
}
public function getGameSpaceY():Number{
return (gamespace_y);
}
public function setGameSpaceY(_arg1:Number):void{
}
public function setGameSpaceX(_arg1:Number):void{
}
public function getTurn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):Number{
return (getRotTurn(this.rotation, _arg1, _arg2, _arg3, _arg4));
}
public function getRotTurn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
update_deltaX = (_arg2 - this.gamespace_x);
update_deltaY = (_arg3 - this.gamespace_y);
update_angle = ((Math.atan2(update_deltaY, update_deltaX) * 180) / Math.PI);
var _local6:Number = _arg1;
if (_local6 >= 360){
_local6 = (_local6 - 360);
} else {
if (_local6 < 0){
_local6 = (_local6 + 360);
};
};
if (update_angle < 0){
update_angle = (360 + update_angle);
};
update_diff = Math.abs((update_angle - _local6));
if (update_angle > _local6){
if (update_diff < 180){
_local6 = (_local6 + ((update_diff < _arg4)) ? update_diff : _arg4);
} else {
_local6 = (_local6 - ((update_diff < _arg4)) ? update_diff : _arg4);
};
} else {
if (update_diff < 180){
_local6 = (_local6 - ((update_diff < _arg4)) ? update_diff : _arg4);
} else {
_local6 = (_local6 + ((update_diff < _arg4)) ? update_diff : _arg4);
};
};
if (_arg5 != 0){
_local6 = (_local6 + _arg5);
};
if (_local6 >= 360){
_local6 = (_local6 - 360);
} else {
if (_local6 < 0){
_local6 = (_local6 + 360);
};
};
return (_local6);
}
}
}//package com.wbwar.chopraider.game
Section 161
//GenericTextField (com.wbwar.chopraider.game.GenericTextField)
package com.wbwar.chopraider.game {
import flash.text.*;
public class GenericTextField extends TextField {
public function GenericTextField(_arg1:Number, _arg2:int){
var _local3:TextFormat = new TextFormat();
_local3.font = "wbfont";
_local3.color = _arg1;
_local3.size = _arg2;
_local3.bold = true;
antiAliasType = AntiAliasType.ADVANCED;
gridFitType = GridFitType.PIXEL;
background = false;
border = false;
embedFonts = true;
defaultTextFormat = _local3;
autoSize = TextFieldAutoSize.LEFT;
selectable = false;
}
}
}//package com.wbwar.chopraider.game
Section 162
//Gun (com.wbwar.chopraider.game.Gun)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.geom.*;
import com.wbwar.chopraider.common.beans.*;
public class Gun extends TrackingGroundWeapon {
private var platformBitmap:Bitmap;
private var barrelBitmap:Bitmap;
public function Gun(_arg1:Space, _arg2:GunBean):void{
platformBitmap = (new GameBitmaps.gunPlatformImage() as Bitmap);
barrelBitmap = (new GameBitmaps.gunBarrelImage() as Bitmap);
super(_arg1, _arg2, platformBitmap, barrelBitmap, 0);
destroyedSound = SoundManager.instance.getSound("destroyed");
gunFireSound = SoundManager.instance.getSound("gunfire");
}
override protected function fireWeapon():void{
var _local1:Point = getRotProjection(500, barrelSprite.rotation, ((Math.random() * 2) - 1));
new Bullet(space, 0, 0, this.gamespace_x, this.gamespace_y, _local1.x, _local1.y, damageAmt, true, false);
}
}
}//package com.wbwar.chopraider.game
Section 163
//HealthBar (com.wbwar.chopraider.game.HealthBar)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.geom.*;
public class HealthBar extends Sprite {
private var barHeight:int;
private var ratios:Array;
private var border:Boolean;
public var barColor:int;
private var barWidth:int;
private var alphas:Array;
private var gradient:Boolean;
private var matr:Matrix;
private var fillType:String;
private var colors:Array;
public function HealthBar(_arg1:int, _arg2:int=5, _arg3:Boolean=false, _arg4:int=16746098){
fillType = GradientType.LINEAR;
alphas = [1, 1];
ratios = [0, 0xFF];
matr = new Matrix();
super();
this.barWidth = _arg1;
this.barHeight = _arg2;
this.border = _arg3;
this.barColor = _arg4;
setHealth(1);
}
public function setGradientColors(_arg1:int, _arg2:int):void{
gradient = true;
colors = [_arg1, _arg2];
matr = new Matrix();
matr.createGradientBox(100, 0, 0, 0, 0);
}
public function setHealth(_arg1:Number):void{
this.graphics.clear();
if (gradient){
this.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr);
this.graphics.drawRect(0, 0, (barWidth * _arg1), barHeight);
this.graphics.endFill();
} else {
this.graphics.beginFill(barColor);
this.graphics.drawRect(0, 0, (barWidth * _arg1), barHeight);
this.graphics.endFill();
};
if (this.border){
this.graphics.lineStyle(1, 3355528);
this.graphics.drawRect(0, 0, this.barWidth, this.barHeight);
};
}
}
}//package com.wbwar.chopraider.game
Section 164
//HittableGameObject (com.wbwar.chopraider.game.HittableGameObject)
package com.wbwar.chopraider.game {
public class HittableGameObject extends GameObject {
protected var hitTop:Number;// = -1
public var startHealth:Number;// = 100
protected var hitRight:Number;// = -1
public var health:Number;// = 100
protected var hitLeft:Number;// = -1
protected var hitBottom:Number;// = -1
public function HittableGameObject(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int=-1, _arg6:int=-1){
super(_arg1, _arg2, _arg3, _arg5, _arg6);
if ((((((this is Carrier)) || ((this is Civ)))) || ((this is Ship)))){
this.startHealth = _arg4;
} else {
if (_arg1.skill == 0){
this.startHealth = (Math.round(((_arg4 * 0.4) * 100)) / 100);
} else {
if (_arg1.skill == 1){
this.startHealth = _arg4;
} else {
this.startHealth = (Math.round(((_arg4 * 1.2) * 100)) / 100);
};
};
};
this.health = startHealth;
}
public function destroy():void{
}
public function superDamage(_arg1:Number):void{
damage(_arg1);
if (health <= 0){
destroy();
};
}
public function hitTest(_arg1:Number, _arg2:Number):Boolean{
return (!((((((((_arg1 < hitLeft)) || ((_arg1 > hitRight)))) || ((_arg2 < hitTop)))) || ((_arg2 > hitBottom)))));
}
public function damage(_arg1:Number):void{
if ((((((this is Carrier)) || ((this is Civ)))) || ((this is Ship)))){
health = (health - _arg1);
} else {
if (space.skill == 0){
health = (health - (_arg1 * 1.5));
} else {
if (space.skill == 1){
health = (health - _arg1);
} else {
health = (health - (_arg1 * 0.5));
};
};
};
if (health < 0){
health = 0;
};
}
}
}//package com.wbwar.chopraider.game
Section 165
//InformationArea (com.wbwar.chopraider.game.InformationArea)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.text.*;
public class InformationArea extends Sprite {
private var takeOffText:Pulsator;
private var space:Space;
public function InformationArea(_arg1:Space):void{
var _local3:TextField;
super();
this.space = _arg1;
var _local2:TextFormat = new TextFormat();
_local2.font = "wbfont";
_local2.color = 144;
_local2.size = 18;
_local2.bold = true;
_local3 = new TextField();
_local3.antiAliasType = AntiAliasType.ADVANCED;
_local3.gridFitType = GridFitType.NONE;
_local3.background = false;
_local3.border = false;
_local3.embedFonts = true;
_local3.defaultTextFormat = _local2;
_local3.autoSize = TextFieldAutoSize.CENTER;
_local3.selectable = false;
_local3.text = "PRESS SHIFT\nTO TAKE OFF\n AND LAND";
takeOffText = new Pulsator(_local3, 1.07, 4);
this.addChild(takeOffText);
}
public function hideTakeOffText():void{
takeOffText.visible = false;
}
public function showTakeOffText():void{
takeOffText.visible = true;
}
public function update():void{
if (takeOffText.visible){
takeOffText.update();
};
}
}
}//package com.wbwar.chopraider.game
Section 166
//InGameMenu (com.wbwar.chopraider.game.InGameMenu)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
public class InGameMenu extends Sprite {
private const menuHeight:Number = 155;
private const menuWidth:Number = 370;
private var space:Space;
public function InGameMenu(_arg1:Space){
this.space = _arg1;
this.graphics.beginFill(0xFFFFFF, 0.95);
this.graphics.drawRect(0, 0, menuWidth, menuHeight);
this.graphics.endFill();
this.graphics.lineStyle(3, 3158271);
this.graphics.drawRect(0, 0, menuWidth, menuHeight);
var _local2:FontButton = new FontButton("Resume Game", 200, 30, 144, 20);
_local2.x = ((menuWidth / 2) - (_local2.width / 2));
_local2.y = 20;
_local2.addEventListener(MouseEvent.CLICK, resumeButtonClicked);
addChild(_local2);
var _local3:FontButton = new FontButton("Exit To Menu", 200, 30, 0x900000, 20);
_local3.x = ((menuWidth / 2) - (_local3.width / 2));
_local3.y = 60;
_local3.addEventListener(MouseEvent.CLICK, exitButtonClicked);
addChild(_local3);
var _local4:FontButton = new FontButton("Play More Games", 200, 30, 0x9000, 20);
_local4.x = ((menuWidth / 2) - (_local4.width / 2));
_local4.y = 100;
_local4.addEventListener(MouseEvent.CLICK, pmgButtonClicked);
addChild(_local4);
}
private function resumeButtonClicked(_arg1:Event):void{
space.hideMenu();
}
private function pmgButtonClicked(_arg1:Event):void{
wbwar.bubbleBoxClick("ingamemenu");
}
private function exitButtonClicked(_arg1:Event):void{
space.exit();
}
}
}//package com.wbwar.chopraider.game
Section 167
//Layer (com.wbwar.chopraider.game.Layer)
package com.wbwar.chopraider.game {
import flash.display.*;
public class Layer extends Sprite {
private var gameObjectsToRemove:Array;
private var gameObjectsToAdd:Array;
private var space:Space;
private var gameObjectStages:Array;
private var lastLevel:int;
public function Layer(_arg1:Space):void{
gameObjectsToAdd = new Array();
gameObjectsToRemove = new Array();
gameObjectStages = new Array();
super();
this.space = _arg1;
this.mouseEnabled = false;
var _local2:int;
while (_local2 < 20) {
gameObjectStages.push(new Array());
_local2++;
};
}
private function removeStagedObjectsByLevel(_arg1:int, _arg2:int):void{
var _local4:GameObject;
var _local3:Array = new Array();
for each (_local4 in this.gameObjectStages[_arg2]) {
if (_local4.owner != _arg1){
_local3.push(_local4);
};
};
this.gameObjectStages[_arg2] = _local3;
}
public function update():void{
var _local1:GameObject;
var _local4:Boolean;
var _local5:uint;
var _local2:Number = (((space.ship.gamespace_x + space.mouseX) + (space.ship.dx * space.SHIP_SLIDE)) - (space.viewPort.width / 2));
var _local3:Number = (((space.ship.gamespace_y + space.mouseY) + (space.ship.dy * space.SHIP_SLIDE)) - (space.viewPort.height / 2));
if (this.space.currentLevel != lastLevel){
lastLevel = this.space.currentLevel;
for each (_local1 in this.gameObjectStages[lastLevel]) {
addGameObject(_local1);
};
gameObjectStages[lastLevel] = new Array();
};
for each (_local1 in gameObjectsToAdd) {
this.addChild(_local1);
};
gameObjectsToAdd = new Array();
_local4 = false;
_local5 = 0;
while (_local5 < numChildren) {
_local1 = (getChildAt(_local5) as GameObject);
if ((_local1 is Factory)){
if ((_local1 as Factory).factoryState == 0){
space.factoryPresent = true;
};
};
if ((((_local1.level == -1)) || ((_local1.level <= this.space.currentLevel)))){
_local1.update();
if ((((_local1 is Carrier)) && ((this.space.ship.shipState == 0)))){
_local1.x = ((_local1.gamespace_x - space.viewPort.x) + (space.viewPort.width / 2));
_local1.y = ((_local1.gamespace_y - space.viewPort.y) + (space.viewPort.height / 2));
} else {
_local1.x = ((_local1.gamespace_x - int(space.viewPort.x)) + (space.viewPort.width / 2));
_local1.y = ((_local1.gamespace_y - int(space.viewPort.y)) + (space.viewPort.height / 2));
};
if ((_local1 is PowerPlant)){
if ((_local1 as PowerPlant).hitTest(_local2, _local3)){
(_local1 as PowerPlant).bombIndicator.visible = true;
};
} else {
if ((_local1 is Factory)){
if ((_local1 as Factory).hitTest(_local2, _local3)){
(_local1 as Factory).bombIndicator.visible = true;
};
} else {
if ((_local1 is AirBase)){
if ((_local1 as AirBase).hitTest(_local2, _local3)){
(_local1 as AirBase).bombIndicator.visible = true;
};
} else {
if ((_local1 is TankBase)){
if ((_local1 as TankBase).hitTest(_local2, _local3)){
(_local1 as TankBase).bombIndicator.visible = true;
};
} else {
if ((_local1 is ShipYard)){
if ((_local1 as ShipYard).hitTest(_local2, _local3)){
(_local1 as ShipYard).bombIndicator.visible = true;
};
} else {
if ((_local1 is RoadBlock)){
if ((_local1 as RoadBlock).hitTest(_local2, _local3)){
(_local1 as RoadBlock).bombIndicator.visible = true;
};
};
};
};
};
};
};
};
_local5++;
};
for each (_local1 in gameObjectsToRemove) {
this.removeChild(_local1);
};
gameObjectsToRemove = new Array();
}
public function removeStagedObjects(_arg1:int):void{
var _local2:int;
while (_local2 < 20) {
removeStagedObjectsByLevel(_arg1, _local2);
_local2++;
};
}
public function addGameObject(_arg1:GameObject):void{
if (_arg1.level > this.space.currentLevel){
gameObjectStages[_arg1.level].push(_arg1);
trace(("adding to higher level: " + _arg1));
} else {
this.gameObjectsToAdd.push(_arg1);
};
}
public function removeGameObject(_arg1:GameObject):void{
this.gameObjectsToRemove.push(_arg1);
}
}
}//package com.wbwar.chopraider.game
Section 168
//LostFocus (com.wbwar.chopraider.game.LostFocus)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
public class LostFocus extends Sprite {
private var space:Space;
public function LostFocus(_arg1:Space){
var _local3:TextField;
super();
this.space = _arg1;
this.graphics.beginFill(0xF0F0F0, 0.95);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
this.addEventListener(MouseEvent.CLICK, resumeButtonClicked);
var _local2:TextFormat = new TextFormat();
_local2.font = "wbfont";
_local2.color = 144;
_local2.size = 28;
_local2.bold = true;
_local3 = new TextField();
_local3.antiAliasType = AntiAliasType.ADVANCED;
_local3.gridFitType = GridFitType.PIXEL;
_local3.background = false;
_local3.border = false;
_local3.embedFonts = true;
_local3.defaultTextFormat = _local2;
_local3.autoSize = TextFieldAutoSize.CENTER;
_local3.selectable = false;
_local3.text = " Game Paused.\n Click to return to the War.";
addChild(_local3);
_local3.x = ((App.GAME_WIDTH / 2) - (_local3.width / 2));
_local3.y = 150;
this.visible = false;
}
private function resumeButtonClicked(_arg1:Event):void{
var _local2:SoundTransform;
space.paused = false;
this.visible = false;
if (!space.status.muteButton.mute){
_local2 = new SoundTransform();
_local2.volume = 1;
SoundMixer.soundTransform = _local2;
};
}
public function show():void{
space.paused = true;
this.visible = true;
var _local1:SoundTransform = new SoundTransform();
_local1.volume = 0;
SoundMixer.soundTransform = _local1;
}
}
}//package com.wbwar.chopraider.game
Section 169
//MainScreen (com.wbwar.chopraider.game.MainScreen)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.text.*;
public class MainScreen extends Sprite {
private var arenaMapsBitmap:Bitmap;
private var arenaMapsButton:ImageButton;
private var app:App;
private var campaignButton:ImageButton;
private var campaignBitmap:Bitmap;
private var playMoreGamesBitmap:Bitmap;
private var creditsBitmap:Bitmap;
private var playMoreGamesButton:ImageButton;
private var creditsButton:ImageButton;
private var titleBitmap:Bitmap;
private var trainingBitmap:Bitmap;
private var trainingButton:ImageButton;
private var bubbleBoxButton:BubbleBoxButton;
private static var trainingImage:Class = MainScreen_trainingImage;
private static var titleImage:Class = MainScreen_titleImage;
private static var creditsImage:Class = MainScreen_creditsImage;
private static var playMoreGamesImage:Class = MainScreen_playMoreGamesImage;
private static var campaignImage:Class = MainScreen_campaignImage;
private static var arenaMapsImage:Class = MainScreen_arenaMapsImage;
public function MainScreen(_arg1:App):void{
var rezSprite:Sprite;
var rezText:GenericTextField;
var cr:GenericTextField;
var app = _arg1;
titleBitmap = (new titleImage() as Bitmap);
creditsBitmap = (new creditsImage() as Bitmap);
trainingBitmap = (new trainingImage() as Bitmap);
campaignBitmap = (new campaignImage() as Bitmap);
arenaMapsBitmap = (new arenaMapsImage() as Bitmap);
playMoreGamesBitmap = (new playMoreGamesImage() as Bitmap);
super();
this.app = app;
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
var titleSprite:Sprite = new Sprite();
titleSprite.addChild(titleBitmap);
addChild(titleSprite);
titleSprite.x = ((App.GAME_WIDTH / 2) - (titleBitmap.width / 2));
titleSprite.y = 10;
titleSprite.addEventListener(MouseEvent.CLICK, navClicked);
titleSprite.buttonMode = true;
creditsButton = new ImageButton(creditsBitmap, 1.05);
creditsButton.x = 20;
creditsButton.y = 310;
creditsButton.addEventListener(ImageButton.CLICKED, creditsButtonClicked);
addChild(creditsButton);
trainingButton = new ImageButton(trainingBitmap, 1.05);
trainingButton.x = ((App.GAME_WIDTH / 2) - (trainingButton.width / 2));
trainingButton.y = 210;
trainingButton.addEventListener(ImageButton.CLICKED, trainingButtonClicked);
addChild(trainingButton);
campaignButton = new ImageButton(campaignBitmap, 1.05);
campaignButton.x = ((App.GAME_WIDTH / 2) - (campaignButton.width / 2));
campaignButton.y = 270;
campaignButton.addEventListener(ImageButton.CLICKED, campaignButtonClicked);
addChild(campaignButton);
arenaMapsButton = new ImageButton(arenaMapsBitmap, 1.05);
arenaMapsButton.x = ((App.GAME_WIDTH / 2) - (arenaMapsButton.width / 2));
arenaMapsButton.y = 330;
arenaMapsButton.addEventListener(ImageButton.CLICKED, arenaMapsButtonClicked);
addChild(arenaMapsButton);
playMoreGamesButton = new ImageButton(playMoreGamesBitmap, 1.05);
playMoreGamesButton.x = ((App.GAME_WIDTH / 2) - (playMoreGamesButton.width / 2));
playMoreGamesButton.y = 390;
playMoreGamesButton.addEventListener(ImageButton.CLICKED, playMoreGamesButtonClicked);
addChild(playMoreGamesButton);
bubbleBoxButton = new BubbleBoxButton(1);
bubbleBoxButton.x = ((App.GAME_WIDTH / 2) - (bubbleBoxButton.width / 2));
bubbleBoxButton.y = ((App.GAME_HEIGHT - bubbleBoxButton.height) - 5);
bubbleBoxButton.addEventListener(BubbleBoxButton.CLICKED, bubbleBoxButtonClicked);
addChild(bubbleBoxButton);
var format:TextFormat = new TextFormat();
format.font = "wbfont";
format.color = 144;
format.size = 15;
format.bold = true;
var linkSprite:Sprite = new Sprite();
addChild(linkSprite);
var wwwtext:TextField = new TextField();
wwwtext.antiAliasType = AntiAliasType.ADVANCED;
wwwtext.gridFitType = GridFitType.PIXEL;
wwwtext.background = false;
wwwtext.border = false;
wwwtext.embedFonts = true;
wwwtext.defaultTextFormat = format;
wwwtext.autoSize = TextFieldAutoSize.LEFT;
wwwtext.text = "WWW.WHITEBOARDWAR.COM";
wwwtext.mouseEnabled = false;
wwwtext.selectable = false;
linkSprite.addChild(wwwtext);
linkSprite.x = ((App.GAME_WIDTH / 2) - (wwwtext.width / 2));
linkSprite.y = 160;
linkSprite.buttonMode = true;
linkSprite.useHandCursor = true;
wwwtext.addEventListener(MouseEvent.MOUSE_DOWN, navClicked);
format.size = 10;
var text:TextField = new TextField();
text.antiAliasType = AntiAliasType.ADVANCED;
text.gridFitType = GridFitType.PIXEL;
text.background = false;
text.border = false;
text.embedFonts = true;
text.defaultTextFormat = format;
text.autoSize = TextFieldAutoSize.LEFT;
text.text = "Copyright© 2008 by Virgil Wall";
addChild(text);
text.x = ((App.GAME_WIDTH - text.width) - 3);
text.y = (App.GAME_HEIGHT - 20);
format.size = 8;
var version:TextField = new TextField();
version.antiAliasType = AntiAliasType.ADVANCED;
version.gridFitType = GridFitType.PIXEL;
version.background = false;
version.border = false;
version.embedFonts = true;
version.defaultTextFormat = format;
version.autoSize = TextFieldAutoSize.LEFT;
version.text = "Version 1.0.8";
addChild(version);
version.x = 5;
version.y = (App.GAME_HEIGHT - 20);
version.alpha = 0.3;
trace(wbwar.instance.stage.stageWidth);
if (((!((wbwar.instance.stage.stageWidth == 700))) || (!((wbwar.instance.stage.stageHeight == 500))))){
rezSprite = new Sprite();
rezSprite.graphics.beginFill(16777200);
rezSprite.graphics.drawRect(0, 0, 100, 110);
rezSprite.graphics.endFill();
rezSprite.graphics.lineStyle(1, 0x303030);
rezSprite.graphics.drawRect(0, 0, 100, 110);
rezText = new GenericTextField(0x700000, 12);
rezText.mouseEnabled = false;
rezText.text = ((((("Best played at\n" + " 700x500\n\n") + " Visit\n") + "bubblebox.com\n") + " to play\n") + " at this rez");
rezSprite.addChild(rezText);
addChild(rezSprite);
rezSprite.x = 585;
rezSprite.y = 250;
rezSprite.buttonMode = true;
cr = new GenericTextField(144, 12);
cr.background = true;
cr.text = ((("Current Resolution\n " + wbwar.instance.stage.stageWidth) + "x") + wbwar.instance.stage.stageHeight);
cr.visible = false;
cr.mouseEnabled = false;
cr.border = true;
addChild(cr);
rezSprite.addEventListener(MouseEvent.CLICK, function (_arg1:Event):void{
wbwar.bubbleBoxClick("resolution");
});
rezSprite.addEventListener(MouseEvent.MOUSE_OVER, function (_arg1:Event):void{
cr.visible = true;
cr.x = mouseX;
cr.y = mouseY;
});
rezSprite.addEventListener(MouseEvent.MOUSE_OUT, function (_arg1:Event):void{
cr.visible = false;
});
rezSprite.addEventListener(MouseEvent.MOUSE_MOVE, function (_arg1:Event):void{
cr.x = (mouseX - (cr.width / 2));
cr.y = ((mouseY - cr.height) - 5);
});
};
}
private function navClicked(_arg1:MouseEvent):void{
wbwar.wbwarClick("mainscreen");
}
private function creditsButtonClicked(_arg1:ButtonEvent):void{
app.showCreditsScreen();
}
private function playMoreGamesButtonClicked(_arg1:ButtonEvent):void{
wbwar.bubbleBoxClick("mainscreen");
}
private function campaignButtonClicked(_arg1:ButtonEvent):void{
app.showCampaignScreen();
}
private function bubbleBoxButtonClicked(_arg1:ButtonEvent):void{
wbwar.bubbleBoxClick("mainscreen");
}
private function arenaMapsButtonClicked(_arg1:ButtonEvent):void{
app.showArenaScreen();
}
private function trainingButtonClicked(_arg1:ButtonEvent):void{
app.showTrainingScreen();
}
}
}//package com.wbwar.chopraider.game
Section 170
//MainScreen_arenaMapsImage (com.wbwar.chopraider.game.MainScreen_arenaMapsImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MainScreen_arenaMapsImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 171
//MainScreen_campaignImage (com.wbwar.chopraider.game.MainScreen_campaignImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MainScreen_campaignImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 172
//MainScreen_creditsImage (com.wbwar.chopraider.game.MainScreen_creditsImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MainScreen_creditsImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 173
//MainScreen_playMoreGamesImage (com.wbwar.chopraider.game.MainScreen_playMoreGamesImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MainScreen_playMoreGamesImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 174
//MainScreen_titleImage (com.wbwar.chopraider.game.MainScreen_titleImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MainScreen_titleImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 175
//MainScreen_trainingImage (com.wbwar.chopraider.game.MainScreen_trainingImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MainScreen_trainingImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 176
//Missile (com.wbwar.chopraider.game.Missile)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
public class Missile extends HittableGameObject {
private var missileExplosionSound:Sound;
private var missileFlySoundChannel:SoundChannel;
private var wiggleDir:Number;// = 1
private var speed:Number;
private var missileFlySound:Sound;
private var sourceBitmap:Bitmap;
public var wiggle:Number;// = 7
private var missileDamage:Number;
private var maxAge:uint;
private var turnRate:Number;// = 10
private var age:uint;// = 0
private static var sourceImage:Class = Missile_sourceImage;
public function Missile(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number){
sourceBitmap = (new sourceImage() as Bitmap);
super(_arg1, _arg2, _arg3, _arg5);
this.maxAge = _arg6;
this.missileDamage = _arg7;
this.speed = _arg8;
_arg1.layerAir.addGameObject(this);
this.addChild(sourceBitmap);
sourceBitmap.x = (-(sourceBitmap.width) / 2);
sourceBitmap.y = (-(sourceBitmap.height) / 2);
this.gamespace_x = _arg2;
this.gamespace_y = _arg3;
this.rotation = _arg4;
missileFlySound = SoundManager.instance.getSound("missilefly");
missileExplosionSound = SoundManager.instance.getSound("missileexplosion");
missileFlySoundChannel = missileFlySound.play(0, 999999);
}
override public function update():void{
if (health <= 0){
space.layerAir.removeGameObject(this);
if (missileFlySoundChannel != null){
missileFlySoundChannel.stop();
};
missileExplosionSound.play();
new SmallExplosion(space, this.gamespace_x, this.gamespace_y, false, 8);
this.space.score = (this.space.score + this.startHealth);
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
return;
};
if (age > maxAge){
space.layerAir.removeGameObject(this);
if (missileFlySoundChannel != null){
missileFlySoundChannel.stop();
};
missileExplosionSound.play();
new SmallExplosion(space, this.gamespace_x, this.gamespace_y, false, 4);
return;
};
age++;
var _local1:Number = this.space.ship.gamespace_x;
var _local2:Number = this.space.ship.gamespace_y;
if ((((((Math.abs((_local1 - this.gamespace_x)) < 7)) && ((Math.abs((_local2 - this.gamespace_y)) < 7)))) && ((this.space.ship.shipState < 4)))){
this.space.ship.damage(missileDamage);
space.layerAir.removeGameObject(this);
if (missileFlySoundChannel != null){
missileFlySoundChannel.stop();
};
missileExplosionSound.play();
new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
};
if ((age % 5) == 0){
wiggleDir = -(wiggleDir);
};
if (this.space.ship.shipState < 4){
rotation = this.getTurn(_local1, _local2, turnRate, (wiggle * wiggleDir));
};
var _local3:Number = (speed * Math.sin(((rotation / 180) * Math.PI)));
var _local4:Number = (speed * Math.cos(((rotation / 180) * Math.PI)));
this.gamespace_x = (this.gamespace_x + _local4);
this.gamespace_y = (this.gamespace_y + _local3);
if ((age % 3) == 0){
new Smoke(space, this.gamespace_x, this.gamespace_y);
};
this.hitLeft = (gamespace_x - 15);
this.hitRight = (gamespace_x + 15);
this.hitTop = (gamespace_y - 15);
this.hitBottom = (gamespace_y + 15);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
}
}
}//package com.wbwar.chopraider.game
Section 177
//Missile_sourceImage (com.wbwar.chopraider.game.Missile_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Missile_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 178
//MissileBarrageBar (com.wbwar.chopraider.game.MissileBarrageBar)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.text.*;
public class MissileBarrageBar extends Sprite {
private var space:Space;
private var border:Boolean;
private var text:TextField;
private var maxBarrages:int;
private var barrageIndicatorBitmap:Bitmap;
private var images:Array;
private static var sourceImage:Class = MissileBarrageBar_sourceImage;
private static var barrageIndicatorImage:Class = MissileBarrageBar_barrageIndicatorImage;
public function MissileBarrageBar(_arg1:Space, _arg2:int){
var _local3:Bitmap;
barrageIndicatorBitmap = (new barrageIndicatorImage() as Bitmap);
images = new Array();
text = new TextField();
super();
this.space = _arg1;
this.border = border;
this.maxBarrages = _arg2;
barrageIndicatorBitmap.x = 12;
barrageIndicatorBitmap.y = -1;
this.addChild(barrageIndicatorBitmap);
var _local4:int;
while (_local4 < _arg2) {
_local3 = (new sourceImage() as Bitmap);
images.push(_local3);
this.addChild(_local3);
_local3.x = 0;
_local3.y = (_local4 * (_local3.height + 2));
_local4++;
};
var _local5:TextFormat = new TextFormat();
_local5.font = "wbfont";
_local5.color = 144;
_local5.size = 8;
_local5.bold = true;
text.background = false;
text.border = false;
text.embedFonts = true;
text.defaultTextFormat = _local5;
text.autoSize = TextFieldAutoSize.LEFT;
text.text = "LOADED";
addChild(text);
text.visible = true;
text.x = -6;
text.y = -14;
}
public function setBarrageCount(_arg1:int):void{
if (this.space.ship.loadedBeacons > 0){
text.visible = true;
} else {
text.visible = false;
};
if (_arg1 > 0){
barrageIndicatorBitmap.visible = true;
} else {
barrageIndicatorBitmap.visible = false;
};
var _local2:int;
while (_local2 < this.maxBarrages) {
if (_local2 >= _arg1){
(images[_local2] as Bitmap).visible = false;
} else {
(images[_local2] as Bitmap).visible = true;
};
_local2++;
};
}
}
}//package com.wbwar.chopraider.game
Section 179
//MissileBarrageBar_barrageIndicatorImage (com.wbwar.chopraider.game.MissileBarrageBar_barrageIndicatorImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MissileBarrageBar_barrageIndicatorImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 180
//MissileBarrageBar_sourceImage (com.wbwar.chopraider.game.MissileBarrageBar_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class MissileBarrageBar_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 181
//MissileLauncher (com.wbwar.chopraider.game.MissileLauncher)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class MissileLauncher extends TrackingGroundWeapon {
private var bean:MissileLauncherBean;
private var platformBitmap:Bitmap;
private var barrelBitmap:Bitmap;
private var launchSound:Sound;
public function MissileLauncher(_arg1:Space, _arg2:MissileLauncherBean):void{
platformBitmap = (new GameBitmaps.gunPlatformImage() as Bitmap);
barrelBitmap = (new GameBitmaps.missileLauncherBarrelImage() as Bitmap);
super(_arg1, _arg2, platformBitmap, barrelBitmap, (barrelBitmap.width / 2));
this.bean = _arg2;
RECOIL_AMT = 0;
destroyedSound = SoundManager.instance.getSound("destroyed");
launchSound = SoundManager.instance.getSound("missilelaunch");
}
override protected function fireWeapon():void{
launchSound.play();
var _local1:Missile = new Missile(space, this.gamespace_x, this.gamespace_y, barrelSprite.rotation, bean.missileHealth, bean.missileLife, bean.weaponDamage, bean.missileSpeed);
}
}
}//package com.wbwar.chopraider.game
Section 182
//MissionBriefing (com.wbwar.chopraider.game.MissionBriefing)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.text.*;
public class MissionBriefing extends Sprite {
private var space:Space;
public function MissionBriefing(_arg1:Space){
var _local3:TextField;
super();
this.space = _arg1;
this.graphics.beginFill(0xFFFFFF, 0.95);
this.graphics.drawRoundRect(0, 0, 500, 450, 11, 11);
this.graphics.endFill();
this.graphics.lineStyle(5, 0);
this.graphics.drawRoundRect(0, 0, 500, 450, 11, 11);
var _local2:TextFormat = new TextFormat();
_local2.font = "wbfont";
_local2.color = 80;
_local2.size = 18;
_local2.bold = true;
_local3 = new TextField();
_local3.antiAliasType = AntiAliasType.ADVANCED;
_local3.gridFitType = GridFitType.PIXEL;
_local3.background = false;
_local3.border = false;
_local3.embedFonts = true;
_local3.defaultTextFormat = _local2;
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.selectable = false;
_local3.text = _arg1.selectedGameMap.title;
_local3.x = ((this.width / 2) - (_local3.width / 2));
_local3.y = 10;
addChild(_local3);
var _local4:TextFormat = new TextFormat();
_local4.font = "wbfont";
_local4.color = 144;
_local4.size = 13;
_local4.bold = true;
var _local5:TextField = new TextField();
_local5.antiAliasType = AntiAliasType.ADVANCED;
_local5.gridFitType = GridFitType.PIXEL;
_local5.background = false;
_local5.border = false;
_local5.embedFonts = true;
_local5.defaultTextFormat = _local4;
_local5.autoSize = TextFieldAutoSize.LEFT;
_local5.selectable = false;
_local5.text = _arg1.selectedGameMap.description;
_local5.x = 10;
_local5.y = ((10 + _local3.height) + 10);
addChild(_local5);
var _local6:TextButton = new TextButton("BEGIN MISSION", 200, 25);
_local6.x = ((this.width / 2) - (_local6.width / 2));
_local6.y = (this.height - 40);
_local6.addEventListener(MouseEvent.CLICK, beginButtonClicked);
addChild(_local6);
}
private function beginButtonClicked(_arg1:Event):void{
this.visible = false;
this.space.onMissionBriefing = false;
}
}
}//package com.wbwar.chopraider.game
Section 183
//NumberDisplay (com.wbwar.chopraider.game.NumberDisplay)
package com.wbwar.chopraider.game {
import flash.display.*;
public class NumberDisplay extends Sprite {
private var bitmap0:Bitmap;
private var bitmap1:Bitmap;
private var bitmap2:Bitmap;
private var bitmap3:Bitmap;
private var bitmap4:Bitmap;
private var bitmap5:Bitmap;
private var bitmap6:Bitmap;
private var bitmap7:Bitmap;
private var bitmap8:Bitmap;
private var bitmap9:Bitmap;
private var digitCount:int;
private var digitBitmaps:Array;
private static var image8:Class = NumberDisplay_image8;
private static var image0:Class = NumberDisplay_image0;
private static var image1:Class = NumberDisplay_image1;
private static var image2:Class = NumberDisplay_image2;
private static var image3:Class = NumberDisplay_image3;
private static var image4:Class = NumberDisplay_image4;
private static var image5:Class = NumberDisplay_image5;
private static var image6:Class = NumberDisplay_image6;
private static var image7:Class = NumberDisplay_image7;
private static var image9:Class = NumberDisplay_image9;
public function NumberDisplay(_arg1:int=7):void{
var _local2:Bitmap;
bitmap0 = (new image0() as Bitmap);
bitmap1 = (new image1() as Bitmap);
bitmap2 = (new image2() as Bitmap);
bitmap3 = (new image3() as Bitmap);
bitmap4 = (new image4() as Bitmap);
bitmap5 = (new image5() as Bitmap);
bitmap6 = (new image6() as Bitmap);
bitmap7 = (new image7() as Bitmap);
bitmap8 = (new image8() as Bitmap);
bitmap9 = (new image9() as Bitmap);
digitBitmaps = new Array();
super();
this.digitCount = _arg1;
var _local3:int;
while (_local3 < _arg1) {
_local2 = new Bitmap();
digitBitmaps.push(_local2);
this.addChild(_local2);
_local2.x = (_local3 * (bitmap0.width + 2));
_local3++;
};
}
public function setNumber(_arg1:int):void{
var _local2:int;
var _local4:BitmapData;
var _local3:int = _arg1;
var _local5:uint;
var _local6:int = Math.pow(10, (digitCount - 1));
var _local7:int = _local6;
while (_local7 > 0) {
_local2 = (_local3 / _local7);
switch (_local2){
case 0:
_local4 = bitmap0.bitmapData;
break;
case 1:
_local4 = bitmap1.bitmapData;
break;
case 2:
_local4 = bitmap2.bitmapData;
break;
case 3:
_local4 = bitmap3.bitmapData;
break;
case 4:
_local4 = bitmap4.bitmapData;
break;
case 5:
_local4 = bitmap5.bitmapData;
break;
case 6:
_local4 = bitmap6.bitmapData;
break;
case 7:
_local4 = bitmap7.bitmapData;
break;
case 8:
_local4 = bitmap8.bitmapData;
break;
case 9:
_local4 = bitmap9.bitmapData;
break;
};
var _temp1 = _local5;
_local5 = (_local5 + 1);
(digitBitmaps[_temp1] as Bitmap).bitmapData = _local4;
_local3 = (_local3 - (_local2 * _local7));
_local7 = (_local7 / 10);
};
}
}
}//package com.wbwar.chopraider.game
Section 184
//NumberDisplay_image0 (com.wbwar.chopraider.game.NumberDisplay_image0)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image0 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 185
//NumberDisplay_image1 (com.wbwar.chopraider.game.NumberDisplay_image1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image1 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 186
//NumberDisplay_image2 (com.wbwar.chopraider.game.NumberDisplay_image2)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image2 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 187
//NumberDisplay_image3 (com.wbwar.chopraider.game.NumberDisplay_image3)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image3 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 188
//NumberDisplay_image4 (com.wbwar.chopraider.game.NumberDisplay_image4)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image4 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 189
//NumberDisplay_image5 (com.wbwar.chopraider.game.NumberDisplay_image5)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image5 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 190
//NumberDisplay_image6 (com.wbwar.chopraider.game.NumberDisplay_image6)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image6 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 191
//NumberDisplay_image7 (com.wbwar.chopraider.game.NumberDisplay_image7)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image7 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 192
//NumberDisplay_image8 (com.wbwar.chopraider.game.NumberDisplay_image8)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image8 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 193
//NumberDisplay_image9 (com.wbwar.chopraider.game.NumberDisplay_image9)
package com.wbwar.chopraider.game {
import mx.core.*;
public class NumberDisplay_image9 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 194
//Plane (com.wbwar.chopraider.game.Plane)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Plane extends HittableGameObject {
private var airBase:AirBase;
private var speed:Number;
private var rangeSquare:Number;
private var planeFlySoundChannel:SoundChannel;
private var range:Number;// = 600
private var planeFlySound:Sound;
private var damageAmt:Number;
private var flyStraightDistance:Number;// = 1250
private var planeExplosionSound:Sound;
private var targetX:Number;
private var targetY:Number;
private var sourceBitmap:Bitmap;
private var recharge:Number;// = 8
private var tship:Boolean;// = true
private var rangeFromAirBaseSquare:Number;
private var rangeFromAirBase:Number;// = 800
private var firedTimer:int;// = 0
private var flyingStraight:Boolean;// = false
private var maxAge:uint;
private var turnRate:Number;// = 4
private var age:uint;// = 0
private static var sourceImage:Class = Plane_sourceImage;
public function Plane(_arg1:AirBase, _arg2:Space, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number){
sourceBitmap = (new sourceImage() as Bitmap);
rangeFromAirBaseSquare = (rangeFromAirBase * rangeFromAirBase);
rangeSquare = (range * range);
super(_arg2, _arg3, _arg4, _arg6);
this.airBase = _arg1;
this.maxAge = _arg7;
this.damageAmt = _arg8;
this.speed = _arg9;
_arg2.layerAir.addGameObject(this);
this.addChild(sourceBitmap);
sourceBitmap.x = (-(sourceBitmap.width) / 2);
sourceBitmap.y = (-(sourceBitmap.height) / 2);
this.gamespace_x = _arg3;
this.gamespace_y = _arg4;
this.rotation = _arg5;
planeExplosionSound = SoundManager.instance.getSound("destroyed2");
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
}
override public function update():void{
var _local5:Point;
var _local6:Point;
if ((((health <= 0)) || ((airBase.baseState == 1)))){
space.layerAir.removeGameObject(this);
planeExplosionSound.play();
new Explosion(space, this.gamespace_x, this.gamespace_y, false, 15);
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 5, 0);
this.space.score = (this.space.score + this.startHealth);
this.airBase.currentPlaneCount--;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
return;
};
if (age > maxAge){
};
age++;
if (((tship) && ((((this.space.ship.shipState < 4)) && (!((this.space.ship.shipState == 0))))))){
_local5 = this.space.ship.getProjection(0, 0);
targetX = _local5.x;
targetY = _local5.y;
};
if ((((Math.abs((targetX - this.gamespace_x)) < 125)) && ((Math.abs((targetY - this.gamespace_y)) < 125)))){
if (flyingStraight){
flyingStraight = false;
tship = true;
} else {
flyingStraight = true;
tship = false;
_local5 = this.getProjection(flyStraightDistance, 0);
targetX = _local5.x;
targetY = _local5.y;
};
};
var _local1:Number = (this.gamespace_x - this.airBase.gamespace_x);
var _local2:Number = (this.gamespace_y - this.airBase.gamespace_y);
if (((!(flyingStraight)) && ((((_local1 * _local1) + (_local2 * _local2)) > rangeFromAirBaseSquare)))){
targetX = this.airBase.gamespace_x;
targetY = this.airBase.gamespace_y;
};
rotation = getTurn(targetX, targetY, turnRate);
var _local3:Number = (speed * Math.sin(((rotation / 180) * Math.PI)));
var _local4:Number = (speed * Math.cos(((rotation / 180) * Math.PI)));
this.gamespace_x = (this.gamespace_x + _local4);
this.gamespace_y = (this.gamespace_y + _local3);
getTurn(this.space.ship.gamespace_x, this.space.ship.gamespace_y, 0);
if ((((((((update_diff < 2)) && ((Math.abs(update_deltaX) < range)))) && ((Math.abs(update_deltaY) < range)))) && ((firedTimer == 0)))){
if (((update_deltaX * update_deltaX) + (update_deltaY * update_deltaY)) < rangeSquare){
_local6 = getProjection(100, 0);
new Bullet(space, _local4, _local3, this.gamespace_x, this.gamespace_y, _local6.x, _local6.y, damageAmt, true, false);
firedTimer = recharge;
};
};
firedTimer--;
if (firedTimer < 0){
firedTimer = 0;
};
if ((age % 2) == 0){
new Smoke(space, this.gamespace_x, this.gamespace_y);
};
this.hitLeft = (gamespace_x - 25);
this.hitRight = (gamespace_x + 25);
this.hitTop = (gamespace_y - 25);
this.hitBottom = (gamespace_y + 25);
}
}
}//package com.wbwar.chopraider.game
Section 195
//Plane_sourceImage (com.wbwar.chopraider.game.Plane_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Plane_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 196
//PowBar (com.wbwar.chopraider.game.PowBar)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.text.*;
public class PowBar extends Sprite {
private var totalPowsOnboardTextValue:TextField;
private var totalPowsOnboardText:TextField;
private var space:Space;
private var totalPowsKilledTextValue:TextField;
private var totalPowsKilledText:TextField;
private var totalPowsSavedText:TextField;
private var totalPowsSavedTextValue:TextField;
public function PowBar(_arg1:Space){
totalPowsSavedText = new GenericTextField(0, 10);
totalPowsKilledText = new GenericTextField(0, 10);
totalPowsOnboardText = new GenericTextField(0, 10);
totalPowsSavedTextValue = new GenericTextField(0xFF, 10);
totalPowsKilledTextValue = new GenericTextField(0xFF0000, 10);
totalPowsOnboardTextValue = new GenericTextField(0x5000, 10);
super();
this.space = _arg1;
totalPowsSavedText.text = "POWS SAVED: ";
totalPowsKilledText.text = "POWS KILLED: ";
totalPowsOnboardText.text = "POWS ON CHOPRAIDER: ";
totalPowsSavedTextValue.background = true;
totalPowsKilledTextValue.background = true;
totalPowsOnboardTextValue.background = true;
addChild(totalPowsSavedText);
totalPowsSavedText.x = 0;
totalPowsSavedText.y = 0;
addChild(totalPowsSavedTextValue);
totalPowsSavedTextValue.x = 75;
totalPowsSavedTextValue.y = 0;
addChild(totalPowsKilledText);
totalPowsKilledText.x = 105;
totalPowsKilledText.y = 0;
addChild(totalPowsKilledTextValue);
totalPowsKilledTextValue.x = 183;
totalPowsKilledTextValue.y = 0;
addChild(totalPowsOnboardText);
totalPowsOnboardText.x = 0;
totalPowsOnboardText.y = 12;
addChild(totalPowsOnboardTextValue);
totalPowsOnboardTextValue.x = 131;
totalPowsOnboardTextValue.y = 12;
}
public function update():void{
totalPowsSavedTextValue.text = String(space.savedPOWS);
totalPowsKilledTextValue.text = String(space.killedPOWS);
totalPowsOnboardTextValue.text = String(space.ship.powsOnboardCount);
}
}
}//package com.wbwar.chopraider.game
Section 197
//PowCamp (com.wbwar.chopraider.game.PowCamp)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class PowCamp extends HittableGameObject {
private var powCampBitmap:Bitmap;
private var prisonerCountDisplay:NumberDisplay;
private var healthBar:HealthBar;
public var powCampState:int;// = 0
public var shipOnPad:Boolean;// = false
private var gateBitmap:Bitmap;
public var finishedPrisonerCount:int;// = 0
private var prisonerTimer:int;
private var lastFinishedPrisonerCount:int;// = 0
public var startPrisonerCount:int;
private var destroyedSound:Sound;
private var prisonerCount:int;
public var prisonerLaunchTime:Number;// = 5
public var gateOpen:Boolean;// = false
public static const POWKILLSCORE:int = 20;
public static const POWSAVESCORE:int = 40;
private static var gateImage:Class = PowCamp_gateImage;
public function PowCamp(_arg1:Space, _arg2:PowCampBean):void{
powCampBitmap = (new GameBitmaps.powCampImage() as Bitmap);
gateBitmap = (new gateImage() as Bitmap);
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
startPrisonerCount = _arg2.prisonerCount;
prisonerCount = startPrisonerCount;
healthBar = new HealthBar(powCampBitmap.width);
healthBar.x = (-(powCampBitmap.width) / 2);
healthBar.y = ((powCampBitmap.height / 2) + 2);
prisonerCountDisplay = new NumberDisplay(2);
prisonerCountDisplay.setNumber(prisonerCount);
this.addChild(powCampBitmap);
this.addChild(gateBitmap);
this.addChild(healthBar);
this.addChild(prisonerCountDisplay);
prisonerCountDisplay.x = 60;
prisonerCountDisplay.y = 18;
powCampBitmap.x = (-(powCampBitmap.width) / 2);
powCampBitmap.y = (-(powCampBitmap.height) / 2);
gateBitmap.x = 16;
gateBitmap.y = -15;
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (powCampBitmap.width / 2));
hitRight = (Number(_arg2.x) + (powCampBitmap.width / 2));
hitTop = (Number(_arg2.y) - (powCampBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (powCampBitmap.height / 2));
}
public function powKilled():void{
finishedPrisonerCount++;
this.space.score = (this.space.score - POWKILLSCORE);
this.space.killedPOWS++;
}
public function powLeft():void{
finishedPrisonerCount++;
}
override public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
if (((shipOnPad) && (!(gateOpen)))){
blowGate();
};
if (finishedPrisonerCount != lastFinishedPrisonerCount){
lastFinishedPrisonerCount = finishedPrisonerCount;
prisonerCountDisplay.setNumber((startPrisonerCount - finishedPrisonerCount));
};
if (powCampState == 0){
if (health <= 0){
destroy();
} else {
if (shipOnPad){
if ((((prisonerCount > 0)) && ((prisonerTimer == 0)))){
prisonerTimer = prisonerLaunchTime;
_local1 = Math.random();
if (_local1 < 0.17){
_local2 = (gamespace_x - 60);
_local3 = (gamespace_y - 25);
} else {
if (_local1 < 0.34){
_local2 = (gamespace_x - 27);
_local3 = (gamespace_y - 25);
} else {
if (_local1 < 0.5){
_local2 = (gamespace_x + 8);
_local3 = (gamespace_y - 25);
} else {
if (_local1 < 0.67){
_local2 = (gamespace_x - 60);
_local3 = (gamespace_y + 25);
} else {
if (_local1 < 0.84){
_local2 = (gamespace_x - 27);
_local3 = (gamespace_y + 25);
} else {
_local2 = (gamespace_x + 8);
_local3 = (gamespace_y + 25);
};
};
};
};
};
new Prisoner(this, space, _local2, _local3, 1, 99999);
prisonerCount--;
};
if (prisonerTimer > 0){
prisonerTimer--;
};
};
};
};
if ((((powCampState == 1)) && ((this.health < this.startHealth)))){
};
}
public function blowGate():void{
this.gateOpen = true;
this.gateBitmap.visible = false;
var _local1:Explosion = new Explosion(space, ((this.gamespace_x + gateBitmap.x) + (gateBitmap.width / 2)), ((this.gamespace_y + gateBitmap.y) + (gateBitmap.height / 2)), false, 20);
destroyedSound.play();
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
powCampState = 1;
this.space.killedPOWS = (this.space.killedPOWS + (startPrisonerCount - finishedPrisonerCount));
this.space.score = (this.space.score - (POWKILLSCORE * (startPrisonerCount - finishedPrisonerCount)));
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
}
}//package com.wbwar.chopraider.game
Section 198
//PowCamp_gateImage (com.wbwar.chopraider.game.PowCamp_gateImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class PowCamp_gateImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 199
//PowerLine (com.wbwar.chopraider.game.PowerLine)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.geom.*;
import com.wbwar.chopraider.common.beans.*;
public class PowerLine extends HittableGameObject {
private var orientation:int;
private var powerLineBitmap:Bitmap;
private var segmentCount:int;
private static var powerLineSegmentBitmap:Bitmap = (new GameBitmaps.powerLineSegmentImage() as Bitmap);
public function PowerLine(_arg1:Space, _arg2:PowerLineBean):void{
var _local3:int;
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
this.segmentCount = _arg2.segmentCount;
this.orientation = _arg2.orientation;
_arg1.layerEffectsLowerGround.addGameObject(this);
this.powerLineBitmap = new Bitmap();
this.powerLineBitmap.bitmapData = new BitmapData(powerLineSegmentBitmap.width, (powerLineSegmentBitmap.height * segmentCount), true, 0);
while (_local3 < segmentCount) {
this.powerLineBitmap.bitmapData.copyPixels(powerLineSegmentBitmap.bitmapData, new Rectangle(0, 0, powerLineSegmentBitmap.width, powerLineSegmentBitmap.height), new Point(0, (_local3 * powerLineSegmentBitmap.height)));
_local3++;
};
this.addChild(powerLineBitmap);
this.powerLineBitmap.x = (-(this.powerLineBitmap.width) / 2);
this.powerLineBitmap.y = (-(this.powerLineBitmap.height) / 2);
if (orientation == 0){
this.rotation = 0;
} else {
if (orientation == 1){
this.rotation = 45;
} else {
if (orientation == 2){
this.rotation = 90;
} else {
if (orientation == 3){
this.rotation = 135;
};
};
};
};
}
override public function hitTest(_arg1:Number, _arg2:Number):Boolean{
return (false);
}
override public function damage(_arg1:Number):void{
}
override public function update():void{
}
override public function destroy():void{
this.space.layerEffectsLowerGround.removeGameObject(this);
}
}
}//package com.wbwar.chopraider.game
Section 200
//PowerPlant (com.wbwar.chopraider.game.PowerPlant)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class PowerPlant extends HittableGameObject {
public var baseState:int;// = 0
public var bombIndicator:BombIndicator;
private var powerPlantBitmap:Bitmap;
private var destroyedSound:Sound;
private var healthBar:HealthBar;
public function PowerPlant(_arg1:Space, _arg2:PowerPlantBean):void{
powerPlantBitmap = (new GameBitmaps.powerPlantImage() as Bitmap);
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
healthBar = new HealthBar(powerPlantBitmap.width);
healthBar.x = (-(powerPlantBitmap.width) / 2);
healthBar.y = ((powerPlantBitmap.height / 2) + 2);
bombIndicator = new BombIndicator();
bombIndicator.visible = false;
this.addChild(powerPlantBitmap);
this.addChild(healthBar);
this.addChild(bombIndicator);
powerPlantBitmap.x = (-(powerPlantBitmap.width) / 2);
powerPlantBitmap.y = (-(powerPlantBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (powerPlantBitmap.width / 2));
hitRight = (Number(_arg2.x) + (powerPlantBitmap.width / 2));
hitTop = (Number(_arg2.y) - (powerPlantBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (powerPlantBitmap.height / 2));
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
baseState = 1;
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
this.space.score = (this.space.score + this.startHealth);
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
}
override public function update():void{
if (bombIndicator.visible){
bombIndicator.update();
bombIndicator.visible = false;
};
if (baseState == 0){
if (health <= 0){
destroy();
};
};
if ((((baseState == 1)) && ((this.health < this.startHealth)))){
};
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
}
}//package com.wbwar.chopraider.game
Section 201
//Prisoner (com.wbwar.chopraider.game.Prisoner)
package com.wbwar.chopraider.game {
import flash.display.*;
public class Prisoner extends HittableGameObject {
private var prisonerState:int;// = 0
private var original_gamespace_x:Number;
private var speed:Number;// = 1
private var targetY:Number;
private var targetX:Number;
private var snapY:Number;// = -1
private var snapX:Number;// = -1
private var prisonerBitmap:Bitmap;
private var powCamp:PowCamp;
private var maxAge:uint;
private var age:uint;// = 0
private static var prisonerImage:Class = Prisoner_prisonerImage;
public function Prisoner(_arg1:PowCamp, _arg2:Space, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
prisonerBitmap = (new prisonerImage() as Bitmap);
super(_arg2, _arg3, _arg4, _arg5);
this.original_gamespace_x = _arg3;
this.powCamp = _arg1;
this.maxAge = _arg6;
_arg2.layerGround.addGameObject(this);
this.addChild(prisonerBitmap);
prisonerBitmap.x = (-(prisonerBitmap.width) / 2);
prisonerBitmap.y = (-(prisonerBitmap.height) / 2);
this.gamespace_x = _arg3;
this.gamespace_y = _arg4;
}
override public function update():void{
if (health <= 0){
space.layerGround.removeGameObject(this);
powCamp.powKilled();
return;
};
if (this.powCamp.powCampState == 1){
trace("PRISONER LOST HIS POW CAMP");
space.layerGround.removeGameObject(this);
return;
};
if (age > maxAge){
space.layerGround.removeGameObject(this);
return;
};
age++;
if (prisonerState == 0){
targetX = (original_gamespace_x + ((Math.random() * 4) - 2));
targetY = (powCamp.gamespace_y + ((Math.random() * 4) - 2));
} else {
if (prisonerState == 1){
targetX = ((powCamp.gamespace_x + 25) + ((Math.random() * 4) - 2));
targetY = (powCamp.gamespace_y + ((Math.random() * 8) - 4));
} else {
if (prisonerState == 2){
if (powCamp.shipOnPad){
targetX = space.ship.gamespace_x;
targetY = space.ship.gamespace_y;
snapX = -1;
} else {
if (snapX == -1){
snapX = this.gamespace_x;
snapY = this.gamespace_y;
};
if ((age % 5) == 0){
targetX = (snapX + ((Math.random() * 8) - 4));
targetY = (snapY + ((Math.random() * 8) - 4));
};
};
};
};
};
if ((((Math.abs((targetX - this.gamespace_x)) < 3)) && ((Math.abs((targetY - this.gamespace_y)) < 3)))){
if (prisonerState < 2){
prisonerState++;
} else {
if (((powCamp.shipOnPad) && ((this.space.ship.shipState == -1)))){
if (this.space.ship.powsOnboardCount < this.space.ship.MAX_POWS){
space.layerGround.removeGameObject(this);
powCamp.powLeft();
this.space.ship.powsOnboardCount++;
new FadingPopup(this.space, this.gamespace_x, (this.gamespace_y + 50), "POW Onboard!", 0xFF, true);
} else {
if (Math.random() < 0.2){
new FadingPopup(this.space, (this.gamespace_x + 50), (this.gamespace_y - 50), "NO MORE ROOM", 0xFF, true);
};
prisonerState = 1;
};
};
};
};
var _local1:Number = getDegree(targetX, targetY);
var _local2:Number = (speed * Math.sin(((_local1 / 180) * Math.PI)));
var _local3:Number = (speed * Math.cos(((_local1 / 180) * Math.PI)));
this.gamespace_x = (this.gamespace_x + _local3);
this.gamespace_y = (this.gamespace_y + _local2);
this.hitLeft = (gamespace_x - 3);
this.hitRight = (gamespace_x + 3);
this.hitTop = (gamespace_y - 3);
this.hitBottom = (gamespace_y + 3);
}
}
}//package com.wbwar.chopraider.game
Section 202
//Prisoner_prisonerImage (com.wbwar.chopraider.game.Prisoner_prisonerImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Prisoner_prisonerImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 203
//Pulsator (com.wbwar.chopraider.game.Pulsator)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
public class Pulsator extends Sprite {
private var rate:Number;
private var container:Sprite;
private var obj:DisplayObject;
private var delta:Number;
private var targetScale:Number;
public function Pulsator(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Boolean=false):void{
var obj = _arg1;
var targetScale = _arg2;
var rate = _arg3;
var auto = _arg4;
super();
this.container = new Sprite();
this.container.x = (obj.width / 2);
this.container.y = (obj.height / 2);
this.addChild(container);
this.obj = obj;
this.targetScale = targetScale;
this.rate = rate;
this.obj.x = (-(obj.width) / 2);
this.obj.y = (-(obj.height) / 2);
container.addChild(obj);
delta = ((targetScale - 1) / rate);
var onEnterFrame:Function = function (_arg1:Event):void{
update();
};
if (auto){
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
};
}
public function update():void{
this.container.scaleX = (this.container.scaleX + delta);
this.container.scaleY = (this.container.scaleY + delta);
if (this.container.scaleX >= this.targetScale){
this.delta = -(this.delta);
} else {
if (this.container.scaleX <= 1){
this.delta = -(this.delta);
};
};
}
}
}//package com.wbwar.chopraider.game
Section 204
//RadialExplosion (com.wbwar.chopraider.game.RadialExplosion)
package com.wbwar.chopraider.game {
import flash.display.*;
public class RadialExplosion extends GameObject {
public const speed:Number = 2;
public const duration:Number = 30;
private const cos:Function;
public const fragmentCount:int = 10;
private const sin:Function;
private var fragments:Array;
private var age:uint;// = 0
private static var fragmentBlueImage:Class = RadialExplosion_fragmentBlueImage;
private static var fragmentRedImage:Class = RadialExplosion_fragmentRedImage;
public function RadialExplosion(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Boolean=false):void{
var _local5:Bitmap;
var _local6:Bitmap;
var _local7:Number;
var _local8:Number;
fragments = new Array();
sin = Math.sin;
cos = Math.cos;
super(_arg1, _arg2, _arg3);
_arg1.layerEffectsUpperGround.addGameObject(this);
var _local9:int;
while (_local9 < fragmentCount) {
_local7 = ((_local9 * 360) / fragmentCount);
_local8 = ((_local7 / 180) * Math.PI);
if (_arg4){
_local5 = (new fragmentRedImage() as Bitmap);
} else {
_local5 = (new fragmentBlueImage() as Bitmap);
};
_local5.rotation = (_local7 + 90);
fragments.push(new ExplosionFragment(cos(_local8), sin(_local8), _local5));
addChild(_local5);
_local9++;
};
}
override public function update():void{
var _local1:ExplosionFragment;
age++;
if (age > duration){
for each (_local1 in fragments) {
this.removeChild(_local1.bitmap);
};
space.layerEffectsUpperGround.removeGameObject(this);
} else {
for each (_local1 in fragments) {
_local1.bitmap.x = (_local1.bitmap.x + (_local1.deltaX * speed));
_local1.bitmap.y = (_local1.bitmap.y + (_local1.deltaY * speed));
_local1.bitmap.alpha = (1 - (age / duration));
};
};
}
}
}//package com.wbwar.chopraider.game
Section 205
//RadialExplosion_fragmentBlueImage (com.wbwar.chopraider.game.RadialExplosion_fragmentBlueImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class RadialExplosion_fragmentBlueImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 206
//RadialExplosion_fragmentRedImage (com.wbwar.chopraider.game.RadialExplosion_fragmentRedImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class RadialExplosion_fragmentRedImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 207
//ResultsScreen (com.wbwar.chopraider.game.ResultsScreen)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.net.*;
import flash.text.*;
public class ResultsScreen extends Sprite {
private var skillValueDisplay:ResultsScreenTextField;
private var noSubmitText:TextDisplay;
public var mapName:String;
private var bonusTotalValueDisplay:ResultsScreenTextField;
private var circleBitmap:Bitmap;
private var app:App;
private var submitDoneRank1ValueTextField:ResultsScreenTextField;
public var bulletsHit:int;
private var skillDisplay:TextDisplay;
private var totalScoreDisplay:TextDisplay;
public var missionName:String;
public var playCount:int;
private var groupNameTextField:TextField;
public var reason:int;
public var skill:int;
private var submitDoneTextField:ResultsScreenTextField;
private var bonusBox:Sprite;
private var progressSaved:GenericTextField;
private var bbSubmitDoneBox:Sprite;
private var scoreBitmap:Bitmap;
private var bulletsValueDisplay:ResultsScreenTextField;
private var submitScoreButton:TextButton;
private var shipDeathsDisplay:TextDisplay;
public var bombsDropped:int;
private var bombsDisplay:TextDisplay;
public var timeLeft:int;
private var userNameTextField:TextField;
public var group:String;// = ""
private var submitDoneRank2ValueTextField:ResultsScreenTextField;
private var shipDeathsValueDisplay:ResultsScreenTextField;
private var groupBitmap:Bitmap;
private var reasonText:TextField;
public var score:int;
private var arrowBitmap:Bitmap;
private var missionDisplay:TextDisplay;
public var victoryState:Boolean;
private var bonusDisplay:TextDisplay;
private var bonusTotalDisplay:TextDisplay;
private var timeLeftValueDisplay:ResultsScreenTextField;
private var titleBitmap:Bitmap;
public var totalScore:int;
private var submitDoneBox:Sprite;
private var trainingBox:Sprite;
private var timeLeftDisplay:TextDisplay;
private var submitDoneRank3ValueTextField:ResultsScreenTextField;
public var bulletsFired:int;
private var scoreValueDisplay:ResultsScreenTextField;
private var missionValueDisplay:ResultsScreenTextField;
public var bombsHit:int;
public var user:String;// = ""
private var scoreDisplay:TextDisplay;
private var bulletsDisplay:TextDisplay;
private var noSubmitBox:Sprite;
private var bonusValueDisplay:ResultsScreenTextField;
private var arrow2Bitmap:Bitmap;
private var scoreBox:Sprite;
private var bombsValueDisplay:ResultsScreenTextField;
public var shipDeaths:int;
private var totalScoreValueDisplay:ResultsScreenTextField;
private var errorMessage:Sprite;
private var bbSubmitDoneTextField:ResultsScreenTextField;
private var submitDoneRank0ValueTextField:ResultsScreenTextField;
private var viewScoresButton:FontButton;
private static var arrow2Image:Class = ResultsScreen_arrow2Image;
private static var titleImage:Class = ResultsScreen_titleImage;
private static var scoreImage:Class = ResultsScreen_scoreImage;
private static var arrowImage:Class = ResultsScreen_arrowImage;
private static var circleImage:Class = ResultsScreen_circleImage;
private static var groupImage:Class = ResultsScreen_groupImage;
public function ResultsScreen(_arg1:App):void{
var _local32:TextDisplay;
titleBitmap = (new titleImage() as Bitmap);
scoreBitmap = (new scoreImage() as Bitmap);
arrowBitmap = (new arrowImage() as Bitmap);
arrow2Bitmap = (new arrow2Image() as Bitmap);
groupBitmap = (new groupImage() as Bitmap);
circleBitmap = (new circleImage() as Bitmap);
missionDisplay = new TextDisplay();
skillDisplay = new TextDisplay();
scoreDisplay = new TextDisplay();
bonusDisplay = new TextDisplay();
shipDeathsDisplay = new TextDisplay();
totalScoreDisplay = new TextDisplay();
reasonText = new TextField();
missionValueDisplay = new ResultsScreenTextField(0x9000);
skillValueDisplay = new ResultsScreenTextField(0x9000);
scoreValueDisplay = new ResultsScreenTextField();
bonusValueDisplay = new ResultsScreenTextField();
shipDeathsValueDisplay = new ResultsScreenTextField(0xFF0000);
totalScoreValueDisplay = new ResultsScreenTextField(2105599);
timeLeftDisplay = new TextDisplay();
bulletsDisplay = new TextDisplay();
bombsDisplay = new TextDisplay();
bonusTotalDisplay = new TextDisplay();
timeLeftValueDisplay = new ResultsScreenTextField();
bulletsValueDisplay = new ResultsScreenTextField();
bombsValueDisplay = new ResultsScreenTextField();
bonusTotalValueDisplay = new ResultsScreenTextField();
bonusBox = new Sprite();
userNameTextField = new TextField();
groupNameTextField = new TextField();
progressSaved = new GenericTextField(144, 18);
scoreBox = new Sprite();
trainingBox = new Sprite();
noSubmitBox = new Sprite();
noSubmitText = new TextDisplay();
errorMessage = new Sprite();
submitDoneBox = new Sprite();
submitDoneTextField = new ResultsScreenTextField(0x7000);
submitDoneRank1ValueTextField = new ResultsScreenTextField();
submitDoneRank2ValueTextField = new ResultsScreenTextField();
submitDoneRank3ValueTextField = new ResultsScreenTextField();
submitDoneRank0ValueTextField = new ResultsScreenTextField();
bbSubmitDoneBox = new Sprite();
bbSubmitDoneTextField = new ResultsScreenTextField(0x7000);
super();
this.app = _arg1;
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
missionDisplay.setText("MISSION:");
skillDisplay.setText("SKILL:");
scoreDisplay.setText("KILL POINTS:");
bonusDisplay.setText("BONUS:");
shipDeathsDisplay.setText("CRASHES:");
totalScoreDisplay.setText("TOTAL SCORE:");
var _local2:Number = 7;
addChild(missionDisplay);
addChild(missionValueDisplay);
addChild(skillDisplay);
addChild(skillValueDisplay);
addChild(scoreDisplay);
addChild(scoreValueDisplay);
addChild(bonusDisplay);
addChild(bonusValueDisplay);
addChild(shipDeathsDisplay);
addChild(shipDeathsValueDisplay);
addChild(totalScoreDisplay);
addChild(totalScoreValueDisplay);
var _local3 = 20;
var _local4 = 220;
var _local5 = 80;
var _local6 = 20;
missionDisplay.x = _local3;
missionDisplay.y = _local5;
missionValueDisplay.x = _local4;
missionValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
skillDisplay.x = _local3;
skillDisplay.y = _local5;
skillValueDisplay.x = _local4;
skillValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
scoreDisplay.x = _local3;
scoreDisplay.y = _local5;
scoreValueDisplay.x = _local4;
scoreValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
bonusDisplay.x = _local3;
bonusDisplay.y = _local5;
bonusValueDisplay.x = _local4;
bonusValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
shipDeathsDisplay.x = _local3;
shipDeathsDisplay.y = _local5;
shipDeathsValueDisplay.x = _local4;
shipDeathsValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
totalScoreDisplay.x = _local3;
totalScoreDisplay.y = _local5;
totalScoreValueDisplay.x = _local4;
totalScoreValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
viewScoresButton = new FontButton("VIEW TOP SCORES", 150, 20, 144, 14);
viewScoresButton.x = (_local3 - 3);
viewScoresButton.y = _local5;
viewScoresButton.addEventListener(MouseEvent.CLICK, viewScoresButtonClicked);
addChild(viewScoresButton);
var _local7:TextFormat = new TextFormat();
_local7.font = "wbfont";
_local7.color = 144;
_local7.size = 16;
_local7.bold = true;
reasonText.antiAliasType = AntiAliasType.ADVANCED;
reasonText.gridFitType = GridFitType.PIXEL;
reasonText.background = false;
reasonText.border = false;
reasonText.embedFonts = true;
reasonText.defaultTextFormat = _local7;
reasonText.autoSize = TextFieldAutoSize.LEFT;
addChild(reasonText);
reasonText.x = 350;
reasonText.y = 225;
bonusBox.x = 375;
bonusBox.y = 90;
timeLeftDisplay.setText("REMAINING TIME:");
bulletsDisplay.setText("BULLET ACCURACY:");
bombsDisplay.setText("BOMB ACCURACY:");
bonusTotalDisplay.setText("TOTAL BONUS:");
bonusBox.addChild(timeLeftDisplay);
bonusBox.addChild(timeLeftValueDisplay);
bonusBox.addChild(bulletsDisplay);
bonusBox.addChild(bulletsValueDisplay);
bonusBox.addChild(bombsDisplay);
bonusBox.addChild(bombsValueDisplay);
bonusBox.addChild(bonusTotalDisplay);
bonusBox.addChild(bonusTotalValueDisplay);
_local5 = 5;
timeLeftDisplay.x = 5;
timeLeftDisplay.y = _local5;
timeLeftValueDisplay.x = _local4;
timeLeftValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
bulletsDisplay.x = 5;
bulletsDisplay.y = _local5;
bulletsValueDisplay.x = _local4;
bulletsValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
bombsDisplay.x = 5;
bombsDisplay.y = _local5;
bombsValueDisplay.x = _local4;
bombsValueDisplay.y = (_local5 - _local2);
_local5 = (_local5 + _local6);
bonusTotalDisplay.x = 5;
bonusTotalDisplay.y = (_local5 + 10);
bonusTotalValueDisplay.x = _local4;
bonusTotalValueDisplay.y = ((_local5 - _local2) + 10);
_local5 = (_local5 + _local6);
addChild(bonusBox);
circleBitmap.x = 352;
circleBitmap.y = 65;
arrow2Bitmap.x = 280;
arrow2Bitmap.y = 132;
addChild(circleBitmap);
addChild(arrow2Bitmap);
noSubmitBox.graphics.lineStyle(3, 80);
noSubmitBox.graphics.drawRoundRect(0, 0, 400, 150, 10, 10);
noSubmitBox.x = ((App.GAME_WIDTH / 2) - (noSubmitBox.width / 2));
noSubmitBox.y = 315;
noSubmitBox.addChild(noSubmitText);
var _local8:TextButton = new TextButton("RETURN TO MISSIONS", 225, 25);
_local8.x = ((noSubmitBox.width / 2) - (_local8.width / 2));
_local8.y = 80;
_local8.addEventListener(MouseEvent.CLICK, exitButtonClicked);
noSubmitBox.addChild(_local8);
var _local9:TextButton = new TextButton("PLAY MORE GAMES", 225, 25);
_local9.x = ((noSubmitBox.width / 2) - (_local9.width / 2));
_local9.y = 110;
_local9.addEventListener(MouseEvent.CLICK, pmgButtonClicked);
noSubmitBox.addChild(_local9);
noSubmitBox.visible = false;
addChild(noSubmitBox);
trainingBox.graphics.lineStyle(3, 80);
trainingBox.graphics.drawRoundRect(0, 0, 400, 150, 10, 10);
trainingBox.x = ((App.GAME_WIDTH / 2) - (trainingBox.width / 2));
trainingBox.y = 315;
var _local10:TextDisplay = new TextDisplay();
var _local11:TextDisplay = new TextDisplay();
_local10.setText("SCORES CANNOT BE SUBMITTED");
_local11.setText("FOR TRAINING MISSIONS");
_local10.x = ((trainingBox.width / 2) - (_local10.width / 2));
_local10.y = 10;
_local11.x = ((trainingBox.width / 2) - (_local11.width / 2));
_local11.y = 30;
trainingBox.addChild(_local10);
trainingBox.addChild(_local11);
var _local12:TextButton = new TextButton("CONTINUE TRAINING", 225, 25);
_local12.x = ((trainingBox.width / 2) - (_local12.width / 2));
_local12.y = 60;
_local12.addEventListener(MouseEvent.CLICK, continueTrainingButtonClicked);
trainingBox.addChild(_local12);
var _local13:TextButton = new TextButton("EXIT TO MENU", 225, 25);
_local13.x = ((trainingBox.width / 2) - (_local13.width / 2));
_local13.y = 90;
_local13.addEventListener(MouseEvent.CLICK, exitButtonClicked);
trainingBox.addChild(_local13);
var _local14:TextButton = new TextButton("PLAY MORE GAMES", 225, 25);
_local14.x = ((trainingBox.width / 2) - (_local14.width / 2));
_local14.y = 120;
_local14.addEventListener(MouseEvent.CLICK, pmgButtonClicked);
trainingBox.addChild(_local14);
trainingBox.visible = false;
addChild(trainingBox);
progressSaved.text = "Game Progress Saved";
progressSaved.x = 150;
progressSaved.y = 275;
addChild(progressSaved);
scoreBox.graphics.lineStyle(3, 80);
scoreBox.graphics.drawRoundRect(0, 0, 400, 160, 10, 10);
scoreBox.x = 50;
scoreBox.y = 315;
addChild(scoreBox);
var _local15:TextFormat = new TextFormat();
_local15.font = "Verdana";
_local15.color = 0xFF;
_local15.size = 14;
_local15.bold = true;
var _local16:TextDisplay = new TextDisplay();
_local16.setText("USER:");
_local16.x = (((scoreBox.width / 2) - _local16.width) - 50);
_local16.y = 10;
scoreBox.addChild(_local16);
userNameTextField.type = TextFieldType.INPUT;
userNameTextField.maxChars = 15;
userNameTextField.background = true;
userNameTextField.border = true;
userNameTextField.defaultTextFormat = _local15;
userNameTextField.x = ((scoreBox.width / 2) - 45);
userNameTextField.y = (_local16.y - 4);
userNameTextField.width = 220;
userNameTextField.height = 22;
scoreBox.addChild(userNameTextField);
var _local17 = 70;
var _local18 = 100;
var _local19 = 130;
if (wbwar.bubblebox){
_local17 = 40;
_local18 = 70;
_local19 = 100;
};
if (!wbwar.bubblebox){
_local32 = new TextDisplay();
_local32.setText("GROUP:");
_local32.x = (((scoreBox.width / 2) - _local32.width) - 50);
_local32.y = 40;
scoreBox.addChild(_local32);
groupNameTextField.type = TextFieldType.INPUT;
groupNameTextField.maxChars = 20;
groupNameTextField.background = true;
groupNameTextField.border = true;
groupNameTextField.defaultTextFormat = _local15;
groupNameTextField.x = ((scoreBox.width / 2) - 45);
groupNameTextField.y = (_local32.y - 4);
groupNameTextField.width = 220;
groupNameTextField.height = 22;
scoreBox.addChild(groupNameTextField);
};
submitScoreButton = new TextButton("SUBMIT SCORE", 225, 25);
submitScoreButton.x = ((scoreBox.width / 2) - (submitScoreButton.width / 2));
submitScoreButton.y = _local17;
submitScoreButton.addEventListener(MouseEvent.CLICK, submitScoreButtonClicked);
scoreBox.addChild(submitScoreButton);
var _local20:TextButton = new TextButton("RETURN TO MISSIONS", 225, 25);
_local20.x = ((scoreBox.width / 2) - (_local20.width / 2));
_local20.y = _local18;
_local20.addEventListener(MouseEvent.CLICK, exitButtonClicked);
scoreBox.addChild(_local20);
var _local21:TextButton = new TextButton("PLAY MORE GAMES", 225, 25);
_local21.x = ((scoreBox.width / 2) - (_local21.width / 2));
_local21.y = _local19;
_local21.addEventListener(MouseEvent.CLICK, pmgButtonClicked);
scoreBox.addChild(_local21);
titleBitmap.x = ((App.GAME_WIDTH / 2) - (titleBitmap.width / 2));
titleBitmap.y = 20;
scoreBitmap.x = 178;
scoreBitmap.y = 200;
arrowBitmap.x = 372;
arrowBitmap.y = 317;
groupBitmap.x = 510;
groupBitmap.y = 245;
addChild(titleBitmap);
addChild(scoreBitmap);
if (!wbwar.bubblebox){
addChild(arrowBitmap);
addChild(groupBitmap);
};
var _local22:TextDisplay = new TextDisplay();
_local22.setText("ENTER A VALID USER NAME\n TO SUBMIT A SCORE");
errorMessage.addChild(_local22);
_local22.x = 10;
_local22.y = 10;
errorMessage.graphics.beginFill(0xEEEEEE);
errorMessage.graphics.drawRoundRect(0, 0, (_local22.width + 20), 80, 8, 8);
errorMessage.graphics.endFill();
errorMessage.graphics.lineStyle(3, 0);
errorMessage.graphics.drawRoundRect(0, 0, (_local22.width + 20), 80, 8, 8);
var _local23:TextButton = new TextButton("OK", 50, 22);
_local23.addEventListener(MouseEvent.CLICK, errorButtonClicked);
errorMessage.addChild(_local23);
_local23.x = ((errorMessage.width / 2) - (_local23.width / 2));
_local23.y = 50;
errorMessage.x = ((App.GAME_WIDTH / 2) - (errorMessage.width / 2));
errorMessage.y = 150;
errorMessage.visible = false;
addChild(errorMessage);
submitDoneTextField.text = "SCORE SUBMITTED!";
submitDoneBox.addChild(submitDoneTextField);
var _local24:ResultsScreenTextField = new ResultsScreenTextField();
_local24.text = "Daily Rank:";
submitDoneBox.addChild(_local24);
_local24.x = 10;
_local24.y = 30;
submitDoneBox.addChild(submitDoneRank1ValueTextField);
submitDoneRank1ValueTextField.x = 165;
submitDoneRank1ValueTextField.y = 30;
var _local25:ResultsScreenTextField = new ResultsScreenTextField();
_local25.text = "Weekly Rank:";
submitDoneBox.addChild(_local25);
_local25.x = 10;
_local25.y = 50;
submitDoneBox.addChild(submitDoneRank2ValueTextField);
submitDoneRank2ValueTextField.x = 165;
submitDoneRank2ValueTextField.y = 50;
var _local26:ResultsScreenTextField = new ResultsScreenTextField();
_local26.text = "Monthly Rank:";
submitDoneBox.addChild(_local26);
_local26.x = 10;
_local26.y = 70;
submitDoneBox.addChild(submitDoneRank3ValueTextField);
submitDoneRank3ValueTextField.x = 165;
submitDoneRank3ValueTextField.y = 70;
var _local27:ResultsScreenTextField = new ResultsScreenTextField();
_local27.text = "Ever Rank:";
submitDoneBox.addChild(_local27);
_local27.x = 10;
_local27.y = 90;
submitDoneBox.addChild(submitDoneRank0ValueTextField);
submitDoneRank0ValueTextField.x = 165;
submitDoneRank0ValueTextField.y = 90;
submitDoneBox.graphics.beginFill(0xEEEEEE);
submitDoneBox.graphics.drawRoundRect(0, 0, 270, 200, 8, 8);
submitDoneBox.graphics.endFill();
submitDoneBox.graphics.lineStyle(3, 0);
submitDoneBox.graphics.drawRoundRect(0, 0, 270, 200, 8, 8);
var _local28:TextButton = new TextButton("VIEW TOP SCORES", 225, 22);
_local28.addEventListener(MouseEvent.CLICK, viewScoresButtonClicked);
submitDoneBox.addChild(_local28);
_local28.x = ((submitDoneBox.width / 2) - (_local28.width / 2));
_local28.y = 130;
var _local29:TextButton = new TextButton("RETURN TO MISSIONS", 225, 22);
_local29.addEventListener(MouseEvent.CLICK, submitDoneButtonClicked);
submitDoneBox.addChild(_local29);
_local29.x = ((submitDoneBox.width / 2) - (_local29.width / 2));
_local29.y = 160;
submitDoneBox.x = ((App.GAME_WIDTH / 2) - (submitDoneBox.width / 2));
submitDoneBox.y = 200;
submitDoneBox.visible = false;
submitDoneTextField.x = 62;
submitDoneTextField.y = 5;
addChild(submitDoneBox);
bbSubmitDoneBox.graphics.beginFill(0xEEEEEE);
bbSubmitDoneBox.graphics.drawRoundRect(0, 0, 270, 100, 8, 8);
bbSubmitDoneBox.graphics.endFill();
bbSubmitDoneBox.graphics.lineStyle(3, 0);
bbSubmitDoneBox.graphics.drawRoundRect(0, 0, 270, 100, 8, 8);
var _local30:TextButton = new TextButton("VIEW SCORES", 225, 22);
_local30.addEventListener(MouseEvent.CLICK, viewScoresButtonClicked);
bbSubmitDoneBox.addChild(_local30);
_local30.x = ((bbSubmitDoneBox.width / 2) - (_local30.width / 2));
_local30.y = 40;
var _local31:TextButton = new TextButton("RETURN TO MISSIONS", 225, 22);
_local31.addEventListener(MouseEvent.CLICK, submitDoneButtonClicked);
bbSubmitDoneBox.addChild(_local31);
_local31.x = ((bbSubmitDoneBox.width / 2) - (_local31.width / 2));
_local31.y = 70;
bbSubmitDoneBox.x = ((App.GAME_WIDTH / 2) - (bbSubmitDoneBox.width / 2));
bbSubmitDoneBox.y = 200;
bbSubmitDoneBox.visible = false;
bbSubmitDoneTextField.text = "SCORE SUBMITTED!";
bbSubmitDoneBox.addChild(bbSubmitDoneTextField);
bbSubmitDoneTextField.x = 62;
bbSubmitDoneTextField.y = 5;
addChild(bbSubmitDoneBox);
}
private function viewScoresButtonClicked(_arg1:Event):void{
var _local2:String;
var _local3:URLRequest;
var _local4:String;
var _local5:String;
var _local6:URLRequest;
if (wbwar.bubblebox){
_local2 = "http://www.bubblebox.com/highscores/";
if (mapName == "campaign1"){
_local2 = (_local2 + "chopraider_c_1_");
} else {
if (mapName == "campaign2"){
_local2 = (_local2 + "chopraider_c_2_");
} else {
if (mapName == "campaign3"){
_local2 = (_local2 + "chopraider_c_3_");
} else {
if (mapName == "campaign4"){
_local2 = (_local2 + "chopraider_c_4_");
} else {
if (mapName == "campaign5"){
_local2 = (_local2 + "chopraider_c_5_");
} else {
if (mapName == "campaign6"){
_local2 = (_local2 + "chopraider_c_6_");
} else {
if (mapName == "campaign7"){
_local2 = (_local2 + "chopraider_c_7_");
} else {
if (mapName == "campaign8"){
_local2 = (_local2 + "chopraider_c_8_");
} else {
if (mapName == "arena1"){
_local2 = (_local2 + "chopraider_a_1_");
} else {
if (mapName == "arena2"){
_local2 = (_local2 + "chopraider_a_2_");
} else {
if (mapName == "arena3"){
_local2 = (_local2 + "chopraider_a_3_");
};
};
};
};
};
};
};
};
};
};
};
if (skill == 2){
_local2 = (_local2 + "hard");
} else {
_local2 = (_local2 + "normal");
};
_local2 = (_local2 + ".htm");
_local3 = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
} else {
if (mapName == "campaign1"){
_local4 = "c1";
} else {
if (mapName == "campaign2"){
_local4 = "c2";
} else {
if (mapName == "campaign3"){
_local4 = "c3";
} else {
if (mapName == "campaign4"){
_local4 = "c4";
} else {
if (mapName == "campaign5"){
_local4 = "c5";
} else {
if (mapName == "campaign6"){
_local4 = "c6";
} else {
if (mapName == "campaign7"){
_local4 = "c7";
} else {
if (mapName == "campaign8"){
_local4 = "c8";
} else {
if (mapName == "arena1"){
_local4 = "a1";
} else {
if (mapName == "arena2"){
_local4 = "a2";
} else {
if (mapName == "arena3"){
_local4 = "a3";
} else {
if (mapName == "arena4"){
_local4 = "a4";
};
};
};
};
};
};
};
};
};
};
};
};
_local5 = (("http://www.whiteboardwar.com/chopraider/crscores.php?mission=" + _local4) + "&timefilter=1");
if (group != ""){
_local5 = (_local5 + ("&groupfilter=" + escape(group)));
};
_local6 = new URLRequest((("http://www.whiteboardwar.com/chopraider/crscores.php?mission=" + _local4) + "&timefilter=0"));
navigateToURL(_local6, "chopraiderscores");
};
}
private function exitButtonClicked(_arg1:Event):void{
submitDoneButtonClicked(_arg1);
}
private function submitScoreButtonClicked(_arg1:Event):void{
var _local2:SharedObject;
if ((((userNameTextField.text == "")) || ((userNameTextField.text.length > 15)))){
errorMessage.visible = true;
trace("BAD USERNAME");
} else {
this.user = userNameTextField.text;
if (groupNameTextField.text.length > 20){
this.group = groupNameTextField.text.substr(0, 20);
} else {
this.group = groupNameTextField.text;
};
_local2 = SharedObject.getLocal("chopraider", "/");
_local2.data.user = this.user;
_local2.data.group = this.group;
_local2.flush();
scoreBox.visible = false;
arrowBitmap.visible = false;
groupBitmap.visible = false;
if (wbwar.bubblebox){
Score.submitBubbleBoxScore(this);
} else {
Score.submitScore(this);
};
};
}
private function errorButtonClicked(_arg1:Event):void{
errorMessage.visible = false;
}
private function continueTrainingButtonClicked(_arg1:Event):void{
app.showTrainingScreen();
}
private function pmgButtonClicked(_arg1:Event):void{
wbwar.bubbleBoxClick("resultsscreen");
}
public function refreshDisplays():void{
var lso:SharedObject;
var user:String;
var group:String;
var pc:int;
var cc:int;
try {
lso = SharedObject.getLocal("chopraider", "/");
user = lso.data.user;
group = lso.data.group;
if (((!((user == null))) && (!((user == ""))))){
userNameTextField.text = user;
};
if (((!((group == null))) && (!((group == ""))))){
groupNameTextField.text = group;
};
pc = lso.data.playCount;
pc = (pc + 1);
lso.data.playCount = pc;
if ((((reason == 0)) || ((reason == 1)))){
cc = lso.data.campaignCount;
if (mapName == "campaign1"){
if (cc < 2){
lso.data.campaignCount = 2;
};
};
if (mapName == "campaign2"){
if (cc < 3){
lso.data.campaignCount = 3;
};
};
if (mapName == "campaign3"){
if (cc < 4){
lso.data.campaignCount = 4;
};
};
if (mapName == "campaign4"){
if (cc < 5){
lso.data.campaignCount = 5;
};
};
if (mapName == "campaign5"){
if (cc < 6){
lso.data.campaignCount = 6;
};
};
if (mapName == "campaign6"){
if (cc < 7){
lso.data.campaignCount = 7;
};
};
if (mapName == "campaign7"){
if (cc < 8){
lso.data.campaignCount = 8;
};
};
};
lso.flush();
lso.close();
this.playCount = pc;
} catch(e:Error) {
trace(e);
};
var formatR:TextFormat = new TextFormat();
formatR.font = "wbfont";
formatR.color = 144;
formatR.size = 16;
formatR.bold = true;
if (reason == 0){
formatR.color = 144;
this.reasonText.text = "VICTORY!";
} else {
if (reason == 1){
formatR.color = 0x900000;
this.reasonText.text = "YOU RAN OUT OF TIME";
} else {
if (reason == 2){
formatR.color = 0x900000;
this.reasonText.text = "YOUR CARRIER WAS DESTROYED";
} else {
this.reasonText.text = "";
};
};
};
this.reasonText.defaultTextFormat = formatR;
var penalty:int = (this.shipDeaths * 100);
this.missionValueDisplay.text = String(this.missionName).toUpperCase();
this.skillValueDisplay.text = ((skill == 0)) ? "EASY" : ((skill == 1)) ? "NORMAL" : "HARD";
this.scoreValueDisplay.text = String(this.score);
this.timeLeftValueDisplay.text = TextDisplay.getTimeText(timeLeft);
if (timeLeft <= 0){
this.timeLeftValueDisplay.textColor = 0xFF0000;
} else {
this.timeLeftValueDisplay.textColor = 0xFF;
};
if (this.shipDeaths > 0){
this.shipDeathsValueDisplay.text = ((((" -" + String(penalty)) + " (") + String(this.shipDeaths)) + ")");
} else {
this.shipDeathsValueDisplay.text = "NONE!";
};
var brat:Number = 0;
if (bulletsFired > 0){
brat = ((bulletsHit / bulletsFired) * 100);
};
this.bulletsValueDisplay.text = (brat.toFixed(2) + "%");
var borat:Number = 0;
if (bombsDropped > 0){
borat = ((bombsHit / bombsDropped) * 100);
};
this.bombsValueDisplay.text = (borat.toFixed(2) + "%");
var div:Number = 0;
if (bulletsFired > 0){
div = (div + 1);
};
if (bombsDropped > 0){
div = (div + 1);
};
var avgFire:Number = (((brat + borat) / div) / 100);
var bonus:int;
if (this.timeLeft > 0){
bonus = int(((this.timeLeft * avgFire) * 5));
};
this.bonusValueDisplay.text = String(bonus);
this.bonusTotalValueDisplay.text = String(bonus);
totalScore = ((this.score + bonus) - penalty);
if (timeLeft <= 0){
totalScore = 0;
};
if (totalScore < 0){
totalScore = 0;
};
this.totalScoreValueDisplay.text = String(totalScore);
if (this.mapName.indexOf("training") > -1){
this.viewScoresButton.visible = false;
this.bbSubmitDoneBox.visible = false;
this.submitDoneBox.visible = false;
this.trainingBox.visible = true;
this.noSubmitBox.visible = false;
progressSaved.visible = true;
this.scoreBox.visible = false;
this.arrowBitmap.visible = false;
this.groupBitmap.visible = false;
} else {
if ((((((skill < 1)) || ((timeLeft <= 0)))) || (!(victoryState)))){
this.viewScoresButton.visible = false;
this.bbSubmitDoneBox.visible = false;
this.submitDoneBox.visible = false;
this.trainingBox.visible = false;
this.noSubmitBox.visible = true;
progressSaved.visible = false;
this.scoreBox.visible = false;
this.arrowBitmap.visible = false;
this.groupBitmap.visible = false;
if (skill < 1){
noSubmitText.setText("SCORES CANNOT BE SUBMITTED\nWHEN YOU PLAY ON EASY SKILL");
} else {
if (!victoryState){
noSubmitText.setText("SCORES CANNOT BE SUBMITTED\nWHEN YOU ARE DEFEATED");
} else {
if (timeLeft <= 0){
noSubmitText.setText("SCORES CANNOT BE SUBMITTED\nWHEN YOU RUN OUT OF TIME");
};
};
};
noSubmitText.x = ((noSubmitBox.width / 2) - (noSubmitText.width / 2));
noSubmitText.y = 20;
} else {
this.submitScoreButton.visible = true;
this.viewScoresButton.visible = true;
this.bbSubmitDoneBox.visible = false;
this.submitDoneBox.visible = false;
progressSaved.visible = true;
this.scoreBox.visible = true;
this.noSubmitBox.visible = false;
this.trainingBox.visible = false;
this.arrowBitmap.visible = true;
this.groupBitmap.visible = true;
};
};
}
public function scoreSubmitDone(_arg1:String):void{
var _local2:Array;
if (wbwar.bubblebox){
if (_arg1 == null){
bbSubmitDoneTextField.text = "SCORE COULD NOT BE SUBMITTED";
} else {
bbSubmitDoneTextField.text = "Score Submitted!";
};
bbSubmitDoneBox.visible = true;
} else {
if (_arg1 == null){
submitDoneTextField.text = "SCORE COULD NOT BE SUBMITTED";
submitDoneRank1ValueTextField.text = "?";
submitDoneRank2ValueTextField.text = "?";
submitDoneRank3ValueTextField.text = "?";
submitDoneRank0ValueTextField.text = "?";
} else {
submitDoneTextField.text = "Score Submitted!";
_local2 = _arg1.split(",");
if (_local2.length == 4){
submitDoneRank1ValueTextField.text = _local2[0].toString();
submitDoneRank2ValueTextField.text = _local2[1].toString();
submitDoneRank3ValueTextField.text = _local2[2].toString();
submitDoneRank0ValueTextField.text = _local2[3].toString();
} else {
submitDoneRank1ValueTextField.text = "?";
submitDoneRank2ValueTextField.text = "?";
submitDoneRank3ValueTextField.text = "?";
submitDoneRank0ValueTextField.text = "?";
};
};
submitDoneBox.visible = true;
};
}
private function submitDoneButtonClicked(_arg1:Event):void{
if (this.mapName.indexOf("campaign") > -1){
this.app.showCampaignScreen();
} else {
if (this.mapName.indexOf("arena") > -1){
this.app.showArenaScreen();
} else {
this.app.showMainScreen();
};
};
}
}
}//package com.wbwar.chopraider.game
Section 208
//ResultsScreen_arrow2Image (com.wbwar.chopraider.game.ResultsScreen_arrow2Image)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ResultsScreen_arrow2Image extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 209
//ResultsScreen_arrowImage (com.wbwar.chopraider.game.ResultsScreen_arrowImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ResultsScreen_arrowImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 210
//ResultsScreen_circleImage (com.wbwar.chopraider.game.ResultsScreen_circleImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ResultsScreen_circleImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 211
//ResultsScreen_groupImage (com.wbwar.chopraider.game.ResultsScreen_groupImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ResultsScreen_groupImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 212
//ResultsScreen_scoreImage (com.wbwar.chopraider.game.ResultsScreen_scoreImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ResultsScreen_scoreImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 213
//ResultsScreen_titleImage (com.wbwar.chopraider.game.ResultsScreen_titleImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class ResultsScreen_titleImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 214
//ResultsScreenTextField (com.wbwar.chopraider.game.ResultsScreenTextField)
package com.wbwar.chopraider.game {
import flash.text.*;
public class ResultsScreenTextField extends TextField {
public function ResultsScreenTextField(_arg1:Number=0xFF){
var _local2:TextFormat = new TextFormat();
_local2.font = "wbfont";
_local2.color = _arg1;
_local2.size = 18;
_local2.bold = true;
antiAliasType = AntiAliasType.ADVANCED;
gridFitType = GridFitType.PIXEL;
background = false;
border = false;
embedFonts = true;
defaultTextFormat = _local2;
autoSize = TextFieldAutoSize.LEFT;
selectable = false;
}
}
}//package com.wbwar.chopraider.game
Section 215
//RoadBlock (com.wbwar.chopraider.game.RoadBlock)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class RoadBlock extends HittableGameObject {
public var baseState:int;// = 0
public var roadNumber:int;
public var bombIndicator:BombIndicator;
private var roadBlockContainer:Sprite;
private var destroyedSound:Sound;
private var healthBar:HealthBar;
private var roadBlockBitmap:Bitmap;
public function RoadBlock(_arg1:Space, _arg2:RoadBlockBean):void{
roadBlockContainer = new Sprite();
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
_arg1.roadBlockCount++;
roadNumber = _arg2.roadNumber;
trace(("roadnumber: " + roadNumber));
roadBlockBitmap = (new GameBitmaps.roadBlockImage() as Bitmap);
if (_arg2.orientation == 0){
roadBlockContainer.rotation = 0;
healthBar = new HealthBar(roadBlockBitmap.width);
healthBar.x = (-(roadBlockBitmap.width) / 2);
healthBar.y = ((roadBlockBitmap.height / 2) + 2);
} else {
if (_arg2.orientation == 1){
roadBlockContainer.rotation = 90;
roadBlockContainer.x = 0;
roadBlockContainer.y = 0;
healthBar = new HealthBar(roadBlockBitmap.height);
healthBar.x = (-(roadBlockBitmap.height) / 2);
healthBar.y = ((roadBlockBitmap.width / 2) + 2);
};
};
bombIndicator = new BombIndicator();
this.addChild(roadBlockContainer);
roadBlockContainer.addChild(roadBlockBitmap);
this.addChild(healthBar);
this.addChild(bombIndicator);
roadBlockBitmap.x = (-(roadBlockBitmap.width) / 2);
roadBlockBitmap.y = (-(roadBlockBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (roadBlockBitmap.width / 2));
hitRight = (Number(_arg2.x) + (roadBlockBitmap.width / 2));
hitTop = (Number(_arg2.y) - (roadBlockBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (roadBlockBitmap.height / 2));
}
override public function destroy():void{
var _local2:GameObject;
var _local3:Boolean;
this.space.layerGround.removeGameObject(this);
space.roadBlockCount--;
destroyedSound.play();
baseState = 1;
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
this.space.score = (this.space.score + this.startHealth);
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + String(this.startHealth)), 0xFF);
var _local4:int;
while (_local4 < space.layerGround.numChildren) {
_local2 = (space.layerGround.getChildAt(_local4) as GameObject);
if ((_local2 is Civ)){
(_local2 as Civ).roadBlockGone(roadNumber);
};
_local4++;
};
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
override public function update():void{
if (bombIndicator.visible){
bombIndicator.update();
bombIndicator.visible = false;
};
if (baseState == 0){
if (health <= 0){
destroy();
};
};
if ((((baseState == 1)) && ((this.health < this.startHealth)))){
};
}
}
}//package com.wbwar.chopraider.game
Section 216
//Ship (com.wbwar.chopraider.game.Ship)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Ship extends HittableGameObject {
public const MAX_LATERALSPEED:Number = 4;
public const MAX_POWS:int = 20;
public const FULL_ROTORSPEED:int = 50;
public const TIME_DROPBOMB:int = 10;
public const PURGATORYTIME:int = 60;
public const MAX_GUNFIRE:int = 25;
public const TURBO_TIME:Number = 90;
public const LANDED_SCALE:Number = 0.8;
public const BONUSLOSS:int = 250;
public const REINCARNATIONTIME:int = 10;
public const MAX_FORWARDSPEED:Number = 6.5;
public const MAX_REVERSESPEED:Number = 5;
public const CRASHTIME:int = 30;
private var shipTakingOffSoundChannel:SoundChannel;
private var shipCrashSound:Sound;
public var loadedBombs:int;// = 30
private var age:int;
private var reincarnationCounter:int;// = 0
private var machineGunSound:Sound;
public var gunFireCount:Number;// = 0
private var powCamp:PowCamp;
private var shipCrashingSound:Sound;
public var superBombLoaded:Boolean;
private var shipSound:Sound;
private var landedDegree:Number;// = 180
private var speed:Number;// = 0
private var shipSoundChannel:SoundChannel;
private var superBombSoundChannel:SoundChannel;
private var superBombSound:Sound;
private var gunSoundChannel:SoundChannel;
private var crashCounter:int;// = 0
private var bladeState:uint;// = 0
public var dropBombCount:Number;// = 0
private var landedRotation:Number;// = 0
private var rotorSpeed:Number;// = 0
public var superBombExploded:Boolean;
private var missileSound:Sound;
private var bombSound:Sound;
private var purgatoryCounter:int;// = 0
public var dx:Number;
public var dy:Number;
private var rotorAcceleration:Number;// = 0
private var shipLandingSound:Sound;
private var gunFired:Boolean;
public var powsOnboardCount:int;// = 0
public var shipState:int;// = 0
private var bombSoundChannel:SoundChannel;
public var lastShipState:int;// = 0
private var softLanded:Boolean;// = false
private var viewPort:ViewPort;
private var turboOn:Boolean;
private var shipCrashingSoundChannel:SoundChannel;
private var turboTimer:int;
private var shipLandingSoundChannel:SoundChannel;
private var lateralSpeed:Number;// = 0
private var landedDistance:Number;// = 120
private var shipTakingOffSound:Sound;
public var loadedBeacons:int;// = 0
public var START_HEALTH:int;// = 0
public var explodingSuperBomb:SuperBomb;
public static const MAX_LOADEDBOMBS:int = 30;
private static var bladesSprite:Sprite = new Sprite();
private static var chopperImage:Class = Ship_chopperImage;
private static var chopperBitmap:Bitmap = (new chopperImage() as Bitmap);
private static var bladesImage1:Class = Ship_bladesImage1;
private static var bladesBitmap:Bitmap = new Bitmap();
private static var bladesImage0:Class = Ship_bladesImage0;
private static var bladesSlowBitmapData:BitmapData = (new bladesSlowImage() as Bitmap).bitmapData;
private static var bladesBitmapData0:BitmapData = (new bladesImage0() as Bitmap).bitmapData;
private static var bladesBitmapData1:BitmapData = (new bladesImage1() as Bitmap).bitmapData;
private static var bladesSlowImage:Class = Ship_bladesSlowImage;
public function Ship(_arg1:Space):void{
if (_arg1.skill == 0){
START_HEALTH = 125;
} else {
if (_arg1.skill == 1){
START_HEALTH = 75;
} else {
START_HEALTH = 50;
};
};
super(_arg1, 0, 0, START_HEALTH);
if ((((loadedBeacons == 0)) && ((_arg1.missileBarrages > 0)))){
this.loadedBeacons = 1;
_arg1.missileBarrages--;
};
chopperBitmap.visible = true;
bladesBitmap.visible = true;
this.viewPort = _arg1.viewPort;
addChild(chopperBitmap);
addChild(bladesSprite);
bladesSprite.addChild(bladesBitmap);
bladesBitmap.bitmapData = bladesBitmapData0;
chopperBitmap.x = ((-(chopperBitmap.width) / 2) - 3);
chopperBitmap.y = (-(chopperBitmap.height) / 2);
bladesSprite.x = 10;
bladesBitmap.x = (-(bladesBitmap.width) / 2);
bladesBitmap.y = (-(bladesBitmap.height) / 2);
this.mouseEnabled = false;
shipSound = SoundManager.instance.getSound("ship");
shipCrashingSound = SoundManager.instance.getSound("shipcrashing");
shipCrashSound = SoundManager.instance.getSound("shipcrash");
shipLandingSound = SoundManager.instance.getSound("shiplanding");
shipTakingOffSound = SoundManager.instance.getSound("shiptakingoff");
machineGunSound = SoundManager.instance.getSound("machinegun");
bombSound = SoundManager.instance.getSound("bombdrop");
missileSound = SoundManager.instance.getSound("missile");
superBombSound = SoundManager.instance.getSound("superbombalarm");
}
public function restart():void{
chopperBitmap.visible = true;
bladesBitmap.visible = true;
purgatoryCounter = 0;
crashCounter = 0;
reincarnationCounter = 0;
this.shipState = 0;
this.health = START_HEALTH;
this.loadedBombs = MAX_LOADEDBOMBS;
if ((((loadedBeacons == 0)) && ((space.missileBarrages > 0)))){
this.loadedBeacons = 1;
space.missileBarrages--;
};
this.lastShipState = 0;
this.rotorSpeed = 0;
space.isSpace = false;
}
public function dropBeacon():void{
if (this.shipState < 4){
dropBeaconGS();
};
}
private function gunSoundComplete(_arg1:Event):void{
gunSoundChannel = null;
}
public function turbo():void{
turboOn = true;
turboTimer = TURBO_TIME;
}
public function turnLeft():void{
if ((((shipState > 0)) && ((shipState < 4)))){
this.rotation = (this.rotation - 6);
};
}
public function increaseSpeed(_arg1:Number=0.3):void{
var _local2:Number = MAX_FORWARDSPEED;
if (turboOn){
_local2 = (MAX_FORWARDSPEED * 2);
};
var _local3:Number = (_local2 - this.speed);
if (this.speed < _local2){
this.speed = (this.speed + ((_local3 > _arg1)) ? _arg1 : _local3);
} else {
if (((!(turboOn)) && ((this.speed > MAX_FORWARDSPEED)))){
decreaseSpeed();
};
};
}
public function fireGun(_arg1:int, _arg2:int):void{
if ((((this.shipState < 4)) && ((this.shipState > 0)))){
fireGunGS(((this.gamespace_x + _arg1) - (space.viewPort.width / 2)), ((this.gamespace_y + _arg2) - (space.viewPort.height / 2)));
} else {
if (this.shipState == 0){
new FadingPopup(space, gamespace_x, gamespace_y, "Press SHIFT to take off", 144, true);
};
};
}
public function dropBomb():void{
if (this.shipState < 4){
dropBombGS();
};
}
public function increaseLateralSpeed(_arg1:Number=0.2):void{
this.lateralSpeed = (this.lateralSpeed + _arg1);
if (this.lateralSpeed > MAX_LATERALSPEED){
this.lateralSpeed = MAX_LATERALSPEED;
};
}
private function dropBeaconGS():void{
if (loadedBeacons <= 0){
if (space.missileBarrages > 0){
new FadingPopup(space, gamespace_x, gamespace_y, "Return to Carrier to load another Beacon!", 0xFF, true);
} else {
new FadingPopup(space, gamespace_x, gamespace_y, "No Volleys Available.", 0xFF, true);
};
};
if ((((loadedBeacons > 0)) && ((shipState == 3)))){
loadedBeacons--;
new Beacon(space, (dx * 0.5), (dy * 0.5), this.gamespace_x, this.gamespace_y, this.rotation);
} else {
if (shipState == 0){
new FadingPopup(space, gamespace_x, gamespace_y, "Press SHIFT to take off", 144, true);
};
};
}
public function decreaseSpeed(_arg1:Number=0.3):void{
this.speed = (this.speed - _arg1);
if (this.speed < -(MAX_REVERSESPEED)){
this.speed = -(MAX_REVERSESPEED);
};
}
public function fireGunStraight():void{
var _local1:Point;
if ((((this.shipState < 4)) && ((this.shipState > 0)))){
_local1 = getProjection(400);
fireGunGS(_local1.x, _local1.y);
};
}
override public function damage(_arg1:Number):void{
if (superBombExploded){
return;
};
super.damage(_arg1);
}
public function takeOff(_arg1:Boolean=false):void{
if ((((this.shipState <= 0)) || (_arg1))){
if (powCamp != null){
powCamp.shipOnPad = false;
powCamp = null;
};
softLanded = false;
rotorAcceleration = 1.5;
lastShipState = shipState;
shipState = 1;
space.airShip.addChild(this);
this.space.informationArea.hideTakeOffText();
};
}
public function zeroSpeed(_arg1:Number=0.2):void{
if (Math.abs(this.speed) < 0.2){
this.speed = 0;
};
if (this.speed > 0){
decreaseSpeed(_arg1);
} else {
if (this.speed < 0){
increaseSpeed(_arg1);
};
};
}
private function overPowCamp():PowCamp{
var _local1:PowCamp;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
for each (_local1 in space.powCamps) {
_local2 = (_local1.gamespace_x + 72);
_local3 = (_local1.gamespace_y - 29);
_local4 = (this.gamespace_x - _local2);
_local5 = (this.gamespace_y - _local3);
_local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
if (_local6 < 20){
return (_local1);
};
};
return (null);
}
public function loadSuperBomb():void{
if ((((this.shipState == 0)) && (space.superBombAvailable))){
superBombLoaded = true;
};
}
private function crashZeroSpeed(_arg1:Number=1.1):void{
dx = (dx / 1.04);
dy = (dy / 1.04);
}
public function zeroLateralSpeed():void{
if (Math.abs(this.lateralSpeed) < 0.2){
this.lateralSpeed = 0;
};
if (this.lateralSpeed > 0){
decreaseLateralSpeed();
} else {
if (this.lateralSpeed < 0){
increaseLateralSpeed();
};
};
}
private function fireGunGS(_arg1:int, _arg2:int):void{
var _local3:Point;
var _local4:Number;
var _local5:Number;
if (((((gunFireCount + 1) <= MAX_GUNFIRE)) && (!(superBombExploded)))){
gunFireCount = (gunFireCount + 1);
_local3 = this.getProjection(15);
_local4 = (Math.abs((_arg1 - this.gamespace_x)) / 7);
_local5 = (Math.abs((_arg2 - this.gamespace_y)) / 7);
new Bullet(space, dx, dy, _local3.x, _local3.y, ((_arg1 + (Math.random() * _local5)) - (_local5 / 2)), ((_arg2 + (Math.random() * _local4)) - (_local4 / 2)), 1, false, false, 12);
if (gunSoundChannel == null){
gunSoundChannel = machineGunSound.play(0, 999999);
};
gunFired = true;
space.bulletsFired++;
};
}
public function crash():void{
trace("Crash");
space.shipDeaths++;
this.shipCrashSound.play();
this.shipState = 5;
chopperBitmap.visible = false;
bladesBitmap.visible = false;
new Explosion(space, this.gamespace_x, this.gamespace_y, true, 20);
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 15, 1);
if (powCamp != null){
powCamp.shipOnPad = false;
powCamp = null;
};
this.space.score = (this.space.score - (PowCamp.POWSAVESCORE * powsOnboardCount));
this.space.killedPOWS = (this.space.killedPOWS + powsOnboardCount);
if (powsOnboardCount > 0){
new FadingPopup(this.space, this.gamespace_x, this.gamespace_y, (powsOnboardCount + " POWS KILLED IN CRASH"), 0xFF0000, true);
};
powsOnboardCount = 0;
}
public function turnRight():void{
if ((((shipState > 0)) && ((shipState < 4)))){
this.rotation = (this.rotation + 6);
};
}
public function decreaseLateralSpeed(_arg1:Number=0.2):void{
this.lateralSpeed = (this.lateralSpeed - _arg1);
if (this.lateralSpeed < -(MAX_LATERALSPEED)){
this.lateralSpeed = -(MAX_LATERALSPEED);
};
}
override public function update():void{
var _local1:Point;
var _local2:Number;
var _local3:Point;
var _local4:HittableGameObject;
var _local5:int;
var _local6:int;
age++;
if (superBombLoaded){
if (superBombSoundChannel == null){
superBombSoundChannel = superBombSound.play(0, 999999, soundTransform);
};
} else {
if (superBombSoundChannel != null){
superBombSoundChannel.stop();
superBombSoundChannel = null;
};
};
if (superBombExploded){
speed = 0;
lateralSpeed = 0;
};
if (turboOn){
if ((age % 1) == 0){
new Smoke(space, this.gamespace_x, this.gamespace_y);
};
increaseSpeed();
turboTimer--;
if (turboTimer == 0){
noTurbo();
};
};
if (this.space.endGameState == 2){
this.visible = false;
this.gamespace_x = this.space.carrier.gamespace_x;
this.gamespace_y = this.space.carrier.gamespace_y;
} else {
if (shipState == -1){
this.scaleX = LANDED_SCALE;
this.scaleY = LANDED_SCALE;
bladesSprite.rotation = (bladesSprite.rotation + rotorSpeed);
if (shipLandingSoundChannel != null){
shipLandingSoundChannel.stop();
shipLandingSoundChannel = null;
};
} else {
if (shipState == 0){
this.health = this.START_HEALTH;
if (space.superBombAvailable){
superBombLoaded = true;
space.superBombAvailable = false;
};
if (!superBombLoaded){
loadedBombs = MAX_LOADEDBOMBS;
} else {
loadedBombs = 0;
};
if ((((loadedBeacons == 0)) && ((space.missileBarrages > 0)))){
this.loadedBeacons = 1;
space.missileBarrages--;
};
_local1 = this.space.carrier.getProjection(this.landedDistance, this.landedDegree);
this.gamespace_x = _local1.x;
this.gamespace_y = _local1.y;
this.rotation = (this.landedRotation + this.space.carrier.rotation);
this.scaleX = LANDED_SCALE;
this.scaleY = LANDED_SCALE;
if (shipLandingSoundChannel != null){
shipLandingSoundChannel.stop();
shipLandingSoundChannel = null;
};
bladesBitmap.bitmapData = bladesSlowBitmapData;
} else {
if (shipState == 1){
if (lastShipState == 0){
_local2 = (-(FULL_ROTORSPEED) + (rotorSpeed * 1.7));
if (_local2 < 0){
_local2 = 0;
_local1 = this.space.carrier.getProjection(this.landedDistance, this.landedDegree);
this.gamespace_x = _local1.x;
this.gamespace_y = _local1.y;
this.rotation = (this.landedRotation + this.space.carrier.rotation);
};
} else {
_local2 = rotorSpeed;
};
this.scaleX = (LANDED_SCALE + ((_local2 / FULL_ROTORSPEED) * (1 - LANDED_SCALE)));
this.scaleY = (LANDED_SCALE + ((_local2 / FULL_ROTORSPEED) * (1 - LANDED_SCALE)));
if (shipLandingSoundChannel != null){
shipLandingSoundChannel.stop();
shipLandingSoundChannel = null;
};
if (shipTakingOffSoundChannel == null){
shipTakingOffSoundChannel = shipTakingOffSound.play();
};
bladesBitmap.bitmapData = bladesSlowBitmapData;
rotorSpeed = (rotorSpeed + rotorAcceleration);
bladesSprite.rotation = (bladesSprite.rotation + rotorSpeed);
if (rotorSpeed >= FULL_ROTORSPEED){
lastShipState = shipState;
shipState = 3;
rotorSpeed = FULL_ROTORSPEED;
};
} else {
if (shipState == 2){
this.scaleX = (LANDED_SCALE + ((rotorSpeed / FULL_ROTORSPEED) * (1 - LANDED_SCALE)));
this.scaleY = (LANDED_SCALE + ((rotorSpeed / FULL_ROTORSPEED) * (1 - LANDED_SCALE)));
if (shipSoundChannel != null){
shipSoundChannel.stop();
shipSoundChannel = null;
};
if (shipTakingOffSoundChannel != null){
shipTakingOffSoundChannel.stop();
shipTakingOffSoundChannel = null;
};
if (shipLandingSoundChannel == null){
shipLandingSoundChannel = shipLandingSound.play();
};
bladesBitmap.bitmapData = bladesSlowBitmapData;
rotorSpeed = (rotorSpeed + rotorAcceleration);
bladesSprite.rotation = (bladesSprite.rotation + rotorSpeed);
if (softLanded){
if (rotorSpeed <= 10){
powCamp = overPowCamp();
if (powCamp != null){
lastShipState = shipState;
space.groundShip.addChild(this);
shipState = -1;
powCamp.shipOnPad = true;
} else {
if (shipLandingSoundChannel == null){
shipLandingSoundChannel = shipLandingSound.play();
};
takeOff(true);
};
};
} else {
if (rotorSpeed <= 0){
if (this.space.carrier.overLandingPad(this.gamespace_x, this.gamespace_y)){
lastShipState = shipState;
space.groundShip.addChild(this);
shipState = 0;
rotorSpeed = 0;
_local3 = this.space.carrier.getDistanceAndDegree(this.gamespace_x, this.gamespace_y);
this.landedDistance = _local3.x;
this.landedDegree = _local3.y;
this.landedRotation = (this.rotation - this.space.carrier.rotation);
this.health = this.START_HEALTH;
this.loadedBombs = MAX_LOADEDBOMBS;
if ((((loadedBeacons == 0)) && ((space.missileBarrages > 0)))){
this.loadedBeacons = 1;
space.missileBarrages--;
};
this.space.informationArea.showTakeOffText();
if (powsOnboardCount > 0){
this.space.score = (this.space.score + (PowCamp.POWSAVESCORE * powsOnboardCount));
this.space.savedPOWS = (this.space.savedPOWS + powsOnboardCount);
new FadingPopup(this.space, this.gamespace_x, this.gamespace_y, (("SAVED " + powsOnboardCount) + " POWS!\nGOOD JOB!"), 0xFF, true);
powsOnboardCount = 0;
} else {
new FadingPopup(this.space, this.gamespace_x, this.gamespace_y, "SUCCESSFUL LANDING", 0xFF, true);
};
} else {
new FadingPopup(this.space, this.gamespace_x, this.gamespace_y, "MISSED LANDING!", 0xFF0000, true);
if (shipLandingSoundChannel == null){
shipLandingSoundChannel = shipLandingSound.play();
};
takeOff(true);
};
};
};
} else {
if (shipState == 3){
this.scaleX = 1;
this.scaleY = 1;
if (shipSoundChannel == null){
shipSoundChannel = shipSound.play(0, 999999, soundTransform);
};
if (shipTakingOffSoundChannel != null){
shipTakingOffSoundChannel.stop();
shipTakingOffSoundChannel = null;
};
bladeState = (bladeState + 1);
if (bladeState > 1){
bladeState = 0;
};
if (bladeState == 0){
bladesBitmap.bitmapData = bladesBitmapData0;
} else {
if (bladeState == 1){
bladesBitmap.bitmapData = bladesBitmapData1;
};
};
} else {
if (shipState == 4){
if (shipSoundChannel != null){
shipSoundChannel.stop();
shipSoundChannel = null;
};
if (shipLandingSoundChannel != null){
shipLandingSoundChannel.stop();
shipLandingSoundChannel = null;
};
if (shipTakingOffSoundChannel != null){
shipTakingOffSoundChannel.stop();
shipTakingOffSoundChannel = null;
};
if (lastShipState == -1){
crash();
} else {
if (shipCrashingSoundChannel == null){
shipCrashingSoundChannel = shipCrashingSound.play(0, 999999);
};
this.rotation = (this.rotation + 25);
crashCounter++;
this.scaleX = (1 - ((crashCounter / CRASHTIME) * (1 - LANDED_SCALE)));
this.scaleY = (1 - ((crashCounter / CRASHTIME) * (1 - LANDED_SCALE)));
if (crashCounter >= CRASHTIME){
crash();
};
};
} else {
if (shipState == 5){
if (shipCrashingSoundChannel != null){
shipCrashingSoundChannel.stop();
shipCrashingSoundChannel = null;
};
purgatoryCounter++;
crashZeroSpeed();
if (((((purgatoryCounter % 5) == 0)) && ((purgatoryCounter < 25)))){
new Explosion(space, this.gamespace_x, this.gamespace_y, true, 20);
_local5 = 0;
while (_local5 < space.layerGround.numChildren) {
_local4 = (space.layerGround.getChildAt(_local5) as HittableGameObject);
if (_local4.hitTest(this.gamespace_x, this.gamespace_y)){
_local4.damage(50);
break;
};
_local5++;
};
};
if (purgatoryCounter >= PURGATORYTIME){
this.shipState = 6;
this.landedDistance = 120;
this.landedDegree = 180;
this.landedRotation = 0;
};
} else {
if (shipState == 6){
_local1 = this.space.carrier.getProjection(this.landedDistance, this.landedDegree);
this.gamespace_x = _local1.x;
this.gamespace_y = _local1.y;
reincarnationCounter++;
if (reincarnationCounter >= REINCARNATIONTIME){
restart();
};
};
};
};
};
};
};
};
};
};
if (shipState <= 0){
dx = 0;
dy = 0;
} else {
if (shipState < 4){
dy = ((this.speed * Math.sin(((rotation / 180) * Math.PI))) + (this.lateralSpeed * Math.sin((((rotation + 90) / 180) * Math.PI))));
dx = ((this.speed * Math.cos(((rotation / 180) * Math.PI))) + (this.lateralSpeed * Math.cos((((rotation + 90) / 180) * Math.PI))));
if ((((shipState == 1)) || ((shipState == 2)))){
_local6 = (rotorSpeed - 25);
if (_local6 < 0){
_local6 = 0;
};
dy = (dy * (_local6 / (FULL_ROTORSPEED - 25)));
dx = (dx * (_local6 / (FULL_ROTORSPEED - 25)));
};
};
};
gamespace_x = (gamespace_x + dx);
gamespace_y = (gamespace_y + dy);
this.hitLeft = (gamespace_x - 20);
this.hitRight = (gamespace_x + 20);
this.hitTop = (gamespace_y - 20);
this.hitBottom = (gamespace_y + 20);
if (gamespace_x > (space.selectedGameMap.worldPixelWidth - 50)){
this.gamespace_x = (space.selectedGameMap.worldPixelWidth - 50);
} else {
if (gamespace_x < 50){
this.gamespace_x = 50;
};
};
if (gamespace_y > (space.selectedGameMap.worldPixelHeight - 50)){
this.gamespace_y = (space.selectedGameMap.worldPixelHeight - 50);
} else {
if (gamespace_y < 50){
this.gamespace_y = 50;
};
};
if (((!(gunFired)) && (!((gunSoundChannel == null))))){
gunSoundChannel.soundTransform.volume = 0;
gunSoundChannel.stop();
gunSoundChannel = null;
};
gunFired = false;
if ((MAX_GUNFIRE - gunFireCount) <= 1){
gunFireCount = (gunFireCount - 0.1);
} else {
gunFireCount = (gunFireCount - 0.6);
};
if (gunFireCount < 0){
gunFireCount = 0;
};
dropBombCount = (dropBombCount - 1);
if (dropBombCount < 0){
dropBombCount = 0;
};
if ((((this.health <= 0)) && ((this.shipState < 4)))){
this.lastShipState = shipState;
this.shipState = 4;
};
if (superBombExploded){
this.visible = false;
if (shipSoundChannel != null){
shipSoundChannel.stop();
shipSoundChannel = null;
};
if (shipLandingSoundChannel != null){
shipLandingSoundChannel.stop();
shipLandingSoundChannel = null;
};
if (shipTakingOffSoundChannel != null){
shipTakingOffSoundChannel.stop();
shipTakingOffSoundChannel = null;
};
};
}
public function noTurbo():void{
turboOn = false;
}
public function dropSuperBomb():void{
if (this.shipState < 4){
dropSuperBombGS();
};
}
private function dropBombGS():void{
if ((((((loadedBombs > 0)) && ((dropBombCount == 0)))) && ((shipState == 3)))){
loadedBombs--;
dropBombCount = (dropBombCount + TIME_DROPBOMB);
new Bomb(space, (dx * 0.5), (dy * 0.5), this.gamespace_x, this.gamespace_y, this.rotation);
bombSoundChannel = bombSound.play();
space.bombsDropped++;
} else {
if (shipState == 0){
new FadingPopup(space, gamespace_x, gamespace_y, "Press SHIFT to take off", 144, true);
};
};
if (loadedBombs <= 0){
space.isSpace = false;
};
}
public function land():void{
if (this.shipState == 3){
if (this.space.carrier.overLandingPad(this.gamespace_x, this.gamespace_y)){
softLanded = false;
rotorAcceleration = -1.3;
lastShipState = shipState;
shipState = 2;
} else {
if (overPowCamp() != null){
softLanded = true;
rotorAcceleration = -1.3;
lastShipState = shipState;
shipState = 2;
};
};
};
}
private function dropSuperBombGS():void{
var _local1:Boolean;
var _local2:GameObject;
var _local3:int;
var _local4:Number;
var _local5:Number;
if (((superBombLoaded) && ((shipState == 3)))){
_local3 = 0;
while (_local3 < space.layerGround.numChildren) {
_local2 = (space.layerGround.getChildAt(_local3) as GameObject);
if ((_local2 is Factory)){
_local4 = Math.abs((this.gamespace_x - _local2.gamespace_x));
_local5 = Math.abs((this.gamespace_y - _local2.gamespace_y));
if ((((_local4 < 200)) && ((_local5 < 200)))){
_local1 = true;
};
};
_local3++;
};
if (_local1){
this.explodingSuperBomb = new SuperBomb(space, (_local4 * 0.5), (_local5 * 0.5), this.gamespace_x, this.gamespace_y);
superBombLoaded = false;
superBombExploded = true;
space.expandView();
} else {
new FadingPopup(this.space, this.gamespace_x, this.gamespace_y, "GET CLOSER TO THE HQ!", 0xFF0000, true);
};
};
}
}
}//package com.wbwar.chopraider.game
Section 217
//Ship_bladesImage0 (com.wbwar.chopraider.game.Ship_bladesImage0)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Ship_bladesImage0 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 218
//Ship_bladesImage1 (com.wbwar.chopraider.game.Ship_bladesImage1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Ship_bladesImage1 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 219
//Ship_bladesSlowImage (com.wbwar.chopraider.game.Ship_bladesSlowImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Ship_bladesSlowImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 220
//Ship_chopperImage (com.wbwar.chopraider.game.Ship_chopperImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Ship_chopperImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 221
//ShipYard (com.wbwar.chopraider.game.ShipYard)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class ShipYard extends HittableGameObject {
public var baseState:int;// = 0
private var boatLaunchTime:Number;
private var shipYardContainer:Sprite;
public var bombIndicator:BombIndicator;
private var orientation:int;
private var repairRate:Number;
private var healthBar:HealthBar;
private var shipYardBitmap:Bitmap;
private var maxBoats:Number;
private var boatLaunchTimer:int;// = 0
public var currentBoatCount:int;// = 0
private var boatHealth:Number;
private var destroyedSound:Sound;
private var repairTimer:int;// = 0
public function ShipYard(_arg1:Space, _arg2:ShipYardBean):void{
shipYardBitmap = (new GameBitmaps.shipYardImage() as Bitmap);
shipYardContainer = new Sprite();
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
orientation = _arg2.orientation;
repairRate = _arg2.repairRate;
maxBoats = _arg2.maxBoats;
boatLaunchTime = _arg2.boatLaunchTime;
boatHealth = _arg2.boatHealth;
boatLaunchTimer = boatLaunchTime;
if (orientation == 0){
shipYardContainer.rotation = 0;
} else {
if (orientation == 1){
shipYardContainer.rotation = 90;
} else {
if (orientation == 2){
shipYardContainer.rotation = 180;
} else {
if (orientation == 3){
shipYardContainer.rotation = 270;
};
};
};
};
if ((((orientation == 0)) || ((orientation == 2)))){
healthBar = new HealthBar(shipYardBitmap.width);
healthBar.x = (-(shipYardBitmap.width) / 2);
healthBar.y = ((shipYardBitmap.height / 2) + 2);
} else {
healthBar = new HealthBar(shipYardBitmap.height);
healthBar.x = (-(shipYardBitmap.height) / 2);
healthBar.y = ((shipYardBitmap.width / 2) + 2);
};
bombIndicator = new BombIndicator();
shipYardContainer.addChild(shipYardBitmap);
this.addChild(shipYardContainer);
this.addChild(healthBar);
this.addChild(bombIndicator);
shipYardBitmap.x = (-(shipYardBitmap.width) / 2);
shipYardBitmap.y = (-(shipYardBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
if ((((orientation == 0)) || ((orientation == 2)))){
hitLeft = (Number(_arg2.x) - (shipYardBitmap.width / 2));
hitRight = (Number(_arg2.x) + (shipYardBitmap.width / 2));
hitTop = (Number(_arg2.y) - (shipYardBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (shipYardBitmap.height / 2));
} else {
hitLeft = (Number(_arg2.x) - (shipYardBitmap.height / 2));
hitRight = (Number(_arg2.x) + (shipYardBitmap.height / 2));
hitTop = (Number(_arg2.y) - (shipYardBitmap.width / 2));
hitBottom = (Number(_arg2.y) + (shipYardBitmap.width / 2));
};
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
baseState = 1;
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
}
override public function update():void{
var _local1:Explosion;
var _local2:Number;
var _local3:Boat;
if (bombIndicator.visible){
bombIndicator.update();
bombIndicator.visible = false;
};
if (baseState == 0){
if (health <= 0){
if (destroyedSound != null){
destroyedSound.play();
};
_local1 = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 5);
this.space.score = (this.space.score + this.startHealth);
baseState = 1;
this.health = 0;
repairTimer = repairRate;
this.alpha = 0.15;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
} else {
if (currentBoatCount < maxBoats){
boatLaunchTimer--;
if (boatLaunchTimer < 0){
boatLaunchTimer = 0;
};
if (boatLaunchTimer == 0){
_local2 = 0;
if (orientation == 0){
_local2 = 0;
} else {
if (orientation == 1){
_local2 = 90;
} else {
if (orientation == 2){
_local2 = 180;
} else {
if (orientation == 3){
_local2 = 270;
};
};
};
};
_local2 = (_local2 + ((Math.random() * 60) - 30));
_local3 = new Boat(this, this.space, this.gamespace_x, this.gamespace_y, _local2, boatHealth, 999999, 0.75, 250, 15);
currentBoatCount++;
boatLaunchTimer = boatLaunchTime;
};
};
};
};
if ((((baseState == 1)) && ((this.health < this.startHealth)))){
this.health = (this.health + this.repairRate);
if (this.health >= this.startHealth){
this.health = this.startHealth;
baseState = 0;
this.health = this.startHealth;
this.alpha = 1;
};
healthBar.setHealth((this.health / startHealth));
};
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
}
}//package com.wbwar.chopraider.game
Section 222
//SkillSelection (com.wbwar.chopraider.game.SkillSelection)
package com.wbwar.chopraider.game {
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.text.*;
public class SkillSelection extends Sprite {
public var r2:RadioButton;
public var r3:RadioButton;
public var r1:RadioButton;
public function SkillSelection(){
var _local2:TextField;
r1 = new RadioButton("Easy");
r2 = new RadioButton("Normal");
r3 = new RadioButton("Hard");
super();
graphics.beginFill(0xFFFFFF);
graphics.drawRoundRect(0, 0, 100, 83, 5, 5);
graphics.endFill();
graphics.lineStyle(2, 0);
graphics.drawRoundRect(0, 0, 100, 83, 5, 5);
var _local1:TextFormat = new TextFormat();
_local1.font = "wbfont";
_local1.color = 0;
_local1.size = 16;
_local1.bold = true;
_local1.underline = true;
_local2 = new TextField();
_local2.antiAliasType = AntiAliasType.ADVANCED;
_local2.gridFitType = GridFitType.PIXEL;
_local2.background = false;
_local2.border = false;
_local2.embedFonts = true;
_local2.defaultTextFormat = _local1;
_local2.autoSize = TextFieldAutoSize.LEFT;
_local2.selectable = false;
_local2.text = "Skill Level";
addChild(_local2);
_local2.x = 5;
_local2.y = 0;
addChild(r1);
addChild(r2);
addChild(r3);
r1.x = 10;
r1.y = 22;
r2.x = 10;
r2.y = 42;
r3.x = 10;
r3.y = 62;
r1.addEventListener(RadioButton.CLICKED, r1Clicked);
r2.addEventListener(RadioButton.CLICKED, r2Clicked);
r3.addEventListener(RadioButton.CLICKED, r3Clicked);
r2.selected = true;
}
public function r2Clicked(_arg1:ButtonEvent):void{
trace("r2Clicked");
r1.selected = false;
r3.selected = false;
}
public function r1Clicked(_arg1:ButtonEvent):void{
trace("r1Clicked");
r2.selected = false;
r3.selected = false;
}
public function r3Clicked(_arg1:ButtonEvent):void{
trace("r3Clicked");
r1.selected = false;
r2.selected = false;
}
}
}//package com.wbwar.chopraider.game
Section 223
//SmallExplosion (com.wbwar.chopraider.game.SmallExplosion)
package com.wbwar.chopraider.game {
import flash.display.*;
public class SmallExplosion extends GameObject {
private var age:uint;// = 0
private var fragments:Array;
public var duration:Number;// = 10
public var speed:Number;// = 7
private var fragmentCount:int;// = 20
private static var fragmentImage:Class = SmallExplosion_fragmentImage;
private static var fragmentImage1:Class = SmallExplosion_fragmentImage1;
public function SmallExplosion(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:int):void{
var _local6:Bitmap;
fragments = new Array();
super(_arg1, _arg2, _arg3);
this.fragmentCount = _arg5;
_arg1.layerEffectsUpperAir.addGameObject(this);
var _local7:int;
while (_local7 < _arg5) {
if (_arg4){
_local6 = (new fragmentImage1() as Bitmap);
} else {
_local6 = (new fragmentImage() as Bitmap);
};
fragments.push(new ExplosionFragment(((Math.random() * 2) - 1), ((Math.random() * 2) - 1), _local6));
addChild(_local6);
_local6.rotation = (Math.random() * 360);
_local7++;
};
}
override public function update():void{
var _local1:ExplosionFragment;
age++;
if (age > duration){
for each (_local1 in fragments) {
this.removeChild(_local1.bitmap);
};
space.layerEffectsUpperAir.removeGameObject(this);
} else {
for each (_local1 in fragments) {
_local1.bitmap.x = (_local1.bitmap.x + (_local1.deltaX * speed));
_local1.bitmap.y = (_local1.bitmap.y + (_local1.deltaY * speed));
_local1.bitmap.alpha = (1 - (age / duration));
};
};
}
}
}//package com.wbwar.chopraider.game
Section 224
//SmallExplosion_fragmentImage (com.wbwar.chopraider.game.SmallExplosion_fragmentImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SmallExplosion_fragmentImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 225
//SmallExplosion_fragmentImage1 (com.wbwar.chopraider.game.SmallExplosion_fragmentImage1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SmallExplosion_fragmentImage1 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 226
//Smoke (com.wbwar.chopraider.game.Smoke)
package com.wbwar.chopraider.game {
import flash.display.*;
public class Smoke extends GameObject {
private var sourceBitmap:Bitmap;
private var age:uint;
private static const maxAge:uint = 5;
private static var sourceImage:Class = Smoke_sourceImage;
public function Smoke(_arg1:Space, _arg2:Number, _arg3:Number){
sourceBitmap = (new sourceImage() as Bitmap);
super(_arg1, _arg2, _arg3);
_arg1.layerEffectsLowerAir.addGameObject(this);
this.addChild(sourceBitmap);
sourceBitmap.x = (-(sourceBitmap.width) / 2);
sourceBitmap.y = (-(sourceBitmap.height) / 2);
}
override public function update():void{
age++;
if (age >= maxAge){
space.layerEffectsLowerAir.removeGameObject(this);
} else {
if (age > 1){
this.scaleX = (0.2 + ((age / maxAge) * 0.8));
this.scaleY = (0.2 + ((age / maxAge) * 0.8));
this.alpha = (1 - ((age / maxAge) * 0.95));
} else {
this.scaleX = 0.2;
this.scaleY = 0.2;
};
};
}
}
}//package com.wbwar.chopraider.game
Section 227
//Smoke_sourceImage (com.wbwar.chopraider.game.Smoke_sourceImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Smoke_sourceImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 228
//SmokeStack (com.wbwar.chopraider.game.SmokeStack)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.geom.*;
public class SmokeStack extends GameObject {
private var deltaX:int;// = 20
private var deltaY:int;// = 20
private var puffDeltaX:Array;
private var age:uint;
private var puffDeltaY:Array;
private var puffAges:Array;
private var puffBitmaps:Array;
private static const puffMaxAge:uint = 10;
private static const numPuffs:int = 10;
private static var puffImage:Class = SmokeStack_puffImage;
public function SmokeStack(_arg1:Space, _arg2:Number, _arg3:Number){
puffBitmaps = new Array(numPuffs);
puffAges = new Array(numPuffs);
puffDeltaX = new Array(numPuffs);
puffDeltaY = new Array(numPuffs);
super(_arg1, _arg2, _arg3);
_arg1.layerEffectsLowerAir.addGameObject(this);
var _local4:int;
while (_local4 < numPuffs) {
puffBitmaps[_local4] = (new puffImage() as Bitmap);
puffAges[_local4] = ((_local4 / numPuffs) * puffMaxAge);
puffDeltaX[_local4] = deltaX;
puffDeltaY[_local4] = deltaY;
addChild(puffBitmaps[_local4]);
_local4++;
};
}
override public function update():void{
var _local2:Number;
var _local3:Number;
var _local5:Point;
var _local6:Bitmap;
age++;
if ((age % 300) == 0){
deltaX = ((Math.random() * 60) - 30);
deltaY = ((Math.random() * 60) - 30);
};
var _local1:Boolean;
if ((((Math.abs((this.gamespace_x - this.space.ship.gamespace_x)) < 100)) && ((Math.abs((this.gamespace_y - this.space.ship.gamespace_y)) < 100)))){
_local1 = true;
_local5 = getDistanceAndDegree(this.space.ship.gamespace_x, this.space.ship.gamespace_y);
if (_local5.x < 35){
_local2 = ((Math.random() * 80) - 40);
_local3 = ((Math.random() * 80) - 40);
} else {
_local2 = ((2 * (100 - _local5.x)) * Math.cos(((((_local5.y / 360) * 2) * Math.PI) + Math.PI)));
_local3 = ((2 * (100 - _local5.x)) * Math.sin(((((_local5.y / 360) * 2) * Math.PI) + Math.PI)));
};
};
var _local4:int;
while (_local4 < numPuffs) {
_local6 = (puffBitmaps[_local4] as Bitmap);
_local6.x = (((puffAges[_local4] / puffMaxAge) * puffDeltaX[_local4]) - (_local6.width / 2));
_local6.y = (((puffAges[_local4] / puffMaxAge) * puffDeltaY[_local4]) - (_local6.height / 2));
_local6.alpha = (1 - (puffAges[_local4] / puffMaxAge));
var _local7 = puffAges;
var _local8 = _local4;
var _local9 = (_local7[_local8] + 1);
_local7[_local8] = _local9;
if (puffAges[_local4] >= puffMaxAge){
puffAges[_local4] = 0;
if (_local1){
puffDeltaX[_local4] = (deltaX + _local2);
puffDeltaY[_local4] = (deltaY + _local3);
} else {
puffDeltaX[_local4] = ((deltaX + (Math.random() * 6)) - 3);
puffDeltaY[_local4] = ((deltaY + (Math.random() * 6)) - 3);
};
};
_local4++;
};
}
}
}//package com.wbwar.chopraider.game
Section 229
//SmokeStack_puffImage (com.wbwar.chopraider.game.SmokeStack_puffImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SmokeStack_puffImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 230
//SoundManager (com.wbwar.chopraider.game.SoundManager)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import de.benz.dataFormat.wave.*;
public class SoundManager {
private var app:App;
private var sounds:Dictionary;
private var loadSoundCount:int;
private var waveswfs:Array;
private static var destroyed2:Class = SoundManager_destroyed2;
private static var bbombdrop:Class = SoundManager_bbombdrop;
private static var beacon:Class = SoundManager_beacon;
private static var gunfire:Class = SoundManager_gunfire;
private static var superbombalarm:Class = SoundManager_superbombalarm;
private static var factoryexplosion:Class = SoundManager_factoryexplosion;
private static var missilefly:Class = SoundManager_missilefly;
private static var bombdrop:Class = SoundManager_bombdrop;
private static var hit:Class = SoundManager_hit;
private static var shipcrashing:Class = SoundManager_shipcrashing;
private static var missilelaunch:Class = SoundManager_missilelaunch;
private static var shiplanding:Class = SoundManager_shiplanding;
private static var bbomb:Class = SoundManager_bbomb;
private static var destroyed:Class = SoundManager_destroyed;
private static var rocket:Class = SoundManager_rocket;
public static var instance:SoundManager;
private static var machinegun:Class = SoundManager_machinegun;
private static var shipcrash:Class = SoundManager_shipcrash;
private static var missileexplosion:Class = SoundManager_missileexplosion;
private static var carrieralarm:Class = SoundManager_carrieralarm;
private static var bombexplosion:Class = SoundManager_bombexplosion;
private static var shiptakingoff:Class = SoundManager_shiptakingoff;
private static var destroyed3:Class = SoundManager_destroyed3;
private static var ship:Class = SoundManager_ship;
public function SoundManager(_arg1:App):void{
sounds = new Dictionary();
waveswfs = new Array();
super();
trace("SoundManager constructor start");
if (instance == null){
instance = this;
loadSounds(_arg1);
};
trace("SoundManager constructor finish");
}
public function loadSound(_arg1:ByteArray, _arg2:String):void{
loadSoundCount++;
var _local3:WaveReader = new WaveReader();
_local3.read(_arg1);
var _local4:WaveSWF = new WaveSWF(_local3, _arg2);
waveswfs.push(_local4);
_local4.addEventListener(Event.COMPLETE, onWaveReady);
}
private function loadSounds(_arg1:App):void{
this.app = _arg1;
loadSound((new ship() as ByteArray), "ship");
loadSound((new shipcrashing() as ByteArray), "shipcrashing");
loadSound((new shipcrash() as ByteArray), "shipcrash");
loadSound((new shiplanding() as ByteArray), "shiplanding");
loadSound((new shiptakingoff() as ByteArray), "shiptakingoff");
loadSound((new machinegun() as ByteArray), "machinegun");
loadSound((new missilelaunch() as ByteArray), "missilelaunch");
loadSound((new missilefly() as ByteArray), "missilefly");
loadSound((new missileexplosion() as ByteArray), "missileexplosion");
loadSound((new hit() as ByteArray), "hit");
loadSound((new factoryexplosion() as ByteArray), "factoryexplosion");
loadSound((new destroyed() as ByteArray), "destroyed");
loadSound((new destroyed2() as ByteArray), "destroyed2");
loadSound((new destroyed2() as ByteArray), "destroyed3");
loadSound((new bombdrop() as ByteArray), "bombdrop");
loadSound((new bombexplosion() as ByteArray), "bombexplosion");
loadSound((new gunfire() as ByteArray), "gunfire");
loadSound((new carrieralarm() as ByteArray), "carrieralarm");
loadSound((new beacon() as ByteArray), "beacon");
loadSound((new bbomb() as ByteArray), "bbomb");
loadSound((new bbombdrop() as ByteArray), "bbombdrop");
loadSound((new rocket() as ByteArray), "rocket");
loadSound((new superbombalarm() as ByteArray), "superbombalarm");
}
private function onWaveReady(_arg1:Event):void{
var _local2:WaveSWF = WaveSWF(_arg1.target);
var _local3:Sound = _local2.sound;
var _local4:String = _local2.name;
sounds[_local4] = _local3;
loadSoundCount--;
app.soundLoaded(loadSoundCount);
if (loadSoundCount == 0){
waveswfs = null;
app.soundsLoaded();
};
}
public function getSound(_arg1:String):Sound{
return (sounds[_arg1]);
}
}
}//package com.wbwar.chopraider.game
Section 231
//SoundManager_bbomb (com.wbwar.chopraider.game.SoundManager_bbomb)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_bbomb extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 232
//SoundManager_bbombdrop (com.wbwar.chopraider.game.SoundManager_bbombdrop)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_bbombdrop extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 233
//SoundManager_beacon (com.wbwar.chopraider.game.SoundManager_beacon)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_beacon extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 234
//SoundManager_bombdrop (com.wbwar.chopraider.game.SoundManager_bombdrop)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_bombdrop extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 235
//SoundManager_bombexplosion (com.wbwar.chopraider.game.SoundManager_bombexplosion)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_bombexplosion extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 236
//SoundManager_carrieralarm (com.wbwar.chopraider.game.SoundManager_carrieralarm)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_carrieralarm extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 237
//SoundManager_destroyed (com.wbwar.chopraider.game.SoundManager_destroyed)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_destroyed extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 238
//SoundManager_destroyed2 (com.wbwar.chopraider.game.SoundManager_destroyed2)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_destroyed2 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 239
//SoundManager_destroyed3 (com.wbwar.chopraider.game.SoundManager_destroyed3)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_destroyed3 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 240
//SoundManager_factoryexplosion (com.wbwar.chopraider.game.SoundManager_factoryexplosion)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_factoryexplosion extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 241
//SoundManager_gunfire (com.wbwar.chopraider.game.SoundManager_gunfire)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_gunfire extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 242
//SoundManager_hit (com.wbwar.chopraider.game.SoundManager_hit)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_hit extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 243
//SoundManager_machinegun (com.wbwar.chopraider.game.SoundManager_machinegun)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_machinegun extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 244
//SoundManager_missileexplosion (com.wbwar.chopraider.game.SoundManager_missileexplosion)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_missileexplosion extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 245
//SoundManager_missilefly (com.wbwar.chopraider.game.SoundManager_missilefly)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_missilefly extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 246
//SoundManager_missilelaunch (com.wbwar.chopraider.game.SoundManager_missilelaunch)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_missilelaunch extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 247
//SoundManager_rocket (com.wbwar.chopraider.game.SoundManager_rocket)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_rocket extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 248
//SoundManager_ship (com.wbwar.chopraider.game.SoundManager_ship)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_ship extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 249
//SoundManager_shipcrash (com.wbwar.chopraider.game.SoundManager_shipcrash)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_shipcrash extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 250
//SoundManager_shipcrashing (com.wbwar.chopraider.game.SoundManager_shipcrashing)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_shipcrashing extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 251
//SoundManager_shiplanding (com.wbwar.chopraider.game.SoundManager_shiplanding)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_shiplanding extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 252
//SoundManager_shiptakingoff (com.wbwar.chopraider.game.SoundManager_shiptakingoff)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_shiptakingoff extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 253
//SoundManager_superbombalarm (com.wbwar.chopraider.game.SoundManager_superbombalarm)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SoundManager_superbombalarm extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 254
//Space (com.wbwar.chopraider.game.Space)
package com.wbwar.chopraider.game {
import flash.events.*;
import com.wbwar.chopraider.common.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.utils.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
import flash.text.*;
public class Space extends Sprite {
public const USESTICKYTHROTTLE:Boolean = false;
private const SHAKE_TIME:int = 25;
public const SHIP_SLIDE:Number = 15;
private const SUPER_SHAKE_TIME:int = 200;
private var warmUp:Boolean;
private var isTab:Boolean;
private var isBeacon:Boolean;
private var isRight:Boolean;
private var lostFocus:LostFocus;
public var killedPOWS:int;
private var compass:Compass;
private var canFireMissile:Boolean;// = true
public var app:App;
public var savedPOWS:int;
public var civCount:int;
public var bulletsHit:int;
public var shakeScreen:Boolean;
private var droppedBeacon:Boolean;
private var victoryIndicator:VictoryIndicator;
public var paused:Boolean;
public var layerEffectsLowerAir:Layer;
public var stickyThrottle:Boolean;
public var layerGround:Layer;
public var layerAir:Layer;
public var ship:Ship;
private var is1:Boolean;
private var is2:Boolean;
private var is3:Boolean;
public var skill:int;
private var defeatIndicator:DefeatIndicator;
private var isB:Boolean;
private var superBombHasBeenOffered:Boolean;
public var endGameState:int;// = 0
public var totalPOWS:int;
private var isLeft:Boolean;
public var groundShip:Sprite;
private var timeCount:int;
private var isUp:Boolean;
public var factoryPresent:Boolean;
private var isT:Boolean;
public var bombsDropped:int;
private var isZ:Boolean;
public var layerEffectsLowerShip:Layer;
private var isShift:Boolean;
public var bPressed:Boolean;
public var currentLevel:int;// = 0
public var layerEffectsUpperShip:Layer;
private var trackingRadar:TrackingRadar;
private var superShakeCount:int;
private var canToggleThrottle:Boolean;// = true
public var tileEngine:TileEngine;
public var layerEffectsUpperGround:Layer;
public var score:int;// = 0
public var powCamps:Array;
public var superBombAvailable:Boolean;
public var superbomb:Boolean;
public var victoryState:Boolean;
public var airShip:Sprite;
public var carCount:int;
private var particles:Array;
public var superShakeScreen:Boolean;
private var inGameMenu:InGameMenu;
public var layerEffectsLowerGround:Layer;
private var shakeCount:int;
public var bulletsFired:int;
public var bombsHit:int;
public var viewPort:ViewPort;
public var roadBlockCount:int;
private var endGameCounter:int;// = 80
private var isLateralLeft:Boolean;
public var informationArea:InformationArea;
public var superTop:Sprite;
private var time:int;
private var isMouseDown:Boolean;
public var missileBarrages:int;
public var shipDeaths:int;
public var remainingTime:int;
public var layerEffectsUpperAir:Layer;
private var isEsc:Boolean;
private var isDown:Boolean;
private var isLateralRight:Boolean;
public var status:Status;
private var updateCount:int;
public var onMissionBriefing:Boolean;
public var selectedGameMap:GameMap;
private var isReturn:Boolean;
public var isSpace:Boolean;
public var carrier:Carrier;
public function Space(_arg1:App, _arg2:GameMap, _arg3:int){
var tower:XML;
var missileLauncher:XML;
var gun:XML;
var powCamp:XML;
var airBase:XML;
var tankBase:XML;
var roadBlock:XML;
var civ:XML;
var shipYard:XML;
var factory:XML;
var wall:XML;
var powerPlant:XML;
var powerLine:XML;
var tow:Tower;
var ml:MissileLauncher;
var g:Gun;
var pow:PowCamp;
var ab:AirBase;
var tb:TankBase;
var rb:RoadBlock;
var ci:Civ;
var sy:ShipYard;
var f:Factory;
var w:Wall;
var pp:PowerPlant;
var pl:PowerLine;
var format:TextFormat;
var trainingText:TextField;
var trainingText2:TextField;
var trainingBox:Sprite;
var trainingBox2:Sprite;
var controlsText:GenericTextField;
var controlsTextPulsator:Pulsator;
var app = _arg1;
var gameMap = _arg2;
var skill = _arg3;
viewPort = new ViewPort();
powCamps = new Array();
super();
this.app = app;
selectedGameMap = gameMap;
this.skill = skill;
remainingTime = (selectedGameMap.time * 1000);
if (skill == 2){
remainingTime = (remainingTime * 1.3);
};
missileBarrages = selectedGameMap.missileBarrages;
superbomb = (selectedGameMap.superbomb > 0);
trace(superbomb);
status = new Status(this);
status.x = 130;
status.y = 3;
var escButton:EscButton = new EscButton();
escButton.x = 3;
escButton.y = 2;
escButton.addEventListener(EscButton.CLICKED, function (_arg1:Event):void{
if (inGameMenu.visible){
hideMenu();
} else {
displayMenu();
};
});
trackingRadar = new TrackingRadar(this);
trackingRadar.x = 3;
trackingRadar.y = 14;
compass = new Compass(this);
compass.x = 90;
compass.y = 3;
informationArea = new InformationArea(this);
informationArea.x = 550;
informationArea.y = 50;
ship = new Ship(this);
layerEffectsUpperShip = new Layer(this);
airShip = new Sprite();
layerEffectsLowerShip = new Layer(this);
layerEffectsUpperAir = new Layer(this);
layerAir = new Layer(this);
layerEffectsLowerAir = new Layer(this);
layerEffectsUpperGround = new Layer(this);
groundShip = new Sprite();
layerGround = new Layer(this);
layerEffectsLowerGround = new Layer(this);
groundShip.addChild(ship);
superTop = new Sprite();
tileEngine = new TileEngine(this);
victoryIndicator = new VictoryIndicator();
victoryIndicator.visible = false;
victoryIndicator.x = (viewPort.width / 2);
victoryIndicator.y = ((viewPort.height / 2) - 50);
defeatIndicator = new DefeatIndicator();
defeatIndicator.visible = false;
defeatIndicator.x = (viewPort.width / 2);
defeatIndicator.y = ((viewPort.height / 2) - 50);
addChild(tileEngine);
addChild(layerEffectsLowerGround);
addChild(layerGround);
addChild(groundShip);
addChild(layerEffectsUpperGround);
addChild(layerEffectsLowerAir);
addChild(layerAir);
addChild(layerEffectsUpperAir);
addChild(layerEffectsLowerShip);
addChild(airShip);
addChild(layerEffectsUpperShip);
addChild(superTop);
addChild(status);
addChild(escButton);
addChild(trackingRadar);
addChild(compass);
addChild(victoryIndicator);
addChild(defeatIndicator);
ship.x = (viewPort.width / 2);
ship.y = (viewPort.height / 2);
carrier = new Carrier(this, selectedGameMap.carrier);
layerGround.addGameObject(carrier);
for each (tower in selectedGameMap.towers) {
tow = new Tower(this, new TowerBean(tower));
};
for each (missileLauncher in selectedGameMap.missileLaunchers) {
ml = new MissileLauncher(this, new MissileLauncherBean(missileLauncher));
};
for each (gun in selectedGameMap.guns) {
g = new Gun(this, new GunBean(gun));
};
for each (powCamp in selectedGameMap.powCamps) {
pow = new PowCamp(this, new PowCampBean(powCamp));
powCamps.push(pow);
totalPOWS = (totalPOWS + pow.startPrisonerCount);
};
for each (airBase in selectedGameMap.airBases) {
ab = new AirBase(this, new AirBaseBean(airBase));
};
for each (tankBase in selectedGameMap.tankBases) {
tb = new TankBase(this, new TankBaseBean(tankBase));
};
for each (roadBlock in selectedGameMap.roadBlocks) {
rb = new RoadBlock(this, new RoadBlockBean(roadBlock));
};
for each (civ in selectedGameMap.civs) {
ci = new Civ(this, new CivBean(civ));
};
for each (shipYard in selectedGameMap.shipYards) {
sy = new ShipYard(this, new ShipYardBean(shipYard));
};
for each (factory in selectedGameMap.factories) {
f = new Factory(this, new FactoryBean(factory));
};
for each (wall in selectedGameMap.walls) {
w = new Wall(this, new WallBean(wall));
};
for each (powerPlant in selectedGameMap.powerPlants) {
pp = new PowerPlant(this, new PowerPlantBean(powerPlant));
};
for each (powerLine in selectedGameMap.powerLines) {
pl = new PowerLine(this, new PowerLineBean(powerLine));
};
if ((((selectedGameMap.mapName == "training1")) || ((selectedGameMap.mapName == "training2")))){
format = new TextFormat();
format.font = "wbfont";
format.color = 160;
format.size = 9;
format.bold = true;
trainingText = new TextField();
trainingText.background = false;
trainingText.border = false;
trainingText.embedFonts = true;
trainingText.defaultTextFormat = format;
trainingText.autoSize = TextFieldAutoSize.LEFT;
trainingText.selectable = false;
trainingText2 = new TextField();
trainingText2.background = false;
trainingText2.border = false;
trainingText2.embedFonts = true;
trainingText2.defaultTextFormat = format;
trainingText2.autoSize = TextFieldAutoSize.LEFT;
trainingText2.selectable = false;
trainingBox = new Sprite();
trainingBox.graphics.beginFill(0xEFEFEF, 0.95);
trainingBox.graphics.drawRoundRect(0, 0, 150, 120, 10, 10);
trainingBox.graphics.endFill();
trainingBox.graphics.lineStyle(2, 112);
trainingBox.graphics.drawRoundRect(0, 0, 150, 120, 10, 10);
trainingText.text = "CONTROLS\n========\nW = FORWARD\nS = BACKWARDS\nA = TURN LEFT\nD = TURN RIGHT\nMOUSE = FIRE GUN\nSPACE = DROP BOMB\nSHIFT = TAKEOFF AND LAND";
trainingText.x = 5;
trainingText.y = 10;
trainingBox.addChild(trainingText);
trainingBox.x = 5;
trainingBox.y = 375;
addChild(trainingBox);
trainingBox2 = new Sprite();
trainingBox2.graphics.beginFill(0xEFEFEF, 0.95);
trainingBox2.graphics.drawRoundRect(0, 0, 128, 130, 10, 10);
trainingBox2.graphics.endFill();
trainingBox2.graphics.lineStyle(2, 112);
trainingBox2.graphics.drawRoundRect(0, 0, 130, 130, 10, 10);
trainingText2.text = "OBJECTIVES\n==========\nUSE BOMBS TO DESTROY\nALL WAR FACTORIES.\nCONNECTED POWER\nPLANTS MUST BE\nDESTROYED FIRST.\n\nREPAIR AND\nREARM AT CARRIER.";
trainingText2.x = 5;
trainingText2.y = 10;
trainingBox2.addChild(trainingText2);
trainingBox2.x = 564;
trainingBox2.y = 365;
addChild(trainingBox2);
controlsText = new GenericTextField(144, 18);
controlsText.gridFitType = GridFitType.NONE;
controlsText.background = true;
controlsText.backgroundColor = 0xEFEFEF;
controlsText.text = "Mouse Fires Gun. Spacebar drops bombs";
controlsTextPulsator = new Pulsator(controlsText, 1.04, 15, true);
addChild(controlsTextPulsator);
controlsTextPulsator.x = 172;
controlsTextPulsator.y = ((App.GAME_HEIGHT - controlsText.height) - 5);
};
var missionBriefing:MissionBriefing = new MissionBriefing(this);
addChild(missionBriefing);
missionBriefing.x = ((App.GAME_WIDTH / 2) - (missionBriefing.width / 2));
missionBriefing.y = ((App.GAME_HEIGHT / 2) - (missionBriefing.height / 2));
inGameMenu = new InGameMenu(this);
this.addChild(inGameMenu);
inGameMenu.x = ((this.width / 2) - (inGameMenu.width / 2));
inGameMenu.y = (((this.height / 2) - (inGameMenu.height / 2)) + 50);
inGameMenu.visible = false;
lostFocus = new LostFocus(this);
this.addChild(lostFocus);
}
public function onMouseWheel(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
this.scaleX = (this.scaleX + 0.1);
this.scaleY = (this.scaleY + 0.1);
} else {
if (_arg1.delta < 0){
this.scaleX = (this.scaleX - 0.1);
this.scaleY = (this.scaleY - 0.1);
};
};
}
public function endGameView():void{
this.scaleX = 1;
this.scaleY = 1;
this.viewPort.width = 700;
this.viewPort.height = 500;
this.tileEngine.init();
status.visible = false;
compass.visible = false;
trackingRadar.visible = false;
}
public function init():void{
time = getTimer();
update();
update();
warmUp = true;
trackingRadar.update();
compass.update();
onMissionBriefing = true;
}
public function exit(_arg1:String="main"):void{
SoundMixer.stopAll();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.removeEventListener(MouseEvent.CLICK, onMouseClick);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
if (_arg1 == "main"){
app.showMainScreen();
} else {
if (_arg1 == "results"){
if (victoryState){
if (ship.powsOnboardCount > 0){
this.savedPOWS = (this.savedPOWS + ship.powsOnboardCount);
};
};
app.showResultsScreen();
};
};
}
private function onMouseClick(_arg1:MouseEvent):void{
}
public function normalView():void{
this.scaleX = 1;
this.scaleY = 1;
this.viewPort.width = 700;
this.viewPort.height = 500;
this.tileEngine.init();
status.visible = true;
compass.visible = true;
trackingRadar.visible = true;
}
private function onMouseUp(_arg1:MouseEvent):void{
isMouseDown = false;
}
public function endGame(_arg1:Boolean):void{
victoryState = _arg1;
if (_arg1){
endGameState = 1;
victoryIndicator.visible = true;
} else {
endGameState = 2;
defeatIndicator.visible = true;
};
}
public function expandView():void{
this.scaleX = 0.3333333333333;
this.scaleY = 0.3333333333333;
this.viewPort.width = 2100;
this.viewPort.height = 1500;
this.tileEngine.init();
status.visible = false;
compass.visible = false;
trackingRadar.visible = false;
}
private function onDeactivate(_arg1:Event):void{
isUp = false;
isDown = false;
isLeft = false;
isRight = false;
isLateralLeft = false;
isLateralRight = false;
lostFocus.show();
}
private function onKeyUp(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 16:
isShift = false;
break;
case 90:
isZ = false;
break;
case 13:
isReturn = false;
break;
case 32:
case 17:
case 96:
case 45:
isSpace = false;
break;
case 69:
isLateralRight = false;
break;
case 81:
isLateralLeft = false;
break;
case 37:
isLeft = false;
break;
case 39:
isRight = false;
break;
case 38:
isUp = false;
break;
case 40:
isDown = false;
break;
case 65:
isLeft = false;
break;
case 68:
isRight = false;
break;
case 87:
isUp = false;
break;
case 83:
isDown = false;
break;
case 84:
break;
case 70:
isBeacon = false;
break;
case 49:
is1 = false;
break;
case 50:
is2 = false;
break;
case 51:
is3 = false;
break;
case 66:
isB = false;
break;
case 27:
isEsc = false;
break;
};
}
private function onMouseDown(_arg1:MouseEvent):void{
isMouseDown = true;
}
public function update():void{
var _local3:SoundTransform;
updateCount++;
if (warmUp){
warmUp = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(Event.DEACTIVATE, onDeactivate);
stage.addEventListener(MouseEvent.CLICK, onMouseClick);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_local3 = new SoundTransform();
_local3.volume = 1;
SoundMixer.soundTransform = _local3;
return;
};
if (endGameState > 0){
endGameCounter--;
if (endGameCounter <= 0){
exit("results");
};
};
var _local1:int = getTimer();
var _local2:int = (_local1 - time);
time = _local1;
if (onMissionBriefing){
return;
};
if (paused){
return;
};
if (superbomb){
if ((((((((roadBlockCount == 0)) && ((civCount == 0)))) && ((carCount == 0)))) && (!(superBombHasBeenOffered)))){
superBombHasBeenOffered = true;
superBombAvailable = true;
};
};
if (shakeScreen){
shakeCount++;
if (shakeCount >= SHAKE_TIME){
this.x = 0;
this.y = 0;
shakeScreen = false;
shakeCount = 0;
} else {
this.x = ((Math.random() * 34) - 17);
this.y = ((Math.random() * 34) - 17);
};
};
if (superShakeScreen){
superShakeCount++;
if (superShakeCount >= SUPER_SHAKE_TIME){
this.x = 0;
this.y = 0;
superShakeScreen = false;
superShakeCount = 0;
} else {
this.x = ((Math.random() * 30) - 15);
this.y = ((Math.random() * 30) - 15);
};
};
if (isLeft){
ship.turnLeft();
} else {
if (isRight){
ship.turnRight();
};
};
if (USESTICKYTHROTTLE){
if (isUp){
if (canToggleThrottle){
stickyThrottle = !(stickyThrottle);
};
canToggleThrottle = false;
} else {
canToggleThrottle = true;
};
if (stickyThrottle){
ship.increaseSpeed();
};
if (isDown){
stickyThrottle = false;
ship.decreaseSpeed();
} else {
if (!stickyThrottle){
ship.zeroSpeed();
};
};
} else {
if (isUp){
ship.increaseSpeed();
} else {
if (isDown){
stickyThrottle = false;
ship.decreaseSpeed();
} else {
ship.zeroSpeed();
};
};
};
if (isLateralLeft){
ship.decreaseLateralSpeed();
} else {
if (isLateralRight){
ship.increaseLateralSpeed();
} else {
ship.zeroLateralSpeed();
};
};
if (isShift){
if (ship.shipState == 3){
ship.land();
} else {
if (ship.shipState <= 0){
ship.takeOff();
};
};
};
if (isT){
stage.frameRate = 100;
} else {
if (stage.frameRate > 24){
stage.frameRate = 24;
};
};
if (isSpace){
if (((!((ship.explodingSuperBomb == null))) && ((ship.explodingSuperBomb.state >= 3)))){
victoryState = true;
exit("results");
};
ship.dropBomb();
} else {
canFireMissile = true;
};
if (isB){
if (!bPressed){
bPressed = true;
if (ship.superBombLoaded){
ship.dropSuperBomb();
};
};
} else {
bPressed = false;
};
if (isBeacon){
if (!droppedBeacon){
ship.dropBeacon();
droppedBeacon = true;
};
} else {
droppedBeacon = false;
};
if (isReturn){
ship.fireGunStraight();
};
if (isMouseDown){
ship.fireGun((mouseX + (ship.dx * SHIP_SLIDE)), (mouseY + (ship.dy * SHIP_SLIDE)));
};
factoryPresent = false;
tileEngine.setViewPort(viewPort);
layerEffectsLowerGround.update();
layerGround.update();
layerEffectsUpperGround.update();
layerEffectsLowerAir.update();
layerAir.update();
layerEffectsUpperAir.update();
layerEffectsLowerShip.update();
ship.update();
layerEffectsUpperShip.update();
if (!factoryPresent){
endGame(true);
};
status.update();
if ((updateCount % 4) == 0){
trackingRadar.update();
compass.update();
informationArea.update();
};
this.viewPort.x = (ship.gamespace_x + (ship.dx * SHIP_SLIDE));
this.viewPort.y = (ship.gamespace_y + (ship.dy * SHIP_SLIDE));
ship.x = ((viewPort.width / 2) - (ship.dx * SHIP_SLIDE));
ship.y = ((viewPort.height / 2) - (ship.dy * SHIP_SLIDE));
if (victoryIndicator.visible == true){
victoryIndicator.update();
} else {
if (defeatIndicator.visible == true){
defeatIndicator.update();
} else {
remainingTime = (remainingTime - _local2);
};
};
if (remainingTime <= 0){
this.score = 0;
};
if (this.score < 0){
this.score = 0;
};
}
private function onKeyDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 16:
isShift = true;
break;
case 90:
isZ = true;
break;
case 13:
isReturn = true;
break;
case 32:
case 17:
case 96:
case 45:
isSpace = true;
break;
case 69:
isLateralRight = true;
break;
case 81:
isLateralLeft = true;
break;
case 37:
isLeft = true;
isRight = false;
break;
case 39:
isRight = true;
isLeft = false;
break;
case 38:
isUp = true;
break;
case 40:
isDown = true;
break;
case 65:
isLeft = true;
isRight = false;
break;
case 68:
isRight = true;
isLeft = false;
break;
case 87:
isUp = true;
break;
case 83:
isDown = true;
break;
case 84:
break;
case 70:
isBeacon = true;
break;
case 49:
is1 = true;
ship.loadSuperBomb();
break;
case 50:
is2 = true;
break;
case 51:
is3 = true;
break;
case 66:
isB = true;
break;
case 77:
status.muteButton.mute = !(status.muteButton.mute);
break;
case 27:
if (!isEsc){
if (inGameMenu.visible){
hideMenu();
} else {
displayMenu();
};
};
isEsc = true;
break;
};
}
public function displayMenu():void{
isUp = false;
isDown = false;
isLeft = false;
isRight = false;
isLateralLeft = false;
isLateralRight = false;
inGameMenu.visible = true;
paused = true;
}
public function hideMenu():void{
inGameMenu.visible = false;
paused = false;
}
}
}//package com.wbwar.chopraider.game
Section 255
//Status (com.wbwar.chopraider.game.Status)
package com.wbwar.chopraider.game {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
public class Status extends Sprite {
private var lastTime:int;// = -1
private var lastScoreNumber:int;// = -1
private var space:Space;
private var bombBar:BombBar;
private var score:StatusTextField;
private var barrageBar:MissileBarrageBar;
private var lastLoadedBombs:int;// = -1
private var healthBar:HealthBar;
private var powBar:PowBar;
private var superBombBar:SuperBombBar;
private var gunHeatBar:HealthBar;
private var civBar:CivBar;
private var lastSavedPOWS:int;// = -1
private var textBombsBitmap:Bitmap;
private var textPointsBitmap:Bitmap;
private var lastSuperBombAvailable:Boolean;
public var muteButton:MuteButton;
private var lastBarrageCount:int;// = -1
private var time:StatusTextField;
private var lastKilledPOWS:int;// = -1
private var lastGunFireCount:Number;// = -1
private var lastCarCount:int;// = -1
private var pmgBitmap:Bitmap;
private var lastPowsOnboard:int;// = -1
private var textGunheatBitmap:Bitmap;
private var lastCivCount:int;// = -1
private var lastSuperBombLoaded:Boolean;
private var textTimeBitmap:Bitmap;
private var lastShipHealth:int;// = -1
private var lastLoadedBeacons:int;// = -1
private var textHealthBitmap:Bitmap;
private var lastRoadBlockCount:int;// = -1
private static var textTimeImage:Class = Status_textTimeImage;
private static var textPointsImage:Class = Status_textPointsImage;
private static var pmgImage:Class = Status_pmgImage;
private static var textHealthImage:Class = Status_textHealthImage;
private static var textBombsImage:Class = Status_textBombsImage;
private static var textGunheatImage:Class = Status_textGunheatImage;
public function Status(_arg1:Space):void{
var space = _arg1;
textHealthBitmap = (new textHealthImage() as Bitmap);
textGunheatBitmap = (new textGunheatImage() as Bitmap);
textBombsBitmap = (new textBombsImage() as Bitmap);
textTimeBitmap = (new textTimeImage() as Bitmap);
textPointsBitmap = (new textPointsImage() as Bitmap);
pmgBitmap = (new pmgImage() as Bitmap);
super();
this.space = space;
this.addChild(textHealthBitmap);
this.addChild(textGunheatBitmap);
this.addChild(textBombsBitmap);
this.addChild(textTimeBitmap);
this.addChild(textPointsBitmap);
textHealthBitmap.x = 20;
textHealthBitmap.y = 5;
healthBar = new HealthBar(100, 10, true, 5263615);
healthBar.x = (textHealthBitmap.x - 20);
healthBar.y = 20;
this.addChild(healthBar);
textGunheatBitmap.x = 120;
textGunheatBitmap.y = 5;
gunHeatBar = new HealthBar(79, 10, true, 0xFF0000);
gunHeatBar.setGradientColors(0x3300FF, 0xFF0000);
gunHeatBar.x = textGunheatBitmap.x;
gunHeatBar.y = 20;
this.addChild(gunHeatBar);
textBombsBitmap.x = (218 + 17);
textBombsBitmap.y = 5;
bombBar = new BombBar(Ship.MAX_LOADEDBOMBS);
bombBar.x = (textBombsBitmap.x - 17);
bombBar.y = 20;
this.addChild(bombBar);
barrageBar = new MissileBarrageBar(this.space, this.space.missileBarrages);
barrageBar.x = 315;
barrageBar.y = 20;
this.addChild(barrageBar);
textTimeBitmap.x = 370;
textTimeBitmap.y = 5;
time = new StatusTextField();
time.x = (textTimeBitmap.x - 7);
time.y = 13;
this.addChild(time);
textPointsBitmap.x = (430 + 15);
textPointsBitmap.y = 5;
score = new StatusTextField();
score.x = (textPointsBitmap.x - 15);
score.y = 13;
this.addChild(score);
powBar = new PowBar(space);
powBar.x = 0;
powBar.y = 32;
this.addChild(powBar);
civBar = new CivBar(space);
civBar.x = 0;
civBar.y = 32;
this.addChild(civBar);
if (space.superbomb){
superBombBar = new SuperBombBar(space);
superBombBar.x = 0;
superBombBar.y = 40;
this.addChild(superBombBar);
};
muteButton = new MuteButton();
muteButton.x = 516;
muteButton.y = 0;
addChild(muteButton);
var pmgButton:ImageButton = new ImageButton(pmgBitmap, 1);
pmgButton.x = 538;
pmgButton.y = 0;
pmgButton.addEventListener(ImageButton.CLICKED, function (_arg1:Event):void{
_arg1.stopPropagation();
wbwar.bubbleBoxClick("ingame");
});
addChild(pmgButton);
this.graphics.lineStyle(2, 48, 0.2);
this.graphics.drawRoundRect(355, 2, 70, 34, 15, 15);
this.graphics.drawRoundRect(425, 0, 90, 38, 15, 15);
}
public function update():void{
var _local2:Number;
var _local3:int;
var _local4:int;
if (space.score != lastScoreNumber){
score.text = String(space.score);
score.x = ((textPointsBitmap.x + (textPointsBitmap.width / 2)) - (score.width / 2));
};
if (int((space.remainingTime / 1000)) != lastTime){
time.text = TextDisplay.getTimeText(int((space.remainingTime / 1000)));
if (space.remainingTime < 0){
time.textColor = 0xFF0000;
};
time.x = ((textTimeBitmap.x + (textTimeBitmap.width / 2)) - (time.width / 2));
lastTime = int((space.remainingTime / 1000));
};
if (space.ship.loadedBombs != lastLoadedBombs){
bombBar.setBombCount(space.ship.loadedBombs);
lastLoadedBombs = space.ship.loadedBombs;
};
var _local1:int = (space.missileBarrages + space.ship.loadedBeacons);
if (((!((_local1 == lastBarrageCount))) || (!((space.ship.loadedBeacons == lastLoadedBeacons))))){
barrageBar.setBarrageCount(_local1);
lastBarrageCount = _local1;
lastLoadedBeacons = space.ship.loadedBeacons;
};
if (space.ship.health != lastShipHealth){
lastShipHealth = space.ship.health;
_local2 = (space.ship.health / space.ship.startHealth);
_local3 = ((1 - _local2) * 0xFF);
_local4 = (_local2 * 0xFF);
healthBar.barColor = ((_local3 << 16) | _local4);
healthBar.setHealth(_local2);
};
if (space.ship.gunFireCount != lastGunFireCount){
lastGunFireCount = space.ship.gunFireCount;
gunHeatBar.setHealth((space.ship.gunFireCount / space.ship.MAX_GUNFIRE));
};
if (((((!((space.killedPOWS == lastKilledPOWS))) || (!((space.savedPOWS == lastSavedPOWS))))) || (!((space.ship.powsOnboardCount == lastPowsOnboard))))){
lastKilledPOWS = space.killedPOWS;
lastSavedPOWS = space.savedPOWS;
lastPowsOnboard = space.ship.powsOnboardCount;
if (space.totalPOWS > 0){
powBar.visible = true;
} else {
powBar.visible = false;
};
powBar.update();
};
if (((((!((space.roadBlockCount == lastRoadBlockCount))) || (!((space.civCount == lastCivCount))))) || (!((space.carCount == lastCarCount))))){
lastRoadBlockCount = space.roadBlockCount;
lastCivCount = space.civCount;
lastCarCount = space.carCount;
if ((((space.roadBlockCount > 0)) || ((space.carCount > 0)))){
civBar.visible = true;
} else {
civBar.visible = false;
};
civBar.update();
};
if (superBombBar != null){
superBombBar.update();
};
}
}
}//package com.wbwar.chopraider.game
Section 256
//Status_pmgImage (com.wbwar.chopraider.game.Status_pmgImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Status_pmgImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 257
//Status_textBombsImage (com.wbwar.chopraider.game.Status_textBombsImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Status_textBombsImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 258
//Status_textGunheatImage (com.wbwar.chopraider.game.Status_textGunheatImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Status_textGunheatImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 259
//Status_textHealthImage (com.wbwar.chopraider.game.Status_textHealthImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Status_textHealthImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 260
//Status_textPointsImage (com.wbwar.chopraider.game.Status_textPointsImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Status_textPointsImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 261
//Status_textTimeImage (com.wbwar.chopraider.game.Status_textTimeImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Status_textTimeImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 262
//StatusTextField (com.wbwar.chopraider.game.StatusTextField)
package com.wbwar.chopraider.game {
import flash.text.*;
public class StatusTextField extends TextField {
public function StatusTextField(_arg1:Number=0){
var _local2:TextFormat = new TextFormat();
_local2.font = "wbfont";
_local2.color = _arg1;
_local2.size = 18;
_local2.bold = true;
antiAliasType = AntiAliasType.ADVANCED;
gridFitType = GridFitType.PIXEL;
background = false;
border = false;
embedFonts = true;
defaultTextFormat = _local2;
autoSize = TextFieldAutoSize.LEFT;
selectable = false;
}
}
}//package com.wbwar.chopraider.game
Section 263
//SuperBomb (com.wbwar.chopraider.game.SuperBomb)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
public class SuperBomb extends GameObject {
private var deltaX:Number;
private var deltaY:Number;
private var dbombExplosionBitmap:Bitmap;
private var age:int;
private var hitSound:Sound;
private var dbombExplosionRingBitmap:Bitmap;
public var state:uint;
public var rad:Number;
private var exploding:Boolean;
private var credits:GenericTextField;
private var ringCount:int;
private static const timeToHit:uint = 40;
private static var dbombExplosionImage:Class = SuperBomb_dbombExplosionImage;
private static var dbombExplosionRingImage:Class = SuperBomb_dbombExplosionRingImage;
public function SuperBomb(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
dbombExplosionBitmap = (new dbombExplosionImage() as Bitmap);
dbombExplosionRingBitmap = (new dbombExplosionRingImage() as Bitmap);
super(_arg1, _arg4, _arg5);
this.space = _arg1;
_arg1.layerEffectsUpperGround.addGameObject(this);
this.deltaX = _arg2;
this.deltaY = _arg3;
this.addChild(dbombExplosionBitmap);
dbombExplosionBitmap.x = (-(dbombExplosionBitmap.width) / 2);
dbombExplosionBitmap.y = (-(dbombExplosionBitmap.height) / 2);
dbombExplosionBitmap.visible = false;
this.addChild(dbombExplosionRingBitmap);
dbombExplosionRingBitmap.x = (-(dbombExplosionRingBitmap.width) / 2);
dbombExplosionRingBitmap.y = (-(dbombExplosionRingBitmap.height) / 2);
dbombExplosionRingBitmap.visible = false;
hitSound = SoundManager.instance.getSound("bbomb");
var _local6:GenericTextField = new GenericTextField(0xEFEFEF, 10);
_local6.text = "Press SPACE\n to skip";
addChild(_local6);
_local6.x = (((App.GAME_WIDTH / 2) - _local6.width) - 3);
_local6.y = ((-(App.GAME_HEIGHT) / 2) + 3);
credits = new GenericTextField(0xFFFFFF, 20);
credits.text = " \"I am become death, the destroyer of boards.\"\n\n";
credits.text = (credits.text + " Dr. Markus Indigostein\n\n\n\n\n\n");
credits.text = (credits.text + "The war didn't end that day.... but it did pause.\n");
credits.text = (credits.text + "After liberating all civilians from Crimson's grasp,\n");
credits.text = (credits.text + "the Drytomic bomb destroyed Red's headquarters.\n");
credits.text = (credits.text + "Facing Drytomic annihilation, Crimson was forced to\n");
credits.text = (credits.text + "withdraw and regroup. No more boards would fall\n");
credits.text = (credits.text + "to Crimson from this day. But, many boards would\n");
credits.text = (credits.text + "yet remain to be liberated.\n\n\n\n");
credits.text = (credits.text + "Though destroyed, Blue vowed to rebuild the\n");
credits.text = (credits.text + "ChopRaider and to honor the memory of her brave\n");
credits.text = (credits.text + "pilot and his sacrifice.\n\n");
credits.text = (credits.text + "There are those who say that we will never see\n");
credits.text = (credits.text + "another pilot like that who flew the ChopRaider\n");
credits.text = (credits.text + "to victory that day.... I'm just an old dried out marker\n");
credits.text = (credits.text + "and some call me foolish. But I still believe\n");
credits.text = (credits.text + "there can be another. For so long as free markers\n");
credits.text = (credits.text + "face tyranny, there must always be another.\n\n\n\n\n\n");
credits.text = (credits.text + " WHITEBOARD WAR: CHOPRAIDER\n");
credits.text = (credits.text + " A game by Virgil Wall\n\n");
credits.text = (credits.text + " Visit the Whiteboard War Universe at\n");
credits.text = (credits.text + " www.whiteboardwar.com\n\n\n\n");
credits.text = (credits.text + " Copyright 2008 by Virgil Wall\n\n\n\n");
credits.text = (credits.text + " For April.\n");
credits.x = (-(credits.width) / 2);
credits.y = (App.GAME_HEIGHT / 2);
credits.visible = false;
addChild(credits);
}
override public function update():void{
var _local1:Number;
var _local2:HittableGameObject;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:int;
age++;
if (!exploding){
exploding = true;
space.superShakeScreen = true;
dbombExplosionRingBitmap.visible = true;
hitSound.play();
this.scaleX = 0.05;
this.scaleY = 0.05;
};
if (exploding){
if (state == 0){
space.app.showFlashScreen(true);
ringCount++;
dbombExplosionRingBitmap.visible = true;
this.scaleX = (this.scaleX + 0.2);
this.scaleY = (this.scaleY + 0.2);
if (ringCount > 1){
space.app.showFlashScreen(false);
};
if (ringCount > 25){
this.scaleX = 0.09;
this.scaleY = 0.09;
dbombExplosionRingBitmap.visible = false;
dbombExplosionBitmap.visible = true;
state = 1;
};
} else {
if (state == 1){
if (this.scaleX < 13){
this.scaleX = (this.scaleX + 0.05);
this.scaleY = (this.scaleY + 0.05);
if ((age % 10) == 0){
rad = ((dbombExplosionBitmap.width / 2) * (this.scaleX - 0.1));
if (rad < 0){
rad = 0;
};
_local1 = (rad * rad);
_local6 = 0;
while (_local6 < space.layerGround.numChildren) {
_local2 = (space.layerGround.getChildAt(_local6) as HittableGameObject);
_local3 = Math.abs((_local2.gamespace_x - gamespace_x));
_local4 = Math.abs((_local2.gamespace_y - gamespace_y));
if ((((_local3 < rad)) && ((_local4 < rad)))){
_local5 = ((_local3 * _local3) + (_local4 * _local4));
if (_local5 < _local1){
if ((_local2 is Carrier)){
} else {
_local2.superDamage(200);
};
};
};
_local6++;
};
};
if ((age % 10) == 0){
_local6 = 0;
while (_local6 < space.layerAir.numChildren) {
_local2 = (space.layerAir.getChildAt(_local6) as HittableGameObject);
_local3 = Math.abs((_local2.gamespace_x - gamespace_x));
_local4 = Math.abs((_local2.gamespace_y - gamespace_y));
if ((((_local3 < rad)) && ((_local4 < rad)))){
_local5 = ((_local3 * _local3) + (_local4 * _local4));
if (_local5 < _local1){
_local2.superDamage(200);
};
};
_local6++;
};
};
} else {
state = 2;
};
} else {
if (state == 2){
this.scaleX = 1;
this.scaleY = 1;
space.endGameView();
dbombExplosionBitmap.visible = false;
this.graphics.beginFill(0);
this.graphics.drawRect(-350, -250, 700, 500);
this.graphics.endFill();
state = 3;
credits.visible = true;
} else {
if (state == 3){
credits.y = (credits.y - 1);
if ((credits.y + credits.height) <= 0){
space.victoryState = true;
space.exit("results");
};
};
};
};
};
};
}
}
}//package com.wbwar.chopraider.game
Section 264
//SuperBomb_dbombExplosionImage (com.wbwar.chopraider.game.SuperBomb_dbombExplosionImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SuperBomb_dbombExplosionImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 265
//SuperBomb_dbombExplosionRingImage (com.wbwar.chopraider.game.SuperBomb_dbombExplosionRingImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class SuperBomb_dbombExplosionRingImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 266
//SuperBombBar (com.wbwar.chopraider.game.SuperBombBar)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.text.*;
public class SuperBombBar extends Sprite {
private var space:Space;
private var pulse:Pulsator;
private var statusText:TextField;
public function SuperBombBar(_arg1:Space){
statusText = new GenericTextField(0x900000, 18);
super();
this.space = _arg1;
statusText.text = "";
statusText.autoSize = TextFieldAutoSize.CENTER;
pulse = new Pulsator(statusText, 1.03, 4);
addChild(pulse);
pulse.x = (statusText.width / 2);
}
public function update():void{
pulse.update();
if (space.superBombAvailable){
statusText.text = "!!DRYTOMIC BOMB AVAILABLE AT CARRIER!!";
} else {
if (space.ship.superBombLoaded){
statusText.text = " WARNING!\nDRYTOMIC BOMB LOADED ON CHOPRAIDER.\n PRESS 'B' to ACTIVATE";
};
};
pulse.x = (statusText.width / 2);
}
}
}//package com.wbwar.chopraider.game
Section 267
//Tank (com.wbwar.chopraider.game.Tank)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Tank extends HittableGameObject {
private const tankTurnRate:Number = 4;
private const speed:Number = 2;
private const tankBarrelTurnRate:Number = 4;
private var tankExplosionSound:Sound;
private var firedTimer:Number;// = 0
private var maxAge:uint;
private var tankBarrelBitmap:Bitmap;
private var targetCellX:int;
private var targetCellY:int;
private var recharge:Number;
private var tankBarrel:Sprite;
private var tankBitmap:Bitmap;
private var rangeSquare:Number;
private var range:Number;
private var lastCellX:int;
private var lastCellY:int;
private var damageAmt:Number;
private var tankBase:TankBase;
private var targetX:Number;
private var targetY:Number;
private var tankMoveSoundChannel:SoundChannel;
private var tankMoveSound:Sound;
private var age:uint;// = 0
private static var tankImage:Class = Tank_tankImage;
private static var tankBarrelImage:Class = Tank_tankBarrelImage;
public function Tank(_arg1:TankBase, _arg2:Space, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number){
tankBitmap = (new tankImage() as Bitmap);
tankBarrelBitmap = (new tankBarrelImage() as Bitmap);
tankBarrel = new Sprite();
super(_arg2, _arg3, _arg4, _arg6);
this.tankBase = _arg1;
this.maxAge = _arg7;
this.damageAmt = _arg8;
_arg2.layerGround.addGameObject(this);
this.range = _arg9;
this.rangeSquare = (_arg9 * _arg9);
this.recharge = _arg10;
this.addChild(tankBitmap);
this.addChild(tankBarrel);
tankBitmap.x = (-(tankBitmap.width) / 2);
tankBitmap.y = (-(tankBitmap.height) / 2);
tankBarrel.addChild(tankBarrelBitmap);
tankBarrelBitmap.x = (-(tankBarrelBitmap.width) / 4);
tankBarrelBitmap.y = (-(tankBarrelBitmap.height) / 2);
this.gamespace_x = _arg3;
this.gamespace_y = _arg4;
this.rotation = _arg5;
tankExplosionSound = SoundManager.instance.getSound("destroyed2");
var _local11:int = (this.gamespace_x / GameMap.cellWidth);
var _local12:int = (this.gamespace_y / GameMap.cellHeight);
this.lastCellX = _local11;
this.lastCellY = _local12;
pickNewTarget();
}
private function evaluateLoc(_arg1:Array, _arg2:int, _arg3:int):void{
var _local4:int;
if ((((((((((((_arg2 >= 0)) && ((_arg3 >= 0)))) && ((_arg2 < space.selectedGameMap.mapDataWidth)))) && ((_arg3 < space.selectedGameMap.mapDataHeight)))) && (((!((_arg2 == 0))) || (!((_arg3 == 0))))))) && (((!((_arg2 == lastCellX))) || (!((_arg3 == lastCellY))))))){
_local4 = space.selectedGameMap.mapData[_arg3][_arg2];
if ((((_local4 >= 52)) && ((_local4 <= 68)))){
_arg1.push(new Point(_arg2, _arg3));
};
};
}
private function pickNewTarget():void{
var _local5:int;
var _local6:Point;
var _local1:int = (this.gamespace_x / GameMap.cellWidth);
var _local2:int = (this.gamespace_y / GameMap.cellHeight);
var _local3:int = space.selectedGameMap.mapData[_local2][_local1];
var _local4:Array = new Array();
if (_local3 == 52){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 53){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 54){
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 55){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 56){
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 - 1));
} else {
if (_local3 == 57){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 - 1));
} else {
if (_local3 == 58){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
evaluateLoc(_local4, (_local1 - 1), _local2);
} else {
if (_local3 == 59){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 60){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 61){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 62){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 63){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 64){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 65){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 66){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
if (_local3 == 67){
evaluateLoc(_local4, (_local1 - 1), _local2);
evaluateLoc(_local4, (_local1 + 1), _local2);
} else {
if (_local3 == 68){
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, _local1, (_local2 + 1));
} else {
evaluateLoc(_local4, _local1, (_local2 - 1));
evaluateLoc(_local4, (_local1 + 1), _local2);
evaluateLoc(_local4, _local1, (_local2 + 1));
evaluateLoc(_local4, (_local1 - 1), _local2);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (_local4.length == 0){
this.targetCellX = this.lastCellX;
this.targetCellY = this.lastCellY;
} else {
_local5 = (Math.random() * _local4.length);
_local6 = _local4[_local5];
this.targetCellX = _local6.x;
this.targetCellY = _local6.y;
};
this.lastCellX = _local1;
this.lastCellY = _local2;
this.targetX = ((this.targetCellX * 100) + 50);
this.targetY = ((this.targetCellY * 100) + 50);
}
override public function update():void{
if ((((health <= 0)) || ((tankBase.baseState == 1)))){
space.layerGround.removeGameObject(this);
tankExplosionSound.play();
new Explosion(space, this.gamespace_x, this.gamespace_y, false, 15);
this.space.score = (this.space.score + this.startHealth);
this.tankBase.currentTankCount--;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
return;
};
if (age > maxAge){
};
age++;
firedTimer--;
if (firedTimer < 0){
firedTimer = 0;
};
if ((((Math.abs((targetX - this.gamespace_x)) < 3)) && ((Math.abs((targetY - this.gamespace_y)) < 3)))){
pickNewTarget();
};
rotation = getTurn(targetX, targetY, tankTurnRate);
var _local1:Number = 0;
var _local2:Number = 0;
if (Math.abs(this.update_diff) < 2){
_local1 = (speed * Math.sin(((rotation / 180) * Math.PI)));
_local2 = (speed * Math.cos(((rotation / 180) * Math.PI)));
};
this.gamespace_x = (this.gamespace_x + _local2);
this.gamespace_y = (this.gamespace_y + _local1);
if ((((((((this.space.ship.shipState < 4)) && (!((this.space.ship.shipState == 0))))) && ((Math.abs((this.space.ship.gamespace_x - this.gamespace_x)) < range)))) && ((Math.abs((this.space.ship.gamespace_y - this.gamespace_y)) < range)))){
this.tankBarrel.rotation = (getRotTurn((this.rotation + this.tankBarrel.rotation), this.space.ship.gamespace_x, this.space.ship.gamespace_y, tankBarrelTurnRate) - this.rotation);
if ((((((((update_diff < 2)) && ((Math.abs(update_deltaX) < range)))) && ((Math.abs(update_deltaY) < range)))) && ((firedTimer == 0)))){
if (((update_deltaX * update_deltaX) + (update_deltaY * update_deltaY)) < rangeSquare){
fireWeapon();
firedTimer = recharge;
};
};
};
this.hitLeft = (gamespace_x - 12);
this.hitRight = (gamespace_x + 12);
this.hitTop = (gamespace_y - 12);
this.hitBottom = (gamespace_y + 12);
}
private function fireWeapon():void{
var _local1:Point = getRotProjection(range, (tankBarrel.rotation + this.rotation), ((Math.random() * 2) - 1));
new Bullet(space, 0, 0, this.gamespace_x, this.gamespace_y, _local1.x, _local1.y, damageAmt, true, true);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
}
}
}//package com.wbwar.chopraider.game
Section 268
//Tank_tankBarrelImage (com.wbwar.chopraider.game.Tank_tankBarrelImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Tank_tankBarrelImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 269
//Tank_tankImage (com.wbwar.chopraider.game.Tank_tankImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Tank_tankImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 270
//TankBase (com.wbwar.chopraider.game.TankBase)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class TankBase extends HittableGameObject {
public var baseState:int;// = 0
private var maxTanks:Number;
private var tankLaunchTimer:int;// = 0
public var currentTankCount:int;// = 0
private var repairRate:Number;
private var healthBar:HealthBar;
public var bombIndicator:BombIndicator;
private var tankHealth:Number;
private var tankBaseBitmap:Bitmap;
private var tankLaunchTime:Number;
private var destroyedSound:Sound;
private var repairTimer:int;// = 0
public function TankBase(_arg1:Space, _arg2:TankBaseBean):void{
tankBaseBitmap = (new GameBitmaps.tankBaseImage() as Bitmap);
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
repairRate = _arg2.repairRate;
maxTanks = _arg2.maxTanks;
tankLaunchTime = _arg2.tankLaunchTime;
tankHealth = _arg2.tankHealth;
tankLaunchTimer = tankLaunchTime;
healthBar = new HealthBar(tankBaseBitmap.width);
healthBar.x = (-(tankBaseBitmap.width) / 2);
healthBar.y = ((tankBaseBitmap.height / 2) + 2);
bombIndicator = new BombIndicator();
this.addChild(tankBaseBitmap);
this.addChild(healthBar);
this.addChild(bombIndicator);
tankBaseBitmap.x = (-(tankBaseBitmap.width) / 2);
tankBaseBitmap.y = (-(tankBaseBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (tankBaseBitmap.width / 2));
hitRight = (Number(_arg2.x) + (tankBaseBitmap.width / 2));
hitTop = (Number(_arg2.y) - (tankBaseBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (tankBaseBitmap.height / 2));
}
override public function update():void{
var _local1:Explosion;
var _local2:Tank;
if (bombIndicator.visible){
bombIndicator.update();
bombIndicator.visible = false;
};
if (baseState == 0){
if (health <= 0){
if (destroyedSound != null){
destroyedSound.play();
};
_local1 = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 5);
this.space.score = (this.space.score + this.startHealth);
baseState = 1;
this.health = 0;
repairTimer = repairRate;
this.alpha = 0.15;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
} else {
if (currentTankCount < maxTanks){
tankLaunchTimer--;
if (tankLaunchTimer < 0){
tankLaunchTimer = 0;
};
if (tankLaunchTimer == 0){
_local2 = new Tank(this, this.space, this.gamespace_x, this.gamespace_y, 0, tankHealth, 999999, 0.5, 250, 15);
currentTankCount++;
tankLaunchTimer = tankLaunchTime;
};
};
};
};
if ((((baseState == 1)) && ((this.health < this.startHealth)))){
this.health = (this.health + this.repairRate);
if (this.health >= this.startHealth){
this.health = this.startHealth;
baseState = 0;
this.health = this.startHealth;
this.alpha = 1;
};
healthBar.setHealth((this.health / startHealth));
};
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
baseState = 1;
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
}
}
}//package com.wbwar.chopraider.game
Section 271
//TextDisplay (com.wbwar.chopraider.game.TextDisplay)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class TextDisplay extends Sprite {
private const yinc:int = 18;
private const xinc:int = 12;
private var drawSurface:Bitmap;
private static var image71:Class = TextDisplay_image71;
private static var image72:Class = TextDisplay_image72;
private static var image37:Class = TextDisplay_image37;
private static var image32:Class = TextDisplay_image32;
private static var image80:Class = TextDisplay_image80;
private static var image81:Class = TextDisplay_image81;
private static var image82:Class = TextDisplay_image82;
private static var image83:Class = TextDisplay_image83;
private static var image84:Class = TextDisplay_image84;
private static var image85:Class = TextDisplay_image85;
private static var image86:Class = TextDisplay_image86;
private static var image87:Class = TextDisplay_image87;
private static var image88:Class = TextDisplay_image88;
private static var image89:Class = TextDisplay_image89;
private static var image46:Class = TextDisplay_image46;
private static var image48:Class = TextDisplay_image48;
private static var image49:Class = TextDisplay_image49;
private static var bitmaps:Array;
private static var image50:Class = TextDisplay_image50;
private static var image51:Class = TextDisplay_image51;
private static var image53:Class = TextDisplay_image53;
private static var image54:Class = TextDisplay_image54;
private static var image55:Class = TextDisplay_image55;
private static var image52:Class = TextDisplay_image52;
private static var image56:Class = TextDisplay_image56;
private static var image57:Class = TextDisplay_image57;
private static var image90:Class = TextDisplay_image90;
private static var image58:Class = TextDisplay_image58;
private static var image61:Class = TextDisplay_image61;
private static var image65:Class = TextDisplay_image65;
private static var image66:Class = TextDisplay_image66;
private static var image67:Class = TextDisplay_image67;
private static var image68:Class = TextDisplay_image68;
private static var image69:Class = TextDisplay_image69;
private static var image70:Class = TextDisplay_image70;
private static var image73:Class = TextDisplay_image73;
private static var image74:Class = TextDisplay_image74;
private static var image75:Class = TextDisplay_image75;
private static var image76:Class = TextDisplay_image76;
private static var image77:Class = TextDisplay_image77;
private static var image78:Class = TextDisplay_image78;
private static var image79:Class = TextDisplay_image79;
public function TextDisplay():void{
var _local1:Bitmap;
var _local2:int;
var _local3:Bitmap;
super();
if (bitmaps == null){
bitmaps = new Array();
_local2 = 0;
while (_local2 <= 90) {
_local1 = new Bitmap();
bitmaps.push(_local1);
_local2++;
};
_local2 = 48;
while (_local2 < 58) {
_local3 = new (TextDisplay[("image" + _local2)]);
bitmaps[_local2] = _local3;
_local2++;
};
_local2 = 65;
while (_local2 < 91) {
_local3 = new (TextDisplay[("image" + _local2)]);
bitmaps[_local2] = _local3;
_local2++;
};
_local3 = new (TextDisplay["image58"]);
bitmaps[58] = _local3;
_local3 = new (TextDisplay["image46"]);
bitmaps[46] = _local3;
_local3 = new (TextDisplay["image32"]);
bitmaps[32] = _local3;
_local3 = new (TextDisplay["image61"]);
bitmaps[61] = _local3;
_local3 = new (TextDisplay["image37"]);
bitmaps[37] = _local3;
};
}
private function determineSize(_arg1:String):Point{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
var _local3:int;
var _local4:int;
var _local5 = 1;
var _local6:int;
while (_local6 < _local2.length) {
if (_local2[_local6] == 10){
_local5++;
_local3 = 0;
};
_local3++;
if (_local3 > _local4){
_local4 = _local3;
};
_local6++;
};
return (new Point((_local4 * xinc), (_local5 * yinc)));
}
public function setText(_arg1:String):void{
var _local4:int;
var _local5:int;
var _local7:BitmapData;
if (drawSurface != null){
removeChild(drawSurface);
};
var _local2:Point = determineSize(_arg1);
drawSurface = new Bitmap();
drawSurface.bitmapData = new BitmapData(_local2.x, _local2.y, true, 0);
addChild(drawSurface);
var _local3:ByteArray = new ByteArray();
_local3.writeUTFBytes(_arg1);
var _local6:int;
while (_local6 < _local3.length) {
if (_local3[_local6] == 10){
_local5 = (_local5 + yinc);
_local4 = 0;
} else {
_local7 = (bitmaps[_local3[_local6]] as Bitmap).bitmapData;
drawSurface.bitmapData.copyPixels(_local7, new Rectangle(0, 0, _local7.width, _local7.height), new Point(_local4, _local5));
_local4 = (_local4 + xinc);
};
_local6++;
};
}
public static function getTimeText(_arg1:int):String{
var _local5:String;
var _local2:int = Math.abs(_arg1);
var _local3:int = int((_local2 / 60));
var _local4:int = (_local2 - (_local3 * 60));
if (_arg1 < 0){
_local5 = "-";
} else {
_local5 = "";
};
_local5 = (_local5 + String(_local3));
if (_local4 < 10){
return (((_local5 + ":0") + _local4));
};
return (((_local5 + ":") + _local4));
}
}
}//package com.wbwar.chopraider.game
Section 272
//TextDisplay_image32 (com.wbwar.chopraider.game.TextDisplay_image32)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image32 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 273
//TextDisplay_image37 (com.wbwar.chopraider.game.TextDisplay_image37)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image37 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 274
//TextDisplay_image46 (com.wbwar.chopraider.game.TextDisplay_image46)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image46 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 275
//TextDisplay_image48 (com.wbwar.chopraider.game.TextDisplay_image48)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image48 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 276
//TextDisplay_image49 (com.wbwar.chopraider.game.TextDisplay_image49)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image49 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 277
//TextDisplay_image50 (com.wbwar.chopraider.game.TextDisplay_image50)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image50 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 278
//TextDisplay_image51 (com.wbwar.chopraider.game.TextDisplay_image51)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image51 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 279
//TextDisplay_image52 (com.wbwar.chopraider.game.TextDisplay_image52)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image52 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 280
//TextDisplay_image53 (com.wbwar.chopraider.game.TextDisplay_image53)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image53 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 281
//TextDisplay_image54 (com.wbwar.chopraider.game.TextDisplay_image54)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image54 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 282
//TextDisplay_image55 (com.wbwar.chopraider.game.TextDisplay_image55)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image55 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 283
//TextDisplay_image56 (com.wbwar.chopraider.game.TextDisplay_image56)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image56 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 284
//TextDisplay_image57 (com.wbwar.chopraider.game.TextDisplay_image57)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image57 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 285
//TextDisplay_image58 (com.wbwar.chopraider.game.TextDisplay_image58)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image58 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 286
//TextDisplay_image61 (com.wbwar.chopraider.game.TextDisplay_image61)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image61 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 287
//TextDisplay_image65 (com.wbwar.chopraider.game.TextDisplay_image65)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image65 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 288
//TextDisplay_image66 (com.wbwar.chopraider.game.TextDisplay_image66)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image66 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 289
//TextDisplay_image67 (com.wbwar.chopraider.game.TextDisplay_image67)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image67 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 290
//TextDisplay_image68 (com.wbwar.chopraider.game.TextDisplay_image68)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image68 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 291
//TextDisplay_image69 (com.wbwar.chopraider.game.TextDisplay_image69)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image69 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 292
//TextDisplay_image70 (com.wbwar.chopraider.game.TextDisplay_image70)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image70 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 293
//TextDisplay_image71 (com.wbwar.chopraider.game.TextDisplay_image71)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image71 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 294
//TextDisplay_image72 (com.wbwar.chopraider.game.TextDisplay_image72)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image72 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 295
//TextDisplay_image73 (com.wbwar.chopraider.game.TextDisplay_image73)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image73 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 296
//TextDisplay_image74 (com.wbwar.chopraider.game.TextDisplay_image74)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image74 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 297
//TextDisplay_image75 (com.wbwar.chopraider.game.TextDisplay_image75)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image75 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 298
//TextDisplay_image76 (com.wbwar.chopraider.game.TextDisplay_image76)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image76 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 299
//TextDisplay_image77 (com.wbwar.chopraider.game.TextDisplay_image77)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image77 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 300
//TextDisplay_image78 (com.wbwar.chopraider.game.TextDisplay_image78)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image78 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 301
//TextDisplay_image79 (com.wbwar.chopraider.game.TextDisplay_image79)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image79 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 302
//TextDisplay_image80 (com.wbwar.chopraider.game.TextDisplay_image80)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image80 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 303
//TextDisplay_image81 (com.wbwar.chopraider.game.TextDisplay_image81)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image81 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 304
//TextDisplay_image82 (com.wbwar.chopraider.game.TextDisplay_image82)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image82 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 305
//TextDisplay_image83 (com.wbwar.chopraider.game.TextDisplay_image83)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image83 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 306
//TextDisplay_image84 (com.wbwar.chopraider.game.TextDisplay_image84)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image84 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 307
//TextDisplay_image85 (com.wbwar.chopraider.game.TextDisplay_image85)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image85 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 308
//TextDisplay_image86 (com.wbwar.chopraider.game.TextDisplay_image86)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image86 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 309
//TextDisplay_image87 (com.wbwar.chopraider.game.TextDisplay_image87)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image87 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 310
//TextDisplay_image88 (com.wbwar.chopraider.game.TextDisplay_image88)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image88 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 311
//TextDisplay_image89 (com.wbwar.chopraider.game.TextDisplay_image89)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image89 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 312
//TextDisplay_image90 (com.wbwar.chopraider.game.TextDisplay_image90)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TextDisplay_image90 extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 313
//Tile (com.wbwar.chopraider.game.Tile)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
public class Tile extends Sprite {
private var mapX:int;
private var space:Space;
public var superTopSet:Boolean;
private var level1Bitmap:Bitmap;
public var gamespace_x:int;
public var gamespace_y:int;
private var level0Bitmap:Bitmap;
private var mapY:int;
public static var blah:uint = 0;
public static var tile_width:int = 100;
public static var tile_height:int = 100;
public function Tile(_arg1:Space):void{
this.space = _arg1;
this.level0Bitmap = new Bitmap();
this.level1Bitmap = new Bitmap();
this.addChild(level0Bitmap);
this.addChild(level1Bitmap);
this.level0Bitmap.bitmapData = GameBitmaps.landBitmapData[0];
}
private function reparent(_arg1:Boolean):void{
if (_arg1){
if (!superTopSet){
superTopSet = true;
this.space.superTop.addChild(this);
};
} else {
if (this.space.tileEngine != null){
if (superTopSet){
superTopSet = false;
this.space.tileEngine.addChild(this);
};
};
};
}
public function setGameSpaceCoords(_arg1:int, _arg2:int):void{
var _local3:int;
gamespace_x = _arg1;
gamespace_y = _arg2;
mapX = (gamespace_x / Tile.tile_width);
mapY = (gamespace_y / Tile.tile_height);
if ((((((mapX == -1)) && ((mapY >= 0)))) && ((mapY < space.selectedGameMap.mapDataHeight)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderLeftBitmapData;
reparent(true);
} else {
if ((((((mapY == -1)) && ((mapX >= 0)))) && ((mapX < space.selectedGameMap.mapDataWidth)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderTopBitmapData;
reparent(true);
} else {
if ((((((mapX == space.selectedGameMap.mapDataWidth)) && ((mapY >= 0)))) && ((mapY < space.selectedGameMap.mapDataHeight)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderRightBitmapData;
reparent(true);
} else {
if ((((((mapY == space.selectedGameMap.mapDataHeight)) && ((mapX >= 0)))) && ((mapX < space.selectedGameMap.mapDataWidth)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderBottomBitmapData;
reparent(true);
} else {
if ((((mapX == -1)) && ((mapY == -1)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderTopLeftBitmapData;
reparent(true);
} else {
if ((((mapX == space.selectedGameMap.mapDataWidth)) && ((mapY == -1)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderTopRightBitmapData;
reparent(true);
} else {
if ((((mapX == space.selectedGameMap.mapDataWidth)) && ((mapY == space.selectedGameMap.mapDataHeight)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderBottomRightBitmapData;
reparent(true);
} else {
if ((((mapX == -1)) && ((mapY == space.selectedGameMap.mapDataHeight)))){
this.level1Bitmap.bitmapData = GameBitmaps.borderBottomLeftBitmapData;
reparent(true);
} else {
if (space.selectedGameMap == null){
_local3 = -1;
} else {
if ((((((((mapX >= 0)) && ((mapY >= 0)))) && ((mapX < space.selectedGameMap.mapDataWidth)))) && ((mapY < space.selectedGameMap.mapDataHeight)))){
_local3 = space.selectedGameMap.mapData[mapY][mapX];
} else {
_local3 = -1;
};
};
this.level1Bitmap.bitmapData = GameBitmaps.getTileBitmap(_local3);
if (_local3 == -1){
reparent(true);
} else {
reparent(false);
};
};
};
};
};
};
};
};
};
}
}
}//package com.wbwar.chopraider.game
Section 314
//TileEngine (com.wbwar.chopraider.game.TileEngine)
package com.wbwar.chopraider.game {
import flash.display.*;
public class TileEngine extends Sprite {
private var tiles:Array;
private var space:Space;
private var tileCountX:uint;
private var tileCountY:uint;
public function TileEngine(_arg1:Space){
this.space = _arg1;
init();
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
}
public function setViewPort(_arg1:ViewPort):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:Boolean;
var _local9:Tile;
var _local7 = 1;
var _local8 = 1;
for each (_local9 in tiles) {
_local6 = false;
_local4 = ((_local9.gamespace_x - int(_arg1.x)) + (_arg1.width / 2));
_local5 = ((_local9.gamespace_y - int(_arg1.y)) + (_arg1.height / 2));
if (_local4 < -(_local9.width)){
_local7 = (-(int(((_local4 + _local9.width) / (Tile.tile_width * tileCountX)))) + 1);
_local2 = (_local9.gamespace_x + ((Tile.tile_width * tileCountX) * _local7));
_local6 = true;
} else {
if (_local4 > _arg1.width){
_local7 = (int(((_local4 - _arg1.width) / (Tile.tile_width * tileCountX))) + 1);
_local2 = (_local9.gamespace_x - ((Tile.tile_width * tileCountX) * _local7));
_local6 = true;
} else {
_local2 = _local9.gamespace_x;
};
};
if (_local5 < -(_local9.height)){
_local8 = (-(int(((_local5 + _local9.height) / (Tile.tile_height * tileCountY)))) + 1);
_local3 = (_local9.gamespace_y + ((Tile.tile_height * tileCountY) * _local8));
_local6 = true;
} else {
if (_local5 > _arg1.height){
_local8 = (int(((_local5 - _arg1.height) / (Tile.tile_height * tileCountY))) + 1);
_local3 = (_local9.gamespace_y - ((Tile.tile_height * tileCountY) * _local8));
_local6 = true;
} else {
_local3 = _local9.gamespace_y;
};
};
if (_local6){
_local9.setGameSpaceCoords(_local2, _local3);
};
_local9.x = ((_local2 - int(_arg1.x)) + (_arg1.width / 2));
_local9.y = ((_local3 - int(_arg1.y)) + (_arg1.height / 2));
};
}
public function init():void{
var _local2:int;
var _local3:Tile;
tiles = new Array();
tileCountX = ((space.viewPort.width / Tile.tile_width) + 1);
tileCountY = ((space.viewPort.height / Tile.tile_height) + 1);
var _local1:int;
while (_local1 < tileCountY) {
_local2 = 0;
while (_local2 < tileCountX) {
_local3 = new Tile(space);
_local3.setGameSpaceCoords((_local2 * Tile.tile_width), (_local1 * Tile.tile_height));
tiles.push(_local3);
addChild(_local3);
_local2++;
};
_local1++;
};
mouseEnabled = false;
}
}
}//package com.wbwar.chopraider.game
Section 315
//Tower (com.wbwar.chopraider.game.Tower)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class Tower extends HittableGameObject {
private var rangeSquare:Number;
public var towerState:int;// = 0
private var repairRate:Number;
private var healthBar:HealthBar;
private var towerBitmap:Bitmap;
private var damageAmt:Number;// = 0.2
private var recharge:int;// = 5
private var destroyedSound:Sound;
private var firedTimer:int;// = 0
private var repairTimer:int;// = 0
private var range:Number;
public function Tower(_arg1:Space, _arg2:TowerBean):void{
towerBitmap = (new GameBitmaps.towerImage() as Bitmap);
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
_arg1.layerGround.addGameObject(this);
this.repairRate = _arg2.repairRate;
this.recharge = _arg2.recharge;
this.range = _arg2.range;
this.damageAmt = _arg2.weaponDamage;
this.rangeSquare = (range * range);
healthBar = new HealthBar(towerBitmap.width);
healthBar.x = (-(towerBitmap.width) / 2);
healthBar.y = ((towerBitmap.height / 2) + 2);
this.addChild(towerBitmap);
this.addChild(healthBar);
towerBitmap.x = (-(towerBitmap.width) / 2);
towerBitmap.y = (-(towerBitmap.height) / 2);
destroyedSound = SoundManager.instance.getSound("destroyed");
hitLeft = (Number(_arg2.x) - (towerBitmap.width / 2));
hitRight = (Number(_arg2.x) + (towerBitmap.width / 2));
hitTop = (Number(_arg2.y) - (towerBitmap.height / 2));
hitBottom = (Number(_arg2.y) + (towerBitmap.height / 2));
}
override public function hitTest(_arg1:Number, _arg2:Number):Boolean{
if (towerState == 0){
return (super.hitTest(_arg1, _arg2));
};
return (false);
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 5);
}
override public function update():void{
var _local1:Explosion;
var _local2:Number;
var _local3:Number;
if (towerState == 0){
if (health <= 0){
if (destroyedSound != null){
destroyedSound.play();
};
_local1 = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 5);
this.space.score = (this.space.score + this.startHealth);
towerState = 1;
this.health = 0;
repairTimer = repairRate;
this.alpha = 0.15;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
} else {
_local2 = (this.gamespace_x - this.space.ship.gamespace_x);
_local3 = (this.gamespace_y - this.space.ship.gamespace_y);
if ((((((((((this.space.ship.shipState < 4)) && (!((this.space.ship.shipState == 0))))) && ((Math.abs(_local2) < range)))) && ((Math.abs(_local3) < range)))) && ((firedTimer == 0)))){
if (((_local2 * _local2) + (_local3 * _local3)) < rangeSquare){
new Bullet(space, 0, 0, this.gamespace_x, this.gamespace_y, this.space.ship.gamespace_x, this.space.ship.gamespace_y, damageAmt, true, true);
firedTimer = recharge;
};
};
};
firedTimer--;
if (firedTimer < 0){
firedTimer = 0;
};
};
if ((((towerState == 1)) && ((this.health < this.startHealth)))){
this.health = (this.health + this.repairRate);
if (this.health >= this.startHealth){
this.health = this.startHealth;
towerState = 0;
this.health = this.startHealth;
this.alpha = 1;
};
healthBar.setHealth((this.health / startHealth));
};
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
}
}//package com.wbwar.chopraider.game
Section 316
//TrackingGroundWeapon (com.wbwar.chopraider.game.TrackingGroundWeapon)
package com.wbwar.chopraider.game {
import flash.display.*;
import flash.media.*;
import com.wbwar.chopraider.common.beans.*;
public class TrackingGroundWeapon extends HittableGameObject {
private var range:Number;
protected var barrelSprite:Sprite;
private var repairRate:Number;
private var healthBar:HealthBar;
protected var gunFireSound:Sound;
protected var damageAmt:Number;
private var recharge:int;
public var RECOIL_AMT:Number;// = 25
public var gunState:uint;// = 0
protected var destroyedSound:Sound;
private var firedTimer:int;// = 0
private var repairTimer:int;// = 0
private var rangeSquare:Number;
private var turnRate:Number;
public function TrackingGroundWeapon(_arg1:Space, _arg2:TrackingGroundWeaponBean, _arg3:Bitmap, _arg4:Bitmap, _arg5:Number):void{
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
this.damageAmt = _arg2.weaponDamage;
this.repairRate = _arg2.repairRate;
this.recharge = _arg2.recharge;
this.turnRate = _arg2.turnRate;
this.range = _arg2.range;
this.rangeSquare = (range * range);
_arg1.layerGround.addGameObject(this);
barrelSprite = new Sprite();
barrelSprite.addChild(_arg4);
_arg4.y = (-(_arg4.height) / 2);
_arg4.x = -(_arg5);
barrelSprite.rotation = (Math.random() * 360);
healthBar = new HealthBar(_arg3.width);
healthBar.x = (-(_arg3.width) / 2);
healthBar.y = ((_arg3.height / 2) + 2);
this.addChild(healthBar);
this.addChild(_arg3);
this.addChild(barrelSprite);
_arg3.x = (-(_arg3.width) / 2);
_arg3.y = (-(_arg3.height) / 2);
hitLeft = (Number(_arg2.x) - (_arg3.width / 2));
hitRight = (Number(_arg2.x) + (_arg3.width / 2));
hitTop = (Number(_arg2.y) - (_arg3.height / 2));
hitBottom = (Number(_arg2.y) + (_arg3.height / 2));
}
override public function hitTest(_arg1:Number, _arg2:Number):Boolean{
if (gunState == 0){
return (!((((((((_arg1 < hitLeft)) || ((_arg1 > hitRight)))) || ((_arg2 < hitTop)))) || ((_arg2 > hitBottom)))));
};
return (false);
}
protected function fireWeapon():void{
}
override public function update():void{
var _local1:Explosion;
if ((((gunState == 0)) && ((health <= 0)))){
if (destroyedSound != null){
destroyedSound.play();
};
_local1 = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
this.space.score = (this.space.score + this.startHealth);
gunState = 1;
this.health = 0;
repairTimer = repairRate;
this.alpha = 0.15;
firedTimer = 0;
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
};
if (firedTimer > 0){
firedTimer--;
};
if ((((gunState == 1)) && ((this.health < this.startHealth)))){
this.health = (this.health + this.repairRate);
if (this.health >= this.startHealth){
this.health = this.startHealth;
gunState = 0;
this.health = this.startHealth;
this.alpha = 1;
};
healthBar.setHealth((this.health / startHealth));
};
if ((((((gunState == 0)) && ((Math.abs((this.space.ship.gamespace_x - this.gamespace_x)) < range)))) && ((Math.abs((this.space.ship.gamespace_y - this.gamespace_y)) < range)))){
barrelSprite.rotation = this.getRotTurn(barrelSprite.rotation, this.space.ship.gamespace_x, this.space.ship.gamespace_y, turnRate);
} else {
update_deltaX = 99999;
};
if (RECOIL_AMT > 0){
barrelSprite.x = (-(Math.cos(((barrelSprite.rotation / 180) * Math.PI))) * ((RECOIL_AMT * firedTimer) / recharge));
barrelSprite.y = (-(Math.sin(((barrelSprite.rotation / 180) * Math.PI))) * ((RECOIL_AMT * firedTimer) / recharge));
};
if ((((((((((((((gunState == 0)) && ((update_diff < 2)))) && ((Math.abs(update_deltaX) < range)))) && ((Math.abs(update_deltaY) < range)))) && ((firedTimer == 0)))) && ((this.space.ship.shipState < 4)))) && (!((this.space.ship.shipState == 0))))){
if (((update_deltaX * update_deltaX) + (update_deltaY * update_deltaY)) < rangeSquare){
fireWeapon();
firedTimer = recharge;
if (gunFireSound != null){
gunFireSound.play();
};
};
};
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
destroyedSound.play();
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 20);
_local1.duration = 30;
_local1.speed = 3;
new FragmentExplosion(space, this.gamespace_x, this.gamespace_y, 10);
}
override public function damage(_arg1:Number):void{
super.damage(_arg1);
healthBar.setHealth((this.health / startHealth));
}
}
}//package com.wbwar.chopraider.game
Section 317
//TrackingRadar (com.wbwar.chopraider.game.TrackingRadar)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.geom.*;
public class TrackingRadar extends Sprite {
private const oceanColor:Number = 4289058303;
private const scale:Number = 1.9;
private const landColor:Number = 4294967295;
private const borderColor:Number = 4285558896;
private var deltaX:Number;
private var space:Space;
private var drawSurface:BitmapData;
private var deltaY:Number;
private var mapSurface:BitmapData;
private var worldWidth:Number;
private var worldHeight:Number;
private static const radarWidth:Number = 80;
private static const radarHeight:Number = 80;
public function TrackingRadar(_arg1:Space):void{
this.space = _arg1;
this.alpha = 0.85;
worldWidth = _arg1.selectedGameMap.worldPixelWidth;
worldHeight = _arg1.selectedGameMap.worldPixelHeight;
mapSurface = new BitmapData(radarWidth, radarHeight, false, 4278190080);
drawSurface = new BitmapData(radarWidth, radarHeight, false, 4278190080);
var _local2:Bitmap = new Bitmap(drawSurface);
this.addChild(_local2);
drawSurface.fillRect(new Rectangle(0, 0, radarWidth, radarHeight), 4294967295);
}
public function update():void{
renderRadar();
}
public function renderRadar():void{
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local13:GameObject;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:int;
var _local19:uint;
drawSurface.fillRect(new Rectangle(0, 0, radarWidth, radarHeight), 4290493371);
var _local1:Number = ((radarWidth / space.selectedGameMap.worldPixelWidth) * scale);
var _local2:Number = ((radarHeight / space.selectedGameMap.worldPixelWidth) * scale);
var _local3:Number = (_local1 * 100);
var _local4:Number = (_local2 * 100);
var _local5:Number = (_local3 / 2);
var _local6:Number = (_local4 / 2);
var _local12:uint;
while (_local12 < space.selectedGameMap.mapDataHeight) {
_local19 = 0;
while (_local19 < space.selectedGameMap.mapDataWidth) {
_local10 = (((_local19 * _local3) - (this.space.ship.gamespace_x * _local1)) + (radarWidth / 2));
_local11 = (((_local12 * _local4) - (this.space.ship.gamespace_y * _local2)) + (radarHeight / 2));
if ((((((((_local10 < -(_local3))) || ((_local10 > radarWidth)))) || ((_local11 < -(_local4))))) || ((_local11 > radarHeight)))){
} else {
_local7 = space.selectedGameMap.mapData[_local12][_local19];
if ((((_local7 >= 11)) && ((_local7 <= 19)))){
_local7 = (_local7 - 10);
_local8 = landColor;
_local9 = oceanColor;
} else {
_local8 = oceanColor;
_local9 = landColor;
};
if (_local7 == 0){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
} else {
if (_local7 == 1){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle((_local10 + _local5), (_local11 + _local6), _local5, _local6), _local9);
Raster.line(drawSurface, (_local10 + _local5), (_local11 + _local4), (_local10 + _local5), (_local11 + _local6), borderColor);
Raster.line(drawSurface, (_local10 + _local5), (_local11 + _local6), (_local10 + _local3), (_local11 + _local6), borderColor);
} else {
if ((((_local7 == 2)) || ((_local7 == 63)))){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle(_local10, (_local11 + _local6), _local3, _local6), _local9);
Raster.line(drawSurface, _local10, (_local11 + _local6), (_local10 + _local3), (_local11 + _local6), borderColor);
} else {
if (_local7 == 3){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle(_local10, (_local11 + _local6), (_local3 / 2), _local6), _local9);
Raster.line(drawSurface, (_local10 + _local5), (_local11 + _local4), (_local10 + (_local3 / 2)), (_local11 + _local6), borderColor);
Raster.line(drawSurface, (_local10 + _local5), (_local11 + _local6), _local10, (_local11 + _local6), borderColor);
} else {
if ((((_local7 == 4)) || ((_local7 == 64)))){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle((_local10 + _local5), _local11, _local5, _local4), _local9);
Raster.line(drawSurface, (_local10 + _local5), _local11, (_local10 + _local5), (_local11 + _local4), borderColor);
} else {
if (_local7 == 5){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local9);
} else {
if ((((_local7 == 6)) || ((_local7 == 65)))){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle(_local10, _local11, _local5, _local4), _local9);
Raster.line(drawSurface, (_local10 + _local5), _local11, (_local10 + _local5), (_local11 + _local4), borderColor);
} else {
if (_local7 == 7){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle((_local10 + _local5), _local11, _local5, _local6), _local9);
Raster.line(drawSurface, (_local10 + _local5), _local11, (_local10 + _local5), (_local11 + _local6), borderColor);
Raster.line(drawSurface, (_local10 + _local5), (_local11 + _local6), (_local10 + _local3), (_local11 + _local6), borderColor);
} else {
if ((((_local7 == 8)) || ((_local7 == 66)))){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local6), _local9);
Raster.line(drawSurface, _local10, (_local11 + _local6), (_local10 + _local3), (_local11 + _local6), borderColor);
} else {
if (_local7 == 9){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
drawSurface.fillRect(new Rectangle(_local10, _local11, _local5, _local6), _local9);
Raster.line(drawSurface, (_local10 + _local5), _local11, (_local10 + _local5), (_local11 + _local6), borderColor);
Raster.line(drawSurface, (_local10 + (_local3 / 2)), (_local11 + (_local4 / 2)), _local10, (_local11 + (_local4 / 2)), borderColor);
} else {
if ((((_local7 == 67)) || ((_local7 == 68)))){
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local8);
} else {
drawSurface.fillRect(new Rectangle(_local10, _local11, _local3, _local4), _local9);
};
};
};
};
};
};
};
};
};
};
};
};
_local19++;
};
_local12++;
};
var _local18:int;
while (_local18 < space.layerGround.numChildren) {
_local13 = (space.layerGround.getChildAt(_local18) as GameObject);
_local14 = (((_local13.gamespace_x * _local1) - (this.space.ship.gamespace_x * _local1)) + (radarWidth / 2));
_local15 = (((_local13.gamespace_y * _local2) - (this.space.ship.gamespace_y * _local2)) + (radarHeight / 2));
if ((_local13 is Factory)){
if ((_local13 as Factory).factoryState == 1){
_local16 = 4278190335;
} else {
_local16 = 4290445312;
};
_local17 = ((10 * _local1) * 10);
if ((_local13 as Factory).building == 2){
_local17 = (_local17 * 2);
};
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is PowerPlant)){
if ((_local13 as PowerPlant).baseState == 1){
_local16 = 4294934656;
} else {
_local16 = 4294901760;
};
_local17 = ((7 * _local1) * 10);
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is Carrier)){
_local16 = 4284506367;
_local17 = ((5 * _local1) * 10);
if (_local17 < 4){
_local17 = 4;
};
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is ShipYard)){
if ((_local13 as ShipYard).baseState == 1){
_local16 = 4294934656;
} else {
_local16 = 4294901760;
};
_local17 = ((10 * _local1) * 10);
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is TankBase)){
if ((_local13 as TankBase).baseState == 1){
_local16 = 4294934656;
} else {
_local16 = 4294901760;
};
_local17 = ((7 * _local1) * 10);
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is AirBase)){
if ((_local13 as AirBase).baseState == 1){
_local16 = 4294934656;
} else {
_local16 = 4294901760;
};
Raster.line(drawSurface, (_local14 - 4), _local15, (_local14 + 5), _local15, _local16);
Raster.line(drawSurface, (_local14 - 4), (_local15 + 1), (_local14 + 5), (_local15 + 1), _local16);
Raster.line(drawSurface, _local14, _local15, (_local14 + 2), (_local15 - 4), _local16);
Raster.line(drawSurface, (_local14 + 1), _local15, (_local14 + 3), (_local15 - 4), _local16);
} else {
if ((_local13 is Boat)){
_local16 = 4294901760;
Raster.line(drawSurface, _local14, (_local15 - 1), _local14, (_local15 + 1), _local16);
Raster.line(drawSurface, (_local14 - 1), (_local15 + 1), (_local14 + 1), (_local15 + 1), _local16);
} else {
if ((_local13 is Tower)){
_local17 = 1;
if ((_local13 as Tower).towerState == 1){
_local16 = 4294934656;
} else {
_local16 = 4294901760;
};
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is TrackingGroundWeapon)){
_local17 = 2;
if ((_local13 as TrackingGroundWeapon).gunState == 1){
_local16 = 4294934656;
} else {
_local16 = 4294901760;
};
drawSurface.fillRect(new Rectangle((_local14 - (_local17 / 2)), (_local15 - (_local17 / 2)), _local17, _local17), _local16);
} else {
if ((_local13 is RoadBlock)){
if ((_local13 as RoadBlock).baseState == 0){
_local16 = 4294901760;
Raster.line(drawSurface, (_local14 - 1), (_local15 - 2), (_local14 - 1), (_local15 + 2), _local16);
Raster.line(drawSurface, (_local14 + 1), (_local15 - 2), (_local14 + 1), (_local15 + 2), _local16);
Raster.line(drawSurface, (_local14 - 1), (_local15 - 2), (_local14 + 1), (_local15 - 2), _local16);
Raster.line(drawSurface, (_local14 - 1), _local15, (_local14 + 1), _local15, _local16);
Raster.line(drawSurface, (_local14 - 1), (_local15 + 2), (_local14 + 1), (_local15 + 2), _local16);
};
};
};
};
};
};
};
};
};
};
};
_local18++;
};
_local18 = 0;
while (_local18 < space.layerAir.numChildren) {
_local13 = (space.layerAir.getChildAt(_local18) as GameObject);
if (!(((((_local13 is Plane)) || ((_local13 is Bomber)))) || ((_local13 is CarrierMissile)))){
} else {
if ((((((((_local13.gamespace_x < 0)) || ((_local13.gamespace_y < 0)))) || ((_local13.gamespace_x > space.selectedGameMap.worldPixelWidth)))) || ((_local13.gamespace_y > space.selectedGameMap.worldPixelHeight)))){
} else {
_local14 = (((_local13.gamespace_x * _local1) - (this.space.ship.gamespace_x * _local1)) + (radarWidth / 2));
_local15 = (((_local13.gamespace_y * _local2) - (this.space.ship.gamespace_y * _local2)) + (radarHeight / 2));
_local16 = 4294901760;
if ((_local13 is Plane)){
Raster.line(drawSurface, _local14, (_local15 - 1), _local14, (_local15 + 1), _local16);
Raster.line(drawSurface, (_local14 - 1), _local15, (_local14 + 1), _local15, _local16);
} else {
if ((_local13 is Bomber)){
Raster.line(drawSurface, (_local14 - 1), (_local15 - 1), (_local14 + 1), (_local15 - 1), _local16);
Raster.line(drawSurface, _local14, (_local15 - 1), _local14, (_local15 + 1), _local16);
Raster.line(drawSurface, (_local14 - 1), (_local15 + 1), (_local14 + 1), (_local15 + 1), _local16);
} else {
if ((_local13 is CarrierMissile)){
Raster.line(drawSurface, (_local14 - 1), (_local15 - 1), (_local14 + 1), (_local15 + 1), 4278190335);
Raster.line(drawSurface, (_local14 + 1), (_local15 - 1), (_local14 - 1), (_local15 + 1), 4278190335);
};
};
};
};
};
_local18++;
};
drawSurface.fillRect(new Rectangle(((radarWidth / 2) - 1), ((radarHeight / 2) - 1), 3, 3), 4278190335);
Raster.line(drawSurface, 0, 0, (radarWidth - 1), 0, 4278190080);
Raster.line(drawSurface, (radarWidth - 1), 0, (radarWidth - 1), (radarHeight - 1), 4278190080);
Raster.line(drawSurface, 0, (radarHeight - 1), (radarWidth - 1), (radarHeight - 1), 4278190080);
Raster.line(drawSurface, 0, 0, 0, (radarHeight - 1), 4278190080);
}
}
}//package com.wbwar.chopraider.game
Section 318
//TrainingScreen (com.wbwar.chopraider.game.TrainingScreen)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
public class TrainingScreen extends Sprite {
private var app:App;
private var backBitmap:Bitmap;
private var missionSelectionBitmap:Bitmap;
private static var backImage:Class = TrainingScreen_backImage;
private static var mission1:Class = TrainingScreen_mission1;
private static var missionSelectionImage:Class = TrainingScreen_missionSelectionImage;
private static var mission2:Class = TrainingScreen_mission2;
public function TrainingScreen(_arg1:App):void{
missionSelectionBitmap = (new missionSelectionImage() as Bitmap);
backBitmap = (new backImage() as Bitmap);
super();
this.app = _arg1;
this.graphics.beginFill(0xFFFFFF);
this.graphics.drawRect(0, 0, App.GAME_WIDTH, App.GAME_HEIGHT);
this.graphics.endFill();
addChild(missionSelectionBitmap);
missionSelectionBitmap.x = ((App.GAME_WIDTH / 2) - (missionSelectionBitmap.width / 2));
missionSelectionBitmap.y = 20;
var _local2:ImageButton = new ImageButton(backBitmap);
addChild(_local2);
_local2.x = 10;
_local2.y = 10;
_local2.addEventListener(ImageButton.CLICKED, backButtonClicked);
var _local3:GameMap = new GameMap();
_local3.parseXML("training1", new mission1());
var _local4:Bitmap = _local3.generateThumbNail(150, 150);
var _local5:TextDisplay = new TextDisplay();
_local5.setText("1");
var _local6:TextDisplay = new TextDisplay();
_local6.setText(_local3.title.toUpperCase());
_local3.parseXML("training2", new mission2());
var _local7:Bitmap = _local3.generateThumbNail(150, 150);
var _local8:TextDisplay = new TextDisplay();
_local8.setText("2");
var _local9:TextDisplay = new TextDisplay();
_local9.setText(_local3.title.toUpperCase());
var _local10:Bitmap = _local4;
var _local11:Bitmap = _local7;
var _local12:Number = ((15 + 150) + 18);
var _local13:Number = ((_local12 + 150) + 18);
var _local14:Number = 100;
var _local15:Number = 300;
var _local16:ImageButton = new ImageButton(_local10);
_local16.x = _local12;
_local16.y = _local14;
_local5.x = (_local16.x + 2);
_local5.y = (_local16.y + 2);
_local6.x = ((_local16.x + (_local16.width / 2)) - (_local6.width / 2));
_local6.y = ((_local14 + _local10.height) + 5);
_local16.addEventListener(ImageButton.CLICKED, mission1ButtonClicked);
addChild(_local16);
addChild(_local5);
addChild(_local6);
var _local17:ImageButton = new ImageButton(_local11);
_local17.x = _local13;
_local17.y = _local14;
_local8.x = (_local17.x + 2);
_local8.y = (_local17.y + 2);
_local9.x = ((_local17.x + (_local17.width / 2)) - (_local9.width / 2));
_local9.y = ((_local14 + _local11.height) + 5);
_local17.addEventListener(ImageButton.CLICKED, mission2ButtonClicked);
addChild(_local17);
addChild(_local8);
addChild(_local9);
}
private function mission1ButtonClicked(_arg1:ButtonEvent):void{
var _local2:GameMap = new GameMap();
_local2.parseXML("training1", new mission1());
app.createGame(_local2, 1);
}
private function backButtonClicked(_arg1:ButtonEvent):void{
app.showMainScreen();
}
private function mission2ButtonClicked(_arg1:ButtonEvent):void{
var _local2:GameMap = new GameMap();
_local2.parseXML("training2", new mission2());
app.createGame(_local2, 1);
}
}
}//package com.wbwar.chopraider.game
Section 319
//TrainingScreen_backImage (com.wbwar.chopraider.game.TrainingScreen_backImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TrainingScreen_backImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 320
//TrainingScreen_mission1 (com.wbwar.chopraider.game.TrainingScreen_mission1)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TrainingScreen_mission1 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 321
//TrainingScreen_mission2 (com.wbwar.chopraider.game.TrainingScreen_mission2)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TrainingScreen_mission2 extends ByteArrayAsset {
}
}//package com.wbwar.chopraider.game
Section 322
//TrainingScreen_missionSelectionImage (com.wbwar.chopraider.game.TrainingScreen_missionSelectionImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class TrainingScreen_missionSelectionImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 323
//Wake (com.wbwar.chopraider.game.Wake)
package com.wbwar.chopraider.game {
import flash.display.*;
public class Wake extends GameObject {
private var segmentBlueBitmap:Bitmap;
private var duration:Number;
private var scaleDelta:Number;
private var initialScale:Number;
private var age:uint;// = 0
private static var segmentBlueImage:Class = Wake_segmentBlueImage;
public function Wake(_arg1:Space, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):void{
segmentBlueBitmap = (new segmentBlueImage() as Bitmap);
super(_arg1, _arg2, _arg3);
this.initialScale = _arg5;
this.duration = _arg7;
this.scaleDelta = _arg6;
_arg1.layerEffectsLowerGround.addGameObject(this);
addChild(segmentBlueBitmap);
segmentBlueBitmap.x = (-(segmentBlueBitmap.width) / 2);
segmentBlueBitmap.y = (-(segmentBlueBitmap.height) / 2);
this.rotation = _arg4;
}
override public function update():void{
age++;
if (age > duration){
space.layerEffectsLowerGround.removeGameObject(this);
} else {
this.alpha = (1 - (age / duration));
this.scaleY = (initialScale + (scaleDelta * (age / duration)));
};
}
}
}//package com.wbwar.chopraider.game
Section 324
//Wake_segmentBlueImage (com.wbwar.chopraider.game.Wake_segmentBlueImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class Wake_segmentBlueImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 325
//Wall (com.wbwar.chopraider.game.Wall)
package com.wbwar.chopraider.game {
import com.wbwar.chopraider.common.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import com.wbwar.chopraider.common.beans.*;
public class Wall extends HittableGameObject {
public var wallState:uint;// = 0
private var repairRate:Number;
private var orientation:int;
protected var destroyedSound:Sound;
private var wallBitmap:Bitmap;
private var segmentCount:int;
private var repairTimer:int;// = 0
private static var wallSegmentBitmap:Bitmap = (new GameBitmaps.wallSegmentImage() as Bitmap);
private static var wallSegmentEndBitmap:Bitmap = (new GameBitmaps.wallSegmentEndImage() as Bitmap);
public function Wall(_arg1:Space, _arg2:WallBean):void{
var _local3:int;
super(_arg1, _arg2.x, _arg2.y, _arg2.health, _arg2.owner, _arg2.level);
this.repairRate = _arg2.repairRate;
this.segmentCount = _arg2.segmentCount;
this.orientation = _arg2.orientation;
_arg1.layerGround.addGameObject(this);
this.wallBitmap = new Bitmap();
this.wallBitmap.bitmapData = new BitmapData(wallSegmentEndBitmap.width, (wallSegmentBitmap.height * segmentCount), true, 0);
while (_local3 < segmentCount) {
this.wallBitmap.bitmapData.copyPixels(wallSegmentBitmap.bitmapData, new Rectangle(0, 0, wallSegmentBitmap.width, wallSegmentBitmap.height), new Point(2, (_local3 * wallSegmentBitmap.height)));
_local3++;
};
this.wallBitmap.bitmapData.copyPixels(wallSegmentEndBitmap.bitmapData, new Rectangle(0, 0, wallSegmentEndBitmap.width, wallSegmentEndBitmap.height), new Point(0, 0));
this.wallBitmap.bitmapData.copyPixels(wallSegmentEndBitmap.bitmapData, new Rectangle(0, 0, wallSegmentEndBitmap.width, wallSegmentEndBitmap.height), new Point(0, (wallBitmap.bitmapData.height - 8)));
this.addChild(wallBitmap);
this.wallBitmap.x = (-(this.wallBitmap.width) / 2);
this.wallBitmap.y = (-(this.wallBitmap.height) / 2);
if (orientation == 0){
this.rotation = 0;
} else {
if (orientation == 1){
this.rotation = 45;
} else {
if (orientation == 2){
this.rotation = 90;
} else {
if (orientation == 3){
this.rotation = 135;
};
};
};
};
}
override public function destroy():void{
this.space.layerGround.removeGameObject(this);
if (destroyedSound != null){
destroyedSound.play();
};
var _local1:Explosion = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 5);
_local1.duration = 20;
_local1.speed = 3;
}
override public function hitTest(_arg1:Number, _arg2:Number):Boolean{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (wallState == 1){
return (false);
};
if (orientation == 0){
if ((((((((_arg1 > (this.gamespace_x - 10))) && ((_arg1 < (this.gamespace_x + 10))))) && ((_arg2 > (this.gamespace_y - (this.height / 2)))))) && ((_arg2 < (this.gamespace_y + (this.height / 2)))))){
return (true);
};
return (false);
} else {
if (orientation == 2){
if ((((((((_arg1 > (this.gamespace_x - (this.width / 2)))) && ((_arg1 < (this.gamespace_x + (this.width / 2)))))) && ((_arg2 > (this.gamespace_y - 10))))) && ((_arg2 < (this.gamespace_y + 10))))){
return (true);
};
return (false);
} else {
if (orientation == 1){
_local3 = ((this.gamespace_y + (this.height / 2)) - _arg2);
if (_arg2 > ((this.gamespace_y + (this.height / 2)) + 3)){
return (false);
};
if (_arg2 < ((this.gamespace_y - (this.height / 2)) - 3)){
return (false);
};
_local4 = ((this.gamespace_x - (this.width / 2)) + _local3);
_local5 = _arg2;
_local6 = (_arg1 - _local4);
_local7 = (((_arg1 - _local4) * _local6) / 2);
if (_local7 < 100){
return (true);
};
} else {
if (orientation == 3){
_local3 = (_arg2 - (this.gamespace_y - (this.height / 2)));
if (_arg2 > ((this.gamespace_y + (this.height / 2)) + 3)){
return (false);
};
if (_arg2 < ((this.gamespace_y - (this.height / 2)) - 3)){
return (false);
};
_local4 = ((this.gamespace_x - (this.width / 2)) + _local3);
_local5 = _arg2;
_local6 = (_arg1 - _local4);
_local7 = (((_arg1 - _local4) * _local6) / 2);
if (_local7 < 100){
return (true);
};
};
};
};
};
return (false);
}
override public function update():void{
var _local1:Explosion;
if ((((wallState == 0)) && ((health <= 0)))){
if (destroyedSound != null){
destroyedSound.play();
};
_local1 = new Explosion(space, this.gamespace_x, this.gamespace_y, false, 5);
_local1.duration = 20;
_local1.speed = 3;
wallState = 1;
this.alpha = 0.15;
this.health = 0;
repairTimer = repairRate;
this.space.score = (this.space.score + this.startHealth);
new FadingPopup(space, gamespace_x, gamespace_y, ("+" + this.startHealth));
};
if ((((wallState == 1)) && ((this.health < this.startHealth)))){
this.health = (this.health + this.repairRate);
if (this.health >= this.startHealth){
this.health = this.startHealth;
wallState = 0;
this.alpha = 1;
this.health = this.startHealth;
};
};
}
override public function damage(_arg1:Number):void{
if (wallState == 1){
super.damage((_arg1 * 2));
} else {
super.damage(_arg1);
};
}
}
}//package com.wbwar.chopraider.game
Section 326
//VictoryIndicator (com.wbwar.chopraider.game.VictoryIndicator)
package com.wbwar.chopraider.game {
import flash.display.*;
public class VictoryIndicator extends Sprite {
private const minScale:Number = 0.9;
private var victoryBitmap:Bitmap;
private var scaleDelta:Number;// = 0.015
private static var victoryImage:Class = VictoryIndicator_victoryImage;
public function VictoryIndicator(){
victoryBitmap = (new victoryImage() as Bitmap);
super();
addChild(victoryBitmap);
victoryBitmap.x = (-(victoryBitmap.width) / 2);
victoryBitmap.y = (-(victoryBitmap.height) / 2);
}
public function update():void{
if (scaleX >= 1){
scaleDelta = -(scaleDelta);
} else {
if (scaleX <= minScale){
scaleDelta = -(scaleDelta);
};
};
this.scaleX = (this.scaleX + scaleDelta);
this.scaleY = (this.scaleY + scaleDelta);
}
}
}//package com.wbwar.chopraider.game
Section 327
//VictoryIndicator_victoryImage (com.wbwar.chopraider.game.VictoryIndicator_victoryImage)
package com.wbwar.chopraider.game {
import mx.core.*;
public class VictoryIndicator_victoryImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.game
Section 328
//ViewPort (com.wbwar.chopraider.game.ViewPort)
package com.wbwar.chopraider.game {
public class ViewPort {
public var width:int;// = 700
public var height:int;// = 500
public var x:Number;
public var y:Number;
}
}//package com.wbwar.chopraider.game
Section 329
//BubbleBoxButton (com.wbwar.chopraider.util.BubbleBoxButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
public class BubbleBoxButton extends SimpleButton {
private var size:int;
public static const CLICKED:String = "com.wbwar.util.BubbleBoxButton.clicked";
private static var bbbtOverImage:Class = BubbleBoxButton_bbbtOverImage;
private static var bbbsOverImage:Class = BubbleBoxButton_bbbsOverImage;
private static var bbbtImage:Class = BubbleBoxButton_bbbtImage;
private static var bbbsImage:Class = BubbleBoxButton_bbbsImage;
public function BubbleBoxButton(_arg1:int):void{
this.size = _arg1;
createStates();
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function generateFrame(_arg1:Boolean=false):Sprite{
var _local2:Sprite = new Sprite();
if (_arg1){
if (size == 0){
_local2.addChild((new bbbsOverImage() as Bitmap));
} else {
if (size == 1){
_local2.addChild((new bbbtOverImage() as Bitmap));
};
};
} else {
if (size == 0){
_local2.addChild((new bbbsImage() as Bitmap));
} else {
if (size == 1){
_local2.addChild((new bbbtImage() as Bitmap));
};
};
};
return (_local2);
}
private function buttonClicked(_arg1:Event):void{
dispatchEvent(new ButtonEvent(this, CLICKED));
}
private function createStates():void{
upState = generateFrame(false);
overState = generateFrame(true);
downState = generateFrame(true);
hitTestState = generateFrame();
}
}
}//package com.wbwar.chopraider.util
Section 330
//BubbleBoxButton_bbbsImage (com.wbwar.chopraider.util.BubbleBoxButton_bbbsImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class BubbleBoxButton_bbbsImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 331
//BubbleBoxButton_bbbsOverImage (com.wbwar.chopraider.util.BubbleBoxButton_bbbsOverImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class BubbleBoxButton_bbbsOverImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 332
//BubbleBoxButton_bbbtImage (com.wbwar.chopraider.util.BubbleBoxButton_bbbtImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class BubbleBoxButton_bbbtImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 333
//BubbleBoxButton_bbbtOverImage (com.wbwar.chopraider.util.BubbleBoxButton_bbbtOverImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class BubbleBoxButton_bbbtOverImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 334
//ButtonEvent (com.wbwar.chopraider.util.ButtonEvent)
package com.wbwar.chopraider.util {
import flash.events.*;
public class ButtonEvent extends Event {
public var button:Object;
public function ButtonEvent(_arg1:Object, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg2, _arg3, _arg4);
this.button = _arg1;
}
}
}//package com.wbwar.chopraider.util
Section 335
//EscButton (com.wbwar.chopraider.util.EscButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
public class EscButton extends SimpleButton {
public static const CLICKED:String = "com.wbwar.util.EscButton.clicked";
private static var escImage:Class = EscButton_escImage;
public function EscButton():void{
createStates();
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function createUpState(_arg1:Bitmap):Sprite{
var _local2:Sprite = new Sprite();
_local2.addChild(_arg1);
return (_local2);
}
private function buttonClicked(_arg1:Event):void{
dispatchEvent(new ButtonEvent(this, CLICKED));
}
private function createStates():void{
upState = createUpState((new escImage() as Bitmap));
overState = upState;
downState = upState;
hitTestState = upState;
}
}
}//package com.wbwar.chopraider.util
Section 336
//EscButton_escImage (com.wbwar.chopraider.util.EscButton_escImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class EscButton_escImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 337
//FontButton (com.wbwar.chopraider.util.FontButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.game.*;
public class FontButton extends SimpleButton {
private var zoom:Number;
private var backGroundColor:Number;
private var textColor:int;
private var textSize:int;
public static const CLICKED:String = "com.wbwar.util.FontButton.clicked";
public function FontButton(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:Number=0xFFFFFF):void{
this.textColor = _arg4;
this.textSize = _arg5;
this.backGroundColor = _arg6;
createStates(_arg1, _arg2, _arg3);
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function createStates(_arg1:String, _arg2:int, _arg3:int):void{
upState = generateFrame(_arg1, _arg2, _arg3);
overState = generateFrame(_arg1, _arg2, _arg3, true);
downState = generateFrame(_arg1, _arg2, _arg3);
hitTestState = generateFrame(_arg1, _arg2, _arg3);
}
private function buttonClicked(_arg1:Event):void{
dispatchEvent(new ButtonEvent(this, CLICKED));
}
private function generateFrame(_arg1:String, _arg2:int, _arg3:int, _arg4:Boolean=false):Sprite{
var _local5:Sprite = new Sprite();
if (_arg4){
_local5.graphics.beginFill(2883385);
_local5.graphics.drawRect(0, 0, _arg2, _arg3);
_local5.graphics.endFill();
} else {
_local5.graphics.beginFill(this.backGroundColor);
_local5.graphics.drawRect(0, 0, _arg2, _arg3);
_local5.graphics.endFill();
};
_local5.graphics.lineStyle(2, 2105488);
_local5.graphics.drawRect(0, 0, _arg2, _arg3);
var _local6:GenericTextField = new GenericTextField(textColor, textSize);
_local6.text = _arg1;
_local5.addChild(_local6);
_local6.x = ((_local5.width / 2) - (_local6.width / 2));
_local6.y = ((_local5.height / 2) - (_local6.height / 2));
return (_local5);
}
}
}//package com.wbwar.chopraider.util
Section 338
//ImageButton (com.wbwar.chopraider.util.ImageButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
public class ImageButton extends SimpleButton {
private var zoom:Number;
public static const CLICKED:String = "com.wbwar.util.RectangleButton.clicked";
public function ImageButton(_arg1:Bitmap, _arg2:Number=1.15):void{
this.zoom = _arg2;
createStates(_arg1);
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function createOverState(_arg1:Bitmap):Sprite{
_arg1.x = ((-(_arg1.width) * (zoom - 1)) / 2);
_arg1.y = ((-(_arg1.height) * (zoom - 1)) / 2);
_arg1.scaleX = zoom;
_arg1.scaleY = zoom;
var _local2:Sprite = new Sprite();
_local2.addChild(_arg1);
return (_local2);
}
private function buttonClicked(_arg1:Event):void{
dispatchEvent(new ButtonEvent(this, CLICKED));
}
private function createUpState(_arg1:Bitmap):Sprite{
var _local2:Sprite = new Sprite();
_local2.addChild(_arg1);
return (_local2);
}
private function createDownState(_arg1:Bitmap):Sprite{
var _local2:Sprite = new Sprite();
return (_local2);
}
private function createStates(_arg1:Bitmap):void{
upState = createUpState(_arg1);
overState = createOverState(new Bitmap(_arg1.bitmapData.clone()));
downState = overState;
hitTestState = upState;
}
}
}//package com.wbwar.chopraider.util
Section 339
//LoaderStartButton (com.wbwar.chopraider.util.LoaderStartButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
public class LoaderStartButton extends SimpleButton {
public static const CLICKED:String = "com.wbwar.util.LoaderStartButton.clicked";
private static var lsbImage:Class = LoaderStartButton_lsbImage;
private static var lsbOverImage:Class = LoaderStartButton_lsbOverImage;
public function LoaderStartButton():void{
createStates();
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function generateFrame(_arg1:Boolean=false):Sprite{
var _local2:Sprite = new Sprite();
if (_arg1){
_local2.addChild((new lsbOverImage() as Bitmap));
} else {
_local2.addChild((new lsbImage() as Bitmap));
};
return (_local2);
}
private function buttonClicked(_arg1:Event):void{
dispatchEvent(new ButtonEvent(this, CLICKED));
}
private function createStates():void{
upState = generateFrame(false);
overState = generateFrame(true);
downState = generateFrame(true);
hitTestState = generateFrame();
}
}
}//package com.wbwar.chopraider.util
Section 340
//LoaderStartButton_lsbImage (com.wbwar.chopraider.util.LoaderStartButton_lsbImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class LoaderStartButton_lsbImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 341
//LoaderStartButton_lsbOverImage (com.wbwar.chopraider.util.LoaderStartButton_lsbOverImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class LoaderStartButton_lsbOverImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 342
//LockedMap (com.wbwar.chopraider.util.LockedMap)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class LockedMap extends Sprite {
public function LockedMap(){
var _local2:TextField;
super();
var _local1:TextFormat = new TextFormat();
_local1.font = "wbfont";
_local1.color = 0;
_local1.size = 28;
_local1.bold = true;
_local2 = new TextField();
_local2.antiAliasType = AntiAliasType.ADVANCED;
_local2.gridFitType = GridFitType.PIXEL;
_local2.background = false;
_local2.border = false;
_local2.embedFonts = true;
_local2.defaultTextFormat = _local1;
_local2.autoSize = TextFieldAutoSize.LEFT;
_local2.selectable = false;
_local2.text = "Locked";
_local2.rotation = -40;
_local2.x = 40;
_local2.y = 70;
addChild(_local2);
graphics.beginFill(0xFFFFFF, 0.7);
graphics.drawRect(0, 0, 150, 175);
graphics.endFill();
addEventListener(MouseEvent.CLICK, onMouseClick);
}
public function onMouseClick(_arg1:MouseEvent):void{
trace(_arg1);
_arg1.stopPropagation();
}
}
}//package com.wbwar.chopraider.util
Section 343
//MD5 (com.wbwar.chopraider.util.MD5)
package com.wbwar.chopraider.util {
public class MD5 {
public static const HEX_FORMAT_LOWERCASE:uint = 0;
public static const HEX_FORMAT_UPPERCASE:uint = 1;
public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = "";
public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "=";
public static var hexcase:uint = 0;
public static var b64pad:String = "";
public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{
return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3));
}
public static function binl_md5(_arg1:Array, _arg2:Number):Array{
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
var _local3:Number = 1732584193;
var _local4:Number = -271733879;
var _local5:Number = -1732584194;
var _local6:Number = 271733878;
var _local7:Number = 0;
while (_local7 < _arg1.length) {
_local8 = _local3;
_local9 = _local4;
_local10 = _local5;
_local11 = _local6;
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162);
_local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682);
_local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101);
_local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290);
_local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501);
_local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467);
_local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784);
_local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473);
_local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189);
_local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487);
_local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835);
_local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520);
_local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649);
_local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070);
_local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379);
_local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259);
_local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551);
_local3 = safe_add(_local3, _local8);
_local4 = safe_add(_local4, _local9);
_local5 = safe_add(_local5, _local10);
_local6 = safe_add(_local6, _local11);
_local7 = (_local7 + 16);
};
return ([_local3, _local4, _local5, _local6]);
}
public static function str2rstr_utf16le(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function hex_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function binl2rstr(_arg1:Array):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < (_arg1.length * 32)) {
_local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF)));
_local3 = (_local3 + 8);
};
return (_local2);
}
public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2binl(_arg1:String):Array{
var _local3:Number;
var _local2:Array = Array((_arg1.length >> 2));
_local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3] = 0;
_local3++;
};
_local3 = 0;
while (_local3 < (_arg1.length * 8)) {
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | ((_arg1.charCodeAt((_local3 / 8)) & 0xFF) << (_local3 % 32)));
_local3 = (_local3 + 8);
};
return (_local2);
}
public static function md5_vm_test():Boolean{
return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"));
}
public static function b64_md5(_arg1:String):String{
return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{
return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3));
}
public static function hex_md5(_arg1:String):String{
return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1))));
}
public static function bit_rol(_arg1:Number, _arg2:Number):Number{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function encrypt(_arg1:String):String{
return (hex_md5(_arg1));
}
public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{
return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7));
}
public static function rstr2hex(_arg1:String):String{
var _local4:Number;
var _local2:String = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
var _local3 = "";
var _local5:Number = 0;
while (_local5 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local5);
_local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15))));
_local5++;
};
return (_local3);
}
public static function any_md5(_arg1:String, _arg2:String):String{
return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2));
}
public static function b64_hmac_md5(_arg1:String, _arg2:String):String{
return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2))));
}
public static function rstr2b64(_arg1:String):String{
var _local6:Number;
var _local7:Number;
var _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local3 = "";
var _local4:Number = _arg1.length;
var _local5:Number = 0;
while (_local5 < _local4) {
_local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0);
_local7 = 0;
while (_local7 < 4) {
if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){
_local3 = (_local3 + b64pad);
} else {
_local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63)));
};
_local7++;
};
_local5 = (_local5 + 3);
};
return (_local3);
}
public static function safe_add(_arg1:Number, _arg2:Number):Number{
var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local4:Number;
var _local5:Number;
var _local2 = "";
var _local3:Number = -1;
while (++_local3 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local3);
_local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0;
if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){
_local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023));
_local3++;
};
if (_local4 <= 127){
_local2 = (_local2 + String.fromCharCode(_local4));
} else {
if (_local4 <= 2047){
_local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 0xFFFF){
_local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
} else {
if (_local4 <= 2097151){
_local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63))));
};
};
};
};
};
return (_local2);
}
public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{
var _local3:Array = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
var _local4:Array = Array(16);
var _local5:Array = Array(16);
var _local6:Number = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
var _local7:Array = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8)));
return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128))));
}
public static function str2rstr_utf16be(_arg1:String):String{
var _local2 = "";
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF)));
_local3++;
};
return (_local2);
}
public static function rstr2any(_arg1:String, _arg2:String):String{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local3:Number = _arg2.length;
var _local4:Array = [];
var _local9:Array = Array((_arg1.length / 2));
_local5 = 0;
while (_local5 < _local9.length) {
_local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1)));
_local5++;
};
while (_local9.length > 0) {
_local8 = [];
_local7 = 0;
_local5 = 0;
while (_local5 < _local9.length) {
_local7 = ((_local7 << 16) + _local9[_local5]);
_local6 = Math.floor((_local7 / _local3));
_local7 = (_local7 - (_local6 * _local3));
if ((((_local8.length > 0)) || ((_local6 > 0)))){
_local8[_local8.length] = _local6;
};
_local5++;
};
_local4[_local4.length] = _local7;
_local9 = _local8;
};
var _local10 = "";
_local5 = (_local4.length - 1);
while (_local5 >= 0) {
_local10 = (_local10 + _arg2.charAt(_local4[_local5]));
_local5--;
};
return (_local10);
}
public static function rstr_md5(_arg1:String):String{
return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8))));
}
}
}//package com.wbwar.chopraider.util
Section 344
//MuteButton (com.wbwar.chopraider.util.MuteButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class MuteButton extends Sprite {
private var soundMutedBitmap:Bitmap;
private var soundBitmap:Bitmap;
private static var soundImage:Class = MuteButton_soundImage;
private static var soundMutedImage:Class = MuteButton_soundMutedImage;
public function MuteButton(){
soundBitmap = (new soundImage() as Bitmap);
soundMutedBitmap = (new soundMutedImage() as Bitmap);
super();
addChild(soundBitmap);
addChild(soundMutedBitmap);
soundMutedBitmap.visible = false;
addEventListener(MouseEvent.MOUSE_DOWN, onMouseClick);
}
public function onMouseClick(_arg1:MouseEvent):void{
_arg1.stopPropagation();
mute = !(mute);
}
public function set mute(_arg1:Boolean):void{
var _local2:SoundTransform;
if (_arg1){
soundMutedBitmap.visible = true;
soundBitmap.visible = false;
_local2 = new SoundTransform();
_local2.volume = 0;
SoundMixer.soundTransform = _local2;
} else {
soundMutedBitmap.visible = false;
soundBitmap.visible = true;
_local2 = new SoundTransform();
_local2.volume = 1;
SoundMixer.soundTransform = _local2;
};
}
public function get mute():Boolean{
return (soundMutedBitmap.visible);
}
}
}//package com.wbwar.chopraider.util
Section 345
//MuteButton_soundImage (com.wbwar.chopraider.util.MuteButton_soundImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class MuteButton_soundImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 346
//MuteButton_soundMutedImage (com.wbwar.chopraider.util.MuteButton_soundMutedImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class MuteButton_soundMutedImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 347
//RadioButton (com.wbwar.chopraider.util.RadioButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class RadioButton extends Sprite {
private var selectBitmap:Bitmap;
private var circleBitmap:Bitmap;
public static const CLICKED:String = "com.wbwar.util.RectangleButton.clicked";
private static var circleImage:Class = RadioButton_circleImage;
private static var selectImage:Class = RadioButton_selectImage;
public function RadioButton(_arg1:String){
var _local2:TextFormat;
circleBitmap = (new circleImage() as Bitmap);
selectBitmap = (new selectImage() as Bitmap);
super();
addChild(circleBitmap);
addChild(selectBitmap);
selectBitmap.x = 4;
selectBitmap.y = 4;
selectBitmap.visible = false;
_local2 = new TextFormat();
_local2.font = "wbfont";
_local2.color = 144;
_local2.size = 14;
_local2.bold = true;
var _local3:TextField = new TextField();
_local3.antiAliasType = AntiAliasType.ADVANCED;
_local3.gridFitType = GridFitType.PIXEL;
_local3.background = false;
_local3.border = false;
_local3.embedFonts = true;
_local3.defaultTextFormat = _local2;
_local3.autoSize = TextFieldAutoSize.LEFT;
_local3.selectable = false;
_local3.text = _arg1;
addChild(_local3);
_local3.x = 24;
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function buttonClicked(_arg1:Event):void{
this.selected = true;
dispatchEvent(new ButtonEvent(this, CLICKED));
}
public function set selected(_arg1:Boolean):void{
selectBitmap.visible = _arg1;
}
public function get selected():Boolean{
return (selectBitmap.visible);
}
}
}//package com.wbwar.chopraider.util
Section 348
//RadioButton_circleImage (com.wbwar.chopraider.util.RadioButton_circleImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class RadioButton_circleImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 349
//RadioButton_selectImage (com.wbwar.chopraider.util.RadioButton_selectImage)
package com.wbwar.chopraider.util {
import mx.core.*;
public class RadioButton_selectImage extends BitmapAsset {
}
}//package com.wbwar.chopraider.util
Section 350
//RC4 (com.wbwar.chopraider.util.RC4)
package com.wbwar.chopraider.util {
public class RC4 {
protected static var mykey:Array = new Array(0xFF);
protected static var sbox:Array = new Array(0xFF);
protected static function charsToHex(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local4:Number = 0;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToHex(_local5));
}
protected static function hexToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:Number = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array = hexToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToStr(_local5));
}
protected static function strToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
protected static function calculate(_arg1:Array, _arg2:Array):Array{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local10:Number;
initialize(_arg2);
var _local3:Number = 0;
var _local4:Number = 0;
var _local5:Array = new Array();
var _local9:Number = 0;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
protected static function initialize(_arg1:Array):void{
var _local3:Number;
var _local5:Number;
var _local2:Number = 0;
var _local4:Number = _arg1.length;
_local5 = 0;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
protected static function charsToStr(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Number = 0;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package com.wbwar.chopraider.util
Section 351
//Score (com.wbwar.chopraider.util.Score)
package com.wbwar.chopraider.util {
import flash.events.*;
import com.wbwar.chopraider.game.*;
import flash.net.*;
import com.bubblebox.*;
public class Score {
private static var rs:ResultsScreen;
private static function errorComplete(_arg1:Event):void{
trace(_arg1);
rs.scoreSubmitDone(null);
}
private static function submitComplete(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
rs.scoreSubmitDone(_local2.data);
}
public static function submitScore(_arg1:ResultsScreen):void{
var data:String;
var request:URLRequest;
var loader:URLLoader;
var rs = _arg1;
MochiBot.track(wbwar.instance, "37d5e1c1");
Score.rs = rs;
data = "1";
data = (data + "\n");
data = (data + rs.mapName);
data = (data + "\n");
data = (data + rs.skill);
data = (data + "\n");
data = (data + rs.user);
data = (data + "\n");
data = (data + rs.group);
data = (data + "\n");
data = (data + rs.score);
data = (data + "\n");
data = (data + rs.timeLeft);
data = (data + "\n");
data = (data + rs.shipDeaths);
data = (data + "\n");
data = (data + rs.bulletsFired);
data = (data + "\n");
data = (data + rs.bulletsHit);
data = (data + "\n");
data = (data + rs.bombsDropped);
data = (data + "\n");
data = (data + rs.bombsHit);
data = (data + "\n");
data = (data + rs.totalScore);
data = (data + "\n");
trace(data);
data = (data + MD5.hex_md5(data));
RC4.decrypt("459c9e9b41814ef1988e6189b498", "spaceestate11");
var edata:String = RC4.encrypt(data, RC4.decrypt("459c9e9b41814ef1988e6189b498", "spaceestate11"));
var variables:URLVariables = new URLVariables();
variables.scoredata = edata;
try {
request = new URLRequest();
request.url = "http://www.whiteboardwar.com/chopraider/submitscore.php";
request.data = variables;
request.method = URLRequestMethod.POST;
loader = new URLLoader();
loader.load(request);
loader.addEventListener(Event.COMPLETE, submitComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR, errorComplete);
} catch(e:Error) {
};
}
public static function submitBubbleBoxScore(_arg1:ResultsScreen):void{
var _local4:String;
MochiBot.track(wbwar.instance, "8dcb3052");
Score.rs = _arg1;
var _local2:String = escape(_arg1.user);
var _local3:int = _arg1.totalScore;
if (_arg1.mapName == "campaign1"){
_local4 = "chopraider_c_1_";
} else {
if (_arg1.mapName == "campaign2"){
_local4 = "chopraider_c_2_";
} else {
if (_arg1.mapName == "campaign3"){
_local4 = "chopraider_c_3_";
} else {
if (_arg1.mapName == "campaign4"){
_local4 = "chopraider_c_4_";
} else {
if (_arg1.mapName == "campaign5"){
_local4 = "chopraider_c_5_";
} else {
if (_arg1.mapName == "campaign6"){
_local4 = "chopraider_c_6_";
} else {
if (_arg1.mapName == "campaign7"){
_local4 = "chopraider_c_7_";
} else {
if (_arg1.mapName == "campaign8"){
_local4 = "chopraider_c_8_";
} else {
if (_arg1.mapName == "arena1"){
_local4 = "chopraider_a_1_";
} else {
if (_arg1.mapName == "arena2"){
_local4 = "chopraider_a_2_";
} else {
if (_arg1.mapName == "arena3"){
_local4 = "chopraider_a_3_";
};
};
};
};
};
};
};
};
};
};
};
if (_arg1.skill == 2){
_local4 = (_local4 + "hard");
} else {
_local4 = (_local4 + "normal");
};
trace(_local4);
var _local5:URLLoader = BubbleBoxAPI.submit(_local2, _local3, _local4);
_local5.addEventListener(Event.COMPLETE, submitComplete);
_local5.addEventListener(IOErrorEvent.IO_ERROR, errorComplete);
}
}
}//package com.wbwar.chopraider.util
Section 352
//TextButton (com.wbwar.chopraider.util.TextButton)
package com.wbwar.chopraider.util {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.game.*;
public class TextButton extends SimpleButton {
private var zoom:Number;
public static const CLICKED:String = "com.wbwar.util.TextButton.clicked";
public function TextButton(_arg1:String, _arg2:int, _arg3:int):void{
createStates(_arg1, _arg2, _arg3);
addEventListener(MouseEvent.MOUSE_DOWN, buttonClicked);
}
private function createStates(_arg1:String, _arg2:int, _arg3:int):void{
upState = generateFrame(_arg1, _arg2, _arg3);
overState = generateFrame(_arg1, _arg2, _arg3, true);
downState = generateFrame(_arg1, _arg2, _arg3);
hitTestState = generateFrame(_arg1, _arg2, _arg3);
}
private function buttonClicked(_arg1:Event):void{
dispatchEvent(new ButtonEvent(this, CLICKED));
}
private function generateFrame(_arg1:String, _arg2:int, _arg3:int, _arg4:Boolean=false):Sprite{
var _local5:Sprite = new Sprite();
if (_arg4){
_local5.graphics.beginFill(2883385);
_local5.graphics.drawRect(0, 0, _arg2, _arg3);
_local5.graphics.endFill();
} else {
_local5.graphics.beginFill(0xFFFFFF);
_local5.graphics.drawRect(0, 0, _arg2, _arg3);
_local5.graphics.endFill();
};
_local5.graphics.lineStyle(2, 2105488);
_local5.graphics.drawRect(0, 0, _arg2, _arg3);
var _local6:TextDisplay = new TextDisplay();
_local6.setText(_arg1.toUpperCase());
_local5.addChild(_local6);
_local6.x = ((_local5.width / 2) - (_local6.width / 2));
_local6.y = ((_local5.height / 2) - (_local6.height / 2));
return (_local5);
}
}
}//package com.wbwar.chopraider.util
Section 353
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int, _arg3:Function=null):DisplayObject{
var poolid = _arg1;
var subpoolid = _arg2;
var loadedFunc = _arg3;
Security.allowDomain("server.cpmstar.com");
var cpmstarViewSWFUrl = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
if (loadedFunc != null){
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function (_arg1:Event):void{
loadedFunc(cpmstarLoader.contentLoaderInfo);
});
};
cpmstarLoader.load(new URLRequest(((((cpmstarViewSWFUrl + "?poolid=") + poolid) + "&subpoolid=") + subpoolid)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 354
//Rect (de.benz.dataFormat.swf.structs.Rect)
package de.benz.dataFormat.swf.structs {
import flash.utils.*;
public class Rect {
private var bitBuf;// = 0
private var bitPos:int;// = 8
private var yMax:int;
private var xMax:int;
private var yMin:int;
private var xMin:int;
public function Rect(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
this.xMin = _arg1;
this.xMax = _arg2;
this.yMin = _arg3;
this.yMax = _arg4;
}
public function writeSBits(_arg1:ByteArray, _arg2:int, _arg3:int):void{
var _local4 = (_arg3 & 2147483647);
if (_arg3 < 0){
_local4 = (_local4 | (1 << (_arg2 - 1)));
};
writeUBits(_arg1, _arg2, _local4);
}
public function writeRect(_arg1:ByteArray):void{
var _local2:int = getBitSize();
writeUBits(_arg1, 5, _local2);
writeSBits(_arg1, _local2, xMin);
writeSBits(_arg1, _local2, xMax);
writeSBits(_arg1, _local2, yMin);
writeSBits(_arg1, _local2, yMax);
while (bitPos > 0) {
writeUBits(_arg1, 1, 0);
};
}
public function setBit(_arg1:int, _arg2:int){
return ((_arg2 | (1 << (_arg1 - 1))));
}
public function determineUnsignedBitSize(_arg1:int):int{
var _local2 = 32;
var _local3:* = 2147483648;
while (_local2 > 0) {
if ((_arg1 & _local3) != 0){
return (_local2);
};
_local3 = (_local3 >> 1);
_local2--;
};
return (0);
}
public function determineSignedBitSize(_arg1:int):int{
if (_arg1 >= 0){
return ((determineUnsignedBitSize(_arg1) + 1));
};
var _local2 = 31;
var _local3:* = 1073741824;
while (_local2 > 0) {
if ((_arg1 & _local3) == 0){
break;
};
_local3 = (_local3 >> 1);
_local2--;
};
if (_local2 == 0){
return (2);
};
var _local4 = (_arg1 & ((1 << _local2) - 1));
if (_local4 == 0){
_local2++;
};
return ((_local2 + 1));
}
public function writeUBits(_arg1:ByteArray, _arg2:int, _arg3:int):void{
if (_arg2 == 0){
return;
};
if (bitPos == 0){
bitPos = 8;
};
var _local4:int = _arg2;
while (_local4 > 0) {
while ((((bitPos > 0)) && ((_local4 > 0)))) {
if (getBit(_local4, _arg3)){
bitBuf = setBit(bitPos, bitBuf);
};
_local4--;
bitPos--;
};
if (bitPos == 0){
_arg1.writeByte(bitBuf);
bitBuf = 0;
if (_local4 > 0){
bitPos = 8;
};
};
};
}
public function getBit(_arg1:int, _arg2:int){
return (!(((_arg2 & (1 << (_arg1 - 1))) == 0)));
}
private function getBitSize():int{
var _local1:int;
var _local2:int = determineSignedBitSize(xMin);
var _local3:* = determineSignedBitSize(xMax);
var _local4:* = determineSignedBitSize(yMin);
var _local5:* = determineSignedBitSize(yMax);
_local1 = _local4;
if (_local1 < _local3){
_local1 = _local3;
};
if (_local1 < _local2){
_local1 = _local2;
};
if (_local1 < _local5){
_local1 = _local5;
};
return (_local1);
}
}
}//package de.benz.dataFormat.swf.structs
Section 355
//WaveReader (de.benz.dataFormat.wave.WaveReader)
package de.benz.dataFormat.wave {
import flash.utils.*;
public class WaveReader {
public var bitsPerSample;
public var chunkFormat:String;
public var subchunk1Size;
public var chunkSize:int;
public var dataChunkSignature:String;
public var channels;
public var subchunk1Id:String;
public var bytesPersecond;
public var chunkId:String;
public var dataChunkLength;
public var sampleRate;
public var bytes:ByteArray;
public var audioFormat;
public var blockAlign;
public function getWaveForm(_arg1:int):Array{
return (new Array());
}
public function read(_arg1:ByteArray):void{
this.bytes = _arg1;
_arg1.endian = "littleEndian";
chunkId = _arg1.readMultiByte(4, "utf");
chunkSize = _arg1.readUnsignedInt();
chunkFormat = _arg1.readMultiByte(4, "utf");
subchunk1Id = _arg1.readMultiByte(4, "iso-8859-1");
subchunk1Size = _arg1.readInt();
audioFormat = _arg1.readShort();
channels = _arg1.readShort();
sampleRate = _arg1.readUnsignedInt();
bytesPersecond = _arg1.readUnsignedInt();
blockAlign = _arg1.readShort();
bitsPerSample = _arg1.readUnsignedShort();
dataChunkSignature = _arg1.readMultiByte(4, "iso-8859-1");
dataChunkLength = _arg1.readInt();
}
public function write():ByteArray{
var _local1:ByteArray = new ByteArray();
_local1.endian = "littleEndian";
_local1.writeMultiByte("RIFF", "utf-8");
_local1.writeUnsignedInt(chunkSize);
_local1.writeMultiByte("WAVE", "utf-8");
_local1.writeMultiByte(subchunk1Id, "utf-8");
_local1.writeUnsignedInt(subchunk1Size);
_local1.writeShort(audioFormat);
_local1.writeShort(channels);
_local1.writeUnsignedInt(sampleRate);
_local1.writeUnsignedInt(bytesPersecond);
_local1.writeShort(blockAlign);
_local1.writeShort(bitsPerSample);
_local1.writeMultiByte("data", "utf");
_local1.writeUnsignedInt(dataChunkLength);
bytes.position = 44;
_local1.writeBytes(bytes);
return (_local1);
}
}
}//package de.benz.dataFormat.wave
Section 356
//WaveSWF (de.benz.dataFormat.wave.WaveSWF)
package de.benz.dataFormat.wave {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import de.benz.dataFormat.swf.structs.*;
public class WaveSWF extends EventDispatcher {
private var linkageClass:Array;
private var bitPos:int;// = 8
public var name:String;
public var sound;
public var swfData:ByteArray;
public var defineSound:ByteArray;
private var loader:Loader;
private var bitBuf;// = 0
private var symbolClassArray:Array;
private var fileAttributesArray;
public function WaveSWF(_arg1:WaveReader, _arg2:String){
var _local5:int;
var _local9:int;
swfData = new ByteArray();
linkageClass = [-65, 20, -39, 0, 0, 0, 1, 0, 0, 0, 0, 16, 0, 46, 0, 0, 0, 0, 10, 7, 100, 101, 46, 98, 101, 110, 122, 9, 119, 97, 118, 101, 115, 111, 117, 110, 100, 11, 102, 108, 97, 115, 104, 46, 109, 101, 100, 105, 97, 5, 83, 111, 117, 110, 100, 17, 100, 101, 46, 98, 101, 110, 122, 58, 119, 97, 118, 101, 115, 111, 117, 110, 100, 0, 6, 79, 98, 106, 101, 99, 116, 12, 102, 108, 97, 115, 104, 46, 101, 118, 101, 110, 116, 115, 15, 69, 118, 101, 110, 116, 68, 105, 115, 112, 97, 116, 99, 104, 101, 114, 6, 22, 1, 22, 3, 24, 5, 22, 6, 22, 8, 0, 5, 7, 1, 2, 7, 2, 4, 7, 4, 7, 7, 5, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 8, 3, 0, 1, 0, 0, 0, 1, 2, 1, 1, 4, 1, 0, 3, 0, 1, 1, 5, 6, 3, -48, 48, 71, 0, 0, 1, 1, 1, 6, 7, 6, -48, 48, -48, 73, 0, 71, 0, 0, 2, 2, 1, 1, 5, 23, -48, 48, 101, 0, 96, 3, 48, 96, 4, 48, 96, 2, 48, 96, 2, 88, 0, 29, 29, 29, 104, 1, 71, 0, 0];
fileAttributesArray = [68, 17, 8, 0, 0, 0];
symbolClassArray = [63, 19, 22, 0, 0, 0, 1, 0, 1, 0, 100, 101, 46, 98, 101, 110, 122, 46, 119, 97, 118, 101, 115, 111, 117, 110, 100, 0];
super();
this.name = _arg2;
defineSound = new ByteArray();
defineSound.endian = Endian.LITTLE_ENDIAN;
defineSound.writeUTFBytes("F");
defineSound.writeUTFBytes("W");
defineSound.writeUTFBytes("S");
defineSound.writeByte(9);
defineSound.writeByte(0);
defineSound.writeByte(0);
defineSound.writeByte(0);
defineSound.writeByte(0);
var _local3:ByteArray = new ByteArray();
var _local4:Rect = new Rect(0, 200, 0, 200);
_local4.writeRect(defineSound);
defineSound.writeShort((25 * 0x0100));
writeUI16(defineSound, 1);
_local5 = 0;
while (_local5 < fileAttributesArray.length) {
defineSound.writeByte(fileAttributesArray[_local5]);
_local5++;
};
var _local6:int;
if (_arg1.bitsPerSample == 16){
_local6 = 1;
} else {
_local6 = 0;
};
var _local7:int;
if (_arg1.sampleRate == 44100){
_local7 = 3;
} else {
if (_arg1.sampleRate == 22050){
_local7 = 2;
} else {
if (_arg1.sampleRate == 11025){
_local7 = 1;
};
};
};
writeRecordHeader(defineSound, 45, 4);
writeUBits(defineSound, 4, 0);
writeUBits(defineSound, 2, _local7);
writeUBits(defineSound, 1, _local6);
writeUBits(defineSound, 1, (_arg1.channels - 1));
writeUBits(defineSound, 4, 0);
writeUBits(defineSound, 2, _local7);
writeUBits(defineSound, 1, _local6);
writeUBits(defineSound, 1, (_arg1.channels - 1));
defineSound.writeShort(0);
_local5 = 0;
while (_local5 < linkageClass.length) {
defineSound.writeByte(linkageClass[_local5]);
_local5++;
};
writeRecordHeader(defineSound, 14, ((_arg1.bytes.length - 44) + 7));
defineSound.writeShort(1);
var _local8:int;
defineSound.writeByte((((((_local8 << 4) + (_local7 << 2)) + (_local6 << 1)) + _arg1.channels) - 1));
if (Number((_arg1.channels - 1)) == 0){
if (_arg1.sampleRate == 8){
_local9 = (_arg1.bytes.length - 44);
} else {
_local9 = ((_arg1.bytes.length / 2) - 44);
};
} else {
if (_arg1.sampleRate == 8){
_local9 = ((_arg1.bytes.length / 2) - 44);
} else {
_local9 = ((_arg1.bytes.length / 4) - 44);
};
};
defineSound.writeUnsignedInt(_local9);
defineSound.writeBytes(_arg1.bytes, 44, (_arg1.bytes.length - 44));
_local5 = 0;
while (_local5 < symbolClassArray.length) {
defineSound.writeByte(symbolClassArray[_local5]);
_local5++;
};
writeRecordHeader(defineSound, 1, 0);
defineSound.writeByte(0);
defineSound.writeByte(0);
defineSound.endian = Endian.LITTLE_ENDIAN;
defineSound.position = 4;
defineSound.writeUnsignedInt(defineSound.length);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderComplete);
loader.loadBytes(defineSound);
}
public function setBit(_arg1:int, _arg2:int){
return ((_arg2 | (1 << (_arg1 - 1))));
}
public function getBit(_arg1:int, _arg2:int){
return (!(((_arg2 & (1 << (_arg1 - 1))) == 0)));
}
private function progressHandler(_arg1:ProgressEvent):void{
trace(((("progressHandler: bytesLoaded=" + _arg1.bytesLoaded) + " bytesTotal=") + _arg1.bytesTotal));
}
private function writeUI16(_arg1:ByteArray, _arg2:int){
_arg1.writeByte((_arg2 & 0xFF));
_arg1.writeByte((_arg2 >> 8));
}
private function onLoaderComplete(_arg1:Event):void{
var _local2:Class = (loader.contentLoaderInfo.applicationDomain.getDefinition("de.benz.wavesound") as Class);
sound = (new (_local2) as Sound);
dispatchEvent(new Event(Event.COMPLETE));
}
private function ioErrorHandler(_arg1:Event):void{
}
public function writeUBits(_arg1:ByteArray, _arg2:int, _arg3:int):void{
if (_arg2 == 0){
return;
};
if (bitPos == 0){
bitPos = 8;
};
var _local4:int = _arg2;
while (_local4 > 0) {
while ((((bitPos > 0)) && ((_local4 > 0)))) {
if (getBit(_local4, _arg3)){
bitBuf = setBit(bitPos, bitBuf);
};
_local4--;
bitPos--;
};
if (bitPos == 0){
_arg1.writeByte(bitBuf);
bitBuf = 0;
if (_local4 > 0){
bitPos = 8;
};
};
};
}
private function writeRecordHeader(_arg1:ByteArray, _arg2:Number, _arg3:Number, _arg4:Boolean=false):void{
if ((((_arg3 <= 62)) && ((_arg4 == false)))){
_arg1.writeShort(((_arg2 << 6) + _arg3));
} else {
_arg1.writeShort(((_arg2 << 6) + 63));
_arg1.writeUnsignedInt(_arg3);
};
}
}
}//package de.benz.dataFormat.wave
Section 357
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 358
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 359
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 360
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 361
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 362
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 363
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 364
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 365
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 366
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 367
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 368
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 369
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 370
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 371
//CPMStarPreloader (CPMStarPreloader)
package {
import flash.events.*;
import flash.display.*;
import com.wbwar.chopraider.util.*;
import flash.text.*;
import CPMStar.*;
import flash.utils.*;
import flash.net.*;
public class CPMStarPreloader extends MovieClip {
private var chopRaiderLoaded:Boolean;
private var startButton:LoaderStartButton;
private var towers:Array;
private var allowLoad:Boolean;
private var loadedText:TextField;
private var startTime:int;
private var cpmstarLoaded:Boolean;
private var flasher:Sprite;
private var tmp:Sprite;
private var cpmstar:DisplayObject;
private var cpmstarInternalLoaded:Boolean;
private var secondStartTime:int;// = -1
private static var towerImage:Class = CPMStarPreloader_towerImage;
private static var wbwarlogoImage:Class = CPMStarPreloader_wbwarlogoImage;
private static var loaderImage:Class = CPMStarPreloader_loaderImage;
public function CPMStarPreloader(){
var tb:Bitmap;
towers = new Array();
super();
this.stage.scaleMode = StageScaleMode.EXACT_FIT;
stop();
addEventListener(Event.ENTER_FRAME, onEnterFrame);
var loaderBitmap:Bitmap = (new loaderImage() as Bitmap);
addChild(loaderBitmap);
var startX = 74;
var i:int;
while (i < 15) {
tb = (new towerImage() as Bitmap);
tb.visible = false;
addChild(tb);
tb.x = (startX + (i * 37));
tb.y = 340;
towers.push(tb);
i = (i + 1);
};
var logo:BubbleBoxButton = new BubbleBoxButton(0);
addChild(logo);
logo.addEventListener(BubbleBoxButton.CLICKED, function (_arg1:Event):void{
bubbleBoxClick();
});
logo.x = 448;
logo.y = 170;
var wbwarlogo:ImageButton = new ImageButton((new wbwarlogoImage() as Bitmap), 1.03);
addChild(wbwarlogo);
wbwarlogo.addEventListener(ImageButton.CLICKED, function (_arg1:Event):void{
wbwarClick();
});
wbwarlogo.x = 435;
wbwarlogo.y = 120;
startButton = new LoaderStartButton();
addChild(startButton);
startButton.visible = false;
startButton.x = 450;
startButton.y = 240;
startButton.addEventListener(LoaderStartButton.CLICKED, startClicked);
flasher = new Sprite();
flasher.graphics.lineStyle(3, 0xFF0000);
flasher.graphics.drawRect(-3, -3, (startButton.width + 5), (startButton.height + 5));
flasher.visible = false;
flasher.x = startButton.x;
flasher.y = startButton.y;
addChild(flasher);
cpmstar = AdLoader.LoadAd(1239, 2, loadedAdCallback);
this.addChild(cpmstar);
cpmstar.x = 70;
cpmstar.y = 62;
var format:TextFormat = new TextFormat();
format.color = 0;
format.size = 10;
format.bold = true;
loadedText = new TextField();
loadedText.background = false;
loadedText.border = false;
loadedText.defaultTextFormat = format;
loadedText.autoSize = TextFieldAutoSize.CENTER;
loadedText.selectable = false;
this.addChild(loadedText);
loadedText.text = "Loaded: %";
loadedText.x = (350 - (loadedText.width / 2));
loadedText.y = 375;
var myTimer:Timer = new Timer(100, 1);
myTimer.addEventListener("timer", timerHandler);
myTimer.start();
startTime = getTimer();
}
public function timerHandler(_arg1:TimerEvent):void{
var _local7:Timer;
var _local2:Number = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 15);
var _local3:int;
while (_local3 < int(_local2)) {
(towers[_local3] as Bitmap).visible = true;
_local3++;
};
var _local4:Number = Math.round((this.loaderInfo.bytesLoaded / 0x0400));
var _local5:Number = Math.round((this.loaderInfo.bytesTotal / 0x0400));
var _local6:Number = Math.round(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
loadedText.text = (("Loaded: " + String(_local6)) + "%");
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
chopRaiderLoaded = true;
secondStartTime = getTimer();
} else {
_local7 = new Timer(100, 1);
_local7.addEventListener("timer", timerHandler);
_local7.start();
};
}
private function wbwarClick():void{
MochiBot.track(this, "5a08cfb3");
var _local1 = "http://www.whiteboardwar.com?game=chopraider";
var _local2:URLRequest = new URLRequest(_local1);
navigateToURL(_local2, "_blank");
}
private function onEnterFrame(_arg1:Event):void{
var deltaT2:int;
var event = _arg1;
var deltaT:int = (getTimer() - startTime);
if (secondStartTime > -1){
deltaT2 = (getTimer() - secondStartTime);
if (deltaT2 > 10000){
};
};
if (!cpmstarInternalLoaded){
try {
if (((!(((cpmstar as Object).content == null))) && ((cpmstar as Object).content.completed))){
cpmstarInternalLoaded = true;
};
} catch(e:Error) {
cpmstarInternalLoaded = true;
};
};
if (((chopRaiderLoaded) && ((deltaT > 3000)))){
startButton.visible = true;
};
if (startButton.visible){
flasher.visible = !(flasher.visible);
};
}
private function init():void{
var _local2:Object;
var _local1:Class = Class(getDefinitionByName("wbwar"));
if (_local1){
_local2 = new (_local1);
addChild((_local2 as DisplayObject));
_local2.init(false);
};
}
private function bubbleBoxClick():void{
MochiBot.track(this, "0adfa8d5");
var _local1 = "http://www.bubblebox.com/clickreg.php?type=gamestats&id=976&subid=preloader";
var _local2:URLRequest = new URLRequest(_local1);
navigateToURL(_local2, "_blank");
}
private function startClicked(_arg1:Event):void{
var event = _arg1;
if (cpmstar != null){
try {
if (((!(((cpmstar as Object).content == null))) && ((cpmstar as Object).content.completed))){
this.removeChild(cpmstar);
};
} catch(e:Error) {
try {
this.removeChild(cpmstar);
} catch(e2:Error) {
};
};
};
this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
this.nextFrame();
init();
}
private function loadedAdCallback(_arg1:LoaderInfo):void{
cpmstarLoaded = true;
}
}
}//package
Section 372
//CPMStarPreloader_loaderImage (CPMStarPreloader_loaderImage)
package {
import mx.core.*;
public class CPMStarPreloader_loaderImage extends BitmapAsset {
}
}//package
Section 373
//CPMStarPreloader_towerImage (CPMStarPreloader_towerImage)
package {
import mx.core.*;
public class CPMStarPreloader_towerImage extends BitmapAsset {
}
}//package
Section 374
//CPMStarPreloader_wbwarlogoImage (CPMStarPreloader_wbwarlogoImage)
package {
import mx.core.*;
public class CPMStarPreloader_wbwarlogoImage extends BitmapAsset {
}
}//package
Section 375
//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{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("core.mochibot.com");
Security.allowInsecureDomain("core.mochibot.com");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 376
//wbwar (wbwar)
package {
import flash.display.*;
import com.wbwar.chopraider.game.*;
import com.wbwar.chopraider.util.*;
import flash.net.*;
import flash.text.*;
public dynamic class wbwar extends Sprite {
public static const sitelock:Boolean = false;
public static const bubblebox:Boolean = true;
private static var efont:String = "wbwar_efont";
public static var instance:wbwar;
public function wbwar(){
instance = this;
if (stage != null){
init(false);
};
}
public function init(_arg1:Boolean):void{
var _local8:App;
var _local9:TextFormat;
var _local10:TextField;
MochiBot.track(this, "c4b07616");
trace(this.stage);
var _local2:Sprite = new Sprite();
_local2.graphics.lineStyle(1, 0);
_local2.graphics.drawRect(0, 0, 699, 499);
var _local3:int = stage.loaderInfo.url.indexOf(RC4.decrypt("4c989c9718c113b0eec62b89a4964edc6f7c928cde36cf5edd616a670c580693", "spaceestate11"));
var _local4:int = stage.loaderInfo.url.indexOf(RC4.decrypt("4285848218c113ae94ce2adcf7d84f9b233ac3ca", "spaceestate11"));
var _local5:int = stage.loaderInfo.url.indexOf(RC4.decrypt("4285848218c113e8da8b2a9aa98915ce6f64928c9522c64383706463", "spaceestate11"));
var _local6:int = stage.loaderInfo.url.indexOf(RC4.decrypt("4285848218c113fdd89e6681a4820ed323689c93", "spaceestate11"));
var _local7:int = stage.loaderInfo.url.indexOf(RC4.decrypt("4285848218c113e8da8b2a8fb48203c768699c86df36c85c", "spaceestate11"));
if (((!(sitelock)) || ((((((((((_local3 == 0)) || ((_local4 == 0)))) || ((_local5 == 0)))) || ((_local6 == 0)))) || ((_local7 == 0)))))){
_local8 = new App();
this.addChild(_local8);
_local8.firstInit();
} else {
_local9 = new TextFormat();
_local9.font = "wbfont";
_local9.color = 0;
_local9.size = 24;
_local9.bold = true;
_local10 = new TextField();
_local10.antiAliasType = AntiAliasType.ADVANCED;
_local10.gridFitType = GridFitType.PIXEL;
_local10.background = false;
_local10.border = false;
_local10.embedFonts = true;
_local10.defaultTextFormat = _local9;
_local10.autoSize = TextFieldAutoSize.CENTER;
_local10.selectable = false;
addChild(_local10);
_local10.text = "Please visit www.whiteboardwar.com to play\n WhiteboardWar: ChopRaider";
_local10.x = ((App.GAME_WIDTH / 2) - (_local10.width / 2));
_local10.y = 200;
};
this.addChild(_local2);
}
public static function bubbleBoxClick(_arg1:String, _arg2:Boolean=false):void{
if (_arg1 == "mainscreen"){
MochiBot.track(wbwar.instance, "9ed82dde");
} else {
if (_arg1 == "arenascreen"){
MochiBot.track(wbwar.instance, "80585241");
} else {
if (_arg1 == "resultsscreen"){
MochiBot.track(wbwar.instance, "8f2d2437");
} else {
if (_arg1 == "ingame"){
MochiBot.track(wbwar.instance, "98d24f64");
} else {
if (_arg1 == "ingamemenu"){
MochiBot.track(wbwar.instance, "1e41558d");
} else {
if (_arg1 == "resolution"){
MochiBot.track(wbwar.instance, "39930149");
} else {
if (_arg1 == "credits"){
MochiBot.track(wbwar.instance, "1b1a0f28");
};
};
};
};
};
};
};
var _local3 = "http://www.bubblebox.com/clickreg.php?type=gamestats&id=976&subid=";
_local3 = (_local3 + _arg1);
if (_arg2){
_local3 = (_local3 + "&action=startgame");
};
var _local4:URLRequest = new URLRequest(_local3);
navigateToURL(_local4, "_blank");
}
public static function wbwarClick(_arg1:String):void{
if (_arg1 == "splash"){
MochiBot.track(wbwar.instance, "782778f3");
} else {
if (_arg1 == "mainscreen"){
MochiBot.track(wbwar.instance, "e20bb8bd");
};
};
var _local2 = "http://www.whiteboardwar.com/?game=chopraider";
var _local3:URLRequest = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
public static function fglClick(_arg1:String):void{
if (_arg1 == "credits"){
MochiBot.track(wbwar.instance, "d50df142");
};
var _local2 = "http://www.flashgamelicense.com/?referrer=chopraider";
var _local3:URLRequest = new URLRequest(_local2);
navigateToURL(_local3, "_blank");
}
}
}//package
Section 377
//wbwar_efont (wbwar_efont)
package {
import mx.core.*;
public class wbwar_efont extends FontAsset {
}
}//package