Section 1
//MD5 (CMG_AS3.MD5)
package CMG_AS3 {
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 _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
_arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32)));
_arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2;
_local3 = 1732584193;
_local4 = -271733879;
_local5 = -1732584194;
_local6 = 271733878;
_local7 = 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:String;
var _local3:Number;
_local2 = "";
_local3 = 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:String;
var _local3:Number;
_local2 = "";
_local3 = 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 _local2:Array;
var _local3:Number;
_local2 = new 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 _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
_local2 = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef";
_local3 = "";
_local5 = 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 _local2:String;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
_local3 = "";
_local4 = _arg1.length;
_local5 = 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;
var _local4:Number;
_local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF));
_local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16));
return (((_local4 << 16) | (_local3 & 0xFFFF)));
}
public static function str2rstr_utf8(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = "";
_local3 = -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;
var _local4:Array;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = rstr2binl(_arg1);
if (_local3.length > 16){
_local3 = binl_md5(_local3, (_arg1.length * 8));
};
_local4 = new Array(16);
_local5 = new Array(16);
_local6 = 0;
while (_local6 < 16) {
_local4[_local6] = (_local3[_local6] ^ 909522486);
_local5[_local6] = (_local3[_local6] ^ 1549556828);
_local6++;
};
_local7 = 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:String;
var _local3:Number;
_local2 = "";
_local3 = 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 _local3:Number;
var _local4:Array;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Array;
var _local9:Array;
var _local10:String;
_local3 = _arg2.length;
_local4 = [];
_local9 = new 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;
};
_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 CMG_AS3
Section 2
//ScoreSubmitter (CMG_AS3.ScoreSubmitter)
package CMG_AS3 {
import flash.events.*;
import flash.net.*;
public class ScoreSubmitter extends EventDispatcher {
private var m_UrlLoader:URLLoader;// = null
public static const RETURNCODE_SUCCESS = 1;
public static const RETURNCODE_REJECTED = 2;
public static const RETURNCODE_INTERNALERROR = 5;
public static const URL_SUBMITSCORE = "http://scores.crazymonkeygames.com/hs/regscores2.php";
public static const URL_UPDATEGAME = "http://scores.crazymonkeygames.com/hs/pleaseupdate.php";
public static const SCORE_RESPONSE:String = "score_response";
public static const RETURNCODE_WORKING = 0;
public static const RETURNCODE_WRONGVERSION = 3;
public static const URL_VIEWSCORES = "http://scores.crazymonkeygames.com/hs/listscores.php";
public static const RETURNCODE_NETWORKERROR = 4;
public static var gameVersion:String = "";
public static var gameValidationCode:String = "";
public static var gameId:uint = 0;
public function ScoreSubmitter(){
m_UrlLoader = null;
super();
}
private function onIoError(_arg1:Event){
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_NETWORKERROR));
}
public function submitScore(_arg1:String, _arg2:Number, _arg3:String=null):void{
var _local4:*;
var _local5:URLRequest;
_arg1 = Utilities.trim(_arg1);
gameVersion = Utilities.trim(gameVersion);
if (_arg3 == null){
_arg3 = "";
} else {
_arg3 = Utilities.trim(_arg3);
};
gameValidationCode = Utilities.trim(gameValidationCode);
if ((((((gameId < 1)) || ((gameVersion == "")))) || ((gameValidationCode == "")))){
trace("ERROR: CMG_AS3.ScoreSubmitter.submitScore: gameId, gameVersion, or gameValidationCode member variables were not set before calling this function!");
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_REJECTED));
return;
};
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_WORKING));
_local4 = new URLVariables();
_local4.name = _arg1;
_local4.score = _arg2;
_local4.gameId = gameId;
_local4.gameVersion = gameVersion;
_local4.special = _arg3;
_local4.key = MD5.encrypt(((((((((_arg1 + "|") + _arg2) + "|") + gameId) + "|") + _arg3) + "|") + gameValidationCode));
_local5 = new URLRequest(URL_SUBMITSCORE);
_local5.method = URLRequestMethod.POST;
_local5.data = _local4;
m_UrlLoader = new URLLoader();
m_UrlLoader.addEventListener("complete", onComplete);
m_UrlLoader.addEventListener("ioError", onIoError);
m_UrlLoader.load(_local5);
}
private function onComplete(_arg1:Event):void{
var _local2:URLVariables;
var _local3:*;
_local2 = new URLVariables(m_UrlLoader.data.replace("&", ""));
_local3 = Utilities.trim(_local2.ok);
if (_local3 == 1){
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_SUCCESS));
} else {
if (_local3 == 0){
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_REJECTED));
} else {
if (_local3 == 2){
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_WRONGVERSION));
} else {
dispatchEvent(new ServerResponseEvent(SCORE_RESPONSE, RETURNCODE_INTERNALERROR));
};
};
};
}
public static function loadHighScorePage():void{
Utilities.goToUrl(((URL_VIEWSCORES + "?id=") + gameId));
}
public static function loadUpdatePage(){
Utilities.goToUrl(((URL_VIEWSCORES + "?id=") + gameId));
}
}
}//package CMG_AS3
Section 3
//ServerResponseEvent (CMG_AS3.ServerResponseEvent)
package CMG_AS3 {
import flash.events.*;
public class ServerResponseEvent extends Event {
public var returnCode:uint;
public function ServerResponseEvent(_arg1:String, _arg2:uint){
super(_arg1, false, false);
returnCode = _arg2;
}
}
}//package CMG_AS3
Section 4
//Utilities (CMG_AS3.Utilities)
package CMG_AS3 {
import flash.net.*;
import flash.external.*;
import flash.system.*;
public class Utilities {
public static function trim(_arg1:String):String{
var _local2:*;
var _local3:*;
_local2 = 0;
while (_arg1.charCodeAt(_local2) < 33) {
_local2++;
};
_local3 = (_arg1.length - 1);
while (_arg1.charCodeAt(_local3) < 33) {
_local3--;
};
return (_arg1.substring(_local2, (_local3 + 1)));
}
public static function goToUrl(_arg1:String):void{
var success:Boolean;
var url = _arg1;
success = false;
if (((ExternalInterface.available) && (!((Capabilities.playerType == "External"))))){
try {
ExternalInterface.call("window.open", url, "win", "");
success = true;
} catch(error:Error) {
} catch(error:SecurityError) {
};
};
if (success != true){
navigateToURL(new URLRequest(url), "_BLANK");
};
}
}
}//package CMG_AS3
Section 5
//EnemyMine_explode_9 (PostalPanic_fla.EnemyMine_explode_9)
package PostalPanic_fla {
import flash.display.*;
public dynamic class EnemyMine_explode_9 extends MovieClip {
public function EnemyMine_explode_9(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package PostalPanic_fla
Section 6
//load_barMC_82 (PostalPanic_fla.load_barMC_82)
package PostalPanic_fla {
import flash.display.*;
public dynamic class load_barMC_82 extends MovieClip {
public var bar:MovieClip;
}
}//package PostalPanic_fla
Section 7
//mainChar_eye_24 (PostalPanic_fla.mainChar_eye_24)
package PostalPanic_fla {
import flash.display.*;
public dynamic class mainChar_eye_24 extends MovieClip {
public function mainChar_eye_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 8
//mainChar_mouth_23 (PostalPanic_fla.mainChar_mouth_23)
package PostalPanic_fla {
import flash.display.*;
public dynamic class mainChar_mouth_23 extends MovieClip {
public function mainChar_mouth_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 9
//monkey_blink_88 (PostalPanic_fla.monkey_blink_88)
package PostalPanic_fla {
import flash.display.*;
public dynamic class monkey_blink_88 extends MovieClip {
public function monkey_blink_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 10
//prefect_mouth_22 (PostalPanic_fla.prefect_mouth_22)
package PostalPanic_fla {
import flash.display.*;
public dynamic class prefect_mouth_22 extends MovieClip {
public function prefect_mouth_22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 11
//Preloader_72 (PostalPanic_fla.Preloader_72)
package PostalPanic_fla {
import flash.display.*;
public dynamic class Preloader_72 extends MovieClip {
public var bar:MovieClip;
public function Preloader_72(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 12
//Sherrif_eye_26 (PostalPanic_fla.Sherrif_eye_26)
package PostalPanic_fla {
import flash.display.*;
public dynamic class Sherrif_eye_26 extends MovieClip {
public function Sherrif_eye_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 13
//Sherrif_mouth_25 (PostalPanic_fla.Sherrif_mouth_25)
package PostalPanic_fla {
import flash.display.*;
public dynamic class Sherrif_mouth_25 extends MovieClip {
public function Sherrif_mouth_25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PostalPanic_fla
Section 14
//BackgroundImg (BackgroundImg)
package {
import flash.display.*;
public dynamic class BackgroundImg extends MovieClip {
}
}//package
Section 15
//BattleMusic (BattleMusic)
package {
import flash.media.*;
public dynamic class BattleMusic extends Sound {
}
}//package
Section 16
//BluePrint (BluePrint)
package {
import flash.display.*;
public dynamic class BluePrint extends MovieClip {
}
}//package
Section 17
//Boss (Boss)
package {
import flash.display.*;
import flash.geom.*;
public class Boss extends Sprite {
public var shootDelayCurr:int;// = 0
private var px:Number;// = 0
private var py:Number;// = 0
public var gunOffset:Point;
private var hp:Number;// = 100
public var gunOffX:int;// = 0
public var gunOffY:int;// = 0
public var type:String;
private var speed:Number;// = 1
public var gun;
private var p;
public var shootDelay:int;// = 40
private var _damage:Number;// = 1
private var behaveChange:Number;// = 0.05
public var vx:Number;// = -1
public var vy:Number;// = 0
private var deadRot:Number;// = 0
private var takeDamage:Boolean;// = false
public var gunArray:Array;
private var behaveCurr:Number;// = 0
public function Boss(_arg1:int, _arg2, _arg3, _arg4:Array, _arg5:int, _arg6:int, _arg7:int=40, _arg8:int=100, _arg9:String="boss"){
vx = -1;
vy = 0;
px = 0;
py = 0;
speed = 1;
behaveCurr = 0;
behaveChange = 0.05;
gunOffX = 0;
gunOffY = 0;
_damage = 1;
gunArray = new Array();
gunOffset = new Point();
shootDelay = 40;
shootDelayCurr = 0;
hp = 100;
deadRot = 0;
takeDamage = false;
super();
if (_arg2 != null){
addChild(_arg2);
};
gun = _arg3;
addChild(gun);
px = 600;
py = _arg1;
this.x = px;
this.y = py;
speed = 1.5;
hp = 10;
_damage = 2;
gunArray = _arg4;
gunOffX = _arg5;
gunOffY = _arg6;
shootDelay = _arg7;
hp = _arg8;
type = _arg9;
}
public function get damage():Number{
return (_damage);
}
public function update():void{
var _local1:ColorTransform;
if (px > (600 - (this.width + 20))){
px = (px + vx);
};
py = (py + vy);
this.x = px;
this.y = py;
gunOffset.x = (px + gunOffX);
gunOffset.y = (py + gunOffY);
_local1 = new ColorTransform();
if (takeDamage){
_local1.redOffset = 230;
_local1.blueOffset = 170;
_local1.greenOffset = 50;
takeDamage = false;
};
this.transform.colorTransform = _local1;
}
public function get alive():Boolean{
if (hp > 0){
return (true);
};
return (false);
}
public function giveDamage(_arg1:Number):void{
if (hp > 0){
hp = (hp - _arg1);
takeDamage = true;
};
}
}
}//package
Section 18
//Bullet (Bullet)
package {
import flash.display.*;
public class Bullet extends Sprite {
private var px:Number;// = 0
private var py:Number;// = 0
private var _type:String;
private var _damage:Number;// = 1
public var vx:Number;// = 0
public var vy:Number;// = 0
public function Bullet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Number, _arg7:Number){
var _local8:BulletImg;
px = 0;
py = 0;
vx = 0;
vy = 0;
_damage = 1;
super();
_type = _arg5;
_local8 = new BulletImg();
_local8.gotoAndStop(_arg5);
_damage = _arg6;
addChild(_local8);
vx = (_arg1 * _arg7);
vy = (_arg2 * _arg7);
px = _arg3;
py = _arg4;
this.x = px;
this.y = py;
}
public function get type():String{
return (_type);
}
public function get damage():Number{
return (_damage);
}
public function update():void{
px = (px + vx);
py = (py + vy);
this.x = px;
this.y = py;
}
}
}//package
Section 19
//BulletImg (BulletImg)
package {
import flash.display.*;
public dynamic class BulletImg extends MovieClip {
}
}//package
Section 20
//CharacterImg (CharacterImg)
package {
import flash.display.*;
public dynamic class CharacterImg extends MovieClip {
public var eye:MovieClip;
public var mouth:MovieClip;
public function CharacterImg(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 21
//CMG_Logo_Animation (CMG_Logo_Animation)
package {
import flash.display.*;
public dynamic class CMG_Logo_Animation extends MovieClip {
public var hp:MovieClip;
public var loader:MovieClip;
public function CMG_Logo_Animation(){
addFrameScript(0, frame1, 80, frame81);
}
function frame81(){
stop();
}
function frame1(){
gotoAndPlay(2);
}
}
}//package
Section 22
//Crate (Crate)
package {
import flash.display.*;
public dynamic class Crate extends MovieClip {
}
}//package
Section 23
//Cutscene (Cutscene)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.ui.*;
import flash.filters.*;
public class Cutscene extends Sprite {
private var char1Target:int;// = 120
private var currentNode:uint;// = 0
private var conversationSprite:Sprite;
private var playSound:Boolean;// = true
private var bgImg:Bitmap;
private var char2Target:int;// = 480
private var fade:Number;// = 0.05
private var char1Clr:uint;
private var char1:CharacterImg;
private var char2:CharacterImg;
private var _parent:Object;
private var directions1:Array;
private var directions2:Array;
private var convTarget:int;// = 75
private var char2Clr:uint;
private var moveSpeed:Number;// = 0.1
public function Cutscene(_arg1:String, _arg2:String, _arg3:Array, _arg4:Array, _arg5:uint, _arg6:uint, _arg7){
var _local8:Sprite;
var _local9:CutsceneNext;
moveSpeed = 0.1;
directions1 = new Array();
directions2 = new Array();
currentNode = 0;
char1Target = 120;
char2Target = 480;
convTarget = 75;
conversationSprite = new Sprite();
bgImg = new Bitmap();
fade = 0.05;
playSound = true;
super();
directions1 = _arg3;
directions2 = _arg4;
char1Clr = _arg5;
char2Clr = _arg6;
_parent = _arg7;
char1 = new CharacterImg();
char2 = new CharacterImg();
addChild(bgImg);
_local8 = new Sprite();
addChild(_local8);
_local8.graphics.beginFill(0xFFFFFF, 0.4);
_local8.graphics.drawRect(260, 45, 96, 32);
_local8.graphics.endFill();
addChild(char1);
addChild(char2);
char1.gotoAndStop(_arg1);
char2.gotoAndStop(_arg2);
conversationSprite.x = 300;
conversationSprite.y = 0;
addChild(conversationSprite);
addEventListener(Event.ADDED_TO_STAGE, onAdded);
char1.x = -100;
char2.x = 700;
char2.scaleX = -1;
_local9 = new CutsceneNext();
addChild(_local9);
_local9.x = 280;
_local9.y = 50;
_local9.buttonMode = true;
_local9.gotoAndStop("next");
_local9.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local9.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local9.addEventListener(MouseEvent.CLICK, nextButtonPress, false, 0, true);
_local9 = new CutsceneNext();
addChild(_local9);
_local9.x = 310;
_local9.y = 50;
_local9.buttonMode = true;
_local9.gotoAndStop("skip");
_local9.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local9.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local9.addEventListener(MouseEvent.CLICK, skipButtonPress, false, 0, true);
}
private function changeExpressions():void{
if (((!((char1.eye == null))) && (!((directions1[currentNode].eye == null))))){
char1.eye.gotoAndStop(directions1[currentNode].eye);
};
if (((!((char1.mouth == null))) && (!((directions1[currentNode].mouth == null))))){
char1.mouth.gotoAndStop(directions1[currentNode].mouth);
};
if (((!((char2.eye == null))) && (!((directions2[currentNode].eye == null))))){
char2.eye.gotoAndStop(directions2[currentNode].eye);
};
if (((!((char2.mouth == null))) && (!((directions2[currentNode].mouth == null))))){
char2.mouth.gotoAndStop(directions2[currentNode].mouth);
};
}
private function displayText():void{
var _local1:CutsceneText;
if (directions1[currentNode].text != null){
_local1 = new CutsceneText(directions1[currentNode].text, char1Clr);
_local1.x = (-(_local1.width) - 10);
_local1.y = (currentNode * -60);
conversationSprite.addChild(_local1);
};
if (directions2[currentNode].text != null){
_local1 = new CutsceneText(directions2[currentNode].text, char2Clr);
_local1.x = 10;
_local1.y = (currentNode * -60);
conversationSprite.addChild(_local1);
};
convTarget = (convTarget + 60);
}
private function skipButtonPress(_arg1:MouseEvent):void{
currentNode = (directions1.length + 100);
update();
}
private function nextButtonPress(_arg1:MouseEvent):void{
update();
}
private function onAdded(_arg1:Event):void{
_parent = this.parent;
bgImg.bitmapData = new BitmapData(600, 300, false, 0);
bgImg.bitmapData.draw(this.parent);
bgImg.bitmapData.applyFilter(bgImg.bitmapData, new Rectangle(0, 0, 600, 300), new Point(0, 0), new BlurFilter(8, 8, 5));
bgImg.alpha = 0;
addEventListener(Event.ENTER_FRAME, run);
stage.addEventListener(KeyboardEvent.KEY_DOWN, kPressed);
currentNode = 0;
conversationSprite.y = 0;
changeExpressions();
displayText();
playSound = _parent.playSound;
}
private function mOverButton(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Sound_ButtonOver;
_local2 = 1.2;
_arg1.target.transform.colorTransform = new ColorTransform(_local2, _local2, _local2);
if (playSound){
_local3 = new Sound_ButtonOver();
_local3.play();
};
}
private function mOutButton(_arg1:MouseEvent):void{
_arg1.target.transform.colorTransform = new ColorTransform();
}
private function run(_arg1:Event):void{
var _local2:Number;
_local2 = (char1Target - char1.x);
char1.x = (char1.x + (_local2 * moveSpeed));
_local2 = (char2Target - char2.x);
char2.x = (char2.x + (_local2 * moveSpeed));
_local2 = (convTarget - conversationSprite.y);
conversationSprite.y = (conversationSprite.y + (_local2 * moveSpeed));
if ((((fade > 0)) && ((bgImg.alpha < 1)))){
bgImg.alpha = (bgImg.alpha + fade);
};
if ((((fade < 0)) && ((bgImg.alpha > 0)))){
bgImg.alpha = (bgImg.alpha + fade);
};
if (((((finishedDirections) && ((bgImg.alpha <= 0)))) && ((fade < 0)))){
cleanUp();
};
}
private function kPressed(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.SPACE){
update();
};
}
private function update():void{
var _local1:Sound_ButtonPress;
currentNode++;
if (finishedDirections){
char1Target = -200;
char2Target = 800;
convTarget = -(conversationSprite.height);
fade = -0.05;
moveSpeed = 0.05;
} else {
changeExpressions();
displayText();
};
if (playSound){
_local1 = new Sound_ButtonPress();
_local1.play();
};
}
private function cleanUp(){
removeChild(conversationSprite);
conversationSprite = new Sprite();
conversationSprite.x = 300;
conversationSprite.y = 0;
addChild(conversationSprite);
char1.x = -100;
char2.x = 700;
char1Target = 120;
char2Target = 480;
convTarget = 75;
currentNode = 0;
removeEventListener(Event.ENTER_FRAME, run);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kPressed);
parent.removeChild(this);
_parent.cutsceneDone();
}
public function get finishedDirections():Boolean{
if (currentNode < directions1.length){
return (false);
};
return (true);
}
}
}//package
Section 24
//CutsceneNext (CutsceneNext)
package {
import flash.display.*;
public dynamic class CutsceneNext extends MovieClip {
}
}//package
Section 25
//CutsceneNode (CutsceneNode)
package {
public class CutsceneNode {
private var _mouth:String;
private var _text:String;
private var _eye:String;
public function CutsceneNode(_arg1:String=null, _arg2:String=null, _arg3:String=null){
_text = _arg1;
_mouth = _arg2;
_eye = _arg3;
}
public function get text():String{
return (_text);
}
public function get mouth():String{
return (_mouth);
}
public function get eye():String{
return (_eye);
}
}
}//package
Section 26
//CutscenePack (CutscenePack)
package {
public class CutscenePack {
private var _shooter:Object;
private var _main:Object;
private static var nerdClr:int = 16377410;
private static var drunkClr:int = 6008958;
private static var grannyClr:int = 11435441;
private static var librarianClr:int = 6904641;
private static var prefectClr:int = 0x111111;
private static var littlegirlClr:int = 16756655;
private static var mainCharClr:int = 5341080;
private static var sherrifClr:int = 6997503;
private static var oldmanClr:int = 9227481;
private static var cryClr:int = 10826296;
public function CutscenePack(_arg1, _arg2){
_main = _arg1;
_shooter = _arg2;
}
public function get PREFECT_INTRO():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Prefect Bathau, I have a letter for you.", "open", "norm"));
_local2.push(new CutsceneNode(null, "closed"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Ah, our new mailman!", "smile"));
_local1.push(new CutsceneNode("Yes sir! I've just arrived.", "grin", "norm"));
_local2.push(new CutsceneNode(null, "smile"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode(null, "smile"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Well, Gor here will give you the bag of \nundelived letters from our last mailman.", "smile"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("It was recoved from the \nwreckage of his vehicle.", "smile"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("After he poked his nose \nwhere it wasn't welcome.", "smile"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode(null, "closed"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("I hope to have you around longer, \nyou seem like the careful sort.", "smile"));
return (new Cutscene("mainChar_letter", "prefect_thug", _local1, _local2, mainCharClr, prefectClr, _shooter));
}
public function get DRUNK_CRY_2():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Letter from Karl.", "unhappy_talk", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("*sniff*"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Look at this! Trying make it all \nokay after what he did!"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("It's over!"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Take this letter. \nIt should make the \nsituation clear to Karl."));
return (new Cutscene("mainChar_letter", "cry", _local1, _local2, mainCharClr, cryClr, _shooter));
}
public function get DRUNK_CRY_3():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Over!??"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Anita can't just break \nit off like that!"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("..."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Here, -*hic*- take this letter..."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("and make sure Anita reads it."));
return (new Cutscene("mainChar_letter", "drunk", _local1, _local2, mainCharClr, drunkClr, _shooter));
}
public function get DRUNK_CRY_4():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Mail from your ex!", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Aww... look at this! \nHe's written a poem."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("'Roses are red,'"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("'Violets are blue,'"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("'When you left I bled,'"));
_local1.push(new CutsceneNode(null, "grin", "norm"));
_local2.push(new CutsceneNode("'Like you'd punched me with kung fu.'"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Karl may be gormless..."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("but he's a sweetie too."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Here, take this letter for him."));
return (new Cutscene("mainChar_letter", "cry", _local1, _local2, mainCharClr, cryClr, _shooter));
}
public function get DRUNK_CRY_5():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Sounds like Anita is reconsidering.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Really?? I've gotta -*hic*- go see her."));
_local1.push(new CutsceneNode("Plus maybe sober up.", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("You're right... *hic*"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Take this message to Sam Loxdale."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I need his famous cure!!"));
return (new Cutscene("mainChar_letter", "drunk", _local1, _local2, mainCharClr, drunkClr, _shooter));
}
public function get DRUNK_CRY_6():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Hey Sam.", "grin", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "happy"));
_local2.push(new CutsceneNode("Hmf. You again."));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("What do you want?"));
_local1.push(new CutsceneNode("Message from Karl Spencer.", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("He needs your famous cure.", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Does he now?"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Here's a package for \nthe waste of space."));
return (new Cutscene("mainChar_letter", "oldman", _local1, _local2, mainCharClr, oldmanClr, _shooter));
}
public function get DRUNK_CRY_1():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Hey there! Letter for you!", "grin", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "happy"));
_local2.push(new CutsceneNode("Ha! From Anita."));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("I haven't been feelin' too great \nsince we had a fight last week."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I gotta give her a reply. \nHang around for a few."));
return (new Cutscene("mainChar_letter", "drunk", _local1, _local2, mainCharClr, drunkClr, _shooter));
}
public function get MAINSTORY_6():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Finally! The McGuffin Device!"));
_local1.push(new CutsceneNode("What's that?", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("It allows us to lower the shields..."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("that the prefect has around \nhimself and Gor his right hand bot."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("And it is Gor that is \nour next target."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Destroy him."));
return (new Cutscene("mainChar_letter", "nerd", _local1, _local2, mainCharClr, nerdClr, _shooter));
}
public function get LIBRARIAN_INTRO():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Package for you.", "grin", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "angry"));
_local2.push(new CutsceneNode("Finally! My order from the book society."));
_local1.push(new CutsceneNode(null, "closed", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("You know the previous mailman \ndied delivering those books?", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Yes... I am aware of that."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("I saw him shot down \nby the prefect's men."));
_local1.push(new CutsceneNode("He was killed by the prefect?", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Yes."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Perhaps you should talk to our \nsherrif before getting too deeply \ninvolved in local politics."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Here's a note for her."));
return (new Cutscene("mainChar_bag", "librarian", _local1, _local2, mainCharClr, librarianClr, _shooter));
}
public function get DRUNK_CRY_7():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Here's the famous cure!", "grin", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "happy"));
_local2.push(new CutsceneNode("Oh, thanks so much man!"));
_local1.push(new CutsceneNode(null, "closed", "happy"));
_local2.push(new CutsceneNode("You're such a great guy!"));
_local1.push(new CutsceneNode(null, "closed", "happy"));
_local2.push(new CutsceneNode("I'd better go see Anita."));
return (new Cutscene("mainChar_bag", "drunk", _local1, _local2, mainCharClr, drunkClr, _shooter));
}
public function get OLDMAN_INTRO_1():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Yes? Whaddaya want?"));
_local1.push(new CutsceneNode("Uh, mail for you.", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("It's very late!"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Try to be on time next time."));
_local1.push(new CutsceneNode("The last mailman was shot down.", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("So they say."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Sounds like an excuse to me."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Deliver this package to Gareth Beaumains."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Try not to lose it."));
_local1.push(new CutsceneNode("Okay, dude!", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "angry"));
_local2.push(new CutsceneNode("Hrmf."));
return (new Cutscene("mainChar_letter", "oldman", _local1, _local2, mainCharClr, oldmanClr, _shooter));
}
public function get OLDMAN_INTRO_2():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("I've got a package for you \nfrom Sam Loxdale.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Oh, a new toy! Thanks."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Sam wasn't too grumpy was he?"));
_local1.push(new CutsceneNode("Yeh. Pretty grumpy.", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Just ignore him. \nThe rest of us do."));
return (new Cutscene("mainChar_letter", "nerd", _local1, _local2, mainCharClr, nerdClr, _shooter));
}
public function get MECHANIC_HELP():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("See anything you like?"));
_local1.push(new CutsceneNode("I need more firepower.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("There's a lot of things \ntrying to kill me out there.", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Well, click on any of the \n'+' buttons to power \nup your ship or gun."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Once you've powered up your gun, \nclick the gun cards beneath it to \nchoose your firepower."));
_local1.push(new CutsceneNode("Thanks!", "grin", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Hey, good luck!"));
return (new Cutscene("mainChar_bag", "mechanic", _local1, _local2, mainCharClr, 0x555555, _main));
}
public function get GRANNY_LITTLEGIRL_2():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Hey there!", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("I've got a letter for you.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Oh, it's from my gramma!"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I haven't gotten a letter from her \nsince that nasty new prefect came here."));
_local1.push(new CutsceneNode("Really?", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("What has he done?", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Mummy says he killed the old postman!"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("You'd better be careful, mister."));
return (new Cutscene("mainChar_letter", "littlegirl", _local1, _local2, mainCharClr, littlegirlClr, _shooter));
}
public function get GRANNY_OLDMAN_2():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Letter from Maggie Darinsson", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Heheha."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I wonder what the fox has written?"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Hehe."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Well? Here's a reply."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Now get lost!"));
return (new Cutscene("mainChar_letter", "oldman", _local1, _local2, mainCharClr, oldmanClr, _shooter));
}
public function get GRANNY_OLDMAN_3():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Letter for you Ms. Darinsson.", "open", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "happy"));
_local2.push(new CutsceneNode("Oh, who from?"));
_local1.push(new CutsceneNode("Your friend Sam Loxd--", "smile", "happy"));
_local2.push(new CutsceneNode("Oh! Thanks! Bye now."));
return (new Cutscene("mainChar_letter", "granny", _local1, _local2, mainCharClr, grannyClr, _shooter));
}
public function get GRANNY_OLDMAN_1():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Your mail, mam! Sorry about the de-", "grin", "happy"));
_local2.push(new CutsceneNode("Oh, thanks luv!"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("I have a letter \nor two for you as well."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Want to come in for a cuppa?"));
_local1.push(new CutsceneNode("No thanks, \nI've gotta be on my way.", "open", "norm"));
_local2.push(new CutsceneNode(null));
return (new Cutscene("mainChar_letter", "granny", _local1, _local2, mainCharClr, grannyClr, _shooter));
}
public function get MAINSTORY_BOOKDELIVER_1():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Book from Edith.", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Oh, thanks so much man."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Want a drink?"));
_local1.push(new CutsceneNode("Sorry, I've got more \nthings to deliver.", "open", "norm"));
_local2.push(new CutsceneNode(null));
return (new Cutscene("mainChar_bag", "drunk", _local1, _local2, mainCharClr, drunkClr, _shooter));
}
public function get MAINSTORY_BOOKDELIVER_2():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Package from Edith.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("My subscription to \nMechanics Monthly!"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Thanks!"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("How's your ship holding up?"));
_local1.push(new CutsceneNode("Well it's survived \nfor this long!", "grin", "norm"));
_local2.push(new CutsceneNode(null));
return (new Cutscene("mainChar_bag", "mechanic", _local1, _local2, mainCharClr, 4018789, _shooter));
}
public function get MAINSTORY_BOOKDELIVER_3():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Hello dearie!"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("What do you have there?"));
_local1.push(new CutsceneNode("Your daughter gave me a book to deliver.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Oh, thanks much!"));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("It's the new Lotte Love book \nI've been waiting for."));
return (new Cutscene("mainChar_bag", "granny", _local1, _local2, mainCharClr, grannyClr, _shooter));
}
public function get SHERRIF_EXPOSITION():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("This is an awful long way out.", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null, "closed", "norm"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I didn't want to put you in any danger.", "open", "norm"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("The prefect tends to hear \nwhen people talk behind his back.", "open", "norm"));
_local1.push(new CutsceneNode("So.. What's going on here?", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null, "closed", "norm"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("It's true that the previous \nmailman was killed by the prefect.", "open", "norm"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Unlike most of the people here, \nhe had a ship...", "open", "norm"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("and a cover for bringing messages \nto resistance members.", "open", "norm"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("We haven't been able to \ncommunicate since he was shot down.", "open", "angry"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("If you want to help, \nvisit Gareth Beaumains.", "open", "happy"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("He may not look much but Gareth \ngenerally knows what to do next.", "grin", "happy"));
_local1.push(new CutsceneNode("Maybe I will.", "hmm", "norm"));
_local2.push(new CutsceneNode(null, "closed", "norm"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Good luck!", "grin", "happy"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("And be careful. One sherrif can only \ndo so much out here.", "open", "angry"));
return (new Cutscene("mainChar_stand", "sherrif_armup", _local1, _local2, mainCharClr, sherrifClr, _shooter));
}
public function get MAINSTORY_2():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("I exploded the mines.", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("You didn't tell me they \nwould be armed though!", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Oh yes, I'm sorry about that."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("It must have slipped my mind."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Oh well. No harm done."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("You're still in \none piece though?"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("And I must thank you for completing \nthe task with such speed."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Now, I have a letter for \nyou to deliver."));
_local1.push(new CutsceneNode("Right.", "unhappy_talk", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("The mail must get through!"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Right?"));
return (new Cutscene("mainChar_stand", "nerd", _local1, _local2, mainCharClr, nerdClr, _shooter));
}
public function get MAINSTORY_4():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Hello again. What's this?"));
_local1.push(new CutsceneNode("Message from Sam Loxdale.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Hmm... he needs plans \nfor a McGuffin device."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("I don't have those on me..."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("I'll send a message to the \nlibrary in the Capitol."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("While we're waiting for that to arrive..."));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("I have a few books that \nneed to be delivered."));
_local1.push(new CutsceneNode("Okay! I'll take those \nplans straight over to \nSam when they arrive", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Good lad."));
return (new Cutscene("mainChar_letter", "librarian", _local1, _local2, mainCharClr, librarianClr, _shooter));
}
public function get MAINSTORY_5():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Ah, that's how it works."));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("Done! Take this \nstraight to Gareth"));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("And don't lose it!!"));
_local1.push(new CutsceneNode("Righto!", "grin", "norm"));
_local2.push(new CutsceneNode(null));
return (new Cutscene("mainChar_letter", "oldman", _local1, _local2, mainCharClr, oldmanClr, _shooter));
}
public function get MAINSTORY_7():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("I have destro-", "grin", "happy"));
_local2.push(new CutsceneNode(null, "smile"));
_local1.push(new CutsceneNode("oh...", "hmm", "happy"));
_local2.push(new CutsceneNode(null, "smile"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("Hello there!", "smile"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("It seems I have another \nrenagade mailman on my hands.", "smile"));
_local1.push(new CutsceneNode("Where's Gareth?", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null, "straight"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("I shot him down as he \ntried to defend his island.", "smile"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("As I will now do to you.", "smile"));
return (new Cutscene("mainChar_letter", "prefect", _local1, _local2, mainCharClr, prefectClr, _shooter));
}
public function get MAINSTORY_1():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Hello?.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("Sherrif Brennan said I \nshould come see you.", "open", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Yes, she said you would \nbe coming to visit."));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("The prefect's grip on our land \nhas gone on too long."));
_local1.push(new CutsceneNode(null, "hmm", "happy"));
_local2.push(new CutsceneNode("If you help us, you will \nnot be just a message boy."));
_local1.push(new CutsceneNode(null, "hmm", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("He has been mining our \nislands for minerals \nthat will power his army."));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("He plans to eventually \nconquer the entire kingdom."));
_local1.push(new CutsceneNode("I'm willing to fight...", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode("Though the mail must \nstill get through.", "unhappy_talk", "angry"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Good!"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("The Prefect has three mining \noperations currently active."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I would like to mail bombs to them!"));
return (new Cutscene("mainChar_stand", "nerd", _local1, _local2, mainCharClr, nerdClr, _shooter));
}
public function get MAINSTORY_3():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Hello Sam!", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "happy"));
_local2.push(new CutsceneNode("What do yeh want now?"));
_local1.push(new CutsceneNode("Letter for you \nfrom Gareth Beaumains.", "grin", "happy"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Hmm..."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("This will take some time. \nBut I have a letter for you."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Come back and see me when Edith \nhas given you a reply."));
_local1.push(new CutsceneNode("Okay, will do!", "open", "norm"));
_local2.push(new CutsceneNode(null));
return (new Cutscene("mainChar_letter", "oldman", _local1, _local2, mainCharClr, oldmanClr, _shooter));
}
public function get SHERRIF_INTRO():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("Sherrif Brennan?", "open", "happy"));
_local2.push(new CutsceneNode(null, "smile", "norm"));
_local1.push(new CutsceneNode(null, "closed", "happy"));
_local2.push(new CutsceneNode("That's me!", "grin", "norm"));
_local1.push(new CutsceneNode(null, "closed", "happy"));
_local2.push(new CutsceneNode("Faye Brennan. And you are?", "open", "norm"));
_local1.push(new CutsceneNode("I'm the new mailman.", "grin", "norm"));
_local2.push(new CutsceneNode(null, "closed", "norm"));
_local1.push(new CutsceneNode("Edith Proust said I \nshould meet you.", "grin", "norm"));
_local2.push(new CutsceneNode(null, "closed", "norm"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("I'm going on patrol in \nthe Wastes this afternoon.", "open", "angry"));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("Why don't you come with?", "open", "angry"));
return (new Cutscene("mainChar_stand", "sherrif_stand", _local1, _local2, mainCharClr, sherrifClr, _shooter));
}
public function get GAME_END():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode("So, Prefect Bathau...", "open", "norm"));
_local2.push(new CutsceneNode(null, "straight"));
_local1.push(new CutsceneNode("Where's your army now?", "grin", "angry"));
_local2.push(new CutsceneNode(null, "straight"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("You may have defeated me \nthis time, Postman.", "straight"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("But I will be back.", "smile"));
_local1.push(new CutsceneNode(null, "hmm", "angry"));
_local2.push(new CutsceneNode("I will put an end to your meddling!", "smile"));
_local1.push(new CutsceneNode("But until you do, \nthe mail will get through!", "grin", "happy"));
_local2.push(new CutsceneNode(null, "straight"));
return (new Cutscene("mainChar_stand", "prefect", _local1, _local2, mainCharClr, prefectClr, _main));
}
public function get GAME_INTRO():Cutscene{
var _local1:Array;
var _local2:Array;
_local1 = new Array();
_local2 = new Array();
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("You there!"));
_local1.push(new CutsceneNode("Yes Postmaster, sir!", "grin", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "smile", "norm"));
_local2.push(new CutsceneNode("The mailman from Keltwall Prefecture\n has gone missing."));
_local1.push(new CutsceneNode(null, "closed", "norm"));
_local2.push(new CutsceneNode("You're being sent to replace him."));
_local1.push(new CutsceneNode("Yes sir!", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Meet with the Prefect there first."));
_local1.push(new CutsceneNode("Yes sir!", "unhappy_talk", "norm"));
_local2.push(new CutsceneNode(null));
_local1.push(new CutsceneNode(null, "hmm", "norm"));
_local2.push(new CutsceneNode("Good luck!"));
return (new Cutscene("mainChar_stand", "postmaster", _local1, _local2, mainCharClr, 2045764, _main));
}
}
}//package
Section 27
//CutsceneText (CutsceneText)
package {
import flash.display.*;
import flash.text.*;
public class CutsceneText extends Sprite {
private static var bgAlpha:Number = 0.9;
private static var margin:Number = 7;
public function CutsceneText(_arg1:String, _arg2:uint=0xFFFFFF){
var _local3:TextFormat;
var _local4:TextField;
var _local5:Object;
var _local6:Number;
super();
_local3 = new TextFormat();
_local3.color = 0;
_local3.size = 12;
_local3.bold = true;
_local3.font = "Verdana";
_local4 = new TextField();
_local4.autoSize = "left";
_local4.defaultTextFormat = _local3;
_local4.selectable = false;
_local5 = convertToRGB(_arg2);
_local6 = (((((_local5.r + _local5.g) + _local5.b) / 0xFF) * 3) / 10);
if (_local6 < 0.5){
_local4.textColor = 0xFFFFFF;
} else {
_local4.textColor = 0;
};
_local4.text = _arg1;
addChild(_local4);
this.graphics.beginFill(_arg2, bgAlpha);
this.graphics.lineStyle(1, 0);
this.graphics.drawRoundRect(-(margin), -(margin), (_local4.width + (margin * 2)), (_local4.height + (margin * 2)), 4, 4);
this.graphics.endFill();
}
function convertToRGB(_arg1:Number){
var _local2:Object;
var _local3:Number;
_local2 = new Object();
_local2.r = (_arg1 >> 16);
_local3 = (_arg1 ^ (_local2.r << 16));
_local2.g = (_local3 >> 8);
_local2.b = (_local3 ^ (_local2.g << 8));
return (_local2);
}
}
}//package
Section 28
//DemoImg (DemoImg)
package {
import flash.display.*;
public dynamic class DemoImg extends MovieClip {
}
}//package
Section 29
//DifficultyStamp (DifficultyStamp)
package {
import flash.display.*;
public dynamic class DifficultyStamp extends MovieClip {
public function DifficultyStamp(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 30
//DoneButton (DoneButton)
package {
import flash.display.*;
public dynamic class DoneButton extends MovieClip {
}
}//package
Section 31
//DropArrow (DropArrow)
package {
import flash.display.*;
public dynamic class DropArrow extends MovieClip {
}
}//package
Section 32
//Enemy (Enemy)
package {
import flash.display.*;
import flash.geom.*;
public class Enemy extends Sprite {
private var shootDelayCurr:int;// = 0
private var px:Number;// = 0
private var py:Number;// = 0
private var hp:Number;// = 5
private var gunOffX:int;// = 0
private var gunOffY:int;// = 0
private var type:String;
private var speed:Number;// = 1
private var p;
private var e;
private var shootDelay:int;// = 0
private var behaveY:Array;
private var behaveX:Array;
private var _damage:Number;// = 1
private var behaveChange:Number;// = 0.05
private var vx:Number;// = -1
private var vy:Number;// = 0
private var dropType:String;// = "coinBig"
private var deadRot:Number;// = 0
private var takeDamage:Boolean;// = false
private var gunArray:Array;
private var behaveCurr:Number;// = 0
public function Enemy(_arg1:String, _arg2:Number, _arg3:Number, _arg4, _arg5:String="coin"){
vx = -1;
vy = 0;
px = 0;
py = 0;
speed = 1;
behaveX = new Array();
behaveY = new Array();
behaveCurr = 0;
behaveChange = 0.05;
shootDelay = 0;
shootDelayCurr = 0;
gunOffX = 0;
gunOffY = 0;
gunArray = new Array();
dropType = "coinBig";
_damage = 1;
hp = 5;
deadRot = 0;
takeDamage = false;
super();
type = _arg1;
setEnemyType(type);
addChild(e);
px = _arg2;
py = _arg3;
this.x = px;
this.y = py;
p = _arg4;
dropType = _arg5;
}
public function play():void{
if (type != "mine"){
e.play();
};
}
public function stop():void{
e.stop();
}
private function behaveSine(_arg1:Number, _arg2:Number, _arg3:int):Array{
var _local4:Array;
var _local5:int;
_local4 = new Array();
_local5 = 0;
while (_local5 < _arg3) {
_local4.push(((Math.sin((((_local5 / _arg3) * Math.PI) * 2)) * _arg2) + _arg1));
_local5++;
};
return (_local4);
}
public function get damage():Number{
return (_damage);
}
private function setEnemyType(_arg1:String):void{
if (_arg1 == "crate"){
e = new Crate();
speed = 0.5;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.5, 16);
behaveChange = 0.2;
hp = 7;
_damage = 0;
};
if (_arg1 == "guncrate"){
e = new GunCrate();
speed = 0.5;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.5, 16);
behaveChange = 0.2;
hp = 7;
_damage = 0;
};
if (_arg1 == "squid"){
e = new EnemySquid();
speed = 2;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.3, 16);
behaveChange = 0.1;
hp = 7;
_damage = 3;
};
if (_arg1 == "buzzard"){
e = new EnemyBuzzard();
speed = 4;
behaveX = behaveStraightLine(-1, 8);
behaveY = behaveSine(0, 0.35, 8);
behaveChange = 0.1;
hp = 0.5;
_damage = 1;
};
if (_arg1 == "skimmer"){
e = new EnemySkimmer();
speed = 3;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.6, 16);
behaveChange = 0.1;
hp = 0.5;
_damage = 0.5;
};
if (_arg1 == "cannon"){
e = new EnemyCannon();
speed = 1;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.7, 16);
behaveChange = 0.2;
hp = 15;
gunOffX = -20;
gunOffY = 22;
_damage = 5;
gunArray.push(new Gun("plasma", 100, 0, 2, 2));
};
if (_arg1 == "lazer"){
e = new EnemyLazer();
speed = 1.3;
behaveX = behaveSine(-1, 1, 16);
behaveY = behaveStraightLine(0, 16);
behaveChange = 0.3;
hp = 10;
_damage = 2;
gunArray.push(new Gun("lazer", 125, 0, 3, 10));
};
if (_arg1 == "mine"){
e = new EnemyMine();
speed = 0.5;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.4, 16);
behaveChange = 0.2;
hp = 5;
_damage = 5;
};
if (_arg1 == "spawn"){
e = new EnemySpawn();
speed = 0.6;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.1, 16);
behaveChange = 0.5;
hp = 25;
_damage = 3;
gunArray.push(new Gun("skimmer", 20, 0, 0, 0));
};
if (_arg1 == "prefectSpike"){
e = new EnemyPrefectSpike();
speed = 4;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveSine(0, 0.1, 16);
behaveChange = 0.1;
hp = 30;
_damage = 3;
};
if (_arg1 == "prefectGun"){
e = new EnemyPrefectGun();
speed = 1.5;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveStraightLine(0, 16);
behaveChange = 0.1;
hp = 30;
_damage = 3;
gunArray.push(new Gun("mgun", 10, 8, 1, 3));
gunArray.push(new Gun("mgun", 10, -8, 1, 3));
};
if (_arg1 == "prefectBigGun"){
e = new EnemyPrefectBigGun();
speed = 2;
behaveX = behaveStraightLine(-1, 16);
behaveY = behaveStraightLine(0, 16);
behaveChange = 0.1;
hp = 40;
gunOffX = -10;
gunOffY = 2;
_damage = 3;
gunArray.push(new Gun("littleRocket", 5, 10, 0.7, 4));
gunArray.push(new Gun("medRocket", 16, 0, 4, 4));
gunArray.push(new Gun("littleRocket", 5, -10, 0.7, 4));
};
behaveCurr = (Math.random() * behaveX.length);
if (_arg1 == "skimmer"){
behaveCurr = 4;
};
shootDelayCurr = shootDelay;
deadRot = ((Math.random() * 4) - 2);
}
public function updateDead():void{
var _local1:ColorTransform;
vy = (vy + 0.1);
px = (px + vx);
py = (py + vy);
this.x = px;
this.y = py;
this.rotation = (this.rotation + deadRot);
e.stop();
_local1 = new ColorTransform();
_local1.redMultiplier = 0.5;
_local1.blueMultiplier = 0.5;
_local1.greenMultiplier = 0.5;
this.transform.colorTransform = _local1;
}
public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:int;
var _local4:ColorTransform;
var _local5:Gun;
behaveCurr = (behaveCurr + behaveChange);
if (behaveCurr >= behaveX.length){
behaveCurr = 0;
};
vx = (behaveX[Math.floor(behaveCurr)] * speed);
vy = (behaveY[Math.floor(behaveCurr)] * speed);
px = (px + vx);
py = (py + vy);
this.x = px;
this.y = py;
_local4 = new ColorTransform();
if (takeDamage){
_local4.redOffset = 230;
_local4.blueOffset = 170;
_local4.greenOffset = 50;
takeDamage = false;
};
this.transform.colorTransform = _local4;
_local3 = 0;
while (_local3 < gunArray.length) {
_local5 = gunArray[_local3];
if (_local5.ready){
if (_local5.type != "skimmer"){
p.addEnemyBullet(new Point((x + gunOffX), (y + gunOffY)), (180 + _local5.angle), _local5.type, _local5.damage, _local5.velo);
} else {
p.spawnEnemy("skimmer", (px + 20), (py + 20), "none");
shootDelayCurr = shootDelay;
};
};
_local3++;
};
}
public function get alive():Boolean{
if (hp > 0){
return (true);
};
return (false);
}
private function behaveStraightLine(_arg1:Number, _arg2:int):Array{
var _local3:Array;
var _local4:int;
_local3 = new Array();
_local4 = 0;
while (_local4 < _arg2) {
_local3.push(_arg1);
_local4++;
};
return (_local3);
}
public function testForBullets(_arg1:Array):void{
var _local2:int;
_local2 = 0;
while (_local2 < _arg1.length) {
if (this.hitTestPoint(_arg1[_local2].x, _arg1[_local2].y, false)){
giveDamage(_arg1[_local2].damage);
parent.removeChild(_arg1[_local2]);
_arg1.splice(_local2, 1);
p.playSoundHit();
};
_local2++;
};
}
public function giveDamage(_arg1:Number):void{
if (hp > 0){
hp = (hp - _arg1);
takeDamage = true;
if (hp <= 0){
p.addPickup(this, dropType);
if (type == "mine"){
e.gotoAndPlay("explode");
};
p.playSoundEnemyDie();
};
};
}
}
}//package
Section 33
//EnemyBuzzard (EnemyBuzzard)
package {
import flash.display.*;
public dynamic class EnemyBuzzard extends MovieClip {
}
}//package
Section 34
//EnemyCannon (EnemyCannon)
package {
import flash.display.*;
public dynamic class EnemyCannon extends MovieClip {
}
}//package
Section 35
//EnemyLazer (EnemyLazer)
package {
import flash.display.*;
public dynamic class EnemyLazer extends MovieClip {
}
}//package
Section 36
//EnemyMine (EnemyMine)
package {
import flash.display.*;
public dynamic class EnemyMine extends MovieClip {
public function EnemyMine(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 37
//EnemyPrefectBigGun (EnemyPrefectBigGun)
package {
import flash.display.*;
public dynamic class EnemyPrefectBigGun extends MovieClip {
}
}//package
Section 38
//EnemyPrefectGun (EnemyPrefectGun)
package {
import flash.display.*;
public dynamic class EnemyPrefectGun extends MovieClip {
}
}//package
Section 39
//EnemyPrefectSpike (EnemyPrefectSpike)
package {
import flash.display.*;
public dynamic class EnemyPrefectSpike extends MovieClip {
}
}//package
Section 40
//EnemySkimmer (EnemySkimmer)
package {
import flash.display.*;
public dynamic class EnemySkimmer extends MovieClip {
}
}//package
Section 41
//EnemySpawn (EnemySpawn)
package {
import flash.display.*;
public dynamic class EnemySpawn extends MovieClip {
}
}//package
Section 42
//EnemySquid (EnemySquid)
package {
import flash.display.*;
public dynamic class EnemySquid extends MovieClip {
}
}//package
Section 43
//EnvelopeImg (EnvelopeImg)
package {
import flash.display.*;
public dynamic class EnvelopeImg extends MovieClip {
}
}//package
Section 44
//EnvelopeSmallImg (EnvelopeSmallImg)
package {
import flash.display.*;
public dynamic class EnvelopeSmallImg extends MovieClip {
}
}//package
Section 45
//Explosion (Explosion)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Explosion extends Sprite {
var life:int;// = 100
public function Explosion(_arg1:Number, _arg2:Number){
var _local3:Timer;
life = 100;
super();
addChild(new ExplosionImg());
this.x = _arg1;
this.y = _arg2;
_local3 = new Timer(300, 1);
_local3.addEventListener(TimerEvent.TIMER_COMPLETE, removeDisplay);
_local3.start();
}
private function removeDisplay(_arg1:TimerEvent):void{
parent.removeChild(this);
}
}
}//package
Section 46
//ExplosionImg (ExplosionImg)
package {
import flash.display.*;
public dynamic class ExplosionImg extends MovieClip {
}
}//package
Section 47
//FontHandwriting (FontHandwriting)
package {
import flash.text.*;
public dynamic class FontHandwriting extends Font {
}
}//package
Section 48
//FPS (FPS)
package {
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class FPS extends TextField {
private var ms:int;
private var fs:int;
private var _theFps:int;
public function FPS(){
var _local1:TextFormat;
super();
_local1 = new TextFormat();
_local1.color = 0;
_local1.size = 10;
_local1.bold = true;
_local1.font = "Verdana";
textColor = 0xCECECE;
autoSize = "left";
defaultTextFormat = _local1;
ms = getTimer();
fs = 0;
selectable = false;
addEventListener(Event.ADDED, onAdded);
addEventListener(Event.REMOVED, onRemoved);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onRemoved(_arg1:Event):void{
stage.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onAdded(_arg1:Event):void{
stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(_arg1:Event):void{
if ((getTimer() - 1000) > ms){
ms = getTimer();
text = Math.floor((fs / 2)).toString();
_theFps = Math.floor((fs / 2));
fs = 0;
} else {
fs++;
};
}
public function get fps():int{
return (_theFps);
}
}
}//package
Section 49
//GameLevel (GameLevel)
package {
public class GameLevel {
private var _delay:int;// = 0
private var _currentWave:int;// = 0
private var _spawnDelay:int;
private var _enemyList:Array;
public function GameLevel(_arg1:int=300, _arg2:Array=null){
_enemyList = new Array();
_currentWave = 0;
_delay = 0;
super();
_spawnDelay = _arg1;
_delay = 0;
if (_arg2 != null){
_enemyList = _arg2;
};
}
public function get ready():Boolean{
if (_delay < 0){
_delay = _spawnDelay;
return (true);
};
_delay--;
return (false);
}
public function addEnemy(_arg1:String):void{
_enemyList.push(_arg1);
}
public function nextWave():void{
_currentWave++;
}
public function get currentWave():String{
return (_enemyList[_currentWave]);
}
public function set enemies(_arg1:Array):void{
_enemyList = _arg1;
}
public function resetLevel(){
_currentWave = 0;
}
public function get totalWaves():int{
return (_enemyList.length);
}
}
}//package
Section 50
//GorBossGunImg (GorBossGunImg)
package {
import flash.display.*;
public dynamic class GorBossGunImg extends MovieClip {
}
}//package
Section 51
//GorBossImg (GorBossImg)
package {
import flash.display.*;
public dynamic class GorBossImg extends MovieClip {
}
}//package
Section 52
//Gun (Gun)
package {
public class Gun {
private var _delay:Number;// = 0
public var numSelected:int;// = 0
private var _speed:Number;
private var _velo:Number;
private var _angle:Number;
private var _damage:Number;
private var _type:String;
public function Gun(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){
_delay = 0;
numSelected = 0;
super();
_type = _arg1;
_speed = _arg2;
_angle = _arg3;
_damage = _arg4;
_velo = _arg5;
}
public function get delay():Number{
return (_delay);
}
public function get speed():Number{
return (_speed);
}
public function get angle():Number{
return (_angle);
}
public function get ready():Boolean{
if (_delay < 0){
_delay = _speed;
return (true);
};
_delay--;
return (false);
}
public function set angle(_arg1:Number):void{
_angle = _arg1;
}
public function recharge():void{
_delay--;
}
public function get damage():Number{
return (_damage);
}
public function get velo():Number{
return (_velo);
}
public function get type():String{
return (_type);
}
}
}//package
Section 53
//GunCard (GunCard)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class GunCard extends Sprite {
private var card:GunCardImg;
private var _enabled:Boolean;// = true
private var _gun:Gun;
private var selected:Boolean;// = false
private var _id:int;// = 0
public var angle:Number;// = 0
public function GunCard(_arg1:Gun=null, _arg2:Number=0){
_id = 0;
angle = 0;
selected = false;
_enabled = true;
super();
_gun = _arg1;
angle = _arg2;
card = new GunCardImg();
addChild(card);
if (_gun == null){
card.gotoAndStop("blank");
} else {
card.gotoAndStop(_gun.type);
_gun.angle = angle;
};
addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
this.buttonMode = true;
}
public function get id():int{
return (_id);
}
public function get numSelected():int{
if (_gun != null){
return (_gun.numSelected);
};
return (0);
}
public function set id(_arg1:int):void{
_id = _arg1;
}
public function clearMouseFx():void{
var _local1:Number;
removeEventListener(MouseEvent.MOUSE_OVER, mOverButton);
removeEventListener(MouseEvent.MOUSE_OUT, mOutButton);
_local1 = 0.2;
this.transform.colorTransform = new ColorTransform(_local1, _local1, _local1);
_enabled = false;
}
public function set numSelected(_arg1:int):void{
if (_gun != null){
_gun.numSelected = _arg1;
};
}
public function set gun(_arg1:Gun):void{
_gun = _arg1;
if (_gun == null){
card.gotoAndStop("blank");
} else {
card.gotoAndStop(_gun.type);
};
}
private function mOverButton(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = 1.2;
_arg1.target.transform.colorTransform = new ColorTransform(_local2, _local2, _local2);
}
private function mOutButton(_arg1:MouseEvent):void{
_arg1.target.transform.colorTransform = new ColorTransform();
}
public function get gun():Gun{
if (_enabled){
return (_gun);
};
return (null);
}
}
}//package
Section 54
//GunCardImg (GunCardImg)
package {
import flash.display.*;
public dynamic class GunCardImg extends MovieClip {
public function GunCardImg(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 55
//GunCrate (GunCrate)
package {
import flash.display.*;
public dynamic class GunCrate extends MovieClip {
}
}//package
Section 56
//GunImg (GunImg)
package {
import flash.display.*;
public dynamic class GunImg extends MovieClip {
public function GunImg(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 57
//GunShopBg (GunShopBg)
package {
import flash.display.*;
public dynamic class GunShopBg extends MovieClip {
}
}//package
Section 58
//HealthDisplay (HealthDisplay)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class HealthDisplay extends Sprite {
private static var clrHp:uint = 16716049;
private static var clrN:uint = 0x111111;
private static var w:int = 50;
public function HealthDisplay(_arg1:Number){
var _local2:Timer;
super();
if (_arg1 < 0){
_arg1 = 0;
};
this.graphics.beginFill(clrHp);
this.graphics.drawRect((-(w) / 2), 0, (w * _arg1), 2);
this.graphics.endFill();
this.graphics.beginFill(clrN);
this.graphics.drawRect(((-(w) / 2) + (w * _arg1)), 0, (w * (1 - _arg1)), 2);
this.graphics.endFill();
_local2 = new Timer(2000, 1);
_local2.addEventListener(TimerEvent.TIMER, removeDisplay);
_local2.start();
}
private function removeDisplay(_arg1:TimerEvent):void{
parent.removeChild(this);
}
}
}//package
Section 59
//HelpButton (HelpButton)
package {
import flash.display.*;
public dynamic class HelpButton extends MovieClip {
}
}//package
Section 60
//HiScoreDisp (HiScoreDisp)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import CMG_AS3.*;
import flash.net.*;
import flash.geom.*;
import flash.filters.*;
public class HiScoreDisp extends Sprite {
private var hsOutput:TextField;
private var nameInput:TextField;
private var playSound:Boolean;// = true
private var bgImg:Bitmap;
private var submitButton:SubmitButton;
private var fade:Number;// = 0.05
private var _score:int;
private var _parent:Object;
private var _infoArray:Array;
public function HiScoreDisp(_arg1, _arg2:Array, _arg3:int){
bgImg = new Bitmap();
fade = 0.05;
playSound = true;
nameInput = new TextField();
hsOutput = new TextField();
submitButton = new SubmitButton();
super();
_parent = _arg1;
_infoArray = _arg2;
_score = _arg3;
ScoreSubmitter.gameId = 341;
ScoreSubmitter.gameVersion = "1.0";
ScoreSubmitter.gameValidationCode = "poste14ef30c0ba281840f386b5dad4809f1";
addEventListener(Event.ADDED_TO_STAGE, onAdded);
}
function submitButtonClick(_arg1:MouseEvent):void{
var _local2:ScoreSubmitter;
_local2 = new ScoreSubmitter();
_local2.addEventListener(ScoreSubmitter.SCORE_RESPONSE, onScoreResponse);
_local2.submitScore(nameInput.text, new Number(_score));
submitButton.removeEventListener(MouseEvent.CLICK, submitButtonClick);
submitButton.removeEventListener(MouseEvent.MOUSE_OVER, mOverButton);
submitButton.removeEventListener(MouseEvent.MOUSE_OUT, mOutButton);
submitButton.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6);
}
function onScoreResponse(_arg1:ServerResponseEvent):void{
switch (_arg1.returnCode){
case ScoreSubmitter.RETURNCODE_WORKING:
hsOutput.text = "Submitting...";
break;
case ScoreSubmitter.RETURNCODE_SUCCESS:
hsOutput.text = "Your score has been submitted!";
ScoreSubmitter.loadHighScorePage();
break;
case ScoreSubmitter.RETURNCODE_REJECTED:
hsOutput.text = "The server rejected your score!";
break;
case ScoreSubmitter.RETURNCODE_WRONGVERSION:
hsOutput.text = "This is the wrong version of the game. Check for the newest version at CrazyMonkeyGames.com";
ScoreSubmitter.loadUpdatePage();
break;
case ScoreSubmitter.RETURNCODE_NETWORKERROR:
hsOutput.text = "Your score could not reach the server at this time.";
break;
default:
hsOutput.text = ("Unknown error " + _arg1.returnCode);
break;
};
}
private function onAdded(_arg1:Event):void{
var _local2:Sprite;
var _local3:TextFormat;
var _local4:TextField;
var _local5:int;
var _local6:TextField;
var _local7:Number;
var _local8:ScoresButton;
var _local9:DoneButton;
var _local10:PlayMoreGames;
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
_parent = this.parent;
bgImg.bitmapData = new BitmapData(600, 300, false, 0);
bgImg.bitmapData.draw(this.parent);
bgImg.bitmapData.applyFilter(bgImg.bitmapData, new Rectangle(0, 0, 600, 300), new Point(0, 0), new BlurFilter(8, 8, 5));
addChild(bgImg);
bgImg.alpha = 0;
addEventListener(Event.ENTER_FRAME, run, false, 0, true);
_local2 = new Sprite();
addChild(_local2);
_local3 = new TextFormat();
_local3.color = 0xFFFFFF;
_local3.size = 14;
_local3.bold = true;
_local3.font = "Verdana";
_local4 = new TextField();
addChild(_local4);
_local4.selectable = false;
_local4.autoSize = "left";
_local4.defaultTextFormat = _local3;
_local5 = 0;
while (_local5 < _infoArray.length) {
_local4.appendText((_infoArray[_local5] + "\n"));
_local5++;
};
_local4.x = 50;
_local4.y = 50;
_local6 = new TextField();
addChild(_local6);
_local6.selectable = false;
_local6.autoSize = "left";
_local6.defaultTextFormat = _local3;
_local6.text = "Name:";
_local6.x = ((_local4.x + _local4.width) + 40);
_local6.y = 50;
addChild(nameInput);
nameInput.type = "input";
nameInput.width = 130;
nameInput.height = 21;
nameInput.defaultTextFormat = _local3;
nameInput.x = ((_local6.x + _local6.width) + 20);
nameInput.y = 50;
_local7 = 5;
_local2.graphics.beginFill(0, 0.8);
_local2.graphics.drawRoundRect((_local4.x - _local7), (_local4.y - _local7), (_local4.width + (_local7 * 2)), (_local4.height + (_local7 * 2)), 6, 6);
_local2.graphics.drawRoundRect((_local6.x - _local7), (_local6.y - _local7), (_local6.width + (_local7 * 2)), (_local6.height + (_local7 * 2)), 6, 6);
_local2.graphics.endFill();
_local2.graphics.beginFill(10040115, 0.8);
_local2.graphics.drawRoundRect((nameInput.x - _local7), (nameInput.y - _local7), (nameInput.width + (_local7 * 2)), (nameInput.height + (_local7 * 2)), 6, 6);
_local2.graphics.endFill();
addChild(submitButton);
submitButton.x = (_local6.x - 5);
submitButton.y = 90;
submitButton.buttonMode = true;
submitButton.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
submitButton.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
submitButton.addEventListener(MouseEvent.CLICK, submitButtonClick, false, 0, true);
_local8 = new ScoresButton();
addChild(_local8);
_local8.x = (submitButton.x + submitButton.width);
_local8.y = 90;
_local8.buttonMode = true;
_local8.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local8.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local8.addEventListener(MouseEvent.CLICK, showScores, false, 0, true);
addChild(hsOutput);
hsOutput.x = (submitButton.x + 3);
hsOutput.y = (submitButton.y + submitButton.height);
hsOutput.autoSize = "left";
hsOutput.selectable = false;
_local9 = new DoneButton();
addChild(_local9);
_local9.x = ((_local8.x + _local8.width) - _local9.width);
_local9.y = ((_local8.y + _local8.height) + 5);
_local9.buttonMode = true;
_local9.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local9.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local9.addEventListener(MouseEvent.CLICK, exitScores, false, 0, true);
_local10 = new PlayMoreGames();
addChild(_local10);
_local10.addEventListener(MouseEvent.CLICK, openCMG, false, 0, true);
_local10.buttonMode = true;
}
private function mOverButton(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Sound_ButtonOver;
_local2 = 1.2;
_arg1.target.transform.colorTransform = new ColorTransform(_local2, _local2, _local2);
if (_parent.playSound){
_local3 = new Sound_ButtonOver();
_local3.play();
};
}
private function mOutButton(_arg1:MouseEvent):void{
_arg1.target.transform.colorTransform = new ColorTransform();
}
private function showScores(_arg1:MouseEvent):void{
ScoreSubmitter.loadHighScorePage();
}
private function run(_arg1:Event):void{
if (bgImg.alpha < 1){
bgImg.alpha = (bgImg.alpha + 0.05);
} else {
removeEventListener(Event.ENTER_FRAME, run);
};
}
private function openCMG(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://crazymonkeygames.com"), "_blank");
}
private function exitScores(_arg1:MouseEvent):void{
parent.removeChild(this);
}
}
}//package
Section 61
//HouseImg (HouseImg)
package {
import flash.display.*;
public dynamic class HouseImg extends MovieClip {
}
}//package
Section 62
//IntroScreen (IntroScreen)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import CMG_AS3.*;
import flash.net.*;
import flash.geom.*;
import flash.ui.*;
public class IntroScreen extends Sprite {
var preload:PreLoad;
var bgArray:Array;
var shooterGame:ShooterMain;
var playSound:Boolean;// = true
var pullMenu:PullDownMenu;
var bitArray:Array;
var scrArray:Array;
var musicPlayer:MusicLoop;
var playMusic:Boolean;// = true
var stageWidth:int;// = 600
var textFormat:TextFormat;
var score:int;// = 0
var stageHeight:int;// = 300
var saveData:SharedObject;
var loaderTF:TextField;
var scoreDisplay:ScoreDisplay;
var demoImg:DemoImg;
var fps:FPS;
var game:Main;
var menuHolder:Sprite;
public function IntroScreen(){
var _local1:*;
fps = new FPS();
bgArray = new Array();
scrArray = new Array();
bitArray = new Array();
stageWidth = 600;
stageHeight = 300;
demoImg = new DemoImg();
score = 0;
scoreDisplay = new ScoreDisplay();
playSound = true;
playMusic = true;
textFormat = new TextFormat();
loaderTF = new TextField();
super();
stage.quality = "high";
addChild(new WoodBg());
preload = new PreLoad(this);
addChild(preload);
_local1 = new ContextMenu();
_local1.hideBuiltInItems();
contextMenu = _local1;
}
public function toggleSound():void{
if (playSound){
playSound = false;
} else {
playSound = true;
};
if (shooterGame != null){
shooterGame.playSound = playSound;
};
if (game != null){
game.toggleSound();
};
}
private function newGameButtonPress(_arg1:MouseEvent):void{
saveData.data.slot1 = new Object();
saveData.data.slot1.spliceArray = new Array();
saveData.data.slot1.score = 0;
saveData.data.slot1.totalScore = 0;
saveData.data.slot1.gunLevel = 1;
saveData.data.slot1.armorLevel = 1;
saveData.data.slot1.speedLevel = 1;
saveData.data.slot1.gunArray = new Array();
saveData.data.slot1.gunArray.push(1);
startGame(saveData.data.slot1);
}
public function cutsceneDone():void{
}
public function toggleMusic():void{
if (playMusic){
playMusic = false;
} else {
playMusic = true;
};
musicPlayer.playing = playMusic;
}
public function exitGame():void{
if (game != null){
game.exitGame();
};
pullMenu.pullDist = 60;
musicPlayer.playSong("NONE");
}
public function displaySurvivalStats(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
var _local6:Array;
var _local7:HiScoreDisp;
stage.quality = "high";
_local6 = new Array();
_local6.push(("You scored " + _arg1));
_local6.push((("Survived " + _arg5) + " waves of enemies."));
_local6.push((("Killed " + _arg2) + " enemies."));
_local6.push((("Fired " + _arg3) + " bullets,"));
_local6.push((("with an accuracy of " + _arg4) + "%"));
_local7 = new HiScoreDisp(this, _local6, _arg1);
addChild(_local7);
}
public function buildMissionScreen(){
makeMenu();
removeChild(scoreDisplay);
score = 0;
}
public function makeMenu():void{
var titleText:TitleImg;
var newGame:NewGameButton;
var loadGame:LoadGameButton;
var survButton:SurvivalModeButton;
var viewButton:ScoresButton;
var help:HelpButton;
var webLink:IWILL_Web;
var playMore:PlayMoreGames;
stage.quality = "high";
menuHolder = new Sprite();
addChildAt(menuHolder, getChildIndex(fps));
titleText = new TitleImg();
titleText.x = 300;
titleText.y = 5;
menuHolder.addChild(titleText);
newGame = new NewGameButton();
newGame.x = ((300 - newGame.width) - 4);
newGame.y = 150;
newGame.buttonMode = true;
newGame.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
newGame.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
newGame.addEventListener(MouseEvent.CLICK, newGameButtonPress, false, 0, true);
menuHolder.addChild(newGame);
loadGame = new LoadGameButton();
loadGame.x = 300;
loadGame.y = 150;
menuHolder.addChild(loadGame);
if (saveData.data.slot1.spliceArray.length != 0){
loadGame.buttonMode = true;
loadGame.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
loadGame.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
loadGame.addEventListener(MouseEvent.CLICK, startButtonPress, false, 0, true);
} else {
loadGame.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6);
};
survButton = new SurvivalModeButton();
survButton.x = (300 - survButton.width);
survButton.y = 190;
survButton.buttonMode = true;
survButton.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
survButton.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
survButton.addEventListener(MouseEvent.CLICK, startSurvivalMode, false, 0, true);
menuHolder.addChild(survButton);
viewButton = new ScoresButton();
viewButton.x = 300;
viewButton.y = 190;
viewButton.buttonMode = true;
viewButton.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
viewButton.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
viewButton.addEventListener(MouseEvent.CLICK, showScores, false, 0, true);
menuHolder.addChild(viewButton);
help = new HelpButton();
help.x = 300;
help.y = 230;
help.buttonMode = true;
help.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
help.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
help.addEventListener(MouseEvent.CLICK, showHelp, false, 0, true);
menuHolder.addChild(help);
webLink = new IWILL_Web();
menuHolder.addChild(webLink);
webLink.buttonMode = true;
webLink.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
navigateToURL(new URLRequest("http://isaacwilliams.net"), "_blank");
}, false, 0, true);
playMore = new PlayMoreGames();
menuHolder.addChild(playMore);
playMore.buttonMode = true;
playMore.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
navigateToURL(new URLRequest("http://crazymonkeygames.com"), "_blank");
}, false, 0, true);
}
private function startGame(_arg1:Object):void{
var _local2:Object;
stage.quality = "low";
removeChild(menuHolder);
_local2 = _arg1;
game = new Main(this, _local2);
addChildAt(game, getChildIndex(fps));
}
private function mOverButton(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Sound_ButtonOver;
_local2 = 1.2;
_arg1.target.transform.colorTransform = new ColorTransform(_local2, _local2, _local2);
if (playSound){
_local3 = new Sound_ButtonOver();
_local3.play();
};
}
private function startSurvivalMode(_arg1:MouseEvent):void{
stage.quality = "low";
if (playMusic){
musicPlayer.playSong("BATTLE");
};
shooterGame = new ShooterMain(new Mission(0, 0, 0, null, null, null, "survival"), this);
addChildAt(shooterGame, getChildIndex(menuHolder));
removeChild(menuHolder);
addChild(scoreDisplay);
pullMenu.pullDist = 60;
}
private function startButtonPress(_arg1:MouseEvent):void{
startGame(saveData.data.slot1);
}
private function showScores(_arg1:MouseEvent):void{
ScoreSubmitter.loadHighScorePage();
}
public function setup():void{
saveData = SharedObject.getLocal("postalpanic");
if (saveData.size == 0){
saveData.data.slot1 = new Object();
saveData.data.slot1.spliceArray = new Array();
saveData.data.slot1.score = 0;
saveData.data.slot1.totalScore = 0;
saveData.data.slot1.gunLevel = 1;
saveData.data.slot1.armorLevel = 1;
saveData.data.slot1.speedLevel = 1;
saveData.data.slot1.gunArray = new Array();
saveData.data.slot1.gunArray.push(1);
};
removeChild(preload);
addChild(fps);
makeMenu();
pullMenu = new PullDownMenu(this);
pullMenu.x = 575;
addChild(pullMenu);
musicPlayer = new MusicLoop();
demoImg.alpha = 0.3;
demoImg.mouseEnabled = false;
ScoreSubmitter.gameId = 341;
ScoreSubmitter.gameVersion = "1.0";
ScoreSubmitter.gameValidationCode = "poste14ef30c0ba281840f386b5dad4809f1";
}
private function mOutButton(_arg1:MouseEvent):void{
_arg1.target.transform.colorTransform = new ColorTransform();
}
private function showHelp(_arg1:MouseEvent):void{
var _local2:Array;
var _local3:Array;
var _local4:Cutscene;
_local2 = new Array();
_local3 = new Array();
_local2.push(new CutsceneNode("Welcome to Postal Panic! \nClick the arrows above this text \nto see the next line \nor skip a cutscene."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("Use the ARROW KEYS \nto move your ship."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("Hold SPACEBAR to shoot your gun."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode(null));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("When you are not shooting, \nyour gun will point in the \ndirection the ship is moving."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("But when you are shooting, \nthe gun will lock into position."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("In story mode click on the \nblueprint to visit the shop."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("At the shop you can upgrade your gun."));
_local3.push(new CutsceneNode(null));
_local2.push(new CutsceneNode("Have fun!."));
_local3.push(new CutsceneNode(null));
_local4 = new Cutscene("mechanic", "none", _local2, _local3, 0x555555, 0, this);
addChild(_local4);
}
}
}//package
Section 63
//IWILL_Web (IWILL_Web)
package {
import flash.display.*;
public dynamic class IWILL_Web extends MovieClip {
}
}//package
Section 64
//IwillLogo (IwillLogo)
package {
import flash.display.*;
public dynamic class IwillLogo extends MovieClip {
}
}//package
Section 65
//Letter (Letter)
package {
import flash.display.*;
public class Letter extends Sprite {
private var rotSpeed:Number;
private var vx:Number;// = 0
private var vy:Number;// = 0
public function Letter(_arg1:Number, _arg2:Number){
var _local3:int;
var _local4:LetterImgs;
vx = 0;
vy = 0;
super();
if (Math.random() < 0.8){
_local3 = Math.floor(((Math.random() * 5) + 1));
} else {
_local3 = Math.floor(((Math.random() * 8) + 1));
};
_local4 = new LetterImgs();
_local4.gotoAndStop(_local3);
addChild(_local4);
vx = _arg1;
vy = _arg2;
rotSpeed = ((Math.random() * 3) - 1.5);
rotation = (Math.random() * 360);
}
public function update():void{
vy = (vy + 0.05);
x = (x + vx);
y = (y + vy);
rotation = (rotation + rotSpeed);
}
}
}//package
Section 66
//LetterButton (LetterButton)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class LetterButton extends Sprite {
private var _mission:Mission;
private var letterImg:EnvelopeSmallImg;
private var _parent:Object;
public function LetterButton(_arg1:Mission, _arg2){
letterImg = new EnvelopeSmallImg();
super();
_parent = _arg2;
_mission = _arg1;
addChild(letterImg);
letterImg.x = (-(letterImg.width) / 2);
this.buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
addEventListener(MouseEvent.MOUSE_OUT, mouseOff, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, loadLevel, false, 0, true);
}
private function mouseOver(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = 1.1;
letterImg.transform.colorTransform = new ColorTransform(_local2, _local2, _local2);
_parent.showLetter(_mission);
}
private function loadLevel(_arg1:MouseEvent):void{
_parent.loadLevel(_mission);
}
private function mouseOff(_arg1:MouseEvent):void{
letterImg.transform.colorTransform = new ColorTransform();
_parent.removeLetter();
}
public function get mission():Mission{
return (_mission);
}
}
}//package
Section 67
//LetterImgs (LetterImgs)
package {
import flash.display.*;
public dynamic class LetterImgs extends MovieClip {
public function LetterImgs(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 68
//LoaderBackground (LoaderBackground)
package {
import flash.display.*;
public dynamic class LoaderBackground extends MovieClip {
}
}//package
Section 69
//LoadGameButton (LoadGameButton)
package {
import flash.display.*;
public dynamic class LoadGameButton extends MovieClip {
}
}//package
Section 70
//LoadingIcon (LoadingIcon)
package {
import flash.display.*;
public dynamic class LoadingIcon extends MovieClip {
}
}//package
Section 71
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.geom.*;
public class Main extends Sprite {
var gunCostMulti:uint;// = 250
var shopTextFormatSmall:TextFormat;
var gunLevel:uint;// = 1
var letter:MissionLetter;
var missionArray:Array;
var firstTimeShop:Boolean;// = false
var selectorAngle:Number;// = 0
var shopHolder:Sprite;
var playSound:Boolean;// = true
var selectorX:Number;// = 0
var bluePrint:BluePrint;
var selectorY:Number;// = 0
var score:int;// = 0
var fullGunArray:Array;
var speedCost:uint;
var allowedGunArray:Array;
var speedCostMulti:uint;// = 200
var playerGunArray:Array;
var shopTextFormat:TextFormat;
var shooterGame:ShooterMain;
var gunCost:uint;
var selectedGunCard:Object;
var playMusic:Boolean;// = true
var armourCost:uint;
var missionCompletedArray:Array;
var speedLevel:uint;// = 1
var missionSelector:Sprite;
var data:Object;
var totalScore:int;
var _parent:Object;
var gunSelectBox:Sprite;
var scoreDisplay:ScoreDisplay;
var armourCostMulti:uint;// = 150
var armourLevel:uint;// = 1
public function Main(_arg1, _arg2:Object){
var _local3:Array;
var _local4:int;
var _local5:Number;
var _local6:Gun;
var _local7:CutscenePack;
var _local8:Cutscene;
missionArray = new Array();
missionCompletedArray = new Array();
missionSelector = new Sprite();
allowedGunArray = new Array();
fullGunArray = new Array();
playerGunArray = new Array();
score = 0;
totalScore = score;
scoreDisplay = new ScoreDisplay();
shopTextFormat = new TextFormat();
shopTextFormatSmall = new TextFormat();
speedLevel = 1;
armourLevel = 1;
gunLevel = 1;
speedCostMulti = 200;
armourCostMulti = 150;
gunCostMulti = 250;
speedCost = ((speedLevel * 2) * speedCostMulti);
armourCost = ((armourLevel * 2) * armourCostMulti);
gunCost = ((gunLevel * 2) * gunCostMulti);
firstTimeShop = false;
selectorX = 0;
selectorY = 0;
selectorAngle = 0;
playSound = true;
playMusic = true;
super();
data = _arg2;
addChild(new WoodBg());
_parent = _arg1;
playSound = _parent.playSound;
playMusic = _parent.playMusic;
fullGunArray.push(null);
fullGunArray.push(new Gun("mgun", 3, 0, 0.5, 5));
fullGunArray.push(new Gun("plasma", 10, 0, 2, 3));
fullGunArray.push(new Gun("lazer", 12, 0, 3, 10));
fullGunArray.push(new Gun("splice", 6, 0, 1, 4));
fullGunArray.push(new Gun("spinningBlade", 8, 0, 2.5, 6));
fullGunArray.push(new Gun("littleRocket", 5, 0, 0.7, 4));
fullGunArray.push(new Gun("medRocket", 16, 0, 4, 4));
fullGunArray.push(new Gun("bigRocket", 24, 0, 10, 3));
missionCompletedArray = data.spliceArray;
score = data.score;
totalScore = data.totalScore;
gunLevel = data.gunLevel;
armourLevel = data.armorLevel;
speedLevel = data.speedLevel;
_local3 = data.gunArray;
playerGunArray = new Array();
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = (((_local4 - (_local3.length / 2)) + 0.5) * 4);
_local6 = fullGunArray[_local3[_local4]];
playerGunArray.push(new Gun(_local6.type, _local6.speed, _local5, _local6.damage, _local6.velo));
_local4++;
};
setup();
if (missionCompletedArray.length == 0){
_local7 = new CutscenePack(this, shooterGame);
_local8 = _local7.GAME_INTRO;
addChild(_local8);
firstTimeShop = true;
};
}
public function toggleSound():void{
if (playSound){
playSound = false;
} else {
playSound = true;
};
if (shooterGame != null){
shooterGame.playSound = playSound;
};
}
function cutsceneDone():void{
if (missionArray.length == 0){
exitGame();
};
}
private function helpButtonPress(_arg1:MouseEvent):void{
showShopHelp();
playButtonPlop();
}
public function exitGame():void{
updateSaveVars();
_parent.makeMenu();
parent.removeChild(this);
}
public function loadLevel(_arg1:Mission){
shooterGame = new ShooterMain(_arg1, this);
removeChild(missionSelector);
addChildAt(shooterGame, getChildIndex(scoreDisplay));
_parent.musicPlayer.playSong("BATTLE");
_parent.pullMenu.pullDist = 60;
}
private function mOutButton(_arg1:MouseEvent):void{
_arg1.target.transform.colorTransform = new ColorTransform();
}
public function displayFinalCuts():void{
var _local1:CutscenePack;
var _local2:Cutscene;
_local1 = new CutscenePack(this, shooterGame);
_local2 = _local1.GAME_END;
addChild(_local2);
}
private function makeGunSelector(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:GunCard;
var _local8:int;
var _local9:int;
_local5 = 130;
_local6 = 265;
gunSelectBox = new Sprite();
gunSelectBox.graphics.beginFill(0, 0.7);
gunSelectBox.graphics.drawRoundRect((_arg1 - 40), ((_arg2 - _local5) - 10), ((allowedGunArray.length * 35) + 20), _local5, 6, 6);
gunSelectBox.graphics.endFill();
shopHolder.addChild(gunSelectBox);
_local4 = 0;
while (_local4 < allowedGunArray.length) {
_local8 = 0;
_local9 = 0;
while (_local9 < playerGunArray.length) {
if (((!((playerGunArray[_local9] == null))) && (!((allowedGunArray[_local4] == null))))){
if (playerGunArray[_local9].type == allowedGunArray[_local4].type){
_local8++;
};
};
_local9++;
};
_local7 = new GunCard(allowedGunArray[_local4], _arg3);
_local7.x = ((_arg1 - 30) + (_local4 * 35));
_local7.y = (_arg2 - _local5);
gunSelectBox.addChild(_local7);
if (_local8 > 0){
_local7.clearMouseFx();
} else {
_local7.addEventListener(MouseEvent.MOUSE_OVER, mouseOverGun, false, 0, true);
};
_local7 = new GunCard(allowedGunArray[_local4], _arg3);
_local7.x = ((_arg1 - 30) + (_local4 * 35));
_local7.y = (_arg2 - 70);
_local7.addEventListener(MouseEvent.MOUSE_OVER, mouseOverGun, false, 0, true);
gunSelectBox.addChild(_local7);
if (_local8 > 1){
_local7.clearMouseFx();
} else {
_local7.addEventListener(MouseEvent.MOUSE_OVER, mouseOverGun, false, 0, true);
};
_local4++;
};
}
private function makeMissions():void{
var _local1:CutscenePack;
var _local2:Mission;
_local1 = new CutscenePack(this, shooterGame);
_local2 = new Mission(250, 0.05, 0.15, "Prefect Bathau", _local1.PREFECT_INTRO, null);
_local2.childs.push(new Mission(170, 0.15, 0.25, "Karl Spence", _local1.DRUNK_CRY_1, null));
_local2.childs.push(new Mission(210, 0.2, 0.65, "Maggie Darinsson", _local1.GRANNY_OLDMAN_1, null));
_local2.childs.push(new Mission(340, 0.26, 0.75, "Edith Proust", _local1.LIBRARIAN_INTRO, null));
_local2.childs.push(new Mission(230, 0.25, 0.45, "Samuel Loxdale", _local1.OLDMAN_INTRO_1, null));
_local2.childs[0].childs.push(new Mission(300, 0.3, 0.35, "Anita Lorres", _local1.DRUNK_CRY_2, null));
_local2.childs[0].childs[0].childs.push(new Mission(320, 0.35, 0.25, "Karl Spence", _local1.DRUNK_CRY_3, null));
_local2.childs[0].childs[0].childs[0].childs.push(new Mission(460, 0.4, 0.35, "Anita Lorres", _local1.DRUNK_CRY_4, null));
_local2.childs[0].childs[0].childs[0].childs[0].childs.push(new Mission(500, 0.5, 0.25, "Karl Spence", _local1.DRUNK_CRY_5, null));
_local2.childs[0].childs[0].childs[0].childs[0].childs[0].childs.push(new Mission(610, 0.55, 0.45, "Sam Loxdale", _local1.DRUNK_CRY_6, null));
_local2.childs[0].childs[0].childs[0].childs[0].childs[0].childs[0].childs.push(new Mission(570, 0.6, 0.25, "Karl Spence", _local1.DRUNK_CRY_7, null));
_local2.childs[1].childs.push(new Mission(250, 0.3, 0.75, "Harriet Proust", _local1.GRANNY_LITTLEGIRL_2, null));
_local2.childs[1].childs.push(new Mission(220, 0.25, 0.45, "Sam Loxdale", _local1.GRANNY_OLDMAN_2, null));
_local2.childs[1].childs[1].childs.push(new Mission(270, 0.35, 0.65, "Maggie Darinsson", _local1.GRANNY_OLDMAN_3, null));
_local2.childs[2].childs.push(new Mission(250, 0.35, 0.05, "Sherrif Brennan", _local1.SHERRIF_INTRO, null));
_local2.childs[2].childs[0].childs.push(new Mission(430, 0.4, 0.95, "Sherrif Brennan", _local1.SHERRIF_EXPOSITION, null, "sherrif"));
_local2.childs[2].childs[0].childs[0].childs.push(new Mission(520, 0.45, 0.55, "Gareth Beaumains", _local1.MAINSTORY_1, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(700, 0.65, 0.85, "Mining Outpost 1", null, null, "boss_mine_1"));
_local2.childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(830, 0.7, 0.55, "Mining Outpost 2", null, null, "boss_mine_2"));
_local2.childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(880, 0.75, 0.25, "Mining Outpost 3", null, null, "boss_mine_3"));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs.push(new Mission(610, 0.55, 0.55, "Gareth Beaumains", _local1.MAINSTORY_2, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs.push(new Mission(640, 0.6, 0.45, "Samuel Loxdale", _local1.MAINSTORY_3, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs.push(new Mission(770, 0.65, 0.75, "Edith Proust", _local1.MAINSTORY_4, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(630, 0.5, 0.25, "Karl Spence", _local1.MAINSTORY_BOOKDELIVER_1, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(680, 0.6, 0.55, "James Klutte", _local1.MAINSTORY_BOOKDELIVER_2, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(720, 0.7, 0.65, "Maggie Darinsson", _local1.MAINSTORY_BOOKDELIVER_3, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs[2].childs.push(new Mission(860, 0.7, 0.45, "Samuel Loxdale", _local1.MAINSTORY_5, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs.push(new Mission(860, 0.75, 0.55, "Gareth Beaumains", _local1.MAINSTORY_6, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs.push(new Mission(1130, 0.75, 0.65, "Gor", null, null, "boss_gor"));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs.push(new Mission(1070, 0.77, 0.55, "Gareth Beaumains", _local1.MAINSTORY_7, null));
_local2.childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs[2].childs[0].childs[0].childs[0].childs[0].childs.push(new Mission(1300, 0.85, 0.15, "Prefect Bathau", null, null, "boss_prefect"));
_local2.childs[3].childs.push(new Mission(300, 0.35, 0.55, "Gareth Beaumains", _local1.OLDMAN_INTRO_2, null));
missionArray.push(_local2);
loadMissions(missionCompletedArray);
}
public function setup():void{
makeMissions();
buildMissionScreen();
addChild(scoreDisplay);
}
private function engineButtonPress(_arg1:MouseEvent):void{
var _local2:int;
_local2 = speedCost;
if ((((speedLevel < 10)) && ((score >= _local2)))){
speedLevel++;
removeChild(shopHolder);
buildShop();
score = (score - _local2);
};
scoreDisplay.displayScore(score);
playButtonPlop();
}
private function buildShop(){
var _local1:int;
var _local2:GunShopBg;
var _local3:PlayerShip;
var _local4:GunImg;
var _local5:Sprite;
var _local6:UpgradeButton;
var _local7:DoneButton;
var _local8:HelpButton;
var _local9:GunCard;
var _local10:Number;
var _local11:TextField;
var _local12:GunCardImg;
allowedGunArray = new Array();
_local1 = 0;
while (_local1 < (gunLevel + 1)) {
allowedGunArray.push(fullGunArray[_local1]);
_local1++;
};
shopHolder = new Sprite();
shopTextFormat.color = 0xFFFFFF;
shopTextFormat.size = 10;
shopTextFormat.bold = true;
shopTextFormat.font = "Verdana";
shopTextFormatSmall.color = 0xAAAAAA;
shopTextFormatSmall.size = 10;
shopTextFormatSmall.bold = false;
shopTextFormatSmall.font = "Verdana";
shopHolder = new Sprite();
addChildAt(shopHolder, getChildIndex(scoreDisplay));
_local2 = new GunShopBg();
shopHolder.addChild(_local2);
shopHolder.addChild(makeBox(40, 30, 310, 95));
shopHolder.addChild(makeBox(40, 150, 310, 135));
_local3 = new PlayerShip();
_local3.x = 90;
_local3.y = 75;
shopHolder.addChild(_local3);
_local4 = new GunImg();
_local4.x = 90;
_local4.y = 180;
_local4.gotoAndStop(gunLevel);
shopHolder.addChild(_local4);
_local5 = makeLabel("ship hull");
_local5.x = 60;
_local5.y = 12;
shopHolder.addChild(_local5);
_local5 = makeLabel("weaponry");
_local5.x = 60;
_local5.y = 132;
shopHolder.addChild(_local5);
speedCost = (((speedLevel * (speedLevel * 0.3)) * speedCostMulti) + speedCostMulti);
armourCost = (((armourLevel * (armourLevel * 0.3)) * armourCostMulti) + armourCostMulti);
gunCost = (((gunLevel * (gunLevel * 0.5)) * gunCostMulti) + gunCostMulti);
if (speedLevel < 10){
_local6 = makeUpgradeButton(140, 40, ((("engine level: " + speedLevel) + "\nupgrade cost: ") + speedCost));
} else {
_local6 = makeUpgradeButton(140, 40, (("engine level: " + speedLevel) + " (MAX) \nupgrade cost: ---"));
};
_local6.addEventListener(MouseEvent.CLICK, engineButtonPress, false, 0, true);
shopHolder.addChild(_local6);
if (armourLevel < 10){
_local6 = makeUpgradeButton(140, 80, ((("armour level: " + armourLevel) + "\nupgrade cost: ") + armourCost));
} else {
_local6 = makeUpgradeButton(140, 80, (("armour level: " + armourLevel) + " (MAX) \nupgrade cost: ---"));
};
_local6.addEventListener(MouseEvent.CLICK, armourButtonPress, false, 0, true);
shopHolder.addChild(_local6);
if (gunLevel < 8){
_local6 = makeUpgradeButton(140, 160, ((("gun chassis level: " + gunLevel) + "\nupgrade cost: ") + gunCost));
} else {
_local6 = makeUpgradeButton(140, 160, (("gun chassis level: " + gunLevel) + " (MAX) \nupgrade cost: ---"));
};
_local6.addEventListener(MouseEvent.CLICK, gunButtonPress, false, 0, true);
shopHolder.addChild(_local6);
_local7 = new DoneButton();
shopHolder.addChild(_local7);
_local7.x = 360;
_local7.y = 253;
_local7.buttonMode = true;
_local7.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local7.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local7.addEventListener(MouseEvent.CLICK, closeShop, false, 0, true);
_local8 = new HelpButton();
shopHolder.addChild(_local8);
_local8.x = 360;
_local8.y = 223;
_local8.buttonMode = true;
_local8.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local8.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local8.addEventListener(MouseEvent.CLICK, helpButtonPress, false, 0, true);
_local1 = 0;
while (_local1 < 8) {
_local12 = new GunCardImg();
_local12.y = 210;
_local12.x = (55 + (_local1 * 35));
_local12.alpha = 0.1;
shopHolder.addChild(_local12);
_local1++;
};
_local1 = 0;
while (_local1 < playerGunArray.length) {
_local10 = (((_local1 - (playerGunArray.length / 2)) + 0.5) * 4);
_local9 = new GunCard(playerGunArray[_local1], _local10);
_local9.id = _local1;
_local9.y = 210;
_local9.x = (55 + (_local1 * 35));
shopHolder.addChild(_local9);
_local9.addEventListener(MouseEvent.MOUSE_DOWN, gunCardButtonPress, false, 0, true);
_local11 = makePlainText(_local10.toString());
_local11.y = 263;
_local11.x = (65 + (_local1 * 35));
shopHolder.addChild(_local11);
_local1++;
};
}
private function armourButtonPress(_arg1:MouseEvent):void{
var _local2:int;
_local2 = armourCost;
if ((((armourLevel < 10)) && ((score >= _local2)))){
armourLevel++;
removeChild(shopHolder);
buildShop();
score = (score - _local2);
};
scoreDisplay.displayScore(score);
playButtonPlop();
}
private function gunButtonPress(_arg1:MouseEvent):void{
var _local2:int;
_local2 = gunCost;
if ((((gunLevel < 8)) && ((score >= _local2)))){
gunLevel++;
playerGunArray.push(null);
removeChild(shopHolder);
buildShop();
score = (score - _local2);
};
scoreDisplay.displayScore(score);
playButtonPlop();
}
private function makeBox(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Sprite{
var _local5:Sprite;
_local5 = new Sprite();
_local5.graphics.beginFill(0, 0.7);
_local5.graphics.drawRoundRect(_arg1, _arg2, _arg3, _arg4, 6, 6);
_local5.graphics.endFill();
return (_local5);
}
private function closeShop(_arg1:MouseEvent):void{
removeChild(shopHolder);
buildMissionScreen();
playButtonPlop();
}
private function makeUpgradeButton(_arg1:Number, _arg2:Number, _arg3:String):UpgradeButton{
var _local4:UpgradeButton;
var _local5:TextField;
_local4 = new UpgradeButton();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.buttonMode = true;
_local4.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
_local4.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
_local5 = new TextField();
_local5.defaultTextFormat = shopTextFormat;
_local5.x = 40;
_local5.y = 2;
_local5.autoSize = "left";
_local5.selectable = false;
_local5.text = _arg3;
_local4.addChild(_local5);
return (_local4);
}
public function updateSaveVars():void{
var _local1:Array;
var _local2:int;
data.spliceArray = missionCompletedArray;
data.score = score;
data.totalScore = totalScore;
data.gunLevel = gunLevel;
data.armorLevel = armourLevel;
data.speedLevel = speedLevel;
_local1 = new Array();
_local2 = 0;
while (_local2 < playerGunArray.length) {
if (playerGunArray[_local2] == null){
_local1.push(0);
} else {
if (playerGunArray[_local2].type == "mgun"){
_local1.push(1);
};
if (playerGunArray[_local2].type == "plasma"){
_local1.push(2);
};
if (playerGunArray[_local2].type == "lazer"){
_local1.push(3);
};
if (playerGunArray[_local2].type == "splice"){
_local1.push(4);
};
if (playerGunArray[_local2].type == "spinningBlade"){
_local1.push(5);
};
if (playerGunArray[_local2].type == "littleRocket"){
_local1.push(6);
};
if (playerGunArray[_local2].type == "medRocket"){
_local1.push(7);
};
if (playerGunArray[_local2].type == "bigRocket"){
_local1.push(8);
};
};
_local2++;
};
data.gunArray = _local1;
}
public function buildMissionScreen(){
var postitLetters:PostItLetter;
var i:int;
var webLink:IWILL_Web;
var playMore:PlayMoreGames;
var button:LetterButton;
updateSaveVars();
missionSelector = new Sprite();
postitLetters = new PostItLetter();
missionSelector.addChild(postitLetters);
postitLetters.x = 350;
postitLetters.y = 10;
i = 0;
while (i < missionArray.length) {
button = new LetterButton(missionArray[i], this);
button.x = ((420 + (Math.floor((i / 4)) * 115)) + (Math.cos(button.mission.reward) * 5));
button.y = (((60 + (i * 55)) - (Math.floor((i / 4)) * 220)) + (Math.sin((button.mission.reward * 2)) * 4));
button.rotation = (Math.sin((i * 5)) * 5);
missionSelector.addChild(button);
i = (i + 1);
};
bluePrint = new BluePrint();
missionSelector.addChild(bluePrint);
bluePrint.x = 25;
bluePrint.y = 30;
bluePrint.buttonMode = true;
bluePrint.addEventListener(MouseEvent.MOUSE_OVER, mOverButton, false, 0, true);
bluePrint.addEventListener(MouseEvent.MOUSE_OUT, mOutButton, false, 0, true);
bluePrint.addEventListener(MouseEvent.MOUSE_UP, showShop, false, 0, true);
addChild(missionSelector);
scoreDisplay.displayScore(score);
_parent.musicPlayer.playSong("SHOP");
_parent.pullMenu.pullDist = 90;
webLink = new IWILL_Web();
missionSelector.addChild(webLink);
webLink.buttonMode = true;
webLink.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
navigateToURL(new URLRequest("http://isaacwilliams.net"), "_blank");
}, false, 0, true);
playMore = new PlayMoreGames();
missionSelector.addChild(playMore);
playMore.buttonMode = true;
playMore.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
navigateToURL(new URLRequest("http://crazymonkeygames.com"), "_blank");
}, false, 0, true);
}
public function gameLevelDone(_arg1:int, _arg2:Mission){
var _local3:int;
var _local4:int;
score = (score + _arg1);
totalScore = (totalScore + _arg1);
_local3 = 0;
while (_local3 < _arg2.childs.length) {
missionArray.push(_arg2.childs[_local3]);
_local3++;
};
_local4 = missionArray.indexOf(_arg2);
missionArray.splice(_local4, 1);
missionCompletedArray.push(_local4);
updateSaveVars();
}
private function mouseOverGun(_arg1:MouseEvent):void{
var _local2:Gun;
var _local3:Sound_ButtonOver;
selectedGunCard.gun = _arg1.target.parent.gun;
_local2 = selectedGunCard.gun;
if (_local2 != null){
playerGunArray[selectedGunCard.id] = new Gun(_local2.type, _local2.speed, selectedGunCard.angle, _local2.damage, _local2.velo);
} else {
playerGunArray[selectedGunCard.id] = null;
};
if (playSound){
_local3 = new Sound_ButtonOver();
_local3.play();
};
}
public function loadMissions(_arg1:Array):void{
var _local2:int;
var _local3:Mission;
var _local4:int;
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = missionArray[_arg1[_local2]];
_local4 = 0;
while (_local4 < _local3.childs.length) {
missionArray.push(_local3.childs[_local4]);
_local4++;
};
missionArray.splice(_arg1[_local2], 1);
_local2++;
};
}
private function mOverButton(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Sound_ButtonOver;
_local2 = 1.2;
_arg1.target.transform.colorTransform = new ColorTransform(_local2, _local2, _local2);
if (playSound){
_local3 = new Sound_ButtonOver();
_local3.play();
};
}
private function showShopHelp():void{
var _local1:CutscenePack;
var _local2:Cutscene;
_local1 = new CutscenePack(this, shooterGame);
_local2 = _local1.MECHANIC_HELP;
addChild(_local2);
}
public function showLetter(_arg1:Mission){
var _local2:Sound_LetterSwip;
letter = new MissionLetter(_arg1.letterText, _arg1.reward, _arg1.difficulty);
letter.show();
addChild(letter);
letter.y = 75;
if (playSound){
_local2 = new Sound_LetterSwip();
_local2.play();
};
}
private function playButtonPlop():void{
var _local1:Sound_ButtonPress;
if (playSound){
_local1 = new Sound_ButtonPress();
_local1.play();
};
}
private function showShop(_arg1:MouseEvent):void{
buildShop();
playButtonPlop();
if (firstTimeShop){
showShopHelp();
firstTimeShop = false;
};
removeChild(missionSelector);
}
private function gunCardButtonPress(_arg1:MouseEvent):void{
selectedGunCard = _arg1.target.parent;
makeGunSelector(_arg1.target.parent.x, _arg1.target.parent.y, _arg1.target.parent.angle);
stage.addEventListener(MouseEvent.MOUSE_UP, gunCardButtonUp, false, 0, true);
playButtonPlop();
selectorX = _arg1.target.parent.x;
selectorY = _arg1.target.parent.y;
selectorAngle = _arg1.target.parent.angle;
}
private function makeLabel(_arg1:String):Sprite{
var _local2:Number;
var _local3:Sprite;
var _local4:TextField;
_local2 = 2;
_local3 = new Sprite();
_local4 = new TextField();
_local4.defaultTextFormat = shopTextFormat;
_local4.autoSize = "left";
_local4.selectable = false;
_local4.text = _arg1;
_local3.addChild(_local4);
_local3.graphics.beginFill(0, 0.7);
_local3.graphics.drawRect((-(_local2) * 4), -(_local2), (_local4.width + (_local2 * 8)), (_local4.height + (_local2 * 2)));
_local3.graphics.endFill();
return (_local3);
}
public function removeLetter(){
letter.remove();
}
private function makePlainText(_arg1:String):TextField{
var _local2:TextField;
_local2 = new TextField();
_local2.defaultTextFormat = shopTextFormatSmall;
_local2.autoSize = "center";
_local2.selectable = false;
_local2.text = _arg1;
return (_local2);
}
private function gunCardButtonUp(_arg1:MouseEvent):void{
shopHolder.removeChild(gunSelectBox);
stage.removeEventListener(MouseEvent.MOUSE_UP, gunCardButtonUp);
}
}
}//package
Section 72
//MenuEx (MenuEx)
package {
import flash.display.*;
public dynamic class MenuEx extends MovieClip {
}
}//package
Section 73
//MenuMusic (MenuMusic)
package {
import flash.display.*;
public dynamic class MenuMusic extends MovieClip {
public function MenuMusic(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 74
//MenuPullDown (MenuPullDown)
package {
import flash.display.*;
public dynamic class MenuPullDown extends MovieClip {
public function MenuPullDown(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 75
//MenuSound (MenuSound)
package {
import flash.display.*;
public dynamic class MenuSound extends MovieClip {
public function MenuSound(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 76
//MineBossGunImg (MineBossGunImg)
package {
import flash.display.*;
public dynamic class MineBossGunImg extends MovieClip {
}
}//package
Section 77
//MineBossImg (MineBossImg)
package {
import flash.display.*;
public dynamic class MineBossImg extends MovieClip {
}
}//package
Section 78
//Mission (Mission)
package {
public class Mission {
private var _level:GameLevel;
private var _recipientAddress:String;
private var _reward:int;
private var _difficulty:Number;
private var random:RandomNumber;
private var _recipient:String;
private var _cutscene:Cutscene;
private var _childs:Array;
private var _special:String;
private static var prefectureName:String = "Keltwall";
private static var enList:Array = new Array("buzzard_top", "buzzard_bottom", "buzzard_both", "buzzard_doubleshot", "buzzard_vee", "buzzard_line", "squid_center", "squid", "squid_both", "lazer", "cannon", "cannon_center", "cannon_long", "mine_both", "mine_hatch", "mine", "squid_cannon", "lazer_vee", "ranged_attack", "close_attack", "spawn", "spawn_double", "prefectSpike", "prefectSpike_double", "prefectGun_single", "prefectGun", "prefectBigGun", "prefectKillSquad");
public function Mission(_arg1:int=100, _arg2:Number=0.25, _arg3:Number=0.1, _arg4:String=null, _arg5:Cutscene=null, _arg6:GameLevel=null, _arg7:String=null){
var _local8:int;
var _local9:int;
_childs = new Array();
super();
_reward = _arg1;
_difficulty = _arg2;
_level = _arg6;
_cutscene = _arg5;
_recipient = _arg4;
_recipientAddress = getAddress(_arg3);
_special = _arg7;
random = new RandomNumber(Math.floor(((_arg1 * _arg2) * 10)));
if (_arg6 == null){
_local8 = (((_arg3 * ((_arg2 / 4) + 2)) * 10) + 2);
_local9 = ((200 * (1 - _difficulty)) + 50);
_level = makeRandomLevel(_local8, _local9, _arg7);
};
}
public function get difficulty():String{
if (_difficulty < 0.33){
return ("easy");
};
if (_difficulty < 0.66){
return ("medium");
};
return ("hard");
}
public function get level():GameLevel{
return (_level);
}
public function get letterText():String{
return ((((((_recipient + "\n") + _recipientAddress) + "\n") + prefectureName) + " Prefecture"));
}
public function get cutscene():Cutscene{
return (_cutscene);
}
private function makeRandomLevel(_arg1:int, _arg2:int, _arg3:String=null):GameLevel{
var _local4:GameLevel;
var _local5:int;
_local4 = new GameLevel(_arg2, null);
if (_arg3 == "sherrif"){
_local4.addEnemy("sherrif");
};
_local4.addEnemy("none");
_local5 = 0;
while (_local5 < _arg1) {
_local4.addEnemy(getRandomEnemy(((_difficulty * enList.length) + (0.25 * _local5))));
if (((((_local5 % 6) == 0)) && ((random.getRandom() < _difficulty)))){
_local4.addEnemy("crate");
};
if (random.getRandom() < 0.07){
_local4.addEnemy("none");
};
_local5++;
};
_local4.addEnemy("none");
_local4.addEnemy("none");
if ((((_arg3 == null)) || ((_arg3 == "sherrif")))){
_local4.addEnemy("finished");
};
if (_arg3 == "boss_mine_1"){
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("boss_mine_1");
};
if (_arg3 == "boss_mine_2"){
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("boss_mine_2");
};
if (_arg3 == "boss_mine_3"){
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("boss_mine_3");
};
if (_arg3 == "boss_gor"){
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("boss_gor");
};
if (_arg3 == "boss_prefect"){
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("none");
_local4.addEnemy("boss_prefect");
};
return (_local4);
}
private function getRandomEnemy(_arg1:Number):String{
var _local2:Number;
_local2 = Math.floor(random.getGaussian(_arg1, enList.length, 10));
if (_local2 < 0){
_local2 = 0;
};
if (_local2 > (enList.length - 1)){
_local2 = (enList.length - 1);
};
return (enList[_local2]);
}
public function get childs():Array{
return (_childs);
}
public function set childs(_arg1:Array):void{
_childs = _arg1;
}
public function get reward():int{
return (_reward);
}
public function get special():String{
return (_special);
}
private function getAddress(_arg1:Number):String{
var _local2:Array;
_local2 = new Array("Market Square", (prefectureName + " Hall"), "Spineyhoof Peak", "Juste Point", "Jelloford Apartments", "Skydocks, Jott Town", "Old Armoury, Jott Town", "Pang Hill", "Scotchfords Mesa", "The Wastes");
return (_local2[Math.floor((_arg1 * _local2.length))]);
}
}
}//package
Section 79
//MissionLetter (MissionLetter)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class MissionLetter extends Sprite {
private var stampHolder:Sprite;
private var handwritingFont:FontHandwriting;
private var handwritingFormat:TextFormat;
private static var stampSpacing:int = 30;
private static var stampsPerLine:int = 4;
private static var moveSpeed:Number = 0.2;
public function MissionLetter(_arg1:String, _arg2:int, _arg3:String){
var _local4:EnvelopeImg;
var _local5:DifficultyStamp;
var _local6:TextField;
handwritingFont = new FontHandwriting();
handwritingFormat = new TextFormat();
stampHolder = new Sprite();
super();
_local4 = new EnvelopeImg();
addChild(_local4);
addChild(stampHolder);
placeStamps(_arg2);
stampHolder.x = ((this.width - stampHolder.width) - 5);
_local5 = new DifficultyStamp();
_local5.gotoAndStop(_arg3);
_local5.x = (((stampHolder.x + (stampHolder.width / 2)) - (_local5.width / 2)) - 20);
_local5.y = (stampHolder.height / 2);
_local5.blendMode = "multiply";
addChild(_local5);
handwritingFormat.font = handwritingFont.fontName;
handwritingFormat.size = 14;
handwritingFormat.color = 68;
_local6 = new TextField();
_local6.autoSize = "left";
_local6.defaultTextFormat = handwritingFormat;
_local6.selectable = false;
_local6.embedFonts = true;
_local6.text = _arg1;
_local6.x = 30;
_local6.y = 60;
_local6.alpha = 0.8;
_local6.blendMode = "multiply";
addChild(_local6);
}
private function scrollOut(_arg1:Event):void{
var _local2:Number;
_local2 = this.x;
this.x = (this.x + (_local2 * moveSpeed));
if (this.x < (-(this.width) + 1)){
removeEventListener(Event.ENTER_FRAME, scrollOut);
parent.removeChild(this);
};
}
public function remove():void{
removeEventListener(Event.ENTER_FRAME, scrollIn);
addEventListener(Event.ENTER_FRAME, scrollOut);
}
private function scrollIn(_arg1:Event):void{
var _local2:Number;
_local2 = -(this.x);
this.x = (this.x + (_local2 * moveSpeed));
if (this.x > -1){
removeEventListener(Event.ENTER_FRAME, scrollIn);
};
}
private function placeStamps(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:StampImgs;
var _local9:int;
_local2 = Math.floor((_arg1 / 500));
_local3 = Math.floor(((_arg1 - (_local2 * 500)) / 200));
_local4 = Math.floor((((_arg1 - (_local2 * 500)) - (_local3 * 200)) / 100));
_local5 = Math.floor(((((_arg1 - (_local2 * 500)) - (_local3 * 200)) - (_local4 * 100)) / 50));
_local6 = Math.floor((((((_arg1 - (_local2 * 500)) - (_local3 * 200)) - (_local4 * 100)) - (_local5 * 50)) / 10));
_local7 = 0;
_local9 = 0;
while (_local9 < _local2) {
_local8 = new StampImgs();
_local8.gotoAndStop("stamp500");
_local8.x = (((_local7 * stampSpacing) - ((Math.floor((_local7 / stampsPerLine)) * stampSpacing) * stampsPerLine)) - (Math.cos(_local7) * 5));
_local8.y = (((Math.sin((_local7 * 2)) * 5) + (Math.floor((_local7 / stampsPerLine)) * stampSpacing)) + 5);
_local8.rotation = (Math.cos(((_arg1 * _local7) * stampsPerLine)) * 5);
stampHolder.addChild(_local8);
_local7++;
_local9++;
};
_local9 = 0;
while (_local9 < _local3) {
_local8 = new StampImgs();
_local8.gotoAndStop("stamp200");
_local8.x = (((_local7 * stampSpacing) - ((Math.floor((_local7 / stampsPerLine)) * stampSpacing) * stampsPerLine)) - (Math.cos(_local7) * 5));
_local8.y = (((Math.sin((_local7 * 2)) * 5) + (Math.floor((_local7 / stampsPerLine)) * stampSpacing)) + 5);
_local8.rotation = (Math.cos(((_arg1 * _local7) * stampsPerLine)) * 5);
stampHolder.addChild(_local8);
_local7++;
_local9++;
};
_local9 = 0;
while (_local9 < _local4) {
_local8 = new StampImgs();
_local8.gotoAndStop("stamp100");
_local8.x = (((_local7 * stampSpacing) - ((Math.floor((_local7 / stampsPerLine)) * stampSpacing) * stampsPerLine)) - (Math.cos(_local7) * 5));
_local8.y = (((Math.sin((_local7 * 2)) * 5) + (Math.floor((_local7 / stampsPerLine)) * stampSpacing)) + 5);
_local8.rotation = (Math.cos(((_arg1 * _local7) * stampsPerLine)) * 5);
stampHolder.addChild(_local8);
_local7++;
_local9++;
};
_local9 = 0;
while (_local9 < _local5) {
_local8 = new StampImgs();
_local8.gotoAndStop("stamp50");
_local8.x = (((_local7 * stampSpacing) - ((Math.floor((_local7 / stampsPerLine)) * stampSpacing) * stampsPerLine)) - (Math.cos(_local7) * 5));
_local8.y = (((Math.sin((_local7 * 2)) * 5) + (Math.floor((_local7 / stampsPerLine)) * stampSpacing)) + 5);
_local8.rotation = (Math.cos(((_arg1 * _local7) * stampsPerLine)) * 5);
stampHolder.addChild(_local8);
_local7++;
_local9++;
};
_local9 = 0;
while (_local9 < _local6) {
_local8 = new StampImgs();
_local8.gotoAndStop("stamp10");
_local8.x = (((_local7 * stampSpacing) - ((Math.floor((_local7 / stampsPerLine)) * stampSpacing) * stampsPerLine)) - (Math.cos(_local7) * 5));
_local8.y = (((Math.sin((_local7 * 2)) * 5) + (Math.floor((_local7 / stampsPerLine)) * stampSpacing)) + 5);
_local8.rotation = (Math.cos(((_arg1 * _local7) * stampsPerLine)) * 5);
stampHolder.addChild(_local8);
_local7++;
_local9++;
};
}
public function show():void{
this.x = -(this.width);
addEventListener(Event.ENTER_FRAME, scrollIn);
}
}
}//package
Section 80
//MusicLoop (MusicLoop)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class MusicLoop extends Sprite {
private var _play:Boolean;// = true
private var song:String;
private var musicChannel:SoundChannel;
private var musicBattle:BattleMusic;
private var musicShop:ShopMusic;
private var vol:Number;// = 0
public function MusicLoop(){
musicBattle = new BattleMusic();
musicShop = new ShopMusic();
musicChannel = new SoundChannel();
vol = 0;
_play = true;
super();
}
public function startMusic():void{
if (_play){
if (song == "BATTLE"){
musicChannel = musicBattle.play();
} else {
if (song == "SHOP"){
musicChannel = musicShop.play();
};
};
setListener();
} else {
stopAll();
};
}
private function setListener(){
musicChannel.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}
public function stopAll(){
musicChannel.stop();
musicChannel.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
}
public function set playing(_arg1:Boolean):void{
_play = _arg1;
startMusic();
}
public function playSong(_arg1:String){
song = _arg1;
stopAll();
if (_arg1 != "NONE"){
startMusic();
vol = 0;
addEventListener(Event.ENTER_FRAME, fadeIn);
};
}
private function fadeIn(_arg1:Event):void{
musicChannel.soundTransform = new SoundTransform(vol);
vol = (vol + 0.005);
if (vol >= 1){
removeEventListener(Event.ENTER_FRAME, fadeIn);
};
}
private function loopMusic(_arg1:Event){
startMusic();
}
}
}//package
Section 81
//NewGameButton (NewGameButton)
package {
import flash.display.*;
public dynamic class NewGameButton extends MovieClip {
}
}//package
Section 82
//Pickup (Pickup)
package {
import flash.display.*;
public class Pickup extends Sprite {
private var px:Number;// = 0
private var py:Number;// = 0
private var life:Number;// = 0
private var type:String;
private var vx:Number;// = 0
private var vy:Number;// = -2
private static var velo:Number = 5;
public function Pickup(_arg1:Number, _arg2:Number, _arg3:String="coin", _arg4:Number=500){
var _local5:PickupImg;
px = 0;
py = 0;
vx = 0;
vy = -2;
life = 0;
super();
type = _arg3;
_local5 = new PickupImg();
_local5.gotoAndStop(type);
addChild(_local5);
px = _arg1;
py = _arg2;
this.x = px;
this.y = py;
life = _arg4;
if ((((type == "hp")) || ((type == "gunupgrade")))){
life = (_arg4 * 10);
};
}
public function get hp():int{
if (type == "hp"){
return (10);
};
return (0);
}
public function get effectType():Object{
return (type);
}
public function get score():int{
if (type == "coin"){
return (1);
};
if (type == "coinBig"){
return (5);
};
if (type == "gem"){
return (10);
};
if (type == "gemBig"){
return (20);
};
if (type == "rubyBig"){
return (50);
};
return (0);
}
public function update():void{
px = (px - 0.5);
life--;
if (life < 0){
vy = (vy + 0.1);
py = (py + vy);
};
x = px;
y = py;
}
}
}//package
Section 83
//PickupImg (PickupImg)
package {
import flash.display.*;
public dynamic class PickupImg extends MovieClip {
}
}//package
Section 84
//Player (Player)
package {
import flash.display.*;
import flash.geom.*;
public class Player extends Sprite {
private var px:Number;// = -50
private var py:Number;// = 150
private var hd:HealthDisplay;
private var shipRot:Number;// = 0
private var hp:Number;// = 10
public var ship:PlayerShip;
private var hpMax:Number;// = 10
public var gun:GunImg;
public var shootSpeed:int;// = 0
private var gunRot:Number;// = 0
private var acc:Number;// = 0.3
public var par:Object;
public var shootDelay:int;// = 10
public var vx:Number;// = 0
public var vy:Number;// = 0
private var bonusGive:Boolean;// = false
public var gunOffSet:Number;
private var takeDamage:Boolean;// = false
private var fric:Number;// = 0.9
public var gunArray:Array;
public function Player(_arg1, _arg2:Array, _arg3:Number, _arg4:Number){
px = -50;
py = 150;
vx = 0;
vy = 0;
acc = 0.3;
fric = 0.9;
shipRot = 0;
gunRot = 0;
takeDamage = false;
bonusGive = false;
gunArray = new Array();
shootSpeed = 0;
shootDelay = 10;
hp = 10;
hpMax = 10;
super();
par = _arg1;
ship = new PlayerShip();
addChild(ship);
gun = new GunImg();
addChild(gun);
gunOffSet = ((0.65 * gun.width) + 10);
gunArray = _arg2;
gun.gotoAndStop(gunArray.length);
hp = 10;
hp = (hp + _arg4);
hpMax = (hpMax + _arg4);
acc = 0.3;
acc = (acc + (acc * (_arg3 / 10)));
}
public function impulse(_arg1:Number, _arg2:Number):void{
vx = (vx + (_arg1 * acc));
vy = (vy + (_arg2 * acc));
}
public function setAim(_arg1:Number, _arg2:Number):void{
if ((((_arg1 == 0)) && ((_arg2 == 0)))){
gunRot = 0;
} else {
if ((((_arg1 == 1)) && ((_arg2 == 0)))){
gunRot = 0;
} else {
if ((((_arg1 == -1)) && ((_arg2 == 0)))){
gunRot = 180;
} else {
if ((((_arg1 == 1)) && ((_arg2 == 1)))){
gunRot = 45;
} else {
if ((((_arg1 == 1)) && ((_arg2 == -1)))){
gunRot = -45;
} else {
if ((((_arg1 == 0)) && ((_arg2 == 1)))){
gunRot = 90;
} else {
if ((((_arg1 == 0)) && ((_arg2 == -1)))){
gunRot = -90;
} else {
if ((((_arg1 == -1)) && ((_arg2 == 1)))){
gunRot = 135;
} else {
if ((((_arg1 == -1)) && ((_arg2 == -1)))){
gunRot = -135;
};
};
};
};
};
};
};
};
};
}
public function update(_arg1:Boolean=true):void{
var _local2:*;
var _local3:ColorTransform;
vx = (vx * fric);
vy = (vy * fric);
px = (px + vx);
py = (py + vy);
if (_arg1){
if (px < 0){
px = 0;
vx = (vx * -1);
} else {
if (px > 600){
px = 600;
vx = (vx * -1);
};
};
if (py < 0){
py = 0;
vy = (vy * -1);
} else {
if (py > 300){
py = 300;
vy = (vy * -1);
};
};
};
this.x = px;
this.y = py;
_local2 = (gunRot - gun.rotation);
gun.rotation = (gun.rotation + (_local2 * 0.2));
_local3 = new ColorTransform();
if (takeDamage){
_local3.redOffset = 200;
_local3.blueOffset = 200;
_local3.greenOffset = 200;
takeDamage = false;
} else {
if (bonusGive){
_local3.redOffset = 170;
_local3.blueOffset = 0xFF;
_local3.greenOffset = 170;
bonusGive = false;
};
};
this.transform.colorTransform = _local3;
}
public function get alive():Boolean{
if (hp > 0){
return (true);
};
return (false);
}
public function giveHealth(_arg1:Number):void{
hp = (hp + _arg1);
bonusGive = true;
if (hp > hpMax){
hp = hpMax;
};
hd = new HealthDisplay((hp / hpMax));
hd.y = -25;
addChild(hd);
}
public function giveDamage(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
var _local4:int;
if (hp > 0){
hp = (hp - _arg1);
takeDamage = true;
if (hp > 0){
hd = new HealthDisplay((hp / hpMax));
hd.y = -25;
addChild(hd);
_local4 = 0;
while (_local4 < (_arg1 * 2)) {
_local2 = ((Math.random() * 2) - 1);
_local3 = (-(Math.random()) * 3);
par.addLetter(this, (this.vx + _local2), (this.vy + _local3));
_local4++;
};
} else {
hd.visible = false;
par.playSoundPlayerDie();
};
};
}
public function updateDead():void{
var _local1:ColorTransform;
vy = (vy + 0.1);
px = (px + vx);
py = (py + vy);
this.x = px;
this.y = py;
this.rotation++;
_local1 = new ColorTransform();
_local1.redMultiplier = 0.5;
_local1.blueMultiplier = 0.5;
_local1.greenMultiplier = 0.5;
this.transform.colorTransform = _local1;
}
}
}//package
Section 85
//PlayerShip (PlayerShip)
package {
import flash.display.*;
public dynamic class PlayerShip extends MovieClip {
public var boost:MovieClip;
}
}//package
Section 86
//PlayMoreGames (PlayMoreGames)
package {
import flash.display.*;
public dynamic class PlayMoreGames extends MovieClip {
}
}//package
Section 87
//Postcard (Postcard)
package {
import flash.display.*;
public dynamic class Postcard extends MovieClip {
public function Postcard(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 88
//PostcardBack (PostcardBack)
package {
import flash.display.*;
public dynamic class PostcardBack extends MovieClip {
}
}//package
Section 89
//PostItLetter (PostItLetter)
package {
import flash.display.*;
public dynamic class PostItLetter extends MovieClip {
}
}//package
Section 90
//PrefectBossGunImg (PrefectBossGunImg)
package {
import flash.display.*;
public dynamic class PrefectBossGunImg extends MovieClip {
}
}//package
Section 91
//PrefectBossImg (PrefectBossImg)
package {
import flash.display.*;
public dynamic class PrefectBossImg extends MovieClip {
}
}//package
Section 92
//PreLoad (PreLoad)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class PreLoad extends Sprite {
private var sponslogo:CMG_Logo_Animation;
private var _parent:Object;
public function PreLoad(_arg1){
sponslogo = new CMG_Logo_Animation();
super();
_parent = _arg1;
addChild(sponslogo);
sponslogo.x = 300;
sponslogo.y = 120;
sponslogo.scaleX = 0.8;
sponslogo.scaleY = 0.8;
sponslogo.buttonMode = true;
sponslogo.hp.addEventListener(MouseEvent.CLICK, cmgLinkClicked);
addEventListener(Event.ENTER_FRAME, testLoadStatus);
}
private function isaacLinkClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://isaacwilliams.net"), "_blank");
}
private function cmgLinkClicked(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://crazymonkeygames.com"), "_blank");
}
private function testLoadStatus(_arg1:Event):void{
var loadPercent:Number;
var event = _arg1;
loadPercent = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
sponslogo.loader.bar.bar.scaleX = loadPercent;
if (loadPercent == 1){
sponslogo.loader.gotoAndStop(2);
removeEventListener(Event.ENTER_FRAME, testLoadStatus);
sponslogo.loader.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent){
_parent.setup();
});
};
}
}
}//package
Section 93
//PullDownMenu (PullDownMenu)
package {
import flash.events.*;
import flash.display.*;
public class PullDownMenu extends Sprite {
public var pullTarget:Number;// = 60
private var soundIcon:MenuSound;
private var musicIcon:MenuMusic;
private var pullIcon:MenuPullDown;
private var moveTarget:Number;
private var _parent:Object;
private var exIcon:MenuEx;
public function PullDownMenu(_arg1){
pullIcon = new MenuPullDown();
musicIcon = new MenuMusic();
soundIcon = new MenuSound();
exIcon = new MenuEx();
pullTarget = 60;
super();
_parent = _arg1;
this.y = -10;
moveTarget = this.y;
addChild(pullIcon);
addChild(musicIcon);
addChild(soundIcon);
addChild(exIcon);
pullIcon.y = 0;
musicIcon.y = -30;
soundIcon.y = -60;
exIcon.y = -90;
pullIcon.buttonMode = true;
musicIcon.buttonMode = true;
soundIcon.buttonMode = true;
exIcon.buttonMode = true;
pullIcon.alpha = 0.7;
musicIcon.alpha = 0.7;
soundIcon.alpha = 0.7;
exIcon.alpha = 0.7;
pullIcon.addEventListener(MouseEvent.CLICK, pullButtonClick, false, 0, true);
musicIcon.addEventListener(MouseEvent.CLICK, musicButtonClick, false, 0, true);
soundIcon.addEventListener(MouseEvent.CLICK, soundButtonClick, false, 0, true);
exIcon.addEventListener(MouseEvent.CLICK, exButtonClick, false, 0, true);
pullIcon.addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
pullIcon.addEventListener(MouseEvent.MOUSE_OUT, mouseOff, false, 0, true);
musicIcon.addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
musicIcon.addEventListener(MouseEvent.MOUSE_OUT, mouseOff, false, 0, true);
soundIcon.addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
soundIcon.addEventListener(MouseEvent.MOUSE_OUT, mouseOff, false, 0, true);
exIcon.addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
exIcon.addEventListener(MouseEvent.MOUSE_OUT, mouseOff, false, 0, true);
}
private function pushButtonClick(_arg1:Event):void{
collpase();
}
private function mouseOver(_arg1:MouseEvent):void{
_arg1.target.alpha = 0.9;
}
private function musicButtonClick(_arg1:Event):void{
_parent.toggleMusic();
if (_parent.playMusic){
musicIcon.gotoAndStop("on");
} else {
musicIcon.gotoAndStop("off");
};
}
public function set pullDist(_arg1:Number):void{
pullTarget = _arg1;
collpase();
}
private function mouseOff(_arg1:MouseEvent):void{
_arg1.target.alpha = 0.7;
}
private function slide(_arg1:Event):void{
var _local2:Number;
_local2 = (moveTarget - this.y);
this.y = (this.y + (_local2 * 0.2));
if (Math.abs(_local2) < 1){
this.y = moveTarget;
removeEventListener(Event.ENTER_FRAME, slide);
};
}
private function exButtonClick(_arg1:Event):void{
_parent.exitGame();
}
private function soundButtonClick(_arg1:Event):void{
_parent.toggleSound();
if (_parent.playSound){
soundIcon.gotoAndStop("on");
} else {
soundIcon.gotoAndStop("off");
};
}
public function collpase():void{
moveTarget = -10;
addEventListener(Event.ENTER_FRAME, slide);
pullIcon.gotoAndStop("pullDown");
pullIcon.removeEventListener(MouseEvent.CLICK, pushButtonClick);
pullIcon.addEventListener(MouseEvent.CLICK, pullButtonClick, false, 0, true);
}
private function pullButtonClick(_arg1:Event):void{
moveTarget = pullTarget;
addEventListener(Event.ENTER_FRAME, slide);
pullIcon.gotoAndStop("pullUp");
pullIcon.removeEventListener(MouseEvent.CLICK, pullButtonClick);
pullIcon.addEventListener(MouseEvent.CLICK, pushButtonClick, false, 0, true);
}
}
}//package
Section 94
//RandomNumber (RandomNumber)
package {
public class RandomNumber {
private var _seed:uint;
public function RandomNumber(_arg1:uint=0){
_seed = _arg1;
}
public function getGaussian(_arg1:Number=0.5, _arg2:Number=1, _arg3:int=10):Number{
var _local4:Number;
var _local5:int;
var _local6:Number;
_local4 = 0;
_local5 = 0;
while (_local5 < _arg3) {
_local4 = (_local4 + ((getRandom() - 0.5) * _arg2));
_local5++;
};
_local6 = ((_local4 / _arg3) + _arg1);
return (_local6);
}
public function getRandom():Number{
_seed = ((_seed * 16807) % 2147483647);
return ((_seed / 2147483647));
}
}
}//package
Section 95
//ScoreDisplay (ScoreDisplay)
package {
import flash.display.*;
import flash.text.*;
public class ScoreDisplay extends Sprite {
private var margin:Number;// = 5
private var scoreText:TextField;
public function ScoreDisplay(){
var _local1:TextFormat;
var _local2:PickupImg;
scoreText = new TextField();
margin = 5;
super();
_local1 = new TextFormat();
_local1.color = 0;
_local1.size = 10;
_local1.bold = true;
_local1.font = "Verdana";
scoreText.autoSize = "left";
scoreText.defaultTextFormat = _local1;
scoreText.selectable = false;
scoreText.textColor = 0xFFFFFF;
scoreText.x = 20;
addChild(scoreText);
_local2 = new PickupImg();
_local2.gotoAndStop("coinBig");
addChild(_local2);
_local2.x = (margin * 2);
_local2.y = (margin * 2);
this.x = 500;
this.graphics.beginFill(0, 0.7);
this.graphics.drawRoundRect(-(margin), (-(margin) * 4), (70 + margin), (20 + (margin * 4)), 6, 6);
this.graphics.endFill();
}
public function displayScore(_arg1:Number):void{
scoreText.text = _arg1.toString();
}
}
}//package
Section 96
//ScoresButton (ScoresButton)
package {
import flash.display.*;
public dynamic class ScoresButton extends MovieClip {
}
}//package
Section 97
//Sherrif (Sherrif)
package {
import flash.display.*;
import flash.geom.*;
public class Sherrif extends Sprite {
public var shootDelayCurr:int;// = 0
private var px:Number;// = 0
private var py:Number;// = 0
private var hp:Number;// = 5
private var gunOffX:int;// = 0
private var gunOffY:int;// = 0
private var speed:Number;// = 1
private var p;
public var shootDelay:int;// = 40
private var behaveY:Array;
private var behaveX:Array;
private var _damage:Number;// = 1
private var behaveChange:Number;// = 0.05
private var vx:Number;// = -1
private var vy:Number;// = 0
private var dropType:String;// = "coinBig"
private var deadRot:Number;// = 0
private var takeDamage:Boolean;// = false
public var gunArray:Array;
private var behaveCurr:Number;// = 0
public function Sherrif(_arg1:Number, _arg2:Number, _arg3){
var _local4:SherrifShip;
var _local5:Array;
var _local6:Array;
vx = -1;
vy = 0;
px = 0;
py = 0;
speed = 1;
behaveX = new Array();
behaveY = new Array();
behaveCurr = 0;
behaveChange = 0.05;
gunOffX = 0;
gunOffY = 0;
gunArray = new Array();
dropType = "coinBig";
_damage = 1;
shootDelay = 40;
shootDelayCurr = 0;
hp = 5;
deadRot = 0;
takeDamage = false;
super();
_local4 = new SherrifShip();
addChild(_local4);
px = _arg1;
py = _arg2;
this.x = px;
this.y = py;
p = _arg3;
speed = 1;
_local5 = behaveSine(0, 0.5, 16);
_local6 = behaveSine(0, -0.5, 16);
behaveX = _local5.concat(_local6);
behaveY = behaveSine(0, 2, 32);
behaveChange = 0.1;
hp = 100;
_damage = 10;
gunArray.push(new Gun("littleRocket", 10, 2, 0.7, 4));
gunArray.push(new Gun("medRocket", 24, 2, 4, 4));
gunArray.push(new Gun("littleRocket", 10, -2, 0.7, 4));
}
private function behaveSine(_arg1:Number, _arg2:Number, _arg3:int):Array{
var _local4:Array;
var _local5:int;
_local4 = new Array();
_local5 = 0;
while (_local5 < _arg3) {
_local4.push(((Math.sin((((_local5 / _arg3) * Math.PI) * 2)) * _arg2) + _arg1));
_local5++;
};
return (_local4);
}
public function get damage():Number{
return (_damage);
}
public function updateDead():void{
var _local1:ColorTransform;
vy = (vy + 0.1);
px = (px + vx);
py = (py + vy);
this.x = px;
this.y = py;
this.rotation = (this.rotation + deadRot);
_local1 = new ColorTransform();
_local1.redMultiplier = 0.5;
_local1.blueMultiplier = 0.5;
_local1.greenMultiplier = 0.5;
this.transform.colorTransform = _local1;
}
public function update():void{
var _local1:Number;
var _local2:Number;
var _local3:int;
var _local4:ColorTransform;
behaveCurr = (behaveCurr + behaveChange);
if (behaveCurr >= behaveX.length){
behaveCurr = 0;
};
vx = (behaveX[Math.floor(behaveCurr)] * speed);
vy = (behaveY[Math.floor(behaveCurr)] * speed);
px = (px + vx);
py = (py + vy);
this.x = px;
this.y = py;
_local4 = new ColorTransform();
if (takeDamage){
_local4.redOffset = 230;
_local4.blueOffset = 170;
_local4.greenOffset = 50;
takeDamage = false;
};
this.transform.colorTransform = _local4;
}
public function get alive():Boolean{
if (hp > 0){
return (true);
};
return (false);
}
private function behaveStraightLine(_arg1:Number, _arg2:int):Array{
var _local3:Array;
var _local4:int;
_local3 = new Array();
_local4 = 0;
while (_local4 < _arg2) {
_local3.push(_arg1);
_local4++;
};
return (_local3);
}
public function giveDamage(_arg1:Number):void{
if (hp > 0){
hp = (hp - _arg1);
takeDamage = true;
};
}
}
}//package
Section 98
//SherrifShip (SherrifShip)
package {
import flash.display.*;
public dynamic class SherrifShip extends MovieClip {
}
}//package
Section 99
//ShooterMain (ShooterMain)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
import flash.ui.*;
import flash.filters.*;
public class ShooterMain extends Sprite {
var survivalMode:Boolean;// = false
private var diff:Number;// = 0
var sherrif:Sherrif;
var bulletsHit:int;// = 0
private var gunLevel:int;// = 0
public var playSound:Boolean;// = true
var gameHolder:Sprite;
private var speed:int;// = 200
var p:Player;
var bulletArray:Array;
var dx:Number;// = 0
var dy:Number;// = 0
var won:Boolean;// = false
var score:int;// = 0
var gameLevel:GameLevel;
private var numWaves:int;// = 0
private var random:RandomNumber;
var soundPlayer:SoundChannel;
var numKills:int;// = 0
var bgArray:Array;
private var count:int;// = 10000
var house:HouseImg;
var pickupArray:Array;
var bitArray:Array;
var scrArray:Array;
var shooting:Boolean;// = false
var boss:Boss;
var stageWidth:int;// = 600
var cutscene:Cutscene;
var mission:Mission;
var blurAmount:Number;// = 0
var enemyArray:Array;
var bulletsFired:int;// = 0
var stageHeight:int;// = 300
var _parent:Object;
var running:Boolean;
var enemyBulletArray:Array;
var letterArray:Array;
var enTick:int;// = 100
private static var enList:Array = new Array("buzzard_top", "buzzard_bottom", "buzzard_both", "buzzard_doubleshot", "buzzard_vee", "buzzard_line", "squid_center", "squid", "squid_both", "lazer", "cannon", "cannon_center", "cannon_long", "mine_both", "mine_hatch", "mine", "squid_cannon", "lazer_vee", "ranged_attack", "close_attack", "spawn", "spawn_double", "prefectSpike", "prefectSpike_double", "prefectGun_single", "prefectGun", "prefectBigGun", "prefectKillSquad");
public function ShooterMain(_arg1:Mission=null, _arg2=null){
won = false;
score = 0;
dx = 0;
dy = 0;
shooting = false;
bulletArray = new Array();
enemyArray = new Array();
enemyBulletArray = new Array();
pickupArray = new Array();
letterArray = new Array();
enTick = 100;
stageWidth = 600;
stageHeight = 300;
blurAmount = 0;
bgArray = new Array();
scrArray = new Array();
bitArray = new Array();
gameHolder = new Sprite();
playSound = true;
survivalMode = false;
soundPlayer = new SoundChannel();
diff = 0;
speed = 200;
count = 10000;
numWaves = 0;
gunLevel = 0;
random = new RandomNumber(0x0400);
numKills = 0;
bulletsFired = 0;
bulletsHit = 0;
super();
_parent = _arg2;
if (_arg1 == null){
survivalMode = true;
} else {
mission = _arg1;
gameLevel = mission.level;
cutscene = mission.cutscene;
gameLevel.resetLevel();
};
makeBackground();
if (mission.special != "survival"){
p = new Player(this, _parent.playerGunArray, _parent.speedLevel, _parent.armourLevel);
gameHolder.addChild(p);
} else {
p = new Player(this, new Array(new Gun("mgun", 3, 0, 0.5, 5)), 0, 0);
gameHolder.addChild(p);
};
addChild(gameHolder);
addEventListener(Event.ADDED_TO_STAGE, onAdded);
addEventListener(Event.REMOVED_FROM_STAGE, onRemoved);
playSound = _parent.playSound;
}
private function updateAll():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Sound_HitPlayer;
var _local5:Sound_GetCoin;
var _local6:Sound_GetHP;
var _local7:Bullet;
var _local8:Enemy;
var _local9:Pickup;
var _local10:Letter;
_local4 = new Sound_HitPlayer();
_local5 = new Sound_GetCoin();
_local6 = new Sound_GetHP();
_local1 = 0;
while (_local1 < bulletArray.length) {
_local7 = bulletArray[_local1];
_local7.update();
if ((((((((_local7.x < 0)) || ((_local7.x > stageWidth)))) || ((_local7.y < 0)))) || ((_local7.y > stageHeight)))){
bulletArray.splice(_local1, 1);
gameHolder.removeChild(_local7);
};
_local1++;
};
_local1 = 0;
while (_local1 < enemyBulletArray.length) {
_local7 = enemyBulletArray[_local1];
_local7.update();
if (p.ship.hitTestPoint(_local7.x, _local7.y)){
p.giveDamage(_local7.damage);
blurAmount = (blurAmount + (_local7.damage * 2));
enemyBulletArray.splice(_local1, 1);
gameHolder.removeChild(_local7);
if (playSound){
_local4.play();
};
};
if ((((((((_local7.x < 0)) || ((_local7.x > stageWidth)))) || ((_local7.y < 0)))) || ((_local7.y > stageHeight)))){
enemyBulletArray.splice(_local1, 1);
gameHolder.removeChild(_local7);
};
_local1++;
};
_local1 = 0;
while (_local1 < enemyArray.length) {
_local8 = enemyArray[_local1];
if (_local8.alive){
if (_local8.x < 620){
_local8.testForBullets(bulletArray);
};
_local8.update();
if (_local8.x < -50){
gameHolder.removeChild(_local8);
enemyArray.splice(_local1, 1);
};
if (_local8.x < 620){
if (p.ship.hitTestObject(_local8)){
p.giveDamage(_local8.damage);
blurAmount = (blurAmount + (_local8.damage * 2));
_local8.giveDamage(10);
if (playSound){
_local4.play();
};
};
if (sherrif != null){
if (sherrif.hitTestObject(_local8)){
sherrif.giveDamage(_local8.damage);
_local8.giveDamage(10);
if (playSound){
_local4.play();
};
};
};
};
} else {
_local8.updateDead();
if (_local8.y > (stageHeight + 50)){
gameHolder.removeChild(_local8);
enemyArray.splice(_local1, 1);
};
};
_local1++;
};
_local1 = 0;
while (_local1 < pickupArray.length) {
_local9 = pickupArray[_local1];
_local9.update();
if (_local9.y > stageHeight){
gameHolder.removeChild(_local9);
pickupArray.splice(_local1, 1);
};
if (_local9.x < -10){
gameHolder.removeChild(_local9);
pickupArray.splice(_local1, 1);
};
if (p.alive){
if (p.ship.hitTestPoint(_local9.x, _local9.y)){
score = (score + _local9.score);
_parent.scoreDisplay.displayScore((score + _parent.score));
if (_local9.hp != 0){
p.giveHealth(_local9.hp);
if (playSound){
_local6.play();
};
} else {
if (((!((_local9.score == 0))) && (playSound))){
_local5.play();
};
};
if (_local9.effectType == "gunupgrade"){
gunLevel++;
givePlayerNewGuns();
if (playSound){
_local6.play();
};
};
gameHolder.removeChild(_local9);
pickupArray.splice(_local1, 1);
};
};
_local1++;
};
_local1 = 0;
while (_local1 < letterArray.length) {
_local10 = letterArray[_local1];
_local10.update();
if (_local10.y > stageHeight){
gameHolder.removeChild(_local10);
letterArray.splice(_local1, 1);
};
_local1++;
};
}
private function runFinished(_arg1:Event):void{
p.impulse(1, 0);
p.update(false);
updateAll();
if (p.x > 650){
score = (score + mission.reward);
_parent.gameLevelDone(score, mission);
finishGame();
removeEventListener(Event.ENTER_FRAME, runFinished);
};
}
public function addLetter(_arg1, _arg2:Number, _arg3:Number){
var _local4:Letter;
_local4 = new Letter(_arg2, _arg3);
_local4.x = _arg1.x;
_local4.y = _arg1.y;
letterArray.push(_local4);
gameHolder.addChild(_local4);
}
public function cutsceneDone(){
addEventListener(Event.ENTER_FRAME, runFinished);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, kUp);
}
public function resume():void{
var _local1:int;
addEventListener(Event.ENTER_FRAME, run);
_local1 = 0;
while (_local1 < enemyArray.length) {
enemyArray[_local1].play();
_local1++;
};
blurScreen(0, gameHolder);
this.scaleX = (this.scaleY = 1);
running = true;
}
private function updateLevel():void{
if (mission.special != "survival"){
if (gameLevel.ready){
addEnemyWave(gameLevel.currentWave);
gameLevel.nextWave();
};
} else {
count++;
if (count > speed){
numWaves++;
addEnemyWave(getRandomEnemy((diff * enList.length)));
diff = (diff + 0.01);
speed = (speed - 1);
count = 0;
if (((((numWaves % 10) == 0)) && ((random.getRandom() < 0.5)))){
addEnemyWave("none");
addEnemyWave("crate");
addEnemyWave("none");
};
if (((((numWaves % (16 + (gunLevel * 2))) == 0)) && ((gunLevel < 9)))){
addEnemyWave("none");
addEnemyWave("guncrate");
addEnemyWave("none");
addEnemyWave("none");
addEnemyWave("none");
addEnemyWave("none");
addEnemyWave("none");
};
};
};
}
private function onAdded(_arg1:Event){
stage.quality = "low";
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
addEventListener(Event.ENTER_FRAME, runStart);
_parent.scoreDisplay.displayScore((score + _parent.score));
}
private function kUp(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case "A".charCodeAt():
case Keyboard.LEFT:
dx = 0;
break;
case "D".charCodeAt():
case Keyboard.RIGHT:
dx = 0;
break;
case "W".charCodeAt():
case Keyboard.UP:
dy = 0;
break;
case "S".charCodeAt():
case Keyboard.DOWN:
dy = 0;
break;
case Keyboard.SPACE:
shooting = false;
break;
};
}
public function addPickup(_arg1, _arg2:String):void{
var _local3:Pickup;
_local3 = new Pickup(_arg1.x, _arg1.y, _arg2);
pickupArray.push(_local3);
gameHolder.addChildAt(_local3, 3);
}
private function runStart(_arg1:Event):void{
scrollBackground();
p.impulse(1, 0);
p.update(false);
if (p.x > 100){
addEventListener(Event.ENTER_FRAME, run);
stage.addEventListener(KeyboardEvent.KEY_DOWN, kDown);
stage.addEventListener(KeyboardEvent.KEY_UP, kUp);
removeEventListener(Event.ENTER_FRAME, runStart);
};
}
private function run(_arg1:Event):void{
scrollBackground();
updateAll();
updatePlayer();
updateLevel();
running = true;
blurAmount = (blurAmount * 0.95);
blurScreen(blurAmount, gameHolder);
}
public function spawnEnemy(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:String="coin"):void{
var _local5:Enemy;
_local5 = new Enemy(_arg1, _arg2, _arg3, this, _arg4);
gameHolder.addChildAt(_local5, 3);
enemyArray.push(_local5);
}
private function addEnemyWave(_arg1:String):void{
var _local2:int;
var _local3:int;
var _local4:Array;
if (_arg1 == "buzzard_top"){
_local3 = Math.floor(((Math.random() * 5) + 10));
_local2 = 0;
while (_local2 < _local3) {
if (Math.random() < 0.5){
addEnemy("buzzard", (_local2 * 25), -100);
} else {
addEnemy("buzzard", (_local2 * 25), -100, "none");
};
_local2++;
};
};
if (_arg1 == "buzzard_bottom"){
_local3 = Math.floor(((Math.random() * 5) + 10));
_local2 = 0;
while (_local2 < _local3) {
if (Math.random() < 0.5){
addEnemy("buzzard", (_local2 * 25), 100);
} else {
addEnemy("buzzard", (_local2 * 25), 100, "none");
};
_local2++;
};
};
if (_arg1 == "buzzard_doubleshot"){
addEnemyWave("buzzard_bottom");
addEnemyWave("buzzard_top");
};
if (_arg1 == "buzzard_both"){
_local3 = 7;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("buzzard", (_local2 * 25), -75);
addEnemy("buzzard", (_local2 * 25), 75);
_local2++;
};
};
if (_arg1 == "buzzard_line"){
_local3 = 10;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("buzzard", (Math.random() * 15), (100 - (_local2 * 20)));
_local2++;
};
};
if (_arg1 == "buzzard_vee"){
_local3 = 10;
_local2 = 0;
while (_local2 < (_local3 / 2)) {
addEnemy("buzzard", (200 - (_local2 * 25)), ((_local2 * 25) - 75));
_local2++;
};
_local2 = 0;
while (_local2 < (_local3 / 2)) {
addEnemy("buzzard", (200 - (_local2 * 25)), ((_local2 * -25) + 75));
_local2++;
};
};
if (_arg1 == "squid"){
_local3 = 6;
_local2 = 0;
while (_local2 < _local3) {
if ((_local2 % 2) == 0){
addEnemy("squid", (_local2 * 50), -100, "coinBig");
} else {
addEnemy("squid", (_local2 * 50), 100, "coinBig");
};
_local2++;
};
};
if (_arg1 == "squid_center"){
_local3 = 3;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("squid", (_local2 * 75), 0, "coinBig");
_local2++;
};
};
if (_arg1 == "squid_both"){
_local3 = 2;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("squid", (_local2 * 125), 100, "coinBig");
addEnemy("squid", (_local2 * 125), -100, "coinBig");
_local2++;
};
};
if (_arg1 == "squid_cannon"){
addEnemy("squid", 50, -50, "coinBig");
addEnemy("squid", 0, 0, "gem");
addEnemy("squid", 50, 50, "coinBig");
addEnemy("cannon", 100, -100, "coinBig");
addEnemy("cannon", 100, 100, "coinBig");
};
if (_arg1 == "cannon"){
addEnemy("cannon", 0, 0, "coinBig");
addEnemy("cannon", 50, -100, "coinBig");
addEnemy("cannon", 50, 100, "coinBig");
};
if (_arg1 == "cannon_center"){
addEnemy("cannon", 0, 0, "coinBig");
};
if (_arg1 == "cannon_long"){
addEnemy("cannon", 0, -50, "coinBig");
addEnemy("cannon", 0, 50, "coinBig");
addEnemy("cannon", 200, -100, "coinBig");
addEnemy("cannon", 200, 100, "coinBig");
};
if (_arg1 == "lazer"){
addEnemy("lazer", 0, 0, "coinBig");
};
if (_arg1 == "lazer_vee"){
addEnemy("lazer", 75, -50, "coinBig");
addEnemy("lazer", 0, 0, "coinBig");
addEnemy("lazer", 75, 50, "coinBig");
};
if (_arg1 == "ranged_attack"){
addEnemy("lazer", 75, -50, "coinBig");
addEnemy("lazer", 0, 0, "coinBig");
addEnemy("lazer", 75, 50, "coinBig");
addEnemy("cannon", 50, -100, "coinBig");
addEnemy("cannon", 50, 100, "coinBig");
};
if (_arg1 == "close_attack"){
_local3 = 3;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("squid", (_local2 * 75), 0, "coinBig");
_local2++;
};
_local3 = 7;
_local2 = 0;
while (_local2 < _local3) {
if (Math.random() < 0.5){
addEnemy("buzzard", (_local2 * 50), -75);
} else {
addEnemy("buzzard", (_local2 * 50), -75, "none");
};
if (Math.random() < 0.5){
addEnemy("buzzard", (_local2 * 50), 75);
} else {
addEnemy("buzzard", (_local2 * 50), 75, "none");
};
_local2++;
};
};
if (_arg1 == "mine_both"){
_local3 = 8;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("mine", (_local2 * 50), (((_local2 % 2) * 200) - 100), "none");
_local2++;
};
};
if (_arg1 == "mine_hatch"){
_local3 = 5;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("mine", ((_local2 % 2) * 100), (100 - (_local2 * 50)), "none");
_local2++;
};
};
if (_arg1 == "mine"){
_local3 = 8;
_local2 = 0;
while (_local2 < _local3) {
addEnemy("mine", (_local2 * 75), 0, "none");
_local2++;
};
};
if (_arg1 == "spawn"){
addEnemy("spawn", 100, 0, "gem");
};
if (_arg1 == "spawn_double"){
addEnemy("spawn", 100, -75, "gem");
addEnemy("spawn", 100, 75, "gem");
};
if (_arg1 == "prefectSpike"){
addEnemy("prefectSpike", 100, 0, "gemSmall");
};
if (_arg1 == "prefectSpike_double"){
addEnemy("prefectSpike", 100, 50, "gemBig");
addEnemy("prefectSpike", 100, -50, "gemBig");
};
if (_arg1 == "prefectGun"){
addEnemy("prefectGun", 100, -100, "gemBig");
addEnemy("prefectGun", 100, 100, "gemBig");
};
if (_arg1 == "prefectGun_single"){
addEnemy("prefectGun", 100, 0, "gemBig");
};
if (_arg1 == "prefectBigGun"){
addEnemy("prefectBigGun", 100, 0, "rubyBig");
};
if (_arg1 == "prefectKillSquad"){
addEnemy("prefectBigGun", 100, 0, "rubyBig");
addEnemy("prefectGun", 250, -100, "gemBig");
addEnemy("prefectGun", 250, 100, "gemBig");
};
if (_arg1 == "none"){
};
if (_arg1 == "finished"){
house = new HouseImg();
gameHolder.addChildAt(house, 3);
house.x = 600;
};
if (_arg1 == "crate"){
addEnemy("crate", 200, 0, "hp");
};
if (_arg1 == "guncrate"){
addEnemy("guncrate", 200, 0, "gunupgrade");
};
if (_arg1 == "sherrif"){
sherrif = new Sherrif(150, 50, this);
gameHolder.addChildAt(sherrif, 3);
};
if (_arg1 == "boss_mine_1"){
_local4 = new Array();
_local4.push(new Gun("littleRocket", 10, 45, 1, 2));
_local4.push(new Gun("littleRocket", 10, -45, 1, 2));
_local4.push(new Gun("littleRocket", 10, 30, 1, 2));
_local4.push(new Gun("littleRocket", 10, -30, 1, 2));
_local4.push(new Gun("littleRocket", 10, -15, 1, 2));
_local4.push(new Gun("littleRocket", 10, 15, 1, 2));
_local4.push(new Gun("littleRocket", 10, 0, 1, 2));
boss = new Boss(70, new MineBossImg(), new MineBossGunImg(), _local4, 60, 80, 50, 250);
gameHolder.addChildAt(boss, 3);
};
if (_arg1 == "boss_mine_2"){
_local4 = new Array();
_local4.push(new Gun("lazer", 5, 0, 5, 5));
_local4.push(new Gun("lazer", 5, 25, 5, 5));
_local4.push(new Gun("lazer", 5, -25, 5, 5));
_local4.push(new Gun("lazer", 5, 45, 5, 5));
_local4.push(new Gun("lazer", 5, -45, 5, 5));
boss = new Boss(70, new MineBossImg(), new MineBossGunImg(), _local4, 60, 80, 30, 250);
gameHolder.addChildAt(boss, 3);
};
if (_arg1 == "boss_mine_3"){
_local4 = new Array();
_local4.push(new Gun("mgun", 10, 0, 0.5, 4));
_local4.push(new Gun("mgun", 10, 10, 0.5, 4));
_local4.push(new Gun("mgun", 10, -10, 0.5, 4));
_local4.push(new Gun("mgun", 10, 35, 0.5, 4));
_local4.push(new Gun("mgun", 10, -35, 0.5, 4));
_local4.push(new Gun("mgun", 10, 45, 0.5, 4));
_local4.push(new Gun("mgun", 10, -45, 0.5, 4));
boss = new Boss(70, new MineBossImg(), new MineBossGunImg(), _local4, 60, 80, 100, 250);
gameHolder.addChildAt(boss, 3);
};
if (_arg1 == "boss_gor"){
_local4 = new Array();
_local4.push(new Gun("mgun", 5, 0, 0.5, 3));
_local4.push(new Gun("mgun", 5, 15, 0.5, 3));
_local4.push(new Gun("mgun", 5, -15, 0.5, 3));
boss = new Boss(0, new GorBossImg(), new GorBossGunImg(), _local4, -3, 80, 80, 250, "boss_gor");
gameHolder.addChildAt(boss, 3);
};
if (_arg1 == "boss_prefect"){
_local4 = new Array();
_local4.push(new Gun("mgun", 10, -45, 1, 3));
_local4.push(new Gun("mgun", 10, -30, 1, 3));
_local4.push(new Gun("mgun", 10, -15, 1, 3));
_local4.push(new Gun("mgun", 10, 0, 1, 3));
_local4.push(new Gun("mgun", 10, 15, 1, 3));
_local4.push(new Gun("mgun", 10, 30, 1, 3));
_local4.push(new Gun("mgun", 10, 45, 1, 3));
boss = new Boss(0, new PrefectBossImg(), new PrefectBossGunImg(), _local4, -3, 95, 50, 250, "boss_prefect");
gameHolder.addChildAt(boss, 3);
};
}
private function updateSherrif():void{
var _local1:Boolean;
var _local2:int;
var _local3:Gun;
var _local4:Sound_GunRocket;
sherrif.update();
_local1 = false;
sherrif.shootDelayCurr++;
if (sherrif.shootDelayCurr > sherrif.shootDelay){
_local2 = 0;
while (_local2 < sherrif.gunArray.length) {
_local3 = sherrif.gunArray[_local2];
if (_local3.ready){
addBullet(sherrif, _local3.angle, 10, _local3.type, _local3.damage, _local3.velo);
_local1 = true;
};
_local2++;
};
if (sherrif.shootDelayCurr > (sherrif.shootDelay * 2)){
sherrif.shootDelayCurr = 0;
sherrif.shootDelay++;
};
};
if (((_local1) && (playSound))){
_local4 = new Sound_GunRocket();
soundPlayer = _local4.play();
};
}
private function updatePlayer():void{
var _local1:int;
var _local2:Number;
var _local3:Number;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Gun;
var _local8:Sound_GunMg;
var _local9:Sound_GunEnergy;
var _local10:Sound_GunRocket;
if (p.alive){
p.impulse(dx, dy);
if (shooting){
_local4 = false;
_local5 = false;
_local6 = false;
_local1 = 0;
while (_local1 < p.gunArray.length) {
if (p.gunArray[_local1] != null){
_local7 = p.gunArray[_local1];
if (_local7.ready){
addBullet(p, (p.gun.rotation + _local7.angle), p.gunOffSet, _local7.type, _local7.damage, _local7.velo);
bulletsFired++;
if (_local7.type == "mgun"){
_local4 = true;
} else {
if ((((((((_local7.type == "plasma")) || ((_local7.type == "lazer")))) || ((_local7.type == "splice")))) || ((_local7.type == "spinningBlade")))){
_local6 = true;
} else {
if ((((((_local7.type == "littleRocket")) || ((_local7.type == "medRocket")))) || ((_local7.type == "bigRocket")))){
_local5 = true;
};
};
};
};
};
_local1++;
};
if (playSound){
if (_local4){
_local8 = new Sound_GunMg();
soundPlayer = _local8.play();
};
if (_local6){
_local9 = new Sound_GunEnergy();
soundPlayer = _local9.play();
};
if (_local5){
_local10 = new Sound_GunRocket();
soundPlayer = _local10.play();
};
};
} else {
_local1 = 0;
while (_local1 < p.gunArray.length) {
if (p.gunArray[_local1] != null){
p.gunArray[_local1].recharge();
};
_local1++;
};
p.setAim(dx, dy);
};
p.update();
} else {
p.updateDead();
_local2 = ((Math.random() * 2) - 1);
_local3 = (-(Math.random()) * 3);
addLetter(p, _local2, _local3);
if (p.y > 400){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, kDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, kUp);
removeEventListener(Event.ENTER_FRAME, run);
finishGame();
};
};
if (house != null){
updateHouse();
};
if (boss != null){
updateBoss();
};
if (sherrif != null){
updateSherrif();
};
}
private function addBullet(_arg1, _arg2:Number, _arg3:Number, _arg4:String, _arg5:Number, _arg6:Number):void{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Bullet;
_local7 = Math.sin(((_arg2 + 90) * (Math.PI / 180)));
_local8 = (Math.cos(((_arg2 + 90) * (Math.PI / 180))) * -1);
_local9 = (_local7 * _arg3);
_local10 = (_local8 * _arg3);
_local11 = new Bullet(_local7, _local8, (_arg1.x + _local9), (_arg1.y + _local10), _arg4, _arg5, _arg6);
_local11.rotation = _arg2;
bulletArray.push(_local11);
gameHolder.addChild(_local11);
}
public function addExplode(_arg1:Number, _arg2:Number){
addChild(new Explosion(_arg1, _arg2));
}
private function finishGame(){
if (mission.special == "survival"){
_parent.displaySurvivalStats(score, numKills, bulletsFired, Math.round(((bulletsHit / bulletsFired) * 100)), numWaves);
};
_parent.buildMissionScreen();
addEventListener(Event.ENTER_FRAME, fadeOutAll);
if ((((mission.special == "boss_prefect")) && (won))){
_parent.displayFinalCuts();
};
}
private function fadeOutAll(_arg1:Event){
this.alpha = (this.alpha - 0.05);
if (this.alpha < 0){
removeEventListener(Event.ENTER_FRAME, fadeOutAll);
parent.removeChild(this);
};
}
public function playSoundEnemyDie():void{
var _local1:Sound_EnemyDie;
if (playSound){
_local1 = new Sound_EnemyDie();
_local1.play();
};
numKills++;
}
private function givePlayerNewGuns():void{
var _local1:Array;
_local1 = new Array();
_local1.push(new Array(new Gun("mgun", 3, 0, 0.5, 5)));
_local1.push(new Array(new Gun("mgun", 3, -2, 0.5, 5), new Gun("mgun", 3, 2, 0.5, 5)));
_local1.push(new Array(new Gun("mgun", 3, -4, 0.5, 5), new Gun("plasma", 10, 0, 2, 3), new Gun("mgun", 3, 4, 0.5, 5)));
_local1.push(new Array(new Gun("plasma", 10, -4, 2, 3), new Gun("lazer", 12, 0, 3, 10), new Gun("plasma", 10, 4, 2, 3)));
_local1.push(new Array(new Gun("plasma", 10, -6, 2, 3), new Gun("lazer", 12, -2, 3, 10), new Gun("lazer", 12, 2, 3, 10), new Gun("plasma", 10, 6, 2, 3)));
_local1.push(new Array(new Gun("lazer", 12, -6, 3, 10), new Gun("splice", 6, -2, 1, 4), new Gun("splice", 6, 2, 1, 4), new Gun("lazer", 12, 6, 3, 10)));
_local1.push(new Array(new Gun("lazer", 12, -8, 3, 10), new Gun("splice", 6, -4, 1, 4), new Gun("spinningBlade", 8, 0, 2.5, 6), new Gun("splice", 6, 4, 1, 4), new Gun("lazer", 12, 8, 3, 10)));
_local1.push(new Array(new Gun("splice", 6, -8, 1, 4), new Gun("spinningBlade", 8, -4, 2.5, 6), new Gun("littleRocket", 5, 0, 0.7, 4), new Gun("spinningBlade", 8, 4, 2.5, 6), new Gun("splice", 6, 8, 1, 4)));
_local1.push(new Array(new Gun("splice", 6, -10, 1, 4), new Gun("spinningBlade", 8, -6, 2.5, 6), new Gun("littleRocket", 5, -2, 0.7, 4), new Gun("littleRocket", 5, 2, 0.7, 4), new Gun("spinningBlade", 8, 6, 2.5, 6), new Gun("splice", 6, 10, 1, 4)));
_local1.push(new Array(new Gun("splice", 6, -12, 1, 4), new Gun("spinningBlade", 8, -8, 2.5, 6), new Gun("littleRocket", 5, -4, 0.7, 4), new Gun("medRocket", 16, 0, 4, 4), new Gun("littleRocket", 5, 4, 0.7, 4), new Gun("spinningBlade", 8, 8, 2.5, 6), new Gun("splice", 6, 12, 1, 4)));
if (gunLevel >= _local1.length){
gunLevel = (_local1.length - 1);
};
p.gunArray = _local1[gunLevel];
}
public function addEnemyBullet(_arg1, _arg2:Number, _arg3:String, _arg4:Number, _arg5:Number):void{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Bullet;
_local6 = Math.sin(((_arg2 + 90) * (Math.PI / 180)));
_local7 = (Math.cos(((_arg2 + 90) * (Math.PI / 180))) * -1);
_local8 = (_local6 * 15);
_local9 = (_local7 * 15);
_local10 = new Bullet(_local6, _local7, (_arg1.x + _local8), (_arg1.y + _local9), _arg3, _arg4, _arg5);
_local10.rotation = _arg2;
enemyBulletArray.push(_local10);
gameHolder.addChild(_local10);
}
private function getRandomEnemy(_arg1:Number):String{
var _local2:Number;
_local2 = Math.floor(random.getGaussian(_arg1, enList.length, 10));
if (_local2 < 0){
_local2 = 0;
};
if (_local2 > (enList.length - 1)){
_local2 = (enList.length - 1);
};
return (enList[_local2]);
}
public function playSoundHit():void{
var _local1:Sound_HitEnemy;
if (playSound){
_local1 = new Sound_HitEnemy();
_local1.play();
};
bulletsHit++;
}
private function addEnemy(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:String="coin"):void{
var _local5:Enemy;
_local5 = new Enemy(_arg1, ((stageWidth + 50) + _arg2), ((stageHeight / 2) + _arg3), this, _arg4);
gameHolder.addChildAt(_local5, 3);
enemyArray.push(_local5);
}
private function onRemoved(_arg1:Event){
}
private function kDown(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case "A".charCodeAt():
case Keyboard.LEFT:
dx = -1;
break;
case "D".charCodeAt():
case Keyboard.RIGHT:
dx = 1;
break;
case "W".charCodeAt():
case Keyboard.UP:
dy = -1;
break;
case "S".charCodeAt():
case Keyboard.DOWN:
dy = 1;
break;
case Keyboard.SPACE:
shooting = true;
break;
case "P".charCodeAt():
if (running){
pause();
} else {
resume();
};
break;
};
}
private function blurScreen(_arg1:Number, _arg2:Object){
var _local3:BlurFilter;
if (_arg1 > 0.5){
_local3 = new BlurFilter(_arg1, _arg1, 1);
_arg2.filters = new Array(_local3);
} else {
_arg2.filters = new Array();
};
}
private function updateAfterBossDeath(_arg1:Event):void{
var _local2:Sound_PlayerDie;
boss.update();
boss.vy = (boss.vy + 0.05);
boss.shootDelayCurr++;
if (boss.shootDelayCurr > 20){
addExplode((boss.x + (Math.random() * boss.width)), (boss.y + (Math.random() * boss.height)));
boss.shootDelayCurr = 0;
if (playSound){
_local2 = new Sound_PlayerDie();
soundPlayer = _local2.play();
};
};
p.impulse(1, 0);
p.update(false);
updateAll();
if (p.x > 650){
score = (score + mission.reward);
_parent.gameLevelDone(score, mission);
finishGame();
removeEventListener(Event.ENTER_FRAME, updateAfterBossDeath);
};
}
private function makeBackground():void{
var _local1:int;
var _local2:Matrix;
var _local3:BackgroundImg;
var _local4:Bitmap;
var _local5:BitmapData;
var _local6:int;
var _local7:int;
_local1 = 3;
_local2 = new Matrix();
_local3 = new BackgroundImg();
_local6 = 0;
_local7 = 0;
while (_local7 < _local1) {
_local5 = new BitmapData(2000, 300, true, 0);
_local3.gotoAndStop((_local7 + 1));
_local2.tx = 0;
_local2.ty = 0;
_local5.draw(_local3, _local2);
_local2.tx = 1000;
_local2.ty = 0;
_local5.draw(_local3, _local2);
bgArray.push(_local5);
if (gameLevel != null){
_local6 = (gameLevel.totalWaves * 75);
} else {
_local6 = Math.floor((Math.random() * 100));
};
scrArray.push(_local6);
_local4 = new Bitmap();
bitArray.push(_local4);
gameHolder.addChild(_local4);
_local7++;
};
}
private function updateBoss():void{
var _local1:Boolean;
var _local2:int;
var _local3:Gun;
var _local4:Bullet;
var _local5:Sound_HitEnemy;
var _local6:Sound_GunMg;
if (p.x > boss.x){
p.x = boss.x;
p.impulse(-3, 0);
p.giveDamage(0.05);
};
if (boss.alive){
boss.update();
_local1 = false;
boss.shootDelayCurr++;
if (boss.shootDelayCurr > boss.shootDelay){
_local2 = 0;
while (_local2 < boss.gunArray.length) {
_local3 = boss.gunArray[_local2];
if (_local3.ready){
addEnemyBullet(boss.gunOffset, (180 + _local3.angle), _local3.type, _local3.damage, _local3.velo);
_local1 = true;
};
_local2++;
};
if (boss.shootDelayCurr > (boss.shootDelay * 2)){
boss.shootDelayCurr = 0;
};
} else {
if (boss.type == "boss_gor"){
if (boss.gunOffY == 80){
boss.gunOffY = 220;
} else {
boss.gunOffY = 80;
};
boss.shootDelayCurr = boss.shootDelay;
};
if (boss.type == "boss_prefect"){
if (boss.gunOffY == 95){
boss.gunOffY = 167;
} else {
if (boss.gunOffY == 167){
boss.gunOffY = 185;
} else {
boss.gunOffY = 95;
};
};
boss.shootDelayCurr = boss.shootDelay;
};
};
_local2 = 0;
while (_local2 < bulletArray.length) {
_local4 = bulletArray[_local2];
if (_local4.hitTestObject(boss.gun)){
boss.giveDamage(_local4.damage);
bulletArray.splice(_local2, 1);
gameHolder.removeChild(_local4);
if (playSound){
_local5 = new Sound_HitEnemy();
_local5.play();
};
};
_local2++;
};
if (((_local1) && (playSound))){
_local6 = new Sound_GunMg();
soundPlayer = _local6.play();
};
} else {
won = true;
removeEventListener(Event.ENTER_FRAME, run);
addEventListener(Event.ENTER_FRAME, updateAfterBossDeath);
};
}
private function updateHouse():void{
var _local1:Sound_PlayerWin;
house.x = (house.x - 0.4);
if (Math.abs((p.x - house.x)) < 10){
removeEventListener(Event.ENTER_FRAME, run);
if (cutscene != null){
addChild(cutscene);
} else {
cutsceneDone();
};
if (playSound){
_local1 = new Sound_PlayerWin();
_local1.play();
};
};
}
private function scrollBackground():void{
var _local1:int;
var _local2:int;
var _local3:Number;
_local1 = 3;
_local2 = 0;
while (_local2 < _local1) {
_local3 = ((_local2 / _local1) / 3);
scrArray[_local2] = (scrArray[_local2] + _local3);
if (scrArray[_local2] > 1000){
scrArray[_local2] = 0;
};
bitArray[_local2].bitmapData = new BitmapData(stageWidth, stageHeight, true, 0);
bitArray[_local2].bitmapData.copyPixels(bgArray[_local2], new Rectangle(scrArray[_local2], 0, stageWidth, stageHeight), new Point(0, 0));
_local2++;
};
}
public function playSoundPlayerDie():void{
var _local1:Sound_PlayerDie;
if (playSound){
_local1 = new Sound_PlayerDie();
_local1.play();
};
}
public function pause():void{
var _local1:int;
removeEventListener(Event.ENTER_FRAME, run);
_local1 = 0;
while (_local1 < enemyArray.length) {
enemyArray[_local1].stop();
_local1++;
};
blurScreen(6, gameHolder);
running = false;
}
}
}//package
Section 100
//ShopMusic (ShopMusic)
package {
import flash.media.*;
public dynamic class ShopMusic extends Sound {
}
}//package
Section 101
//Sound_ButtonOver (Sound_ButtonOver)
package {
import flash.media.*;
public dynamic class Sound_ButtonOver extends Sound {
}
}//package
Section 102
//Sound_ButtonPress (Sound_ButtonPress)
package {
import flash.media.*;
public dynamic class Sound_ButtonPress extends Sound {
}
}//package
Section 103
//Sound_EnemyDie (Sound_EnemyDie)
package {
import flash.media.*;
public dynamic class Sound_EnemyDie extends Sound {
}
}//package
Section 104
//Sound_GetCoin (Sound_GetCoin)
package {
import flash.media.*;
public dynamic class Sound_GetCoin extends Sound {
}
}//package
Section 105
//Sound_GetHP (Sound_GetHP)
package {
import flash.media.*;
public dynamic class Sound_GetHP extends Sound {
}
}//package
Section 106
//Sound_GunEnergy (Sound_GunEnergy)
package {
import flash.media.*;
public dynamic class Sound_GunEnergy extends Sound {
}
}//package
Section 107
//Sound_GunMg (Sound_GunMg)
package {
import flash.media.*;
public dynamic class Sound_GunMg extends Sound {
}
}//package
Section 108
//Sound_GunRocket (Sound_GunRocket)
package {
import flash.media.*;
public dynamic class Sound_GunRocket extends Sound {
}
}//package
Section 109
//Sound_HitEnemy (Sound_HitEnemy)
package {
import flash.media.*;
public dynamic class Sound_HitEnemy extends Sound {
}
}//package
Section 110
//Sound_HitPlayer (Sound_HitPlayer)
package {
import flash.media.*;
public dynamic class Sound_HitPlayer extends Sound {
}
}//package
Section 111
//Sound_LetterSwip (Sound_LetterSwip)
package {
import flash.media.*;
public dynamic class Sound_LetterSwip extends Sound {
}
}//package
Section 112
//Sound_PlayerDie (Sound_PlayerDie)
package {
import flash.media.*;
public dynamic class Sound_PlayerDie extends Sound {
}
}//package
Section 113
//Sound_PlayerLose (Sound_PlayerLose)
package {
import flash.media.*;
public dynamic class Sound_PlayerLose extends Sound {
}
}//package
Section 114
//Sound_PlayerWin (Sound_PlayerWin)
package {
import flash.media.*;
public dynamic class Sound_PlayerWin extends Sound {
}
}//package
Section 115
//SoundIcon (SoundIcon)
package {
import flash.display.*;
public dynamic class SoundIcon extends MovieClip {
public function SoundIcon(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 116
//StampImgs (StampImgs)
package {
import flash.display.*;
public dynamic class StampImgs extends MovieClip {
public function StampImgs(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 117
//SubmitButton (SubmitButton)
package {
import flash.display.*;
public dynamic class SubmitButton extends MovieClip {
}
}//package
Section 118
//SurvivalModeButton (SurvivalModeButton)
package {
import flash.display.*;
public dynamic class SurvivalModeButton extends MovieClip {
}
}//package
Section 119
//TitleImg (TitleImg)
package {
import flash.display.*;
public dynamic class TitleImg extends MovieClip {
}
}//package
Section 120
//UpgradeButton (UpgradeButton)
package {
import flash.display.*;
public dynamic class UpgradeButton extends MovieClip {
}
}//package
Section 121
//WoodBg (WoodBg)
package {
import flash.display.*;
public dynamic class WoodBg extends MovieClip {
}
}//package